@openclaw/buzz 2026.9.1 → 2026.9.3
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 +1 -1
- package/dist/{channel-B50upNWy.js → channel-C6rro-f7.js} +30 -13
- package/dist/channel-plugin-api.js +1 -1
- package/node_modules/nostr-tools/README.md +23 -0
- package/node_modules/nostr-tools/lib/cjs/index.js +25 -15
- package/node_modules/nostr-tools/lib/cjs/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/nip27.js +24 -14
- package/node_modules/nostr-tools/lib/cjs/nip27.js.map +2 -2
- package/node_modules/nostr-tools/lib/cjs/nipb7.js +1003 -98
- package/node_modules/nostr-tools/lib/cjs/nipb7.js.map +4 -4
- package/node_modules/nostr-tools/lib/cjs/relay.js +1 -1
- package/node_modules/nostr-tools/lib/cjs/relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/index.js +25 -15
- package/node_modules/nostr-tools/lib/esm/index.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/nip27.js +24 -14
- package/node_modules/nostr-tools/lib/esm/nip27.js.map +2 -2
- package/node_modules/nostr-tools/lib/esm/nipb7.js +1009 -98
- package/node_modules/nostr-tools/lib/esm/nipb7.js.map +4 -4
- package/node_modules/nostr-tools/lib/esm/relay.js +1 -1
- package/node_modules/nostr-tools/lib/esm/relay.js.map +2 -2
- package/node_modules/nostr-tools/lib/nostr.bundle.js +25 -15
- package/node_modules/nostr-tools/lib/nostr.bundle.js.map +2 -2
- package/node_modules/nostr-tools/lib/types/nip27.d.ts +18 -0
- package/node_modules/nostr-tools/lib/types/nipb7.d.ts +112 -5
- package/node_modules/nostr-tools/lib/types/relay.d.ts +1 -1
- package/node_modules/nostr-tools/package.json +1 -7
- package/package.json +5 -5
- package/node_modules/nostr-tools/lib/cjs/nipb0.js +0 -1087
- package/node_modules/nostr-tools/lib/cjs/nipb0.js.map +0 -7
- package/node_modules/nostr-tools/lib/esm/nipb0.js +0 -1072
- package/node_modules/nostr-tools/lib/esm/nipb0.js.map +0 -7
- package/node_modules/nostr-tools/lib/types/nipb0.d.ts +0 -128
- package/node_modules/nostr-tools/lib/types/nipb0.test.d.ts +0 -1
|
@@ -3,30 +3,48 @@ import { AddressPointer, EventPointer, ProfilePointer } from './nip19.ts';
|
|
|
3
3
|
export type Block = {
|
|
4
4
|
type: 'text';
|
|
5
5
|
text: string;
|
|
6
|
+
start: number;
|
|
7
|
+
end: number;
|
|
6
8
|
} | {
|
|
7
9
|
type: 'reference';
|
|
8
10
|
pointer: ProfilePointer | AddressPointer | EventPointer;
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
9
13
|
} | {
|
|
10
14
|
type: 'url';
|
|
11
15
|
url: string;
|
|
16
|
+
start: number;
|
|
17
|
+
end: number;
|
|
12
18
|
} | {
|
|
13
19
|
type: 'relay';
|
|
14
20
|
url: string;
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
15
23
|
} | {
|
|
16
24
|
type: 'image';
|
|
17
25
|
url: string;
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
18
28
|
} | {
|
|
19
29
|
type: 'video';
|
|
20
30
|
url: string;
|
|
31
|
+
start: number;
|
|
32
|
+
end: number;
|
|
21
33
|
} | {
|
|
22
34
|
type: 'audio';
|
|
23
35
|
url: string;
|
|
36
|
+
start: number;
|
|
37
|
+
end: number;
|
|
24
38
|
} | {
|
|
25
39
|
type: 'emoji';
|
|
26
40
|
shortcode: string;
|
|
27
41
|
url: string;
|
|
42
|
+
start: number;
|
|
43
|
+
end: number;
|
|
28
44
|
} | {
|
|
29
45
|
type: 'hashtag';
|
|
30
46
|
value: string;
|
|
47
|
+
start: number;
|
|
48
|
+
end: number;
|
|
31
49
|
};
|
|
32
50
|
export declare function parse(content: string | NostrEvent): Iterable<Block>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EventTemplate } from './core.ts';
|
|
2
|
+
import type { Signer } from './signer.ts';
|
|
2
3
|
export type BlobDescriptor = {
|
|
3
4
|
url: string;
|
|
4
5
|
sha256: string;
|
|
@@ -6,17 +7,123 @@ export type BlobDescriptor = {
|
|
|
6
7
|
type: string;
|
|
7
8
|
uploaded: number;
|
|
8
9
|
};
|
|
10
|
+
export type UploadType = Blob | File | Buffer;
|
|
11
|
+
export type SignedEvent = EventTemplate & {
|
|
12
|
+
id: string;
|
|
13
|
+
sig: string;
|
|
14
|
+
pubkey: string;
|
|
15
|
+
};
|
|
16
|
+
export type AuthEventOptions = {
|
|
17
|
+
blobs?: string | string[];
|
|
18
|
+
servers?: string | string[];
|
|
19
|
+
message?: string;
|
|
20
|
+
expiration?: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function getBlobSize(blob: UploadType): number;
|
|
23
|
+
export declare function getBlobType(blob: UploadType): string | undefined;
|
|
24
|
+
export declare function computeBlobSha256(blob: UploadType): Promise<string>;
|
|
25
|
+
export declare function encodeAuthorizationHeader(event: SignedEvent): string;
|
|
26
|
+
export declare function now(): number;
|
|
27
|
+
export declare function oneHour(): number;
|
|
28
|
+
export declare function getAuthTagValues(auth: SignedEvent, tagName: string): string[];
|
|
29
|
+
export declare function getAuthExpiration(auth: SignedEvent): number | undefined;
|
|
30
|
+
export declare function isAuthExpired(auth: SignedEvent, timestamp?: number): boolean;
|
|
31
|
+
export declare function normalizeServerTag(server: string | URL): string;
|
|
32
|
+
export declare function areServersEqual(a: string | URL, b: string | URL): boolean;
|
|
33
|
+
export declare function createAuthEvent(signer: (draft: EventTemplate) => Promise<SignedEvent>, type: 'upload' | 'list' | 'delete' | 'get' | 'media', options?: AuthEventOptions): Promise<SignedEvent>;
|
|
34
|
+
export type UploadAuthOptions = Omit<AuthEventOptions, 'blobs'> & {
|
|
35
|
+
type?: 'upload' | 'media';
|
|
36
|
+
};
|
|
37
|
+
export declare function createUploadAuth(signer: (draft: EventTemplate) => Promise<SignedEvent>, blobs: string | string[], options?: UploadAuthOptions): Promise<SignedEvent>;
|
|
38
|
+
export type DownloadAuthOptions = Omit<AuthEventOptions, 'blobs' | 'servers'>;
|
|
39
|
+
export declare function createDownloadAuth(signer: (draft: EventTemplate) => Promise<SignedEvent>, hash: string, options?: DownloadAuthOptions): Promise<SignedEvent>;
|
|
40
|
+
export type MirrorAuthOptions = Omit<AuthEventOptions, 'blobs'>;
|
|
41
|
+
export declare function createMirrorAuth(signer: (draft: EventTemplate) => Promise<SignedEvent>, hash: string, options?: MirrorAuthOptions): Promise<SignedEvent>;
|
|
42
|
+
export type ListAuthOptions = Omit<AuthEventOptions, 'blobs'>;
|
|
43
|
+
export declare function createListAuth(signer: (draft: EventTemplate) => Promise<SignedEvent>, options?: ListAuthOptions): Promise<SignedEvent>;
|
|
44
|
+
export type DeleteAuthOptions = Omit<AuthEventOptions, 'blobs'>;
|
|
45
|
+
export declare function createDeleteAuth(signer: (draft: EventTemplate) => Promise<SignedEvent>, hash: string, options?: DeleteAuthOptions): Promise<SignedEvent>;
|
|
46
|
+
export type BlossomURI = {
|
|
47
|
+
sha256: string;
|
|
48
|
+
ext: string;
|
|
49
|
+
servers: string[];
|
|
50
|
+
authors: string[];
|
|
51
|
+
size?: number;
|
|
52
|
+
};
|
|
53
|
+
export declare function parseBlossomURI(uri: string): BlossomURI;
|
|
54
|
+
export declare function buildBlossomURI(options: BlossomURI): string;
|
|
55
|
+
export declare function blossomURIToURL(uri: string | BlossomURI): URL;
|
|
56
|
+
export declare function blossomURIFromURL(url: URL): BlossomURI;
|
|
57
|
+
export declare function getExtension(mimetype: string): string;
|
|
58
|
+
export declare function getMIMEType(ext: string): string;
|
|
59
|
+
export declare function getServersFromServerListEvent(event: {
|
|
60
|
+
tags: string[][];
|
|
61
|
+
}): URL[];
|
|
62
|
+
export declare function getHashFromURL(url: string | URL): string | null;
|
|
63
|
+
export type UploadOptions = {
|
|
64
|
+
signal?: AbortSignal;
|
|
65
|
+
auth?: SignedEvent | boolean;
|
|
66
|
+
timeout?: number;
|
|
67
|
+
onAuth?: (server: string, sha256: string) => Promise<SignedEvent>;
|
|
68
|
+
};
|
|
69
|
+
export declare function uploadBlob(server: string, blob: Blob | File, opts?: UploadOptions): Promise<BlobDescriptor>;
|
|
70
|
+
export type DownloadOptions = {
|
|
71
|
+
signal?: AbortSignal;
|
|
72
|
+
auth?: SignedEvent | boolean;
|
|
73
|
+
timeout?: number;
|
|
74
|
+
onAuth?: (server: string, sha256: string) => Promise<SignedEvent>;
|
|
75
|
+
};
|
|
76
|
+
export declare function downloadBlob(server: string, hash: string, opts?: DownloadOptions): Promise<Response>;
|
|
77
|
+
export type ListOptions = {
|
|
78
|
+
signal?: AbortSignal;
|
|
79
|
+
auth?: SignedEvent | boolean;
|
|
80
|
+
timeout?: number;
|
|
81
|
+
onAuth?: (server: string) => Promise<SignedEvent>;
|
|
82
|
+
cursor?: string;
|
|
83
|
+
limit?: number;
|
|
84
|
+
since?: number;
|
|
85
|
+
until?: number;
|
|
86
|
+
};
|
|
87
|
+
export declare function listBlobs(server: string, pubkey: string, opts?: ListOptions): Promise<BlobDescriptor[]>;
|
|
88
|
+
export declare function iterateBlobs(server: string, pubkey: string, opts?: ListOptions): AsyncGenerator<BlobDescriptor[], void, void>;
|
|
89
|
+
export type DeleteOptions = {
|
|
90
|
+
signal?: AbortSignal;
|
|
91
|
+
auth?: SignedEvent | boolean;
|
|
92
|
+
timeout?: number;
|
|
93
|
+
onAuth?: (server: string, sha256: string) => Promise<SignedEvent>;
|
|
94
|
+
};
|
|
95
|
+
export declare function deleteBlob(server: string, hash: string, opts?: DeleteOptions): Promise<boolean>;
|
|
96
|
+
export type HasBlobOptions = {
|
|
97
|
+
signal?: AbortSignal;
|
|
98
|
+
timeout?: number;
|
|
99
|
+
};
|
|
100
|
+
export declare function hasBlob(server: string, hash: string, opts?: HasBlobOptions): Promise<boolean>;
|
|
101
|
+
export type MirrorOptions = {
|
|
102
|
+
signal?: AbortSignal;
|
|
103
|
+
auth?: SignedEvent | boolean;
|
|
104
|
+
timeout?: number;
|
|
105
|
+
onAuth?: (server: string, sha256: string) => Promise<SignedEvent>;
|
|
106
|
+
};
|
|
107
|
+
export declare function mirrorBlob(server: string, blob: BlobDescriptor, opts?: MirrorOptions): Promise<BlobDescriptor>;
|
|
108
|
+
export type ReportOptions = {
|
|
109
|
+
signal?: AbortSignal;
|
|
110
|
+
timeout?: number;
|
|
111
|
+
onError?: (server: string, error: Error) => void;
|
|
112
|
+
};
|
|
113
|
+
export declare function reportBlobs(servers: Iterable<string>, report: SignedEvent, opts?: ReportOptions): Promise<Map<string, boolean>>;
|
|
9
114
|
export declare class BlossomClient {
|
|
10
|
-
private mediaserver;
|
|
11
115
|
private signer;
|
|
116
|
+
private mediaserver;
|
|
12
117
|
constructor(mediaserver: string, signer: Signer);
|
|
13
|
-
|
|
118
|
+
getMediaServer(): string;
|
|
14
119
|
private authorizationHeader;
|
|
15
|
-
|
|
16
|
-
uploadBlob(file:
|
|
120
|
+
private httpCall;
|
|
121
|
+
uploadBlob(file: Blob | File, contentType?: string): Promise<BlobDescriptor>;
|
|
17
122
|
uploadFile(file: File): Promise<BlobDescriptor>;
|
|
18
123
|
download(hash: string): Promise<ArrayBuffer>;
|
|
19
124
|
downloadAsBlob(hash: string): Promise<Blob>;
|
|
20
125
|
list(): Promise<BlobDescriptor[]>;
|
|
21
126
|
delete(hash: string): Promise<void>;
|
|
127
|
+
check(hash: string): Promise<void>;
|
|
128
|
+
mirror(remoteBlobURL: string): Promise<BlobDescriptor>;
|
|
22
129
|
}
|
|
@@ -2,7 +2,7 @@ import { AbstractRelay, type AbstractRelayConstructorOptions } from './abstract-
|
|
|
2
2
|
export declare function useWebSocketImplementation(websocketImplementation: any): void;
|
|
3
3
|
export declare class Relay extends AbstractRelay {
|
|
4
4
|
constructor(url: string, options?: Pick<AbstractRelayConstructorOptions, 'enablePing' | 'enableReconnect' | 'idleTimeout'>);
|
|
5
|
-
static connect(url: string, options?: Pick<AbstractRelayConstructorOptions, 'enablePing' | 'enableReconnect' | 'idleTimeout'>): Promise<Relay>;
|
|
5
|
+
static connect(url: string, options?: Pick<AbstractRelayConstructorOptions, 'enablePing' | 'enableReconnect' | 'idleTimeout'> & Parameters<AbstractRelay['connect']>[0]): Promise<Relay>;
|
|
6
6
|
}
|
|
7
7
|
export type RelayRecord = Record<string, {
|
|
8
8
|
read: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "nostr-tools",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.25.1",
|
|
5
5
|
"description": "Tools for making a Nostr client.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -270,12 +270,6 @@
|
|
|
270
270
|
"require": "./lib/cjs/nip99.js",
|
|
271
271
|
"types": "./lib/types/nip99.d.ts"
|
|
272
272
|
},
|
|
273
|
-
"./nipb0": {
|
|
274
|
-
"source": "./nipb0.ts",
|
|
275
|
-
"import": "./lib/esm/nipb0.js",
|
|
276
|
-
"require": "./lib/cjs/nipb0.js",
|
|
277
|
-
"types": "./lib/types/nipb0.d.ts"
|
|
278
|
-
},
|
|
279
273
|
"./nipb7": {
|
|
280
274
|
"source": "./nipb7.ts",
|
|
281
275
|
"import": "./lib/esm/nipb7.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/buzz",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.3",
|
|
4
4
|
"description": "Connect OpenClaw agents to Buzz rooms",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"nostr-tools": "2.
|
|
11
|
+
"nostr-tools": "2.25.1",
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.9.
|
|
15
|
+
"openclaw": ">=2026.9.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"minHostVersion": ">=2026.7.2"
|
|
85
85
|
},
|
|
86
86
|
"compat": {
|
|
87
|
-
"pluginApi": ">=2026.9.
|
|
87
|
+
"pluginApi": ">=2026.9.3"
|
|
88
88
|
},
|
|
89
89
|
"build": {
|
|
90
|
-
"openclawVersion": "2026.9.
|
|
90
|
+
"openclawVersion": "2026.9.3"
|
|
91
91
|
},
|
|
92
92
|
"release": {
|
|
93
93
|
"publishToClawHub": true,
|