@openclaw/nostr 2026.7.2-beta.3 → 2026.7.2-beta.5
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-DNeI-LB-.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-BJCFpe02.js} +12 -26
- 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/openclaw.plugin.json +0 -5
- package/package.json +41 -16
- package/npm-shrinkwrap.json +0 -137
|
@@ -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/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.5",
|
|
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.5"
|
|
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.5"
|
|
54
80
|
},
|
|
55
81
|
"build": {
|
|
56
|
-
"openclawVersion": "2026.7.2-beta.
|
|
82
|
+
"openclawVersion": "2026.7.2-beta.5"
|
|
57
83
|
},
|
|
58
84
|
"release": {
|
|
59
85
|
"publishToClawHub": true,
|
|
@@ -67,7 +93,6 @@
|
|
|
67
93
|
"files": [
|
|
68
94
|
"dist/**",
|
|
69
95
|
"openclaw.plugin.json",
|
|
70
|
-
"npm-shrinkwrap.json",
|
|
71
96
|
"README.md"
|
|
72
97
|
],
|
|
73
98
|
"bundledDependencies": [
|
package/npm-shrinkwrap.json
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.7.2-beta.3",
|
|
4
|
-
"lockfileVersion": 3,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "@openclaw/nostr",
|
|
9
|
-
"version": "2026.7.2-beta.3",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"nostr-tools": "2.23.9",
|
|
12
|
-
"zod": "4.4.3"
|
|
13
|
-
},
|
|
14
|
-
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.2-beta.3"
|
|
16
|
-
},
|
|
17
|
-
"peerDependenciesMeta": {
|
|
18
|
-
"openclaw": {
|
|
19
|
-
"optional": true
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"node_modules/@noble/ciphers": {
|
|
24
|
-
"version": "2.1.1",
|
|
25
|
-
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.1.1.tgz",
|
|
26
|
-
"integrity": "sha512-bysYuiVfhxNJuldNXlFEitTVdNnYUc+XNJZd7Qm2a5j1vZHgY+fazadNFWFaMK/2vye0JVlxV3gHmC0WDfAOQw==",
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">= 20.19.0"
|
|
30
|
-
},
|
|
31
|
-
"funding": {
|
|
32
|
-
"url": "https://paulmillr.com/funding/"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"node_modules/@noble/curves": {
|
|
36
|
-
"version": "2.0.1",
|
|
37
|
-
"resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.0.1.tgz",
|
|
38
|
-
"integrity": "sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw==",
|
|
39
|
-
"license": "MIT",
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"@noble/hashes": "2.0.1"
|
|
42
|
-
},
|
|
43
|
-
"engines": {
|
|
44
|
-
"node": ">= 20.19.0"
|
|
45
|
-
},
|
|
46
|
-
"funding": {
|
|
47
|
-
"url": "https://paulmillr.com/funding/"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"node_modules/@noble/hashes": {
|
|
51
|
-
"version": "2.0.1",
|
|
52
|
-
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz",
|
|
53
|
-
"integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==",
|
|
54
|
-
"license": "MIT",
|
|
55
|
-
"engines": {
|
|
56
|
-
"node": ">= 20.19.0"
|
|
57
|
-
},
|
|
58
|
-
"funding": {
|
|
59
|
-
"url": "https://paulmillr.com/funding/"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"node_modules/@scure/base": {
|
|
63
|
-
"version": "2.0.0",
|
|
64
|
-
"resolved": "https://registry.npmjs.org/@scure/base/-/base-2.0.0.tgz",
|
|
65
|
-
"integrity": "sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==",
|
|
66
|
-
"license": "MIT",
|
|
67
|
-
"funding": {
|
|
68
|
-
"url": "https://paulmillr.com/funding/"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"node_modules/@scure/bip32": {
|
|
72
|
-
"version": "2.0.1",
|
|
73
|
-
"resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-2.0.1.tgz",
|
|
74
|
-
"integrity": "sha512-4Md1NI5BzoVP+bhyJaY3K6yMesEFzNS1sE/cP+9nuvE7p/b0kx9XbpDHHFl8dHtufcbdHRUUQdRqLIPHN/s7yA==",
|
|
75
|
-
"license": "MIT",
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"@noble/curves": "2.0.1",
|
|
78
|
-
"@noble/hashes": "2.0.1",
|
|
79
|
-
"@scure/base": "2.0.0"
|
|
80
|
-
},
|
|
81
|
-
"funding": {
|
|
82
|
-
"url": "https://paulmillr.com/funding/"
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"node_modules/@scure/bip39": {
|
|
86
|
-
"version": "2.0.1",
|
|
87
|
-
"resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-2.0.1.tgz",
|
|
88
|
-
"integrity": "sha512-PsxdFj/d2AcJcZDX1FXN3dDgitDDTmwf78rKZq1a6c1P1Nan1X/Sxc7667zU3U+AN60g7SxxP0YCVw2H/hBycg==",
|
|
89
|
-
"license": "MIT",
|
|
90
|
-
"dependencies": {
|
|
91
|
-
"@noble/hashes": "2.0.1",
|
|
92
|
-
"@scure/base": "2.0.0"
|
|
93
|
-
},
|
|
94
|
-
"funding": {
|
|
95
|
-
"url": "https://paulmillr.com/funding/"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"node_modules/nostr-tools": {
|
|
99
|
-
"version": "2.23.9",
|
|
100
|
-
"resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.23.9.tgz",
|
|
101
|
-
"integrity": "sha512-PBN3TpGh+EszlTZWpQdvcqEMqhcKcY1vTw0Xkkccg+TyP7y/icu9/iXJw72aFZ/ETm35ehU0hneGTXLaTSkImw==",
|
|
102
|
-
"license": "Unlicense",
|
|
103
|
-
"dependencies": {
|
|
104
|
-
"@noble/ciphers": "2.1.1",
|
|
105
|
-
"@noble/curves": "2.0.1",
|
|
106
|
-
"@noble/hashes": "2.0.1",
|
|
107
|
-
"@scure/base": "2.0.0",
|
|
108
|
-
"@scure/bip32": "2.0.1",
|
|
109
|
-
"@scure/bip39": "2.0.1",
|
|
110
|
-
"nostr-wasm": "0.1.0"
|
|
111
|
-
},
|
|
112
|
-
"peerDependencies": {
|
|
113
|
-
"typescript": ">=5.0.0"
|
|
114
|
-
},
|
|
115
|
-
"peerDependenciesMeta": {
|
|
116
|
-
"typescript": {
|
|
117
|
-
"optional": true
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"node_modules/nostr-wasm": {
|
|
122
|
-
"version": "0.1.0",
|
|
123
|
-
"resolved": "https://registry.npmjs.org/nostr-wasm/-/nostr-wasm-0.1.0.tgz",
|
|
124
|
-
"integrity": "sha512-78BTryCLcLYv96ONU8Ws3Q1JzjlAt+43pWQhIl86xZmWeegYCNLPml7yQ+gG3vR6V5h4XGj+TxO+SS5dsThQIA==",
|
|
125
|
-
"license": "MIT"
|
|
126
|
-
},
|
|
127
|
-
"node_modules/zod": {
|
|
128
|
-
"version": "4.4.3",
|
|
129
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
|
|
130
|
-
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
|
|
131
|
-
"license": "MIT",
|
|
132
|
-
"funding": {
|
|
133
|
-
"url": "https://github.com/sponsors/colinhacks"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|