@openclaw/nostr 2026.10.10-beta.5 → 2026.10.10
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/.setup/{channel-B0EC4IOq.mjs → channel-C2iK5Fjg.mjs} +16 -29
- package/dist/.setup/{channel.setup-B2tWt-Ro.mjs → channel.setup-DeVyQy6t.mjs} +4 -6
- package/dist/.setup/{secret-contract-api-nVWula4c.mjs → secret-contract-api-DhkjtAQ4.mjs} +1 -2
- package/dist/.setup/{secret-contract-api-sFIFEwqO.mjs → secret-contract-api-KACe-wY3.mjs} +1 -1
- package/dist/.setup/{setup-adapter-DTqb2Hne.mjs → setup-adapter-CCRkU3LC.mjs} +4 -8
- package/dist/.setup/setup-plugin-api-Cc2r8u0U.mjs +2 -0
- package/dist/.setup/{setup-surface-CadI9603.mjs → setup-surface-fC0kex9d.mjs} +5 -9
- package/dist/.source-module-urls/434fb4e7afdaac23908221824ec325d8f61be72ba97af41567f2cb4ebe3ad38c.json +1 -1
- package/dist/api.js +6 -9
- package/dist/channel-plugin-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -2
- package/dist/index.js +1 -2
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +3 -4
- package/dist/setup-plugin-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/setup-plugin-api-BT2_wr33.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as listNostrAccountIds, c as normalizePubkey, n as nostrSetupContract, o as resolveDefaultNostrAccountId, r as nostrSetupWizard, s as resolveNostrAccount } from "./setup-surface-
|
|
2
|
-
import { l as validatePrivateKey, u as DEFAULT_RELAYS } from "./setup-adapter-
|
|
3
|
-
import { n as NostrProfileSchema, t as nostrSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { a as listNostrAccountIds, c as normalizePubkey, n as nostrSetupContract, o as resolveDefaultNostrAccountId, r as nostrSetupWizard, s as resolveNostrAccount } from "./setup-surface-fC0kex9d.mjs";
|
|
2
|
+
import { l as validatePrivateKey, u as DEFAULT_RELAYS } from "./setup-adapter-CCRkU3LC.mjs";
|
|
3
|
+
import { n as NostrProfileSchema, t as nostrSetupPlugin } from "./channel.setup-DeVyQy6t.mjs";
|
|
4
4
|
import { createScopedDmSecurityResolver, createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
5
5
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
6
6
|
import { missingTargetError } from "openclaw/plugin-sdk/channel-feedback";
|
|
@@ -25,7 +25,7 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
|
25
25
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
26
26
|
import { withTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
27
27
|
import { buildChannelOutboundSessionRoute, stripChannelTargetPrefix } from "openclaw/plugin-sdk/core";
|
|
28
|
-
|
|
28
|
+
// extensions/nostr/src/metrics.ts
|
|
29
29
|
function createMetrics(onMetric) {
|
|
30
30
|
return { emit(name, value = 1, labels) {
|
|
31
31
|
onMetric?.({
|
|
@@ -36,8 +36,7 @@ function createMetrics(onMetric) {
|
|
|
36
36
|
});
|
|
37
37
|
} };
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
//#region extensions/nostr/src/nostr-cursor.ts
|
|
39
|
+
// extensions/nostr/src/nostr-cursor.ts
|
|
41
40
|
const CURSOR_WRITE_RETRY_MS = [
|
|
42
41
|
0,
|
|
43
42
|
100,
|
|
@@ -198,14 +197,12 @@ async function migrateNostrLegacyRecentEventIds(params) {
|
|
|
198
197
|
}
|
|
199
198
|
return migrated;
|
|
200
199
|
}
|
|
201
|
-
|
|
202
|
-
//#region extensions/nostr/src/runtime.ts
|
|
200
|
+
// extensions/nostr/src/runtime.ts
|
|
203
201
|
const { setRuntime: setNostrRuntime, getRuntime: getNostrRuntime } = createPluginRuntimeStore({
|
|
204
202
|
pluginId: "nostr",
|
|
205
203
|
errorMessage: "Nostr runtime not initialized"
|
|
206
204
|
});
|
|
207
|
-
|
|
208
|
-
//#region extensions/nostr/src/nostr-ingress.ts
|
|
205
|
+
// extensions/nostr/src/nostr-ingress.ts
|
|
209
206
|
const NOSTR_INGRESS_POLL_INTERVAL_MS = 500;
|
|
210
207
|
const NOSTR_INGRESS_APPEND_RETRY_MS = [
|
|
211
208
|
0,
|
|
@@ -396,8 +393,7 @@ function createNostrIngress(options) {
|
|
|
396
393
|
}
|
|
397
394
|
};
|
|
398
395
|
}
|
|
399
|
-
|
|
400
|
-
//#region extensions/nostr/src/nostr-profile-core.ts
|
|
396
|
+
// extensions/nostr/src/nostr-profile-core.ts
|
|
401
397
|
const PROFILE_FIELDS = [
|
|
402
398
|
["name", "name"],
|
|
403
399
|
["displayName", "display_name"],
|
|
@@ -426,8 +422,7 @@ function contentToProfile(content) {
|
|
|
426
422
|
}
|
|
427
423
|
return profile;
|
|
428
424
|
}
|
|
429
|
-
|
|
430
|
-
//#region extensions/nostr/src/nostr-profile.ts
|
|
425
|
+
// extensions/nostr/src/nostr-profile.ts
|
|
431
426
|
const RELAY_PUBLISH_TIMEOUT_MS = 5e3;
|
|
432
427
|
/** Publish one signed kind:0 event, reporting each relay's result without retrying. */
|
|
433
428
|
async function publishProfile(pool, sk, relays, profile, lastPublishedAt) {
|
|
@@ -461,8 +456,7 @@ async function publishProfile(pool, sk, relays, profile, lastPublishedAt) {
|
|
|
461
456
|
createdAt: event.created_at
|
|
462
457
|
};
|
|
463
458
|
}
|
|
464
|
-
|
|
465
|
-
//#region extensions/nostr/src/nostr-relay-subscription.ts
|
|
459
|
+
// extensions/nostr/src/nostr-relay-subscription.ts
|
|
466
460
|
const DEFAULT_EOSE_CONFIRM_DEADLINE_MS = 1e4;
|
|
467
461
|
/** Separates real relay EOSE frames from nostr-tools timeout/close synthesis. */
|
|
468
462
|
function createNostrRelaySubscriptionGroup(options) {
|
|
@@ -523,15 +517,13 @@ function createNostrRelaySubscriptionGroup(options) {
|
|
|
523
517
|
}
|
|
524
518
|
};
|
|
525
519
|
}
|
|
526
|
-
|
|
527
|
-
//#region extensions/nostr/src/state-account-id.ts
|
|
520
|
+
// extensions/nostr/src/state-account-id.ts
|
|
528
521
|
function normalizeNostrStateAccountId(accountId) {
|
|
529
522
|
const trimmed = accountId?.trim();
|
|
530
523
|
if (!trimmed) return "default";
|
|
531
524
|
return trimmed.replace(/[^a-z0-9._-]+/gi, "_");
|
|
532
525
|
}
|
|
533
|
-
|
|
534
|
-
//#region extensions/nostr/src/nostr-state-store.ts
|
|
526
|
+
// extensions/nostr/src/nostr-state-store.ts
|
|
535
527
|
const STORE_VERSION = 2;
|
|
536
528
|
const PROFILE_STATE_VERSION = 1;
|
|
537
529
|
function openNostrBusStateStore(env) {
|
|
@@ -583,8 +575,7 @@ async function writeNostrProfileState(params) {
|
|
|
583
575
|
};
|
|
584
576
|
await openNostrProfileStateStore(params.env).register(normalizeNostrStateAccountId(params.accountId), payload);
|
|
585
577
|
}
|
|
586
|
-
|
|
587
|
-
//#region extensions/nostr/src/nostr-bus.ts
|
|
578
|
+
// extensions/nostr/src/nostr-bus.ts
|
|
588
579
|
const STARTUP_LOOKBACK_SEC = 120;
|
|
589
580
|
const STATE_PERSIST_DEBOUNCE_MS = 5e3;
|
|
590
581
|
const NOSTR_INGRESS_ENVELOPE_OVERHEAD_BYTES = 16384;
|
|
@@ -1008,8 +999,7 @@ async function startNostrBus(options) {
|
|
|
1008
999
|
getProfileState
|
|
1009
1000
|
};
|
|
1010
1001
|
}
|
|
1011
|
-
|
|
1012
|
-
//#region extensions/nostr/src/gateway.ts
|
|
1002
|
+
// extensions/nostr/src/gateway.ts
|
|
1013
1003
|
const activeBuses = /* @__PURE__ */ new Map();
|
|
1014
1004
|
function normalizeRelayLifecycleKey(relay) {
|
|
1015
1005
|
return new URL(relay).toString();
|
|
@@ -1243,8 +1233,7 @@ const nostrOutboundAdapter = {
|
|
|
1243
1233
|
function getActiveNostrBuses() {
|
|
1244
1234
|
return new Map(activeBuses);
|
|
1245
1235
|
}
|
|
1246
|
-
|
|
1247
|
-
//#region extensions/nostr/src/session-route.ts
|
|
1236
|
+
// extensions/nostr/src/session-route.ts
|
|
1248
1237
|
function resolveNostrOutboundSessionRoute(params) {
|
|
1249
1238
|
const rawTarget = stripChannelTargetPrefix(params.target, "nostr");
|
|
1250
1239
|
let target;
|
|
@@ -1268,8 +1257,7 @@ function resolveNostrOutboundSessionRoute(params) {
|
|
|
1268
1257
|
to: `nostr:${target}`
|
|
1269
1258
|
});
|
|
1270
1259
|
}
|
|
1271
|
-
|
|
1272
|
-
//#region extensions/nostr/src/channel.ts
|
|
1260
|
+
// extensions/nostr/src/channel.ts
|
|
1273
1261
|
const NOSTR_TARGET_HINT = "<npub|hex pubkey|nostr:npub...>";
|
|
1274
1262
|
function stripNostrTargetPrefix(target) {
|
|
1275
1263
|
return target.trim().replace(/^nostr:/i, "");
|
|
@@ -1398,5 +1386,4 @@ async function getNostrProfileState(accountId = DEFAULT_ACCOUNT_ID) {
|
|
|
1398
1386
|
if (!bus) return null;
|
|
1399
1387
|
return bus.getProfileState();
|
|
1400
1388
|
}
|
|
1401
|
-
//#endregion
|
|
1402
1389
|
export { getNostrRuntime as a, contentToProfile as i, nostrPlugin as n, setNostrRuntime as o, publishNostrProfile as r, getNostrProfileState as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as createNostrSetupStatus, n as createNostrSetupAdapter, o as getNostrConfig, r as createNostrSetupContract, s as resolveNostrAccountBase } from "./setup-adapter-
|
|
1
|
+
import { i as createNostrSetupStatus, n as createNostrSetupAdapter, o as getNostrConfig, r as createNostrSetupContract, s as resolveNostrAccountBase } from "./setup-adapter-CCRkU3LC.mjs";
|
|
2
2
|
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-plugin-common";
|
|
3
3
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
4
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -6,7 +6,7 @@ import { createDelegatedSetupWizardProxy } from "openclaw/plugin-sdk/setup-runti
|
|
|
6
6
|
import { buildSecretInputSchema } from "openclaw/plugin-sdk/secret-input";
|
|
7
7
|
import { AllowFromListSchema, DmPolicySchema, MarkdownConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
-
|
|
9
|
+
// extensions/nostr/src/config-schema.ts
|
|
10
10
|
const safeUrlSchema = z.string().url().refine((url) => URL.parse(url)?.protocol === "https:", { message: "URL must use https:// protocol" });
|
|
11
11
|
/**
|
|
12
12
|
* NIP-01 profile metadata schema
|
|
@@ -43,8 +43,7 @@ const NostrConfigSchema = z.object({
|
|
|
43
43
|
/** Profile metadata (NIP-01 kind:0 content) */
|
|
44
44
|
profile: NostrProfileSchema.optional()
|
|
45
45
|
});
|
|
46
|
-
|
|
47
|
-
//#region extensions/nostr/src/channel.setup.ts
|
|
46
|
+
// extensions/nostr/src/channel.setup.ts
|
|
48
47
|
const channel = "nostr";
|
|
49
48
|
function resolveDefaultSetupNostrAccountId(cfg) {
|
|
50
49
|
return normalizeAccountId(getNostrConfig(cfg)?.defaultAccount);
|
|
@@ -55,7 +54,7 @@ function resolveSetupNostrAccount(params) {
|
|
|
55
54
|
}
|
|
56
55
|
const nostrSetupWizard = createDelegatedSetupWizardProxy({
|
|
57
56
|
channel,
|
|
58
|
-
loadWizard: async () => (await import("./setup-surface-
|
|
57
|
+
loadWizard: async () => (await import("./setup-surface-fC0kex9d.mjs").then((n) => n.i)).nostrSetupWizard,
|
|
59
58
|
status: createNostrSetupStatus(resolveSetupNostrAccount),
|
|
60
59
|
resolveShouldPromptAccountIds: () => false,
|
|
61
60
|
delegatePrepare: true,
|
|
@@ -95,5 +94,4 @@ const nostrSetupPlugin = {
|
|
|
95
94
|
})
|
|
96
95
|
}
|
|
97
96
|
};
|
|
98
|
-
//#endregion
|
|
99
97
|
export { NostrProfileSchema as n, nostrSetupPlugin as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
2
2
|
import { collectSecretInputAssignment, createChannelSecretTargetRegistryEntries, getChannelRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/nostr/src/secret-contract.ts
|
|
4
4
|
const secretTargetRegistryEntries = createChannelSecretTargetRegistryEntries({
|
|
5
5
|
channelKey: "nostr",
|
|
6
6
|
channel: ["privateKey"]
|
|
@@ -33,5 +33,4 @@ const channelSecrets = {
|
|
|
33
33
|
secretTargetRegistryEntries,
|
|
34
34
|
collectRuntimeConfigAssignments
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-api-
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-api-DhkjtAQ4.mjs";
|
|
@@ -4,10 +4,9 @@ import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/p
|
|
|
4
4
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
import { createSetupTranslator, createStandardChannelSetupStatus, patchTopLevelChannelConfigSection, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
7
|
-
|
|
7
|
+
// extensions/nostr/src/default-relays.ts
|
|
8
8
|
const DEFAULT_RELAYS = ["wss://relay.damus.io", "wss://nos.lol"];
|
|
9
|
-
|
|
10
|
-
//#region extensions/nostr/src/private-key.ts
|
|
9
|
+
// extensions/nostr/src/private-key.ts
|
|
11
10
|
const NOSTR_PRIVATE_KEY_ENV_VAR = "NOSTR_PRIVATE_KEY";
|
|
12
11
|
const SECP256K1_ORDER = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
|
|
13
12
|
/** Validate and normalize a private key (hex or NIP-19 nsec). */
|
|
@@ -40,8 +39,7 @@ function resolveNostrPrivateKey(value) {
|
|
|
40
39
|
if (configured || hasConfiguredSecretInput(value)) return configured ?? "";
|
|
41
40
|
return process.env["NOSTR_PRIVATE_KEY"]?.trim() ?? "";
|
|
42
41
|
}
|
|
43
|
-
|
|
44
|
-
//#region extensions/nostr/src/accounts.ts
|
|
42
|
+
// extensions/nostr/src/accounts.ts
|
|
45
43
|
function getNostrConfig(cfg) {
|
|
46
44
|
return cfg.channels?.nostr;
|
|
47
45
|
}
|
|
@@ -68,8 +66,7 @@ function resolveNostrAccountBase(cfg, accountId) {
|
|
|
68
66
|
}
|
|
69
67
|
};
|
|
70
68
|
}
|
|
71
|
-
|
|
72
|
-
//#region extensions/nostr/src/setup-adapter.ts
|
|
69
|
+
// extensions/nostr/src/setup-adapter.ts
|
|
73
70
|
const channel = "nostr";
|
|
74
71
|
function buildNostrSetupPatch(accountId, patch) {
|
|
75
72
|
return {
|
|
@@ -179,5 +176,4 @@ function createNostrSetupStatus(resolveAccount) {
|
|
|
179
176
|
}
|
|
180
177
|
});
|
|
181
178
|
}
|
|
182
|
-
//#endregion
|
|
183
179
|
export { parseRelayUrls as a, hasConfiguredNostrPrivateKey as c, createNostrSetupStatus as i, validatePrivateKey as l, createNostrSetupAdapter as n, getNostrConfig as o, createNostrSetupContract as r, resolveNostrAccountBase as s, buildNostrSetupPatch as t, DEFAULT_RELAYS as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseRelayUrls, c as hasConfiguredNostrPrivateKey, i as createNostrSetupStatus, l as validatePrivateKey, n as createNostrSetupAdapter, o as getNostrConfig, r as createNostrSetupContract, s as resolveNostrAccountBase, t as buildNostrSetupPatch, u as DEFAULT_RELAYS } from "./setup-adapter-
|
|
1
|
+
import { a as parseRelayUrls, c as hasConfiguredNostrPrivateKey, i as createNostrSetupStatus, l as validatePrivateKey, n as createNostrSetupAdapter, o as getNostrConfig, r as createNostrSetupContract, s as resolveNostrAccountBase, t as buildNostrSetupPatch, u as DEFAULT_RELAYS } from "./setup-adapter-CCRkU3LC.mjs";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -7,7 +7,7 @@ import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/p
|
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/routing";
|
|
8
8
|
import { createSetupTranslator, createTopLevelChannelDmPolicy, createTopLevelChannelParsedAllowFromPrompt, defineTokenCredential, formatDocsLink, mergeAllowFromEntries, parseSetupEntriesWithParser, patchTopLevelChannelConfigSection, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
9
9
|
import { getPublicKey } from "nostr-tools/pure";
|
|
10
|
-
|
|
10
|
+
// \0rolldown/runtime.js
|
|
11
11
|
var __defProp = Object.defineProperty;
|
|
12
12
|
var __exportAll = (all, no_symbols) => {
|
|
13
13
|
let target = {};
|
|
@@ -18,8 +18,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
18
18
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
19
19
|
return target;
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
//#region extensions/nostr/src/nostr-key-utils.ts
|
|
21
|
+
// extensions/nostr/src/nostr-key-utils.ts
|
|
23
22
|
function getPublicKeyFromPrivate(privateKey) {
|
|
24
23
|
return getPublicKey(validatePrivateKey(privateKey));
|
|
25
24
|
}
|
|
@@ -33,8 +32,7 @@ function normalizePubkey(input) {
|
|
|
33
32
|
if (!/^[0-9a-fA-F]{64}$/.test(trimmed)) throw new Error("Pubkey must be 64 hex characters or npub format");
|
|
34
33
|
return trimmed.toLowerCase();
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
//#region extensions/nostr/src/types.ts
|
|
35
|
+
// extensions/nostr/src/types.ts
|
|
38
36
|
const { listAccountIds: listNostrAccountIds, resolveDefaultAccountId: resolveDefaultNostrAccountId } = createAccountListHelpers("nostr", {
|
|
39
37
|
fallbackAccountIdWhenEmpty: false,
|
|
40
38
|
resolveImplicitAccountId: (cfg) => {
|
|
@@ -55,8 +53,7 @@ function resolveNostrAccount(opts) {
|
|
|
55
53
|
publicKey
|
|
56
54
|
};
|
|
57
55
|
}
|
|
58
|
-
|
|
59
|
-
//#region extensions/nostr/src/setup-surface.ts
|
|
56
|
+
// extensions/nostr/src/setup-surface.ts
|
|
60
57
|
var setup_surface_exports = /* @__PURE__ */ __exportAll({
|
|
61
58
|
nostrSetupAdapter: () => nostrSetupAdapter,
|
|
62
59
|
nostrSetupContract: () => nostrSetupContract,
|
|
@@ -194,5 +191,4 @@ const nostrSetupWizard = {
|
|
|
194
191
|
dmPolicy: nostrDmPolicy,
|
|
195
192
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
196
193
|
};
|
|
197
|
-
//#endregion
|
|
198
194
|
export { listNostrAccountIds as a, normalizePubkey as c, setup_surface_exports as i, nostrSetupContract as n, resolveDefaultNostrAccountId as o, nostrSetupWizard as r, resolveNostrAccount as s, nostrSetupAdapter as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/nostr/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/nostr/channel-plugin-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/nostr/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/nostr/index.ts"},{"output":"runtime-api.js","source":"extensions/nostr/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/nostr/secret-contract-api.ts"},{"output":"setup-api.js","source":"extensions/nostr/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/nostr/setup-entry.ts"},{"output":"setup-plugin-api.js","source":"extensions/nostr/setup-plugin-api.ts"}],"chunks":[{"output":".setup/channel-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/nostr/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/nostr/channel-plugin-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/nostr/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/nostr/index.ts"},{"output":"runtime-api.js","source":"extensions/nostr/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/nostr/secret-contract-api.ts"},{"output":"setup-api.js","source":"extensions/nostr/setup-api.ts"},{"output":"setup-entry.js","source":"extensions/nostr/setup-entry.ts"},{"output":"setup-plugin-api.js","source":"extensions/nostr/setup-plugin-api.ts"}],"chunks":[{"output":".setup/channel-C2iK5Fjg.mjs","sha256":"41e983ff7554d455d591d48e39b74a0b25b66e5dbf763cd39e8f87126379c314","facadeSource":null,"sources":["extensions/nostr/src/channel.ts","extensions/nostr/src/gateway.ts","extensions/nostr/src/metrics.ts","extensions/nostr/src/nostr-bus.ts","extensions/nostr/src/nostr-cursor.ts","extensions/nostr/src/nostr-ingress-state.ts","extensions/nostr/src/nostr-ingress.ts","extensions/nostr/src/nostr-profile-core.ts","extensions/nostr/src/nostr-profile.ts","extensions/nostr/src/nostr-relay-subscription.ts","extensions/nostr/src/nostr-state-store.ts","extensions/nostr/src/runtime.ts","extensions/nostr/src/session-route.ts","extensions/nostr/src/state-account-id.ts"]},{"output":".setup/channel.setup-DeVyQy6t.mjs","sha256":"21198c1ca467148b2b38e3fbf33d391f8d88354010d4cb4964e7ee6397541687","facadeSource":null,"sources":["extensions/nostr/src/channel.setup.ts","extensions/nostr/src/config-schema.ts"]},{"output":".setup/secret-contract-api-DhkjtAQ4.mjs","sha256":"cc9bd97896c09a5b7011d5081c7b77f9d549c4a8e6d6851e45bd88db2b0e9175","facadeSource":null,"sources":["extensions/nostr/src/secret-contract.ts"]},{"output":".setup/secret-contract-api-KACe-wY3.mjs","sha256":"5b017c198ae7077b346a36f99804618262353b63b3cd0a33f5aa3d6506dbf63f","facadeSource":"extensions/nostr/secret-contract-api.ts","sources":[]},{"output":".setup/setup-adapter-CCRkU3LC.mjs","sha256":"50f8fd5436ae00373f8f9d07726071a143d1aee09e9e54b3376846eff1270ca8","facadeSource":null,"sources":["extensions/nostr/src/accounts.ts","extensions/nostr/src/default-relays.ts","extensions/nostr/src/private-key.ts","extensions/nostr/src/setup-adapter.ts"]},{"output":".setup/setup-plugin-api-Cc2r8u0U.mjs","sha256":"ad6188354ce98d71de2f396039ea7aa30caa4e780f8cf5cf6a05a04bda7bbbaf","facadeSource":"extensions/nostr/setup-plugin-api.ts","sources":[]},{"output":".setup/setup-surface-fC0kex9d.mjs","sha256":"0cc6e9cd504307f33810f714397ce209fbd113dd017fdbc47ff39a1538614e93","facadeSource":null,"sources":["extensions/nostr/src/nostr-key-utils.ts","extensions/nostr/src/setup-surface.ts","extensions/nostr/src/types.ts"]},{"output":"api.js","sha256":"a9e95190c5f921e40be42fdda932b84851669a211f492f679e505a56e902782e","facadeSource":"extensions/nostr/api.ts","sources":["extensions/nostr/src/nostr-profile-http.ts","extensions/nostr/src/nostr-profile-import.ts","extensions/nostr/src/nostr-profile-url-safety.ts"]},{"output":"channel-plugin-api.js","sha256":"a0e8a5de3ca74010c237afc5cdfe26e40629cd4c902dd2d75f176768571c0df6","facadeSource":"extensions/nostr/channel-plugin-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"fdfdc60708b4ee687d31f1dd5825611b8ae0b2d441015441166322c9605c7cd6","facadeSource":"extensions/nostr/doctor-contract-api.ts","sources":["extensions/nostr/doctor-contract-api.ts"]},{"output":"index.js","sha256":"ceca06a0f98117bb6121283a5e21b124d97db7b180f13a971bd44f3a1de255e6","facadeSource":"extensions/nostr/index.ts","sources":["extensions/nostr/index.ts"]},{"output":"runtime-api.js","sha256":"1bed0357f746cd96a7c503a5be63f8dfbac1f7a2ac9c97072b969bbdc479bea5","facadeSource":"extensions/nostr/runtime-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"4d20da44e93e63dbf4d09ff7bc370df393a13690407e78710cc5ba3d3786453e","facadeSource":"extensions/nostr/secret-contract-api.ts","sources":[]},{"output":"setup-api.js","sha256":"a8cfafe955ed0621f96d0822c9817d8764aebe934240de0c5e416df732a11bac","facadeSource":"extensions/nostr/setup-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"0e8a2a6e49b964a3e2ffdca8a72624f1213fa246be0578d139e4883b88b51951","facadeSource":"extensions/nostr/setup-entry.ts","sources":["extensions/nostr/setup-entry.ts"]},{"output":"setup-plugin-api.js","sha256":"8b1d448cc299cd115f9180af38c93c6e335922accbc318ffcda992f255e138df","facadeSource":"extensions/nostr/setup-plugin-api.ts","sources":[]}],"unrenderedSources":["extensions/nostr/api.ts","extensions/nostr/channel-plugin-api.ts","extensions/nostr/runtime-api.ts","extensions/nostr/secret-contract-api.ts","extensions/nostr/setup-api.ts","extensions/nostr/setup-plugin-api.ts"]}
|
package/dist/api.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as resolveNostrAccount } from "./.setup/setup-surface-
|
|
1
|
+
import { s as resolveNostrAccount } from "./.setup/setup-surface-fC0kex9d.mjs";
|
|
2
2
|
import { getPluginRuntimeGatewayRequestScope } from "./runtime-api.js";
|
|
3
|
-
import { n as NostrProfileSchema } from "./.setup/channel.setup-
|
|
4
|
-
import { a as getNostrRuntime, i as contentToProfile, n as nostrPlugin, o as setNostrRuntime, r as publishNostrProfile, t as getNostrProfileState } from "./.setup/channel-
|
|
3
|
+
import { n as NostrProfileSchema } from "./.setup/channel.setup-DeVyQy6t.mjs";
|
|
4
|
+
import { a as getNostrRuntime, i as contentToProfile, n as nostrPlugin, o as setNostrRuntime, r as publishNostrProfile, t as getNostrProfileState } from "./.setup/channel-C2iK5Fjg.mjs";
|
|
5
5
|
import { getPluginRuntimeGatewayRequestScope as getPluginRuntimeGatewayRequestScope$1 } from "openclaw/plugin-sdk/plugin-runtime";
|
|
6
6
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -12,7 +12,7 @@ import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
|
12
12
|
import { isBlockedHostnameOrIp, isLoopbackHost } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
13
13
|
import { readJsonBodyWithLimit, requestBodyErrorToText } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
14
14
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
15
|
-
|
|
15
|
+
// extensions/nostr/src/nostr-profile-url-safety.ts
|
|
16
16
|
function normalizeNostrProfileUrlForRuntime(urlStr) {
|
|
17
17
|
return urlStr.replace(/^([a-z][a-z\d+.-]*:\/\/\[[\da-f:]*:)(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})\.(0|[1-9]\d{0,2})(\].*)$/iu, (original, prefix, a, b, c, d, suffix) => {
|
|
18
18
|
const octets = [
|
|
@@ -47,8 +47,7 @@ function validateUrlSafety(urlStr) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
//#region extensions/nostr/src/nostr-profile-import.ts
|
|
50
|
+
// extensions/nostr/src/nostr-profile-import.ts
|
|
52
51
|
const DEFAULT_TIMEOUT_MS = 5e3;
|
|
53
52
|
function sanitizeProfileUrls(profile) {
|
|
54
53
|
const result = { ...profile };
|
|
@@ -170,8 +169,7 @@ function mergeProfiles(local, imported) {
|
|
|
170
169
|
lud16: local.lud16 ?? imported.lud16
|
|
171
170
|
};
|
|
172
171
|
}
|
|
173
|
-
|
|
174
|
-
//#region extensions/nostr/src/nostr-profile-http.ts
|
|
172
|
+
// extensions/nostr/src/nostr-profile-http.ts
|
|
175
173
|
const profileRateLimiter = createFixedWindowRateLimiter({
|
|
176
174
|
windowMs: 6e4,
|
|
177
175
|
maxRequests: 5,
|
|
@@ -466,5 +464,4 @@ async function handleImportProfile(accountId, ctx, req, res) {
|
|
|
466
464
|
});
|
|
467
465
|
return true;
|
|
468
466
|
}
|
|
469
|
-
//#endregion
|
|
470
467
|
export { createNostrProfileHttpHandler, getNostrRuntime, getPluginRuntimeGatewayRequestScope, nostrPlugin, resolveNostrAccount, setNostrRuntime };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as nostrPlugin } from "./.setup/channel-
|
|
1
|
+
export { n as nostrPlugin } from "./.setup/channel-C2iK5Fjg.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { extractErrorCode } from "openclaw/plugin-sdk/error-runtime";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
|
|
4
|
+
// extensions/nostr/doctor-contract-api.ts
|
|
5
5
|
function retiredNostrStateMigration(namespace, label) {
|
|
6
6
|
const warning = `${label} JSON imports were retired. Upgrade to OpenClaw 2026.9.5 and run openclaw doctor --fix before upgrading to the latest version. Legacy files were left untouched.`;
|
|
7
7
|
const hasLegacyState = async (stateDir) => {
|
|
@@ -28,5 +28,4 @@ function retiredNostrStateMigration(namespace, label) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
const stateMigrations = [retiredNostrStateMigration("bus-state", "Nostr bus state"), retiredNostrStateMigration("profile-state", "Nostr profile state")];
|
|
31
|
-
//#endregion
|
|
32
31
|
export { stateMigrations };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry, loadBundledEntryExportSync } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
// extensions/nostr/index.ts
|
|
3
3
|
var nostr_default = defineBundledChannelEntry({
|
|
4
4
|
id: "nostr",
|
|
5
5
|
name: "Nostr",
|
|
@@ -66,5 +66,4 @@ var nostr_default = defineBundledChannelEntry({
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
//#endregion
|
|
70
69
|
export { nostr_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-api-
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-api-DhkjtAQ4.mjs";
|
package/dist/setup-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as nostrSetupAdapter, r as nostrSetupWizard } from "./.setup/setup-surface-
|
|
1
|
+
export { t as nostrSetupAdapter, r as nostrSetupWizard } from "./.setup/setup-surface-fC0kex9d.mjs";
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
// extensions/nostr/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-Cc2r8u0U.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "nostrSetupPlugin"
|
|
9
9
|
},
|
|
10
10
|
secrets: {
|
|
11
|
-
specifier: fileURLToPath(new URL(".setup/secret-contract-api-
|
|
11
|
+
specifier: fileURLToPath(new URL(".setup/secret-contract-api-KACe-wY3.mjs", import.meta.url).href),
|
|
12
12
|
exportName: "channelSecrets"
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
//#endregion
|
|
16
15
|
export { setup_entry_default as default };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as nostrSetupPlugin } from "./.setup/channel.setup-
|
|
1
|
+
export { t as nostrSetupPlugin } from "./.setup/channel.setup-DeVyQy6t.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nostr",
|
|
3
|
-
"version": "2026.10.10
|
|
3
|
+
"version": "2026.10.10",
|
|
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.6.5"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.10.10
|
|
15
|
+
"openclaw": ">=2026.10.10"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"minHostVersion": ">=2026.4.10"
|
|
81
81
|
},
|
|
82
82
|
"compat": {
|
|
83
|
-
"pluginApi": ">=2026.10.10
|
|
83
|
+
"pluginApi": ">=2026.10.10"
|
|
84
84
|
},
|
|
85
85
|
"build": {
|
|
86
|
-
"openclawVersion": "2026.10.10
|
|
86
|
+
"openclawVersion": "2026.10.10"
|
|
87
87
|
},
|
|
88
88
|
"release": {
|
|
89
89
|
"publishToClawHub": true,
|