@pkcprotocol/pkc-js 0.0.15 → 0.0.17
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/browser/clients/base-client-manager.d.ts +7 -5
- package/dist/browser/clients/base-client-manager.js +38 -23
- package/dist/browser/clients/base-client-manager.js.map +1 -1
- package/dist/browser/clients/rpc-client/pkc-rpc-client.d.ts +24 -29
- package/dist/browser/clients/rpc-client/pkc-rpc-client.js +56 -67
- package/dist/browser/clients/rpc-client/pkc-rpc-client.js.map +1 -1
- package/dist/browser/clients/rpc-client/rpc-schema-util.d.ts +25 -8
- package/dist/browser/clients/rpc-client/rpc-schema-util.js +12 -6
- package/dist/browser/clients/rpc-client/rpc-schema-util.js.map +1 -1
- package/dist/browser/clients/rpc-client/schema.d.ts +14 -10
- package/dist/browser/clients/rpc-client/schema.js +14 -11
- package/dist/browser/clients/rpc-client/schema.js.map +1 -1
- package/dist/browser/clients/rpc-client/types.d.ts +20 -3
- package/dist/browser/community/community-client-manager.js +19 -8
- package/dist/browser/community/community-client-manager.js.map +1 -1
- package/dist/browser/community/remote-community.d.ts +1 -0
- package/dist/browser/community/remote-community.js +30 -5
- package/dist/browser/community/remote-community.js.map +1 -1
- package/dist/browser/community/rpc-local-community.js +11 -6
- package/dist/browser/community/rpc-local-community.js.map +1 -1
- package/dist/browser/community/rpc-remote-community.js +11 -9
- package/dist/browser/community/rpc-remote-community.js.map +1 -1
- package/dist/browser/community/schema.d.ts +1 -1
- package/dist/browser/community/schema.js +1 -2
- package/dist/browser/community/schema.js.map +1 -1
- package/dist/browser/errors.d.ts +2 -3
- package/dist/browser/errors.js +1 -2
- package/dist/browser/errors.js.map +1 -1
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/pages/pages-client-manager.js +11 -8
- package/dist/browser/pages/pages-client-manager.js.map +1 -1
- package/dist/browser/pages/pages.d.ts +1 -1
- package/dist/browser/pages/pages.js +2 -2
- package/dist/browser/pages/pages.js.map +1 -1
- package/dist/browser/pkc/pkc-with-rpc-client.d.ts +8 -3
- package/dist/browser/pkc/pkc-with-rpc-client.js +9 -3
- package/dist/browser/pkc/pkc-with-rpc-client.js.map +1 -1
- package/dist/browser/pkc/pkc.d.ts +8 -5
- package/dist/browser/pkc/pkc.js +37 -25
- package/dist/browser/pkc/pkc.js.map +1 -1
- package/dist/browser/pkc/tracked-instance-registry-util.d.ts +4 -2
- package/dist/browser/pkc/tracked-instance-registry-util.js +2 -0
- package/dist/browser/pkc/tracked-instance-registry-util.js.map +1 -1
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/publications/comment/comment-client-manager.d.ts +1 -1
- package/dist/browser/publications/comment/comment-client-manager.js +37 -16
- package/dist/browser/publications/comment/comment-client-manager.js.map +1 -1
- package/dist/browser/publications/comment/comment.js +19 -9
- package/dist/browser/publications/comment/comment.js.map +1 -1
- package/dist/browser/publications/publication-client-manager.js +9 -6
- package/dist/browser/publications/publication-client-manager.js.map +1 -1
- package/dist/browser/publications/publication.d.ts +3 -1
- package/dist/browser/publications/publication.js +21 -17
- package/dist/browser/publications/publication.js.map +1 -1
- package/dist/browser/publications/types.d.ts +0 -1
- package/dist/browser/rpc/src/index.d.ts +23 -409
- package/dist/browser/rpc/src/index.js +81 -49
- package/dist/browser/rpc/src/index.js.map +1 -1
- package/dist/browser/rpc/src/schema.d.ts +3 -60
- package/dist/browser/runtime/node/community/challenges/index.js +1 -2
- package/dist/browser/runtime/node/community/challenges/index.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community.js +31 -19
- package/dist/browser/runtime/node/community/local-community.js.map +1 -1
- package/dist/browser/schema/schema-util.js +4 -4
- package/dist/browser/schema/schema-util.js.map +1 -1
- package/dist/browser/schema/schema.d.ts +1 -0
- package/dist/browser/schema/schema.js +6 -0
- package/dist/browser/schema/schema.js.map +1 -1
- package/dist/browser/schema.d.ts +17 -132
- package/dist/browser/schema.js +19 -21
- package/dist/browser/schema.js.map +1 -1
- package/dist/browser/signer/signatures.d.ts +2 -1
- package/dist/browser/signer/signatures.js +34 -19
- package/dist/browser/signer/signatures.js.map +1 -1
- package/dist/browser/signer/util.d.ts +6 -6
- package/dist/browser/signer/util.js +25 -25
- package/dist/browser/signer/util.js.map +1 -1
- package/dist/browser/test/node/hanging-test/scenarios/comment-update.scenario.js +2 -1
- package/dist/browser/test/node/hanging-test/scenarios/comment-update.scenario.js.map +1 -1
- package/dist/browser/test/test-util.js +30 -8
- package/dist/browser/test/test-util.js.map +1 -1
- package/dist/browser/types.d.ts +5 -0
- package/dist/browser/util.js +32 -12
- package/dist/browser/util.js.map +1 -1
- package/dist/node/clients/base-client-manager.d.ts +7 -5
- package/dist/node/clients/base-client-manager.js +38 -23
- package/dist/node/clients/base-client-manager.js.map +1 -1
- package/dist/node/clients/rpc-client/pkc-rpc-client.d.ts +24 -29
- package/dist/node/clients/rpc-client/pkc-rpc-client.js +56 -67
- package/dist/node/clients/rpc-client/pkc-rpc-client.js.map +1 -1
- package/dist/node/clients/rpc-client/rpc-schema-util.d.ts +25 -8
- package/dist/node/clients/rpc-client/rpc-schema-util.js +12 -6
- package/dist/node/clients/rpc-client/rpc-schema-util.js.map +1 -1
- package/dist/node/clients/rpc-client/schema.d.ts +14 -10
- package/dist/node/clients/rpc-client/schema.js +14 -11
- package/dist/node/clients/rpc-client/schema.js.map +1 -1
- package/dist/node/clients/rpc-client/types.d.ts +20 -3
- package/dist/node/community/community-client-manager.js +19 -8
- package/dist/node/community/community-client-manager.js.map +1 -1
- package/dist/node/community/remote-community.d.ts +1 -0
- package/dist/node/community/remote-community.js +30 -5
- package/dist/node/community/remote-community.js.map +1 -1
- package/dist/node/community/rpc-local-community.js +11 -6
- package/dist/node/community/rpc-local-community.js.map +1 -1
- package/dist/node/community/rpc-remote-community.js +11 -9
- package/dist/node/community/rpc-remote-community.js.map +1 -1
- package/dist/node/community/schema.d.ts +1 -1
- package/dist/node/community/schema.js +1 -2
- package/dist/node/community/schema.js.map +1 -1
- package/dist/node/errors.d.ts +2 -3
- package/dist/node/errors.js +1 -2
- package/dist/node/errors.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/pages/pages-client-manager.js +11 -8
- package/dist/node/pages/pages-client-manager.js.map +1 -1
- package/dist/node/pages/pages.d.ts +1 -1
- package/dist/node/pages/pages.js +2 -2
- package/dist/node/pages/pages.js.map +1 -1
- package/dist/node/pkc/pkc-with-rpc-client.d.ts +8 -3
- package/dist/node/pkc/pkc-with-rpc-client.js +9 -3
- package/dist/node/pkc/pkc-with-rpc-client.js.map +1 -1
- package/dist/node/pkc/pkc.d.ts +8 -5
- package/dist/node/pkc/pkc.js +37 -25
- package/dist/node/pkc/pkc.js.map +1 -1
- package/dist/node/pkc/tracked-instance-registry-util.d.ts +4 -2
- package/dist/node/pkc/tracked-instance-registry-util.js +2 -0
- package/dist/node/pkc/tracked-instance-registry-util.js.map +1 -1
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/publications/comment/comment-client-manager.d.ts +1 -1
- package/dist/node/publications/comment/comment-client-manager.js +37 -16
- package/dist/node/publications/comment/comment-client-manager.js.map +1 -1
- package/dist/node/publications/comment/comment.js +19 -9
- package/dist/node/publications/comment/comment.js.map +1 -1
- package/dist/node/publications/publication-client-manager.js +9 -6
- package/dist/node/publications/publication-client-manager.js.map +1 -1
- package/dist/node/publications/publication.d.ts +3 -1
- package/dist/node/publications/publication.js +21 -17
- package/dist/node/publications/publication.js.map +1 -1
- package/dist/node/publications/types.d.ts +0 -1
- package/dist/node/rpc/src/index.d.ts +23 -409
- package/dist/node/rpc/src/index.js +81 -49
- package/dist/node/rpc/src/index.js.map +1 -1
- package/dist/node/rpc/src/schema.d.ts +3 -60
- package/dist/node/runtime/node/community/challenges/index.js +1 -2
- package/dist/node/runtime/node/community/challenges/index.js.map +1 -1
- package/dist/node/runtime/node/community/local-community.js +31 -19
- package/dist/node/runtime/node/community/local-community.js.map +1 -1
- package/dist/node/schema/schema-util.js +4 -4
- package/dist/node/schema/schema-util.js.map +1 -1
- package/dist/node/schema/schema.d.ts +1 -0
- package/dist/node/schema/schema.js +6 -0
- package/dist/node/schema/schema.js.map +1 -1
- package/dist/node/schema.d.ts +17 -132
- package/dist/node/schema.js +19 -21
- package/dist/node/schema.js.map +1 -1
- package/dist/node/signer/signatures.d.ts +2 -1
- package/dist/node/signer/signatures.js +34 -19
- package/dist/node/signer/signatures.js.map +1 -1
- package/dist/node/signer/util.d.ts +6 -6
- package/dist/node/signer/util.js +25 -25
- package/dist/node/signer/util.js.map +1 -1
- package/dist/node/test/node/hanging-test/scenarios/comment-update.scenario.js +2 -1
- package/dist/node/test/node/hanging-test/scenarios/comment-update.scenario.js.map +1 -1
- package/dist/node/test/test-util.js +30 -8
- package/dist/node/test/test-util.js.map +1 -1
- package/dist/node/types.d.ts +5 -0
- package/dist/node/util.js +32 -12
- package/dist/node/util.js.map +1 -1
- package/package.json +12 -18
|
@@ -6,10 +6,9 @@ import WebSocket from "ws";
|
|
|
6
6
|
import Publication from "../../publications/publication.js";
|
|
7
7
|
import { LocalCommunity } from "../../runtime/browser/community/local-community.js";
|
|
8
8
|
import type { CommentIpfsType } from "../../publications/comment/types.js";
|
|
9
|
-
import type {
|
|
10
|
-
import { RpcPublishResult } from "../../publications/types.js";
|
|
9
|
+
import type { RpcInternalCommunityRecordBeforeFirstUpdateType } from "../../community/types.js";
|
|
11
10
|
import { TypedEmitter } from "tiny-typed-emitter";
|
|
12
|
-
import type {
|
|
11
|
+
import type { RpcSubscriptionIdResult, RpcSuccessResult, RpcFetchCidResult, RpcResolveAuthorNameResult, RpcCommentPageResult, RpcCommunityPageResult, RpcLocalCommunityUpdateResultType } from "../../clients/rpc-client/types.js";
|
|
13
12
|
declare class PKCWsServer extends TypedEmitter<PKCRpcServerEvents> {
|
|
14
13
|
pkc: PKC;
|
|
15
14
|
rpcWebsockets: RpcWebsocketsServer;
|
|
@@ -40,6 +39,7 @@ declare class PKCWsServer extends TypedEmitter<PKCRpcServerEvents> {
|
|
|
40
39
|
private _rpcStateDb;
|
|
41
40
|
constructor({ port, server, pkc, authKey, startStartedCommunitiesOnStartup }: PKCWsServerClassOptions);
|
|
42
41
|
getStartedCommunity(address: string): Promise<LocalCommunity>;
|
|
42
|
+
private _findCommunityAddress;
|
|
43
43
|
private _emitError;
|
|
44
44
|
private _getRpcStateDb;
|
|
45
45
|
private _updateCommunityState;
|
|
@@ -54,426 +54,40 @@ declare class PKCWsServer extends TypedEmitter<PKCRpcServerEvents> {
|
|
|
54
54
|
private _retirePKCIfNeeded;
|
|
55
55
|
_getPKCInstance(): Promise<PKC>;
|
|
56
56
|
getComment(params: any): Promise<CommentIpfsType>;
|
|
57
|
-
getCommunityPage(params: any): Promise<
|
|
58
|
-
|
|
59
|
-
comments: {
|
|
60
|
-
comment: {
|
|
61
|
-
[x: string]: unknown;
|
|
62
|
-
timestamp: number;
|
|
63
|
-
signature: {
|
|
64
|
-
type: string;
|
|
65
|
-
signature: string;
|
|
66
|
-
publicKey: string;
|
|
67
|
-
signedPropertyNames: string[];
|
|
68
|
-
};
|
|
69
|
-
protocolVersion: string;
|
|
70
|
-
depth: number;
|
|
71
|
-
flairs?: {
|
|
72
|
-
[x: string]: unknown;
|
|
73
|
-
text: string;
|
|
74
|
-
backgroundColor?: string | undefined;
|
|
75
|
-
textColor?: string | undefined;
|
|
76
|
-
expiresAt?: number | undefined;
|
|
77
|
-
}[] | undefined;
|
|
78
|
-
communityPublicKey?: string | undefined;
|
|
79
|
-
communityName?: string | undefined;
|
|
80
|
-
link?: string | undefined;
|
|
81
|
-
spoiler?: boolean | undefined;
|
|
82
|
-
nsfw?: boolean | undefined;
|
|
83
|
-
content?: string | undefined;
|
|
84
|
-
title?: string | undefined;
|
|
85
|
-
linkWidth?: number | undefined;
|
|
86
|
-
linkHeight?: number | undefined;
|
|
87
|
-
linkHtmlTagName?: string | undefined;
|
|
88
|
-
parentCid?: string | undefined;
|
|
89
|
-
postCid?: string | undefined;
|
|
90
|
-
quotedCids?: string[] | undefined;
|
|
91
|
-
author?: {
|
|
92
|
-
[x: string]: unknown;
|
|
93
|
-
name?: string | undefined;
|
|
94
|
-
previousCommentCid?: string | undefined;
|
|
95
|
-
displayName?: string | undefined;
|
|
96
|
-
wallets?: Record<string, {
|
|
97
|
-
address: string;
|
|
98
|
-
timestamp: number;
|
|
99
|
-
signature: {
|
|
100
|
-
signature: string;
|
|
101
|
-
type: string;
|
|
102
|
-
};
|
|
103
|
-
}> | undefined;
|
|
104
|
-
avatar?: {
|
|
105
|
-
[x: string]: unknown;
|
|
106
|
-
chainTicker: string;
|
|
107
|
-
address: string;
|
|
108
|
-
id: string;
|
|
109
|
-
timestamp: number;
|
|
110
|
-
signature: {
|
|
111
|
-
signature: string;
|
|
112
|
-
type: string;
|
|
113
|
-
};
|
|
114
|
-
} | undefined;
|
|
115
|
-
flairs?: {
|
|
116
|
-
[x: string]: unknown;
|
|
117
|
-
text: string;
|
|
118
|
-
backgroundColor?: string | undefined;
|
|
119
|
-
textColor?: string | undefined;
|
|
120
|
-
expiresAt?: number | undefined;
|
|
121
|
-
}[] | undefined;
|
|
122
|
-
} | undefined;
|
|
123
|
-
thumbnailUrl?: string | undefined;
|
|
124
|
-
thumbnailUrlWidth?: number | undefined;
|
|
125
|
-
thumbnailUrlHeight?: number | undefined;
|
|
126
|
-
previousCid?: string | undefined;
|
|
127
|
-
pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined;
|
|
128
|
-
};
|
|
129
|
-
commentUpdate: {
|
|
130
|
-
[x: string]: unknown;
|
|
131
|
-
cid: string;
|
|
132
|
-
upvoteCount: number;
|
|
133
|
-
downvoteCount: number;
|
|
134
|
-
replyCount: number;
|
|
135
|
-
updatedAt: number;
|
|
136
|
-
signature: {
|
|
137
|
-
type: string;
|
|
138
|
-
signature: string;
|
|
139
|
-
publicKey: string;
|
|
140
|
-
signedPropertyNames: string[];
|
|
141
|
-
};
|
|
142
|
-
protocolVersion: string;
|
|
143
|
-
childCount?: number | undefined;
|
|
144
|
-
number?: number | undefined;
|
|
145
|
-
postNumber?: number | undefined;
|
|
146
|
-
edit?: {
|
|
147
|
-
[x: string]: unknown;
|
|
148
|
-
timestamp: number;
|
|
149
|
-
signature: {
|
|
150
|
-
type: string;
|
|
151
|
-
signature: string;
|
|
152
|
-
publicKey: string;
|
|
153
|
-
signedPropertyNames: string[];
|
|
154
|
-
};
|
|
155
|
-
protocolVersion: string;
|
|
156
|
-
commentCid: string;
|
|
157
|
-
flairs?: {
|
|
158
|
-
[x: string]: unknown;
|
|
159
|
-
text: string;
|
|
160
|
-
backgroundColor?: string | undefined;
|
|
161
|
-
textColor?: string | undefined;
|
|
162
|
-
expiresAt?: number | undefined;
|
|
163
|
-
}[] | undefined;
|
|
164
|
-
communityPublicKey?: string | undefined;
|
|
165
|
-
communityName?: string | undefined;
|
|
166
|
-
spoiler?: boolean | undefined;
|
|
167
|
-
nsfw?: boolean | undefined;
|
|
168
|
-
reason?: string | undefined;
|
|
169
|
-
content?: string | undefined;
|
|
170
|
-
deleted?: boolean | undefined;
|
|
171
|
-
author?: {
|
|
172
|
-
[x: string]: unknown;
|
|
173
|
-
name?: string | undefined;
|
|
174
|
-
previousCommentCid?: string | undefined;
|
|
175
|
-
displayName?: string | undefined;
|
|
176
|
-
wallets?: Record<string, {
|
|
177
|
-
address: string;
|
|
178
|
-
timestamp: number;
|
|
179
|
-
signature: {
|
|
180
|
-
signature: string;
|
|
181
|
-
type: string;
|
|
182
|
-
};
|
|
183
|
-
}> | undefined;
|
|
184
|
-
avatar?: {
|
|
185
|
-
[x: string]: unknown;
|
|
186
|
-
chainTicker: string;
|
|
187
|
-
address: string;
|
|
188
|
-
id: string;
|
|
189
|
-
timestamp: number;
|
|
190
|
-
signature: {
|
|
191
|
-
signature: string;
|
|
192
|
-
type: string;
|
|
193
|
-
};
|
|
194
|
-
} | undefined;
|
|
195
|
-
flairs?: {
|
|
196
|
-
[x: string]: unknown;
|
|
197
|
-
text: string;
|
|
198
|
-
backgroundColor?: string | undefined;
|
|
199
|
-
textColor?: string | undefined;
|
|
200
|
-
expiresAt?: number | undefined;
|
|
201
|
-
}[] | undefined;
|
|
202
|
-
} | undefined;
|
|
203
|
-
} | undefined;
|
|
204
|
-
flairs?: {
|
|
205
|
-
[x: string]: unknown;
|
|
206
|
-
text: string;
|
|
207
|
-
backgroundColor?: string | undefined;
|
|
208
|
-
textColor?: string | undefined;
|
|
209
|
-
expiresAt?: number | undefined;
|
|
210
|
-
}[] | undefined;
|
|
211
|
-
spoiler?: boolean | undefined;
|
|
212
|
-
nsfw?: boolean | undefined;
|
|
213
|
-
pinned?: boolean | undefined;
|
|
214
|
-
locked?: boolean | undefined;
|
|
215
|
-
archived?: boolean | undefined;
|
|
216
|
-
removed?: boolean | undefined;
|
|
217
|
-
reason?: string | undefined;
|
|
218
|
-
approved?: boolean | undefined;
|
|
219
|
-
author?: {
|
|
220
|
-
[x: string]: unknown;
|
|
221
|
-
community?: {
|
|
222
|
-
[x: string]: unknown;
|
|
223
|
-
postScore: number;
|
|
224
|
-
replyScore: number;
|
|
225
|
-
firstCommentTimestamp: number;
|
|
226
|
-
lastCommentCid: string;
|
|
227
|
-
banExpiresAt?: number | undefined;
|
|
228
|
-
flairs?: {
|
|
229
|
-
[x: string]: unknown;
|
|
230
|
-
text: string;
|
|
231
|
-
backgroundColor?: string | undefined;
|
|
232
|
-
textColor?: string | undefined;
|
|
233
|
-
expiresAt?: number | undefined;
|
|
234
|
-
}[] | undefined;
|
|
235
|
-
} | undefined;
|
|
236
|
-
} | undefined;
|
|
237
|
-
lastChildCid?: string | undefined;
|
|
238
|
-
lastReplyTimestamp?: number | undefined;
|
|
239
|
-
replies?: {
|
|
240
|
-
pages: Record<string, /*elided*/ any>;
|
|
241
|
-
pageCids?: Record<string, string> | undefined;
|
|
242
|
-
} | undefined;
|
|
243
|
-
};
|
|
244
|
-
}[];
|
|
245
|
-
nextCid?: string | undefined;
|
|
246
|
-
} | ModQueuePageIpfs;
|
|
247
|
-
runtimeFields: import("../../pages/util.js").PageRuntimeFields;
|
|
248
|
-
}>;
|
|
249
|
-
getCommentPage(params: any): Promise<{
|
|
250
|
-
page: {
|
|
251
|
-
comments: {
|
|
252
|
-
comment: {
|
|
253
|
-
[x: string]: unknown;
|
|
254
|
-
timestamp: number;
|
|
255
|
-
signature: {
|
|
256
|
-
type: string;
|
|
257
|
-
signature: string;
|
|
258
|
-
publicKey: string;
|
|
259
|
-
signedPropertyNames: string[];
|
|
260
|
-
};
|
|
261
|
-
protocolVersion: string;
|
|
262
|
-
depth: number;
|
|
263
|
-
flairs?: {
|
|
264
|
-
[x: string]: unknown;
|
|
265
|
-
text: string;
|
|
266
|
-
backgroundColor?: string | undefined;
|
|
267
|
-
textColor?: string | undefined;
|
|
268
|
-
expiresAt?: number | undefined;
|
|
269
|
-
}[] | undefined;
|
|
270
|
-
communityPublicKey?: string | undefined;
|
|
271
|
-
communityName?: string | undefined;
|
|
272
|
-
link?: string | undefined;
|
|
273
|
-
spoiler?: boolean | undefined;
|
|
274
|
-
nsfw?: boolean | undefined;
|
|
275
|
-
content?: string | undefined;
|
|
276
|
-
title?: string | undefined;
|
|
277
|
-
linkWidth?: number | undefined;
|
|
278
|
-
linkHeight?: number | undefined;
|
|
279
|
-
linkHtmlTagName?: string | undefined;
|
|
280
|
-
parentCid?: string | undefined;
|
|
281
|
-
postCid?: string | undefined;
|
|
282
|
-
quotedCids?: string[] | undefined;
|
|
283
|
-
author?: {
|
|
284
|
-
[x: string]: unknown;
|
|
285
|
-
name?: string | undefined;
|
|
286
|
-
previousCommentCid?: string | undefined;
|
|
287
|
-
displayName?: string | undefined;
|
|
288
|
-
wallets?: Record<string, {
|
|
289
|
-
address: string;
|
|
290
|
-
timestamp: number;
|
|
291
|
-
signature: {
|
|
292
|
-
signature: string;
|
|
293
|
-
type: string;
|
|
294
|
-
};
|
|
295
|
-
}> | undefined;
|
|
296
|
-
avatar?: {
|
|
297
|
-
[x: string]: unknown;
|
|
298
|
-
chainTicker: string;
|
|
299
|
-
address: string;
|
|
300
|
-
id: string;
|
|
301
|
-
timestamp: number;
|
|
302
|
-
signature: {
|
|
303
|
-
signature: string;
|
|
304
|
-
type: string;
|
|
305
|
-
};
|
|
306
|
-
} | undefined;
|
|
307
|
-
flairs?: {
|
|
308
|
-
[x: string]: unknown;
|
|
309
|
-
text: string;
|
|
310
|
-
backgroundColor?: string | undefined;
|
|
311
|
-
textColor?: string | undefined;
|
|
312
|
-
expiresAt?: number | undefined;
|
|
313
|
-
}[] | undefined;
|
|
314
|
-
} | undefined;
|
|
315
|
-
thumbnailUrl?: string | undefined;
|
|
316
|
-
thumbnailUrlWidth?: number | undefined;
|
|
317
|
-
thumbnailUrlHeight?: number | undefined;
|
|
318
|
-
previousCid?: string | undefined;
|
|
319
|
-
pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined;
|
|
320
|
-
};
|
|
321
|
-
commentUpdate: {
|
|
322
|
-
[x: string]: unknown;
|
|
323
|
-
cid: string;
|
|
324
|
-
upvoteCount: number;
|
|
325
|
-
downvoteCount: number;
|
|
326
|
-
replyCount: number;
|
|
327
|
-
updatedAt: number;
|
|
328
|
-
signature: {
|
|
329
|
-
type: string;
|
|
330
|
-
signature: string;
|
|
331
|
-
publicKey: string;
|
|
332
|
-
signedPropertyNames: string[];
|
|
333
|
-
};
|
|
334
|
-
protocolVersion: string;
|
|
335
|
-
childCount?: number | undefined;
|
|
336
|
-
number?: number | undefined;
|
|
337
|
-
postNumber?: number | undefined;
|
|
338
|
-
edit?: {
|
|
339
|
-
[x: string]: unknown;
|
|
340
|
-
timestamp: number;
|
|
341
|
-
signature: {
|
|
342
|
-
type: string;
|
|
343
|
-
signature: string;
|
|
344
|
-
publicKey: string;
|
|
345
|
-
signedPropertyNames: string[];
|
|
346
|
-
};
|
|
347
|
-
protocolVersion: string;
|
|
348
|
-
commentCid: string;
|
|
349
|
-
flairs?: {
|
|
350
|
-
[x: string]: unknown;
|
|
351
|
-
text: string;
|
|
352
|
-
backgroundColor?: string | undefined;
|
|
353
|
-
textColor?: string | undefined;
|
|
354
|
-
expiresAt?: number | undefined;
|
|
355
|
-
}[] | undefined;
|
|
356
|
-
communityPublicKey?: string | undefined;
|
|
357
|
-
communityName?: string | undefined;
|
|
358
|
-
spoiler?: boolean | undefined;
|
|
359
|
-
nsfw?: boolean | undefined;
|
|
360
|
-
reason?: string | undefined;
|
|
361
|
-
content?: string | undefined;
|
|
362
|
-
deleted?: boolean | undefined;
|
|
363
|
-
author?: {
|
|
364
|
-
[x: string]: unknown;
|
|
365
|
-
name?: string | undefined;
|
|
366
|
-
previousCommentCid?: string | undefined;
|
|
367
|
-
displayName?: string | undefined;
|
|
368
|
-
wallets?: Record<string, {
|
|
369
|
-
address: string;
|
|
370
|
-
timestamp: number;
|
|
371
|
-
signature: {
|
|
372
|
-
signature: string;
|
|
373
|
-
type: string;
|
|
374
|
-
};
|
|
375
|
-
}> | undefined;
|
|
376
|
-
avatar?: {
|
|
377
|
-
[x: string]: unknown;
|
|
378
|
-
chainTicker: string;
|
|
379
|
-
address: string;
|
|
380
|
-
id: string;
|
|
381
|
-
timestamp: number;
|
|
382
|
-
signature: {
|
|
383
|
-
signature: string;
|
|
384
|
-
type: string;
|
|
385
|
-
};
|
|
386
|
-
} | undefined;
|
|
387
|
-
flairs?: {
|
|
388
|
-
[x: string]: unknown;
|
|
389
|
-
text: string;
|
|
390
|
-
backgroundColor?: string | undefined;
|
|
391
|
-
textColor?: string | undefined;
|
|
392
|
-
expiresAt?: number | undefined;
|
|
393
|
-
}[] | undefined;
|
|
394
|
-
} | undefined;
|
|
395
|
-
} | undefined;
|
|
396
|
-
flairs?: {
|
|
397
|
-
[x: string]: unknown;
|
|
398
|
-
text: string;
|
|
399
|
-
backgroundColor?: string | undefined;
|
|
400
|
-
textColor?: string | undefined;
|
|
401
|
-
expiresAt?: number | undefined;
|
|
402
|
-
}[] | undefined;
|
|
403
|
-
spoiler?: boolean | undefined;
|
|
404
|
-
nsfw?: boolean | undefined;
|
|
405
|
-
pinned?: boolean | undefined;
|
|
406
|
-
locked?: boolean | undefined;
|
|
407
|
-
archived?: boolean | undefined;
|
|
408
|
-
removed?: boolean | undefined;
|
|
409
|
-
reason?: string | undefined;
|
|
410
|
-
approved?: boolean | undefined;
|
|
411
|
-
author?: {
|
|
412
|
-
[x: string]: unknown;
|
|
413
|
-
community?: {
|
|
414
|
-
[x: string]: unknown;
|
|
415
|
-
postScore: number;
|
|
416
|
-
replyScore: number;
|
|
417
|
-
firstCommentTimestamp: number;
|
|
418
|
-
lastCommentCid: string;
|
|
419
|
-
banExpiresAt?: number | undefined;
|
|
420
|
-
flairs?: {
|
|
421
|
-
[x: string]: unknown;
|
|
422
|
-
text: string;
|
|
423
|
-
backgroundColor?: string | undefined;
|
|
424
|
-
textColor?: string | undefined;
|
|
425
|
-
expiresAt?: number | undefined;
|
|
426
|
-
}[] | undefined;
|
|
427
|
-
} | undefined;
|
|
428
|
-
} | undefined;
|
|
429
|
-
lastChildCid?: string | undefined;
|
|
430
|
-
lastReplyTimestamp?: number | undefined;
|
|
431
|
-
replies?: {
|
|
432
|
-
pages: Record<string, /*elided*/ any>;
|
|
433
|
-
pageCids?: Record<string, string> | undefined;
|
|
434
|
-
} | undefined;
|
|
435
|
-
};
|
|
436
|
-
}[];
|
|
437
|
-
nextCid?: string | undefined;
|
|
438
|
-
};
|
|
439
|
-
runtimeFields: import("../../pages/util.js").PageRuntimeFields;
|
|
440
|
-
}>;
|
|
57
|
+
getCommunityPage(params: any): Promise<RpcCommunityPageResult>;
|
|
58
|
+
getCommentPage(params: any): Promise<RpcCommentPageResult>;
|
|
441
59
|
createCommunity(params: any): Promise<RpcInternalCommunityRecordBeforeFirstUpdateType>;
|
|
442
60
|
private _trackCommunityListener;
|
|
443
61
|
private _untrackCommunityListener;
|
|
444
62
|
_setupStartedEvents(community: LocalCommunity, connectionId: string, subscriptionId: number): void;
|
|
445
|
-
startCommunity(params: any, connectionId: string): Promise<
|
|
446
|
-
stopCommunity(params: any): Promise<
|
|
63
|
+
startCommunity(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
64
|
+
stopCommunity(params: any): Promise<RpcSuccessResult>;
|
|
447
65
|
private _postStoppingOrDeleting;
|
|
448
|
-
editCommunity(params: any): Promise<
|
|
449
|
-
deleteCommunity(params: any): Promise<
|
|
450
|
-
communitiesSubscribe(params: any, connectionId: string): Promise<
|
|
451
|
-
fetchCid(params: any): Promise<
|
|
452
|
-
content: string;
|
|
453
|
-
}>;
|
|
66
|
+
editCommunity(params: any): Promise<RpcLocalCommunityUpdateResultType>;
|
|
67
|
+
deleteCommunity(params: any): Promise<RpcSuccessResult>;
|
|
68
|
+
communitiesSubscribe(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
69
|
+
fetchCid(params: any): Promise<RpcFetchCidResult>;
|
|
454
70
|
private _serializeSettingsFromPKC;
|
|
455
|
-
settingsSubscribe(params: any, connectionId: string): Promise<
|
|
71
|
+
settingsSubscribe(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
456
72
|
private _initPKC;
|
|
457
73
|
private _createPKCInstanceFromSetSettings;
|
|
458
|
-
setSettings(params: any): Promise<
|
|
459
|
-
commentUpdateSubscribe(params: any, connectionId: string): Promise<
|
|
460
|
-
communityUpdateSubscribe(params: any, connectionId: string): Promise<
|
|
74
|
+
setSettings(params: any): Promise<RpcSuccessResult>;
|
|
75
|
+
commentUpdateSubscribe(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
76
|
+
communityUpdateSubscribe(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
461
77
|
private _bindCommunityUpdateSubscription;
|
|
462
78
|
private _createCommentInstanceFromPublishCommentParams;
|
|
463
|
-
publishComment(params: any, connectionId: string): Promise<
|
|
79
|
+
publishComment(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
464
80
|
private _createVoteInstanceFromPublishVoteParams;
|
|
465
|
-
publishVote(params: any, connectionId: string): Promise<
|
|
81
|
+
publishVote(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
466
82
|
private _createCommunityEditInstanceFromPublishCommunityEditParams;
|
|
467
|
-
publishCommunityEdit(params: any, connectionId: string): Promise<
|
|
83
|
+
publishCommunityEdit(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
468
84
|
private _createCommentEditInstanceFromPublishCommentEditParams;
|
|
469
|
-
publishCommentEdit(params: any, connectionId: string): Promise<
|
|
85
|
+
publishCommentEdit(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
470
86
|
private _createCommentModerationInstanceFromPublishCommentModerationParams;
|
|
471
|
-
publishCommentModeration(params: any, connectionId: string): Promise<
|
|
472
|
-
publishChallengeAnswers(params: any): Promise<
|
|
473
|
-
resolveAuthorName(params: any): Promise<
|
|
474
|
-
|
|
475
|
-
}>;
|
|
476
|
-
unsubscribe(params: any, connectionId: string): Promise<boolean>;
|
|
87
|
+
publishCommentModeration(params: any, connectionId: string): Promise<RpcSubscriptionIdResult>;
|
|
88
|
+
publishChallengeAnswers(params: any): Promise<RpcSuccessResult>;
|
|
89
|
+
resolveAuthorName(params: any): Promise<RpcResolveAuthorNameResult>;
|
|
90
|
+
unsubscribe(params: any, connectionId: string): Promise<RpcSuccessResult>;
|
|
477
91
|
destroy(): Promise<void>;
|
|
478
92
|
}
|
|
479
93
|
declare const PKCRpc: {
|