@openclaw/nostr 2026.5.31-beta.3 → 2026.5.31-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 +2 -2
- package/dist/{channel-B7ZqjP8z.js → channel-Dz31pjch.js} +7 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-CVEYWXAG.js → setup-surface-BqBa2C0K.js} +2 -2
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as resolveNostrAccount } from "./setup-surface-
|
|
1
|
+
import { o as resolveNostrAccount } from "./setup-surface-BqBa2C0K.js";
|
|
2
2
|
import { getPluginRuntimeGatewayRequestScope } from "./runtime-api.js";
|
|
3
3
|
import { n as NostrProfileSchema } from "./config-schema-DIiXiBKr.js";
|
|
4
|
-
import { a as setNostrRuntime, i as getNostrRuntime, n as nostrPlugin, o as contentToProfile, r as publishNostrProfile, t as getNostrProfileState } from "./channel-
|
|
4
|
+
import { a as setNostrRuntime, i as getNostrRuntime, n as nostrPlugin, o as contentToProfile, r as publishNostrProfile, t as getNostrProfileState } from "./channel-Dz31pjch.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { SimplePool, verifyEvent } from "nostr-tools";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveDefaultNostrAccountId, c as validatePrivateKey, i as listNostrAccountIds, n as nostrSetupWizard, o as resolveNostrAccount, s as normalizePubkey, t as nostrSetupAdapter } from "./setup-surface-
|
|
1
|
+
import { a as resolveDefaultNostrAccountId, c as validatePrivateKey, i as listNostrAccountIds, n as nostrSetupWizard, o as resolveNostrAccount, s as normalizePubkey, t as nostrSetupAdapter } from "./setup-surface-BqBa2C0K.js";
|
|
2
2
|
import { a as collectStatusIssuesFromLastError, i as buildChannelConfigSchema, n as NostrProfileSchema, o as createDefaultChannelRuntimeState, r as DEFAULT_ACCOUNT_ID, s as formatPairingApproveHint, t as NostrConfigSchema } from "./config-schema-DIiXiBKr.js";
|
|
3
3
|
import { i as DEFAULT_RELAYS } from "./setup-adapter-DEU3o8MF.js";
|
|
4
4
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -950,7 +950,9 @@ async function startNostrBus(options) {
|
|
|
950
950
|
};
|
|
951
951
|
const relayAbort = new AbortController();
|
|
952
952
|
const sub = pool.subscribeMany(relays, dmFilter, {
|
|
953
|
-
onevent:
|
|
953
|
+
onevent: (event) => {
|
|
954
|
+
handleEvent(event);
|
|
955
|
+
},
|
|
954
956
|
oneose: () => {
|
|
955
957
|
for (const relay of relays) metrics.emit("relay.message.eose", 1, { relay });
|
|
956
958
|
onEose?.(relays.join(", "));
|
|
@@ -1031,9 +1033,9 @@ async function sendEncryptedDm(pool, sk, toPubkey, text, relays, metrics, circui
|
|
|
1031
1033
|
if (cb && !cb.canAttempt()) continue;
|
|
1032
1034
|
const startTime = Date.now();
|
|
1033
1035
|
try {
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1036
|
-
await
|
|
1036
|
+
const publishPromises = pool.publish([relay], reply);
|
|
1037
|
+
if (publishPromises.length === 0) throw new Error(`Failed to create publish promise for relay ${relay}`);
|
|
1038
|
+
await publishPromises[0];
|
|
1037
1039
|
const latency = Date.now() - startTime;
|
|
1038
1040
|
cb?.recordSuccess();
|
|
1039
1041
|
healthTracker.recordSuccess(relay, latency);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nostrPlugin } from "./channel-
|
|
1
|
+
import { n as nostrPlugin } from "./channel-Dz31pjch.js";
|
|
2
2
|
export { nostrPlugin };
|
|
@@ -51,7 +51,7 @@ async function readJsonFile(filePath) {
|
|
|
51
51
|
}
|
|
52
52
|
async function listLegacyFiles(params) {
|
|
53
53
|
const dir = path.join(params.stateDir, "nostr");
|
|
54
|
-
let entries
|
|
54
|
+
let entries;
|
|
55
55
|
try {
|
|
56
56
|
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
57
57
|
} catch {
|
package/dist/setup-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nostrSetupWizard, t as nostrSetupAdapter } from "./setup-surface-
|
|
1
|
+
import { n as nostrSetupWizard, t as nostrSetupAdapter } from "./setup-surface-BqBa2C0K.js";
|
|
2
2
|
export { nostrSetupAdapter, nostrSetupWizard };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -51,7 +51,7 @@ const nostrSetupAdapter = createNostrSetupAdapter({
|
|
|
51
51
|
});
|
|
52
52
|
const nostrSetupWizard = createDelegatedSetupWizardProxy({
|
|
53
53
|
channel,
|
|
54
|
-
loadWizard: async () => (await import("./setup-surface-
|
|
54
|
+
loadWizard: async () => (await import("./setup-surface-BqBa2C0K.js").then((n) => n.r)).nostrSetupWizard,
|
|
55
55
|
status: { ...createStandardChannelSetupStatus({
|
|
56
56
|
channelLabel: "Nostr",
|
|
57
57
|
configuredLabel: t("wizard.channels.statusConfigured"),
|
|
@@ -47,8 +47,8 @@ function normalizePubkey(input) {
|
|
|
47
47
|
const trimmed = input.trim();
|
|
48
48
|
if (trimmed.startsWith("npub1")) {
|
|
49
49
|
const decoded = nip19.decode(trimmed);
|
|
50
|
-
if (decoded.type !== "npub") throw new Error("Invalid npub key");
|
|
51
|
-
return
|
|
50
|
+
if (decoded.type !== "npub" || typeof decoded.data !== "string") throw new Error("Invalid npub key");
|
|
51
|
+
return decoded.data.toLowerCase();
|
|
52
52
|
}
|
|
53
53
|
if (!/^[0-9a-fA-F]{64}$/.test(trimmed)) throw new Error("Pubkey must be 64 hex characters or npub format");
|
|
54
54
|
return trimmed.toLowerCase();
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.5.31-beta.
|
|
3
|
+
"version": "2026.5.31-beta.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/nostr",
|
|
9
|
-
"version": "2026.5.31-beta.
|
|
9
|
+
"version": "2026.5.31-beta.4",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"nostr-tools": "2.23.5",
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.5.31-beta.
|
|
15
|
+
"openclaw": ">=2026.5.31-beta.4"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.5.31-beta.
|
|
3
|
+
"version": "2026.5.31-beta.4",
|
|
4
4
|
"description": "OpenClaw Nostr channel plugin for NIP-04 encrypted direct messages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.5.31-beta.
|
|
15
|
+
"openclaw": ">=2026.5.31-beta.4"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"minHostVersion": ">=2026.4.10"
|
|
51
51
|
},
|
|
52
52
|
"compat": {
|
|
53
|
-
"pluginApi": ">=2026.5.31-beta.
|
|
53
|
+
"pluginApi": ">=2026.5.31-beta.4"
|
|
54
54
|
},
|
|
55
55
|
"build": {
|
|
56
|
-
"openclawVersion": "2026.5.31-beta.
|
|
56
|
+
"openclawVersion": "2026.5.31-beta.4"
|
|
57
57
|
},
|
|
58
58
|
"release": {
|
|
59
59
|
"publishToClawHub": true,
|