@ixo/editor 3.0.0-beta.2 → 3.0.0-beta.21
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/capabilityValidation-B3NRVwYZ.d.ts +406 -0
- package/dist/chunk-3RYZSIC2.mjs +3020 -0
- package/dist/chunk-3RYZSIC2.mjs.map +1 -0
- package/dist/{chunk-HHEGZUQF.mjs → chunk-4344EQ47.mjs} +13331 -12621
- package/dist/chunk-4344EQ47.mjs.map +1 -0
- package/dist/chunk-VU34HOXM.mjs +36 -0
- package/dist/chunk-VU34HOXM.mjs.map +1 -0
- package/dist/cid-6O646X2I.mjs +9 -0
- package/dist/cid-6O646X2I.mjs.map +1 -0
- package/dist/core/index.d.ts +201 -0
- package/dist/core/index.mjs +59 -0
- package/dist/core/index.mjs.map +1 -0
- package/dist/graphql-client-b82luVYe.d.ts +2857 -0
- package/dist/index-CnqA4qDa.d.ts +2592 -0
- package/dist/index.d.ts +5 -149
- package/dist/index.mjs +14 -8
- package/dist/index.mjs.map +1 -1
- package/dist/mantine/index.d.ts +9 -3
- package/dist/mantine/index.mjs +10 -3
- package/package.json +9 -1
- package/style-core.css +47 -1
- package/style-mantine.css +47 -1
- package/style.css +47 -1
- package/dist/chunk-HHEGZUQF.mjs.map +0 -1
- package/dist/graphql-client-Dv0q3wZe.d.ts +0 -5302
|
@@ -0,0 +1,2857 @@
|
|
|
1
|
+
import * as _blocknote_core from '@blocknote/core';
|
|
2
|
+
import { K as IxoBlockProps, J as IxoEditorType, I as IxoEditorOptions, e as IxoCollaborativeEditorOptions, D as DelegationGrant } from './index-CnqA4qDa.mjs';
|
|
3
|
+
import { Text, Doc, Map, Array as Array$1 } from 'yjs';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { MatrixClient } from 'matrix-js-sdk';
|
|
6
|
+
|
|
7
|
+
declare const CheckboxBlockSpec: {
|
|
8
|
+
config: {
|
|
9
|
+
readonly type: "checkbox";
|
|
10
|
+
readonly propSchema: {
|
|
11
|
+
readonly checked: {
|
|
12
|
+
readonly default: false;
|
|
13
|
+
};
|
|
14
|
+
readonly allowedCheckers: {
|
|
15
|
+
readonly default: "all";
|
|
16
|
+
};
|
|
17
|
+
readonly initialChecked: {
|
|
18
|
+
readonly default: false;
|
|
19
|
+
};
|
|
20
|
+
readonly title: {
|
|
21
|
+
readonly default: "";
|
|
22
|
+
};
|
|
23
|
+
readonly description: {
|
|
24
|
+
readonly default: "";
|
|
25
|
+
};
|
|
26
|
+
readonly icon: {
|
|
27
|
+
readonly default: "square-check";
|
|
28
|
+
};
|
|
29
|
+
readonly conditions: {
|
|
30
|
+
readonly default: "";
|
|
31
|
+
};
|
|
32
|
+
readonly ttlAbsoluteDueDate: {
|
|
33
|
+
readonly default: "";
|
|
34
|
+
};
|
|
35
|
+
readonly ttlFromEnablement: {
|
|
36
|
+
readonly default: "";
|
|
37
|
+
};
|
|
38
|
+
readonly ttlFromCommitment: {
|
|
39
|
+
readonly default: "";
|
|
40
|
+
};
|
|
41
|
+
readonly skill: {
|
|
42
|
+
readonly default: "";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly content: "none";
|
|
46
|
+
};
|
|
47
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
48
|
+
readonly type: "checkbox";
|
|
49
|
+
readonly propSchema: {
|
|
50
|
+
readonly checked: {
|
|
51
|
+
readonly default: false;
|
|
52
|
+
};
|
|
53
|
+
readonly allowedCheckers: {
|
|
54
|
+
readonly default: "all";
|
|
55
|
+
};
|
|
56
|
+
readonly initialChecked: {
|
|
57
|
+
readonly default: false;
|
|
58
|
+
};
|
|
59
|
+
readonly title: {
|
|
60
|
+
readonly default: "";
|
|
61
|
+
};
|
|
62
|
+
readonly description: {
|
|
63
|
+
readonly default: "";
|
|
64
|
+
};
|
|
65
|
+
readonly icon: {
|
|
66
|
+
readonly default: "square-check";
|
|
67
|
+
};
|
|
68
|
+
readonly conditions: {
|
|
69
|
+
readonly default: "";
|
|
70
|
+
};
|
|
71
|
+
readonly ttlAbsoluteDueDate: {
|
|
72
|
+
readonly default: "";
|
|
73
|
+
};
|
|
74
|
+
readonly ttlFromEnablement: {
|
|
75
|
+
readonly default: "";
|
|
76
|
+
};
|
|
77
|
+
readonly ttlFromCommitment: {
|
|
78
|
+
readonly default: "";
|
|
79
|
+
};
|
|
80
|
+
readonly skill: {
|
|
81
|
+
readonly default: "";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
readonly content: "none";
|
|
85
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
type CheckboxBlockProps = IxoBlockProps;
|
|
89
|
+
|
|
90
|
+
declare const ListBlockSpec: {
|
|
91
|
+
config: {
|
|
92
|
+
readonly type: "list";
|
|
93
|
+
readonly propSchema: {
|
|
94
|
+
readonly listType: {
|
|
95
|
+
readonly default: "";
|
|
96
|
+
};
|
|
97
|
+
readonly sort: {
|
|
98
|
+
readonly default: "{}";
|
|
99
|
+
};
|
|
100
|
+
readonly filter: {
|
|
101
|
+
readonly default: "{}";
|
|
102
|
+
};
|
|
103
|
+
readonly filterOptions: {
|
|
104
|
+
readonly default: "{}";
|
|
105
|
+
};
|
|
106
|
+
readonly sortOptions: {
|
|
107
|
+
readonly default: "{}";
|
|
108
|
+
};
|
|
109
|
+
readonly listConfig: {
|
|
110
|
+
readonly default: "{}";
|
|
111
|
+
};
|
|
112
|
+
readonly icon: {
|
|
113
|
+
readonly default: "📋";
|
|
114
|
+
};
|
|
115
|
+
readonly skill: {
|
|
116
|
+
readonly default: "";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly content: "none";
|
|
120
|
+
};
|
|
121
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
122
|
+
readonly type: "list";
|
|
123
|
+
readonly propSchema: {
|
|
124
|
+
readonly listType: {
|
|
125
|
+
readonly default: "";
|
|
126
|
+
};
|
|
127
|
+
readonly sort: {
|
|
128
|
+
readonly default: "{}";
|
|
129
|
+
};
|
|
130
|
+
readonly filter: {
|
|
131
|
+
readonly default: "{}";
|
|
132
|
+
};
|
|
133
|
+
readonly filterOptions: {
|
|
134
|
+
readonly default: "{}";
|
|
135
|
+
};
|
|
136
|
+
readonly sortOptions: {
|
|
137
|
+
readonly default: "{}";
|
|
138
|
+
};
|
|
139
|
+
readonly listConfig: {
|
|
140
|
+
readonly default: "{}";
|
|
141
|
+
};
|
|
142
|
+
readonly icon: {
|
|
143
|
+
readonly default: "📋";
|
|
144
|
+
};
|
|
145
|
+
readonly skill: {
|
|
146
|
+
readonly default: "";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
readonly content: "none";
|
|
150
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
interface ListBlockSettings {
|
|
154
|
+
listType: string | null;
|
|
155
|
+
listConfig: string;
|
|
156
|
+
}
|
|
157
|
+
interface ListBlockProps extends IxoBlockProps {
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
type ProposalActionType = 'Spend' | 'UpdateMembers' | 'Stake' | 'Join' | 'AuthzExec' | 'AuthzGrant' | 'AuthzRevoke' | 'BurnNft' | 'Mint' | 'Execute' | 'Instantiate' | 'ManageSubDaos' | 'ManageCw721' | 'ManageCw20' | 'Migrate' | 'TransferNft' | 'UpdateAdmin' | 'UpdatePreProposeConfig' | 'UpdateVotingConfig' | 'GovernanceVote' | 'WithdrawTokenSwap' | 'UpdateInfo' | 'Custom' | 'ManageStorageItems' | 'ValidatorActions' | 'PerformTokenSwap' | 'DaoAdminExec' | 'StakeToGroup' | 'SendGroupToken' | 'AcceptToMarketplace' | 'CreateEntity';
|
|
161
|
+
interface Member$1 {
|
|
162
|
+
addr: string;
|
|
163
|
+
weight: number;
|
|
164
|
+
}
|
|
165
|
+
interface BaseProposalAction {
|
|
166
|
+
type: ProposalActionType;
|
|
167
|
+
}
|
|
168
|
+
interface SpendData {
|
|
169
|
+
to: string;
|
|
170
|
+
denom: string;
|
|
171
|
+
amount: string;
|
|
172
|
+
}
|
|
173
|
+
interface ManageMembersData {
|
|
174
|
+
add: Member$1[];
|
|
175
|
+
remove: {
|
|
176
|
+
addr: string;
|
|
177
|
+
}[];
|
|
178
|
+
}
|
|
179
|
+
interface SpendAction extends BaseProposalAction {
|
|
180
|
+
type: 'Spend';
|
|
181
|
+
data: SpendData;
|
|
182
|
+
}
|
|
183
|
+
interface UpdateMembersAction extends BaseProposalAction {
|
|
184
|
+
type: 'UpdateMembers';
|
|
185
|
+
data: ManageMembersData;
|
|
186
|
+
}
|
|
187
|
+
declare const StakeType: {
|
|
188
|
+
readonly Delegate: "delegate";
|
|
189
|
+
readonly Undelegate: "undelegate";
|
|
190
|
+
readonly Redelegate: "redelegate";
|
|
191
|
+
readonly WithdrawDelegatorReward: "withdraw_delegator_reward";
|
|
192
|
+
};
|
|
193
|
+
type StakeType = (typeof StakeType)[keyof typeof StakeType];
|
|
194
|
+
interface StakeData {
|
|
195
|
+
stakeType: StakeType;
|
|
196
|
+
validator: string;
|
|
197
|
+
toValidator: string;
|
|
198
|
+
amount: string;
|
|
199
|
+
denom: string;
|
|
200
|
+
}
|
|
201
|
+
interface JoinData {
|
|
202
|
+
id: string;
|
|
203
|
+
coreAddress: string;
|
|
204
|
+
address: string;
|
|
205
|
+
}
|
|
206
|
+
interface StakeAction extends BaseProposalAction {
|
|
207
|
+
type: 'Stake';
|
|
208
|
+
data: StakeData;
|
|
209
|
+
}
|
|
210
|
+
interface JoinAction extends BaseProposalAction {
|
|
211
|
+
type: 'Join';
|
|
212
|
+
data: JoinData;
|
|
213
|
+
}
|
|
214
|
+
interface Coin$1 {
|
|
215
|
+
denom: string;
|
|
216
|
+
amount: string;
|
|
217
|
+
}
|
|
218
|
+
interface Binary {
|
|
219
|
+
[k: string]: unknown;
|
|
220
|
+
}
|
|
221
|
+
interface Empty {
|
|
222
|
+
[k: string]: unknown;
|
|
223
|
+
}
|
|
224
|
+
interface GenericToken {
|
|
225
|
+
[k: string]: unknown;
|
|
226
|
+
}
|
|
227
|
+
interface SubDao {
|
|
228
|
+
addr: string;
|
|
229
|
+
charter?: string | null;
|
|
230
|
+
[k: string]: unknown;
|
|
231
|
+
}
|
|
232
|
+
interface Counterparty {
|
|
233
|
+
address: string;
|
|
234
|
+
[k: string]: unknown;
|
|
235
|
+
}
|
|
236
|
+
type DepositRefundPolicy = string;
|
|
237
|
+
type VoteOption = number;
|
|
238
|
+
type TProposalActionModel = any;
|
|
239
|
+
interface MsgDelegate {
|
|
240
|
+
[k: string]: unknown;
|
|
241
|
+
}
|
|
242
|
+
interface MsgUndelegate {
|
|
243
|
+
[k: string]: unknown;
|
|
244
|
+
}
|
|
245
|
+
interface MsgBeginRedelegate {
|
|
246
|
+
[k: string]: unknown;
|
|
247
|
+
}
|
|
248
|
+
interface MsgWithdrawDelegatorReward {
|
|
249
|
+
[k: string]: unknown;
|
|
250
|
+
}
|
|
251
|
+
type BankMsg = {
|
|
252
|
+
send: {
|
|
253
|
+
amount: Coin$1[];
|
|
254
|
+
to_address: string;
|
|
255
|
+
};
|
|
256
|
+
} | {
|
|
257
|
+
burn: {
|
|
258
|
+
amount: Coin$1[];
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
type StakingMsg = {
|
|
262
|
+
delegate: {
|
|
263
|
+
amount: Coin$1;
|
|
264
|
+
validator: string;
|
|
265
|
+
};
|
|
266
|
+
} | {
|
|
267
|
+
undelegate: {
|
|
268
|
+
amount: Coin$1;
|
|
269
|
+
validator: string;
|
|
270
|
+
};
|
|
271
|
+
} | {
|
|
272
|
+
redelegate: {
|
|
273
|
+
amount: Coin$1;
|
|
274
|
+
dst_validator: string;
|
|
275
|
+
src_validator: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
type DistributionMsg = {
|
|
279
|
+
set_withdraw_address: {
|
|
280
|
+
address: string;
|
|
281
|
+
};
|
|
282
|
+
} | {
|
|
283
|
+
withdraw_delegator_reward: {
|
|
284
|
+
validator: string;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
interface IbcTimeout {
|
|
288
|
+
[k: string]: unknown;
|
|
289
|
+
}
|
|
290
|
+
type IbcMsg = {
|
|
291
|
+
transfer: {
|
|
292
|
+
amount: Coin$1;
|
|
293
|
+
channel_id: string;
|
|
294
|
+
timeout: IbcTimeout;
|
|
295
|
+
to_address: string;
|
|
296
|
+
};
|
|
297
|
+
} | {
|
|
298
|
+
send_packet: {
|
|
299
|
+
channel_id: string;
|
|
300
|
+
data: Binary;
|
|
301
|
+
timeout: IbcTimeout;
|
|
302
|
+
};
|
|
303
|
+
} | {
|
|
304
|
+
close_channel: {
|
|
305
|
+
channel_id: string;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
type WasmMsg = {
|
|
309
|
+
execute: {
|
|
310
|
+
contract_addr: string;
|
|
311
|
+
funds: Coin$1[];
|
|
312
|
+
msg: Binary;
|
|
313
|
+
};
|
|
314
|
+
} | {
|
|
315
|
+
instantiate: {
|
|
316
|
+
admin?: string | null;
|
|
317
|
+
code_id: number;
|
|
318
|
+
funds: Coin$1[];
|
|
319
|
+
label: string;
|
|
320
|
+
msg: Binary;
|
|
321
|
+
};
|
|
322
|
+
} | {
|
|
323
|
+
migrate: {
|
|
324
|
+
contract_addr: string;
|
|
325
|
+
msg: Binary;
|
|
326
|
+
new_code_id: number;
|
|
327
|
+
};
|
|
328
|
+
} | {
|
|
329
|
+
update_admin: {
|
|
330
|
+
admin: string;
|
|
331
|
+
contract_addr: string;
|
|
332
|
+
};
|
|
333
|
+
} | {
|
|
334
|
+
clear_admin: {
|
|
335
|
+
contract_addr: string;
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
type GovMsg = {
|
|
339
|
+
vote: {
|
|
340
|
+
proposal_id: number;
|
|
341
|
+
vote: VoteOption;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
type StargateMsg = {
|
|
345
|
+
stargate: {
|
|
346
|
+
type_url: string;
|
|
347
|
+
value: Binary;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
type CosmosMsgFor_Empty = {
|
|
351
|
+
bank: BankMsg;
|
|
352
|
+
} | {
|
|
353
|
+
custom: Empty;
|
|
354
|
+
} | {
|
|
355
|
+
staking: StakingMsg;
|
|
356
|
+
} | {
|
|
357
|
+
distribution: DistributionMsg;
|
|
358
|
+
} | {
|
|
359
|
+
ibc: IbcMsg;
|
|
360
|
+
} | {
|
|
361
|
+
wasm: WasmMsg;
|
|
362
|
+
} | {
|
|
363
|
+
gov: GovMsg;
|
|
364
|
+
} | StargateMsg;
|
|
365
|
+
declare const AuthzExecActionTypes: {
|
|
366
|
+
readonly Delegate: "/cosmos.staking.v1beta1.MsgDelegate";
|
|
367
|
+
readonly Undelegate: "/cosmos.staking.v1beta1.MsgUndelegate";
|
|
368
|
+
readonly Redelegate: "/cosmos.staking.v1beta1.MsgBeginRedelegate";
|
|
369
|
+
readonly ClaimRewards: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward";
|
|
370
|
+
readonly Custom: "custom";
|
|
371
|
+
};
|
|
372
|
+
type AuthzExecActionType = (typeof AuthzExecActionTypes)[keyof typeof AuthzExecActionTypes];
|
|
373
|
+
interface AuthzExecData {
|
|
374
|
+
authzExecActionType: AuthzExecActionType;
|
|
375
|
+
delegate: MsgDelegate;
|
|
376
|
+
undelegate: MsgUndelegate;
|
|
377
|
+
redelegate: MsgBeginRedelegate;
|
|
378
|
+
claimRewards: MsgWithdrawDelegatorReward;
|
|
379
|
+
custom: string;
|
|
380
|
+
}
|
|
381
|
+
interface AuthzData {
|
|
382
|
+
custom?: boolean;
|
|
383
|
+
typeUrl: string;
|
|
384
|
+
value: {
|
|
385
|
+
grantee: string;
|
|
386
|
+
msgTypeUrl: string;
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
interface BurnNftData {
|
|
390
|
+
collection: string;
|
|
391
|
+
tokenId: string;
|
|
392
|
+
}
|
|
393
|
+
interface ExecuteData {
|
|
394
|
+
address: string;
|
|
395
|
+
message: string;
|
|
396
|
+
funds: Coin$1[];
|
|
397
|
+
}
|
|
398
|
+
interface InstantiateData {
|
|
399
|
+
admin: string;
|
|
400
|
+
codeId: number;
|
|
401
|
+
label: string;
|
|
402
|
+
message: string;
|
|
403
|
+
funds: Coin$1[];
|
|
404
|
+
}
|
|
405
|
+
interface ManageSubDaosData {
|
|
406
|
+
toAdd: SubDao[];
|
|
407
|
+
toRemove: {
|
|
408
|
+
address: string;
|
|
409
|
+
}[];
|
|
410
|
+
}
|
|
411
|
+
interface ManageCw721Data {
|
|
412
|
+
adding: boolean;
|
|
413
|
+
address: string;
|
|
414
|
+
}
|
|
415
|
+
interface ManageCw20Data {
|
|
416
|
+
adding: boolean;
|
|
417
|
+
address: string;
|
|
418
|
+
}
|
|
419
|
+
interface MigrateData {
|
|
420
|
+
contract: string;
|
|
421
|
+
codeId: number;
|
|
422
|
+
msg: string;
|
|
423
|
+
}
|
|
424
|
+
interface MintData {
|
|
425
|
+
to: string;
|
|
426
|
+
amount: number;
|
|
427
|
+
}
|
|
428
|
+
interface TransferNftData {
|
|
429
|
+
collection: string;
|
|
430
|
+
tokenId: string;
|
|
431
|
+
recipient: string;
|
|
432
|
+
executeSmartContract: boolean;
|
|
433
|
+
smartContractMsg: string;
|
|
434
|
+
}
|
|
435
|
+
interface UpdateAdminData {
|
|
436
|
+
contract: string;
|
|
437
|
+
newAdmin: string;
|
|
438
|
+
}
|
|
439
|
+
interface UpdatePreProposeConfigData {
|
|
440
|
+
depositRequired: boolean;
|
|
441
|
+
depositInfo: {
|
|
442
|
+
amount: string;
|
|
443
|
+
type: 'native' | 'cw20' | 'voting_module_token';
|
|
444
|
+
denomOrAddress: string;
|
|
445
|
+
token?: GenericToken;
|
|
446
|
+
refundPolicy: DepositRefundPolicy;
|
|
447
|
+
};
|
|
448
|
+
anyoneCanPropose: boolean;
|
|
449
|
+
}
|
|
450
|
+
interface UpdateProposalConfigData {
|
|
451
|
+
onlyMembersExecute: boolean;
|
|
452
|
+
thresholdType: '%' | 'majority';
|
|
453
|
+
thresholdPercentage?: number;
|
|
454
|
+
quorumEnabled: boolean;
|
|
455
|
+
quorumType: '%' | 'majority';
|
|
456
|
+
quorumPercentage?: number;
|
|
457
|
+
proposalDuration: number;
|
|
458
|
+
proposalDurationUnits: 'weeks' | 'days' | 'hours' | 'minutes' | 'seconds';
|
|
459
|
+
allowRevoting: boolean;
|
|
460
|
+
}
|
|
461
|
+
interface GovernanceVoteData {
|
|
462
|
+
proposalId: string;
|
|
463
|
+
vote: VoteOption;
|
|
464
|
+
}
|
|
465
|
+
interface WithdrawTokenSwapData {
|
|
466
|
+
contractChosen: boolean;
|
|
467
|
+
tokenSwapContractAddress?: string;
|
|
468
|
+
}
|
|
469
|
+
interface UpdateInfoData {
|
|
470
|
+
automatically_add_cw20s: boolean;
|
|
471
|
+
automatically_add_cw721s: boolean;
|
|
472
|
+
dao_uri?: string | null;
|
|
473
|
+
description: string;
|
|
474
|
+
image_url?: string | null;
|
|
475
|
+
name: string;
|
|
476
|
+
[k: string]: unknown;
|
|
477
|
+
}
|
|
478
|
+
interface CustomData {
|
|
479
|
+
message: string;
|
|
480
|
+
}
|
|
481
|
+
interface ManageStorageItemsData {
|
|
482
|
+
setting: boolean;
|
|
483
|
+
key: string;
|
|
484
|
+
value: string;
|
|
485
|
+
}
|
|
486
|
+
declare enum ValidatorActionType {
|
|
487
|
+
CreateValidator = "/cosmos.staking.v1beta1.MsgCreateValidator",
|
|
488
|
+
EditValidator = "/cosmos.staking.v1beta1.MsgEditValidator",
|
|
489
|
+
UnjailValidator = "/cosmos.slashing.v1beta1.MsgUnjail",
|
|
490
|
+
WithdrawValidatorCommission = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"
|
|
491
|
+
}
|
|
492
|
+
interface ValidatorActionsData {
|
|
493
|
+
validatorActionType: ValidatorActionType;
|
|
494
|
+
createMsg: string;
|
|
495
|
+
editMsg: string;
|
|
496
|
+
}
|
|
497
|
+
interface PerformTokenSwapData {
|
|
498
|
+
contractChosen: boolean;
|
|
499
|
+
tokenSwapContractAddress?: string;
|
|
500
|
+
selfParty?: Omit<Counterparty, 'address'>;
|
|
501
|
+
counterparty?: Counterparty;
|
|
502
|
+
}
|
|
503
|
+
type DaoAdminExecData = {
|
|
504
|
+
coreAddress: string;
|
|
505
|
+
msgs: CosmosMsgFor_Empty[];
|
|
506
|
+
_actions?: TProposalActionModel[];
|
|
507
|
+
};
|
|
508
|
+
interface StakeToGroupData {
|
|
509
|
+
amount: string;
|
|
510
|
+
tokenContract: string;
|
|
511
|
+
stakingContract: string;
|
|
512
|
+
}
|
|
513
|
+
interface SendGroupTokenData {
|
|
514
|
+
amount: string;
|
|
515
|
+
contract: string;
|
|
516
|
+
toAddress: string;
|
|
517
|
+
}
|
|
518
|
+
interface AcceptToMarketplaceData {
|
|
519
|
+
did: string;
|
|
520
|
+
relayerNodeDid: string;
|
|
521
|
+
relayerNodeAddress: string;
|
|
522
|
+
}
|
|
523
|
+
interface AuthzExecAction extends BaseProposalAction {
|
|
524
|
+
type: 'AuthzExec';
|
|
525
|
+
data: AuthzExecData;
|
|
526
|
+
}
|
|
527
|
+
interface AuthzGrantAction extends BaseProposalAction {
|
|
528
|
+
type: 'AuthzGrant';
|
|
529
|
+
data: AuthzData;
|
|
530
|
+
}
|
|
531
|
+
interface AuthzRevokeAction extends BaseProposalAction {
|
|
532
|
+
type: 'AuthzRevoke';
|
|
533
|
+
data: AuthzData;
|
|
534
|
+
}
|
|
535
|
+
interface BurnNftAction extends BaseProposalAction {
|
|
536
|
+
type: 'BurnNft';
|
|
537
|
+
data: BurnNftData;
|
|
538
|
+
}
|
|
539
|
+
interface MintAction extends BaseProposalAction {
|
|
540
|
+
type: 'Mint';
|
|
541
|
+
data: MintData;
|
|
542
|
+
}
|
|
543
|
+
interface ExecuteAction extends BaseProposalAction {
|
|
544
|
+
type: 'Execute';
|
|
545
|
+
data: ExecuteData;
|
|
546
|
+
}
|
|
547
|
+
interface InstantiateAction extends BaseProposalAction {
|
|
548
|
+
type: 'Instantiate';
|
|
549
|
+
data: InstantiateData;
|
|
550
|
+
}
|
|
551
|
+
interface ManageSubDaosAction extends BaseProposalAction {
|
|
552
|
+
type: 'ManageSubDaos';
|
|
553
|
+
data: ManageSubDaosData;
|
|
554
|
+
}
|
|
555
|
+
interface ManageCw721Action extends BaseProposalAction {
|
|
556
|
+
type: 'ManageCw721';
|
|
557
|
+
data: ManageCw721Data;
|
|
558
|
+
}
|
|
559
|
+
interface ManageCw20Action extends BaseProposalAction {
|
|
560
|
+
type: 'ManageCw20';
|
|
561
|
+
data: ManageCw20Data;
|
|
562
|
+
}
|
|
563
|
+
interface MigrateAction extends BaseProposalAction {
|
|
564
|
+
type: 'Migrate';
|
|
565
|
+
data: MigrateData;
|
|
566
|
+
}
|
|
567
|
+
interface TransferNftAction extends BaseProposalAction {
|
|
568
|
+
type: 'TransferNft';
|
|
569
|
+
data: TransferNftData;
|
|
570
|
+
}
|
|
571
|
+
interface UpdateAdminAction extends BaseProposalAction {
|
|
572
|
+
type: 'UpdateAdmin';
|
|
573
|
+
data: UpdateAdminData;
|
|
574
|
+
}
|
|
575
|
+
interface UpdatePreProposeConfigAction extends BaseProposalAction {
|
|
576
|
+
type: 'UpdatePreProposeConfig';
|
|
577
|
+
data: UpdatePreProposeConfigData;
|
|
578
|
+
}
|
|
579
|
+
interface UpdateVotingConfigAction extends BaseProposalAction {
|
|
580
|
+
type: 'UpdateVotingConfig';
|
|
581
|
+
data: UpdateProposalConfigData;
|
|
582
|
+
}
|
|
583
|
+
interface GovernanceVoteAction extends BaseProposalAction {
|
|
584
|
+
type: 'GovernanceVote';
|
|
585
|
+
data: GovernanceVoteData;
|
|
586
|
+
}
|
|
587
|
+
interface WithdrawTokenSwapAction extends BaseProposalAction {
|
|
588
|
+
type: 'WithdrawTokenSwap';
|
|
589
|
+
data: WithdrawTokenSwapData;
|
|
590
|
+
}
|
|
591
|
+
interface UpdateInfoAction extends BaseProposalAction {
|
|
592
|
+
type: 'UpdateInfo';
|
|
593
|
+
data: UpdateInfoData;
|
|
594
|
+
}
|
|
595
|
+
interface CustomAction extends BaseProposalAction {
|
|
596
|
+
type: 'Custom';
|
|
597
|
+
data: CustomData;
|
|
598
|
+
}
|
|
599
|
+
interface ManageStorageItemsAction extends BaseProposalAction {
|
|
600
|
+
type: 'ManageStorageItems';
|
|
601
|
+
data: ManageStorageItemsData;
|
|
602
|
+
}
|
|
603
|
+
interface ValidatorActionsAction extends BaseProposalAction {
|
|
604
|
+
type: 'ValidatorActions';
|
|
605
|
+
data: ValidatorActionsData;
|
|
606
|
+
}
|
|
607
|
+
interface PerformTokenSwapAction extends BaseProposalAction {
|
|
608
|
+
type: 'PerformTokenSwap';
|
|
609
|
+
data: PerformTokenSwapData;
|
|
610
|
+
}
|
|
611
|
+
interface DaoAdminExecAction extends BaseProposalAction {
|
|
612
|
+
type: 'DaoAdminExec';
|
|
613
|
+
data: DaoAdminExecData;
|
|
614
|
+
}
|
|
615
|
+
interface StakeToGroupAction extends BaseProposalAction {
|
|
616
|
+
type: 'StakeToGroup';
|
|
617
|
+
data: StakeToGroupData;
|
|
618
|
+
}
|
|
619
|
+
interface SendGroupTokenAction extends BaseProposalAction {
|
|
620
|
+
type: 'SendGroupToken';
|
|
621
|
+
data: SendGroupTokenData;
|
|
622
|
+
}
|
|
623
|
+
interface AcceptToMarketplaceAction extends BaseProposalAction {
|
|
624
|
+
type: 'AcceptToMarketplace';
|
|
625
|
+
data: AcceptToMarketplaceData;
|
|
626
|
+
}
|
|
627
|
+
interface CreateEntityAction extends BaseProposalAction {
|
|
628
|
+
type: 'CreateEntity';
|
|
629
|
+
data: any;
|
|
630
|
+
}
|
|
631
|
+
type ProposalAction = SpendAction | UpdateMembersAction | StakeAction | JoinAction | AuthzExecAction | AuthzGrantAction | AuthzRevokeAction | BurnNftAction | MintAction | ExecuteAction | InstantiateAction | ManageSubDaosAction | ManageCw721Action | ManageCw20Action | MigrateAction | TransferNftAction | UpdateAdminAction | UpdatePreProposeConfigAction | UpdateVotingConfigAction | GovernanceVoteAction | WithdrawTokenSwapAction | UpdateInfoAction | CustomAction | ManageStorageItemsAction | ValidatorActionsAction | PerformTokenSwapAction | DaoAdminExecAction | StakeToGroupAction | SendGroupTokenAction | AcceptToMarketplaceAction | CreateEntityAction;
|
|
632
|
+
interface SharedProposalData {
|
|
633
|
+
[proposalId: string]: {
|
|
634
|
+
proposal: any;
|
|
635
|
+
lastFetched: number;
|
|
636
|
+
loading: boolean;
|
|
637
|
+
error?: Error;
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
type Addr = string;
|
|
642
|
+
type Uint128 = string;
|
|
643
|
+
type Timestamp = string;
|
|
644
|
+
interface Coin {
|
|
645
|
+
denom: string;
|
|
646
|
+
amount: string;
|
|
647
|
+
}
|
|
648
|
+
type Expiration = {
|
|
649
|
+
at_height: number;
|
|
650
|
+
} | {
|
|
651
|
+
at_time: Timestamp;
|
|
652
|
+
} | {
|
|
653
|
+
never: {};
|
|
654
|
+
};
|
|
655
|
+
type Status = 'open' | 'rejected' | 'passed' | 'executed' | 'closed' | 'execution_failed' | 'veto_timelock';
|
|
656
|
+
interface Threshold {
|
|
657
|
+
absolute_count?: {
|
|
658
|
+
weight: Uint128;
|
|
659
|
+
};
|
|
660
|
+
absolute_percentage?: {
|
|
661
|
+
percentage: string;
|
|
662
|
+
};
|
|
663
|
+
threshold_quorum?: {
|
|
664
|
+
threshold: string;
|
|
665
|
+
quorum: string;
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
interface Votes {
|
|
669
|
+
yes: Uint128;
|
|
670
|
+
no: Uint128;
|
|
671
|
+
abstain: Uint128;
|
|
672
|
+
}
|
|
673
|
+
interface CosmosMsgForEmpty {
|
|
674
|
+
[key: string]: any;
|
|
675
|
+
}
|
|
676
|
+
interface SingleChoiceProposal {
|
|
677
|
+
allow_revoting: boolean;
|
|
678
|
+
description: string;
|
|
679
|
+
expiration: Expiration;
|
|
680
|
+
min_voting_period?: Expiration | null;
|
|
681
|
+
msgs: CosmosMsgForEmpty[];
|
|
682
|
+
proposer: Addr;
|
|
683
|
+
start_height: number;
|
|
684
|
+
status: Status;
|
|
685
|
+
threshold: Threshold;
|
|
686
|
+
title: string;
|
|
687
|
+
total_power: Uint128;
|
|
688
|
+
votes: Votes;
|
|
689
|
+
}
|
|
690
|
+
interface ProposalResponse {
|
|
691
|
+
id: number;
|
|
692
|
+
proposal: SingleChoiceProposal;
|
|
693
|
+
}
|
|
694
|
+
type Vote = 'yes' | 'no' | 'abstain' | 'no_with_veto';
|
|
695
|
+
interface VoteInfo {
|
|
696
|
+
power: Uint128;
|
|
697
|
+
rationale?: string | null;
|
|
698
|
+
vote: Vote;
|
|
699
|
+
voter: Addr;
|
|
700
|
+
}
|
|
701
|
+
interface VoteResponse {
|
|
702
|
+
vote?: VoteInfo | null;
|
|
703
|
+
}
|
|
704
|
+
interface User {
|
|
705
|
+
address: string;
|
|
706
|
+
}
|
|
707
|
+
type AwarenessDocActor = {
|
|
708
|
+
name: string;
|
|
709
|
+
did: string;
|
|
710
|
+
src: string | null;
|
|
711
|
+
};
|
|
712
|
+
type IUserMatrixProfile = {
|
|
713
|
+
walletAddress: string;
|
|
714
|
+
displayname: string;
|
|
715
|
+
avatarUrl: string | null;
|
|
716
|
+
did: string;
|
|
717
|
+
verified?: boolean;
|
|
718
|
+
};
|
|
719
|
+
interface LinkedResource {
|
|
720
|
+
id: string;
|
|
721
|
+
type: string;
|
|
722
|
+
proof: string;
|
|
723
|
+
right: string;
|
|
724
|
+
encrypted: string;
|
|
725
|
+
mediaType: string;
|
|
726
|
+
description: string;
|
|
727
|
+
serviceEndpoint: string;
|
|
728
|
+
}
|
|
729
|
+
interface Service {
|
|
730
|
+
id: string;
|
|
731
|
+
type: string;
|
|
732
|
+
serviceEndpoint: string;
|
|
733
|
+
}
|
|
734
|
+
interface GQLLinkedResource {
|
|
735
|
+
id: string;
|
|
736
|
+
type: string;
|
|
737
|
+
description: string;
|
|
738
|
+
mediaType: string;
|
|
739
|
+
serviceEndpoint: string;
|
|
740
|
+
proof: string;
|
|
741
|
+
encrypted: string;
|
|
742
|
+
right: string;
|
|
743
|
+
}
|
|
744
|
+
interface EntityNode {
|
|
745
|
+
id: string;
|
|
746
|
+
type: string;
|
|
747
|
+
startDate?: string;
|
|
748
|
+
endDate?: string;
|
|
749
|
+
status: number;
|
|
750
|
+
relayerNode: string;
|
|
751
|
+
credentials?: string[];
|
|
752
|
+
entityVerified: boolean;
|
|
753
|
+
metadata: any;
|
|
754
|
+
accounts: any;
|
|
755
|
+
externalId?: string;
|
|
756
|
+
owner?: string;
|
|
757
|
+
context: any;
|
|
758
|
+
controller: string[];
|
|
759
|
+
verificationMethod: any;
|
|
760
|
+
service: Service[];
|
|
761
|
+
authentication: string[];
|
|
762
|
+
assertionMethod: string[];
|
|
763
|
+
keyAgreement: string[];
|
|
764
|
+
capabilityInvocation: string[];
|
|
765
|
+
capabilityDelegation: string[];
|
|
766
|
+
linkedResource: LinkedResource[];
|
|
767
|
+
linkedClaim: any;
|
|
768
|
+
accordedRight: any;
|
|
769
|
+
linkedEntity: any;
|
|
770
|
+
alsoKnownAs: string;
|
|
771
|
+
settings: any;
|
|
772
|
+
profile?: {
|
|
773
|
+
name?: string;
|
|
774
|
+
[key: string]: any;
|
|
775
|
+
};
|
|
776
|
+
iidById: {
|
|
777
|
+
id: string;
|
|
778
|
+
linkedResource: GQLLinkedResource[];
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
interface EntityResponse$1 {
|
|
782
|
+
id: string;
|
|
783
|
+
context: string;
|
|
784
|
+
relayerNode: string;
|
|
785
|
+
controller: string;
|
|
786
|
+
type: string;
|
|
787
|
+
startDate: string;
|
|
788
|
+
endDate: string;
|
|
789
|
+
metadata: string;
|
|
790
|
+
linkedResource: LinkedResource[];
|
|
791
|
+
settings: Record<string, LinkedResource>;
|
|
792
|
+
service: Service[];
|
|
793
|
+
externalId: string;
|
|
794
|
+
}
|
|
795
|
+
interface Asset {
|
|
796
|
+
did: string;
|
|
797
|
+
alsoKnownAs: string;
|
|
798
|
+
name: string;
|
|
799
|
+
icon: string;
|
|
800
|
+
issuer: string;
|
|
801
|
+
owned: boolean;
|
|
802
|
+
price: number;
|
|
803
|
+
available: boolean;
|
|
804
|
+
currency: string;
|
|
805
|
+
description?: string;
|
|
806
|
+
}
|
|
807
|
+
interface POD {
|
|
808
|
+
did: string;
|
|
809
|
+
name: string;
|
|
810
|
+
icon: string;
|
|
811
|
+
members: number;
|
|
812
|
+
isMember: boolean;
|
|
813
|
+
totalProposals: number;
|
|
814
|
+
startDate: string;
|
|
815
|
+
endDate: string;
|
|
816
|
+
description?: string;
|
|
817
|
+
}
|
|
818
|
+
interface Request {
|
|
819
|
+
did: string;
|
|
820
|
+
name: string;
|
|
821
|
+
icon: string;
|
|
822
|
+
budget: number;
|
|
823
|
+
isMember: boolean;
|
|
824
|
+
currency: string;
|
|
825
|
+
brand: string;
|
|
826
|
+
totalApplications: number;
|
|
827
|
+
description?: string;
|
|
828
|
+
}
|
|
829
|
+
interface Project {
|
|
830
|
+
did: string;
|
|
831
|
+
name: string;
|
|
832
|
+
icon: string;
|
|
833
|
+
description?: string;
|
|
834
|
+
}
|
|
835
|
+
interface Dao {
|
|
836
|
+
did: string;
|
|
837
|
+
name: string;
|
|
838
|
+
icon: string;
|
|
839
|
+
description?: string;
|
|
840
|
+
}
|
|
841
|
+
interface Balance {
|
|
842
|
+
denom: string;
|
|
843
|
+
tokenName: string;
|
|
844
|
+
chainCount: number;
|
|
845
|
+
tokenImage: string;
|
|
846
|
+
amount: number;
|
|
847
|
+
usdAmount: number;
|
|
848
|
+
isCoin: boolean;
|
|
849
|
+
isShare: boolean;
|
|
850
|
+
isCredit: boolean;
|
|
851
|
+
}
|
|
852
|
+
interface Oracle {
|
|
853
|
+
did: string;
|
|
854
|
+
name: string;
|
|
855
|
+
icon: string;
|
|
856
|
+
isActive: boolean;
|
|
857
|
+
isInvited: boolean;
|
|
858
|
+
minPoints: number;
|
|
859
|
+
maxPoints: number;
|
|
860
|
+
currency: string;
|
|
861
|
+
brand: string;
|
|
862
|
+
flowsAmount: number;
|
|
863
|
+
description?: string;
|
|
864
|
+
}
|
|
865
|
+
interface Proposal {
|
|
866
|
+
did: string;
|
|
867
|
+
name: string;
|
|
868
|
+
icon: string;
|
|
869
|
+
description: string;
|
|
870
|
+
isVotedOn: boolean;
|
|
871
|
+
vote: string | null;
|
|
872
|
+
status: string;
|
|
873
|
+
}
|
|
874
|
+
interface Member {
|
|
875
|
+
did: string;
|
|
876
|
+
username: string;
|
|
877
|
+
address: string;
|
|
878
|
+
icon: string;
|
|
879
|
+
percentage: string;
|
|
880
|
+
role: string;
|
|
881
|
+
description?: string;
|
|
882
|
+
}
|
|
883
|
+
interface Validator {
|
|
884
|
+
did: string;
|
|
885
|
+
name: string;
|
|
886
|
+
description: string;
|
|
887
|
+
icon: string;
|
|
888
|
+
amount: number;
|
|
889
|
+
currency: string;
|
|
890
|
+
commission: number;
|
|
891
|
+
isStaked: boolean;
|
|
892
|
+
isBonding: boolean;
|
|
893
|
+
isActive: boolean;
|
|
894
|
+
}
|
|
895
|
+
interface Investment {
|
|
896
|
+
did: string;
|
|
897
|
+
name: string;
|
|
898
|
+
icon: string;
|
|
899
|
+
brand: string;
|
|
900
|
+
isSubscribed: boolean;
|
|
901
|
+
isOpen: boolean;
|
|
902
|
+
currency: string;
|
|
903
|
+
currentAmount: number;
|
|
904
|
+
maxAmount: number;
|
|
905
|
+
status: string;
|
|
906
|
+
price: number;
|
|
907
|
+
description?: string;
|
|
908
|
+
}
|
|
909
|
+
interface Collection {
|
|
910
|
+
did: string;
|
|
911
|
+
name: string;
|
|
912
|
+
brand: string;
|
|
913
|
+
icon: string;
|
|
914
|
+
price: number;
|
|
915
|
+
currency: string;
|
|
916
|
+
totalAssets: number;
|
|
917
|
+
description?: string;
|
|
918
|
+
}
|
|
919
|
+
interface TransactionByHash {
|
|
920
|
+
code: number;
|
|
921
|
+
fee: {
|
|
922
|
+
payer: string;
|
|
923
|
+
amount: Array<{
|
|
924
|
+
denom: string;
|
|
925
|
+
amount: string;
|
|
926
|
+
}>;
|
|
927
|
+
granter: string;
|
|
928
|
+
gasLimit: {
|
|
929
|
+
low: number;
|
|
930
|
+
high: number;
|
|
931
|
+
unsigned: boolean;
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
hash: string;
|
|
935
|
+
height: number;
|
|
936
|
+
memo: string;
|
|
937
|
+
time: string;
|
|
938
|
+
}
|
|
939
|
+
interface Transaction {
|
|
940
|
+
id: number;
|
|
941
|
+
transactionHash: string;
|
|
942
|
+
typeUrl: string;
|
|
943
|
+
memo: string;
|
|
944
|
+
time: string;
|
|
945
|
+
from: string;
|
|
946
|
+
to: string | null;
|
|
947
|
+
denoms: string[];
|
|
948
|
+
tokenNames: string[];
|
|
949
|
+
value: Record<string, any>;
|
|
950
|
+
transactionByTransactionHash?: TransactionByHash;
|
|
951
|
+
description?: string;
|
|
952
|
+
}
|
|
953
|
+
interface DeedSubscription {
|
|
954
|
+
did: string;
|
|
955
|
+
subscriberAddress: string;
|
|
956
|
+
subscriberDid?: string;
|
|
957
|
+
subscriberName?: string;
|
|
958
|
+
subscriberImage?: string;
|
|
959
|
+
subscriptionDate: string;
|
|
960
|
+
status: 'active' | 'inactive' | 'pending';
|
|
961
|
+
metadata?: Record<string, any>;
|
|
962
|
+
actionSections?: SelectionActionSection[];
|
|
963
|
+
}
|
|
964
|
+
type IAssetsListItem = {
|
|
965
|
+
symbol: string;
|
|
966
|
+
description: string;
|
|
967
|
+
display: string;
|
|
968
|
+
entityId: string;
|
|
969
|
+
assetType: string;
|
|
970
|
+
coinMinimalDenom?: string;
|
|
971
|
+
base: string;
|
|
972
|
+
denomUnits: {
|
|
973
|
+
denom: string;
|
|
974
|
+
exponent: number;
|
|
975
|
+
aliases: string[];
|
|
976
|
+
}[];
|
|
977
|
+
logoURIs: {
|
|
978
|
+
png: string;
|
|
979
|
+
svg: string;
|
|
980
|
+
zlottie: string;
|
|
981
|
+
};
|
|
982
|
+
isStakeCurrency: string;
|
|
983
|
+
isFeeCurrency: string;
|
|
984
|
+
isBondToken: string;
|
|
985
|
+
coingeckoId?: string;
|
|
986
|
+
contractAddress?: string;
|
|
987
|
+
};
|
|
988
|
+
interface Bid {
|
|
989
|
+
id: string;
|
|
990
|
+
did: string;
|
|
991
|
+
collection: string;
|
|
992
|
+
type: 'bid';
|
|
993
|
+
address: string;
|
|
994
|
+
data: string;
|
|
995
|
+
role: string;
|
|
996
|
+
created: string;
|
|
997
|
+
}
|
|
998
|
+
interface SubmitBidParams {
|
|
999
|
+
collectionId: string;
|
|
1000
|
+
role: EAAgentRoles;
|
|
1001
|
+
surveyAnswers: any;
|
|
1002
|
+
}
|
|
1003
|
+
interface QueryBidsParams {
|
|
1004
|
+
collectionId: string;
|
|
1005
|
+
pagination?: {
|
|
1006
|
+
nextPageToken?: string;
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
interface QueryBidsByDidParams {
|
|
1010
|
+
collectionId: string;
|
|
1011
|
+
did: string;
|
|
1012
|
+
}
|
|
1013
|
+
interface ApproveBidParams {
|
|
1014
|
+
bidId: string;
|
|
1015
|
+
collectionId: string;
|
|
1016
|
+
did: string;
|
|
1017
|
+
}
|
|
1018
|
+
interface RejectBidParams {
|
|
1019
|
+
bidId: string;
|
|
1020
|
+
collectionId: string;
|
|
1021
|
+
did: string;
|
|
1022
|
+
reason: string;
|
|
1023
|
+
}
|
|
1024
|
+
interface BidResponse {
|
|
1025
|
+
success: boolean;
|
|
1026
|
+
bidId: string;
|
|
1027
|
+
}
|
|
1028
|
+
interface QueryBidsResponse {
|
|
1029
|
+
data: Bid[];
|
|
1030
|
+
nextPageToken?: string;
|
|
1031
|
+
}
|
|
1032
|
+
declare enum EAAgentRoles {
|
|
1033
|
+
owners = "PO",
|
|
1034
|
+
evaluators = "EA",
|
|
1035
|
+
serviceProviders = "SA",
|
|
1036
|
+
investors = "IA"
|
|
1037
|
+
}
|
|
1038
|
+
declare enum AgentRole {
|
|
1039
|
+
Owner = "PO",// Collection Controller
|
|
1040
|
+
Evaluator = "EA",// Evaluator
|
|
1041
|
+
ServiceProvider = "SA",// Contributor/Service Agent
|
|
1042
|
+
Investor = "IA"
|
|
1043
|
+
}
|
|
1044
|
+
type CheckUserRoleParams = {
|
|
1045
|
+
/** Address to check role for */
|
|
1046
|
+
userAddress: string;
|
|
1047
|
+
/** Admin account address of the entity */
|
|
1048
|
+
adminAddress: string;
|
|
1049
|
+
/** Deed DID */
|
|
1050
|
+
deedDid: string;
|
|
1051
|
+
/** Claim collection IDs to check roles for */
|
|
1052
|
+
collectionIds: string[];
|
|
1053
|
+
};
|
|
1054
|
+
type ClaimCollectionRole = {
|
|
1055
|
+
collectionId: string;
|
|
1056
|
+
role: AgentRole;
|
|
1057
|
+
};
|
|
1058
|
+
type ClaimCollection = {
|
|
1059
|
+
id: string;
|
|
1060
|
+
name: string;
|
|
1061
|
+
description: string;
|
|
1062
|
+
entity: string;
|
|
1063
|
+
protocol: EntityNode | null;
|
|
1064
|
+
admin: string;
|
|
1065
|
+
};
|
|
1066
|
+
type ClaimCollectionResponse = {
|
|
1067
|
+
adminAddress: string;
|
|
1068
|
+
collections: ClaimCollection[];
|
|
1069
|
+
};
|
|
1070
|
+
type Claim = {
|
|
1071
|
+
claimId: string;
|
|
1072
|
+
collectionId: string;
|
|
1073
|
+
agentDid: string;
|
|
1074
|
+
agentAddress: string;
|
|
1075
|
+
submissionDate: string;
|
|
1076
|
+
paymentsStatus: {
|
|
1077
|
+
approval: string;
|
|
1078
|
+
rejection: string;
|
|
1079
|
+
evaluation: string;
|
|
1080
|
+
submission: string;
|
|
1081
|
+
};
|
|
1082
|
+
schemaType: string | null;
|
|
1083
|
+
approved?: boolean;
|
|
1084
|
+
pending?: boolean;
|
|
1085
|
+
rejected?: boolean;
|
|
1086
|
+
disputed?: boolean;
|
|
1087
|
+
};
|
|
1088
|
+
interface GetClaimsPerCollectionIdParams {
|
|
1089
|
+
collectionId: string;
|
|
1090
|
+
}
|
|
1091
|
+
interface GetClaimsPerUserAddressParams {
|
|
1092
|
+
collectionId: string;
|
|
1093
|
+
userAddress: string;
|
|
1094
|
+
}
|
|
1095
|
+
interface FAQItem {
|
|
1096
|
+
question: string;
|
|
1097
|
+
answer: string;
|
|
1098
|
+
}
|
|
1099
|
+
interface ContactInfo {
|
|
1100
|
+
email: string;
|
|
1101
|
+
location: string;
|
|
1102
|
+
socialLinks: string[];
|
|
1103
|
+
website: string;
|
|
1104
|
+
}
|
|
1105
|
+
interface Relationships {
|
|
1106
|
+
funders?: string[];
|
|
1107
|
+
memberOf?: string[];
|
|
1108
|
+
partners?: string[];
|
|
1109
|
+
}
|
|
1110
|
+
interface LogoUrl {
|
|
1111
|
+
alt: string;
|
|
1112
|
+
url: string;
|
|
1113
|
+
}
|
|
1114
|
+
interface AdditionalProperties {
|
|
1115
|
+
content_hashes?: Record<string, string>;
|
|
1116
|
+
content_summaries?: Record<string, string>;
|
|
1117
|
+
fetch_errors?: Array<{
|
|
1118
|
+
error: string;
|
|
1119
|
+
url: string;
|
|
1120
|
+
}>;
|
|
1121
|
+
last_fetch_date?: string;
|
|
1122
|
+
}
|
|
1123
|
+
interface Coordinates {
|
|
1124
|
+
type: string;
|
|
1125
|
+
coordinates: [number, number];
|
|
1126
|
+
}
|
|
1127
|
+
interface DomainCard {
|
|
1128
|
+
additional_properties?: AdditionalProperties;
|
|
1129
|
+
address?: string;
|
|
1130
|
+
alternate_names?: string[];
|
|
1131
|
+
area_served?: string;
|
|
1132
|
+
categories?: string[];
|
|
1133
|
+
contact?: ContactInfo;
|
|
1134
|
+
coordinates?: Coordinates;
|
|
1135
|
+
credential_type?: string[];
|
|
1136
|
+
description?: string;
|
|
1137
|
+
entity_type?: string[];
|
|
1138
|
+
faq?: FAQItem[];
|
|
1139
|
+
id: string;
|
|
1140
|
+
image_urls?: Array<Record<string, any>>;
|
|
1141
|
+
indexed_at?: string;
|
|
1142
|
+
issuer?: string;
|
|
1143
|
+
keywords?: string[];
|
|
1144
|
+
knows_about?: string[];
|
|
1145
|
+
location?: string;
|
|
1146
|
+
logo_url?: LogoUrl;
|
|
1147
|
+
name: string;
|
|
1148
|
+
overview?: string;
|
|
1149
|
+
relationships?: Relationships;
|
|
1150
|
+
same_as?: string[];
|
|
1151
|
+
schema_id?: string;
|
|
1152
|
+
summary?: string;
|
|
1153
|
+
updated_at?: string;
|
|
1154
|
+
url?: string;
|
|
1155
|
+
valid_from?: string;
|
|
1156
|
+
}
|
|
1157
|
+
interface AssetDetails extends Asset {
|
|
1158
|
+
actionSections: SelectionActionSection[];
|
|
1159
|
+
}
|
|
1160
|
+
interface CollectionDetails extends Collection {
|
|
1161
|
+
actionSections: SelectionActionSection[];
|
|
1162
|
+
}
|
|
1163
|
+
interface TransactionDetails extends Transaction {
|
|
1164
|
+
actionSections: SelectionActionSection[];
|
|
1165
|
+
}
|
|
1166
|
+
interface InvestmentDetails extends Investment {
|
|
1167
|
+
actionSections: SelectionActionSection[];
|
|
1168
|
+
}
|
|
1169
|
+
interface OracleDetails extends Oracle {
|
|
1170
|
+
actionSections: SelectionActionSection[];
|
|
1171
|
+
}
|
|
1172
|
+
interface PODDetails extends POD {
|
|
1173
|
+
actionSections: SelectionActionSection[];
|
|
1174
|
+
}
|
|
1175
|
+
interface ProposalDetails extends Proposal {
|
|
1176
|
+
actionSections: SelectionActionSection[];
|
|
1177
|
+
}
|
|
1178
|
+
interface RequestDetails extends Request {
|
|
1179
|
+
actionSections: SelectionActionSection[];
|
|
1180
|
+
}
|
|
1181
|
+
interface MemberDetails extends Member {
|
|
1182
|
+
actionSections: SelectionActionSection[];
|
|
1183
|
+
}
|
|
1184
|
+
interface ValidatorDetails extends Validator {
|
|
1185
|
+
actionSections: SelectionActionSection[];
|
|
1186
|
+
}
|
|
1187
|
+
interface LinkedResourceDetails extends LinkedResource {
|
|
1188
|
+
actionSections: SelectionActionSection[];
|
|
1189
|
+
}
|
|
1190
|
+
interface DAOGroup {
|
|
1191
|
+
id: string;
|
|
1192
|
+
name: string;
|
|
1193
|
+
coreAddress: string;
|
|
1194
|
+
}
|
|
1195
|
+
interface BlockRequirements {
|
|
1196
|
+
proposal?: {
|
|
1197
|
+
coreAddress: string;
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1200
|
+
interface UnlMapConfig {
|
|
1201
|
+
apiKey: string;
|
|
1202
|
+
vpmId: string;
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* UDID outcome values matching EvaluationStatus enum
|
|
1206
|
+
* PENDING = 0, APPROVED = 1, REJECTED = 2, DISPUTED = 3, INVALIDATED = 4, UNRECOGNIZED = -1
|
|
1207
|
+
*/
|
|
1208
|
+
type UdidOutcome = 0 | 1 | 2 | 3 | 4 | -1;
|
|
1209
|
+
/**
|
|
1210
|
+
* Granular step result item for UDID
|
|
1211
|
+
*/
|
|
1212
|
+
interface UdidResultItem {
|
|
1213
|
+
/** Unique identifier for this result item */
|
|
1214
|
+
id: string;
|
|
1215
|
+
/** Type of check/step */
|
|
1216
|
+
kind: 'compute' | 'fetch' | 'check' | 'validate';
|
|
1217
|
+
/** Whether this step passed */
|
|
1218
|
+
success: boolean;
|
|
1219
|
+
/** Score or value (optional) */
|
|
1220
|
+
score?: number;
|
|
1221
|
+
/** Output data from this step */
|
|
1222
|
+
outputs?: Record<string, any>;
|
|
1223
|
+
/** Human-readable message */
|
|
1224
|
+
message?: string;
|
|
1225
|
+
/** Error message if failed */
|
|
1226
|
+
error?: string;
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Signed UDID structure
|
|
1230
|
+
*/
|
|
1231
|
+
interface SignedUdid {
|
|
1232
|
+
/** Unique identifier for this UDID */
|
|
1233
|
+
id: string;
|
|
1234
|
+
/** The unsigned UDID payload */
|
|
1235
|
+
payload: {
|
|
1236
|
+
/** Subject of the evaluation (claim CID) */
|
|
1237
|
+
sub: string;
|
|
1238
|
+
/** Issuer DID (evaluator) */
|
|
1239
|
+
iss: string;
|
|
1240
|
+
/** Audience/context (deed DID) */
|
|
1241
|
+
aud: string;
|
|
1242
|
+
/** Issued at timestamp */
|
|
1243
|
+
iat: number;
|
|
1244
|
+
/** Expiration timestamp (optional) */
|
|
1245
|
+
exp?: number;
|
|
1246
|
+
/** Action/capability context */
|
|
1247
|
+
act: {
|
|
1248
|
+
capabilityCid: string;
|
|
1249
|
+
capabilitySchema: string;
|
|
1250
|
+
rubricAuthority: string;
|
|
1251
|
+
rubricId: string;
|
|
1252
|
+
environment: string;
|
|
1253
|
+
evaluatorVersion?: string;
|
|
1254
|
+
};
|
|
1255
|
+
/** Result data */
|
|
1256
|
+
res: {
|
|
1257
|
+
outcome: number;
|
|
1258
|
+
tag: string;
|
|
1259
|
+
patch?: Record<string, any>;
|
|
1260
|
+
traceCid?: string;
|
|
1261
|
+
traceHash?: string;
|
|
1262
|
+
items?: UdidResultItem[];
|
|
1263
|
+
resultSchema?: string;
|
|
1264
|
+
};
|
|
1265
|
+
/** Metadata */
|
|
1266
|
+
meta: {
|
|
1267
|
+
collectionId: string;
|
|
1268
|
+
timestamp: string;
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
/** Signature of the payload */
|
|
1272
|
+
signature: string;
|
|
1273
|
+
/** Verification method used for signing */
|
|
1274
|
+
verificationMethod: string;
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Parameters for creating a UDID
|
|
1278
|
+
*/
|
|
1279
|
+
interface CreateUdidParams {
|
|
1280
|
+
/** CID of the claim being evaluated */
|
|
1281
|
+
claimCid: string;
|
|
1282
|
+
/** DID of the Deed/Context where this result applies */
|
|
1283
|
+
deedDid: string;
|
|
1284
|
+
/** Collection ID for the claim */
|
|
1285
|
+
collectionId: string;
|
|
1286
|
+
/** CID of the UCAN/capability that authorized this evaluation */
|
|
1287
|
+
capabilityCid: string;
|
|
1288
|
+
/** Schema of the capability (default: "ixo-protocol-v1") */
|
|
1289
|
+
capabilitySchema?: string;
|
|
1290
|
+
/** DID of the rubric authority (usually the Deed DID) */
|
|
1291
|
+
rubricAuthority: string;
|
|
1292
|
+
/** Version/ID of the rubric used */
|
|
1293
|
+
rubricId: string;
|
|
1294
|
+
/** Environment (default: "production") */
|
|
1295
|
+
environment?: 'production' | 'simulation' | 'testnet';
|
|
1296
|
+
/** Version of the evaluator (optional) */
|
|
1297
|
+
evaluatorVersion?: string;
|
|
1298
|
+
/** Outcome of the evaluation matching EvaluationStatus enum (0=PENDING, 1=APPROVED, 2=REJECTED, 3=DISPUTED, 4=INVALIDATED, -1=UNRECOGNIZED) */
|
|
1299
|
+
outcome: UdidOutcome | number;
|
|
1300
|
+
/** Human-readable tag for the outcome */
|
|
1301
|
+
tag: string;
|
|
1302
|
+
/** State patch to apply to Digital Twin (optional) */
|
|
1303
|
+
patch?: Record<string, any>;
|
|
1304
|
+
/** CID of the trace/reasoning logs (optional) */
|
|
1305
|
+
traceCid?: string;
|
|
1306
|
+
/** Hash of the trace for integrity (optional) */
|
|
1307
|
+
traceHash?: string;
|
|
1308
|
+
/** Granular step results (optional) */
|
|
1309
|
+
items?: UdidResultItem[];
|
|
1310
|
+
/** Schema for result validation (optional) */
|
|
1311
|
+
resultSchema?: string;
|
|
1312
|
+
/** Type of issuer: entity or user */
|
|
1313
|
+
issuerType: 'entity' | 'user';
|
|
1314
|
+
/** Entity room ID (required if issuerType is "entity") */
|
|
1315
|
+
entityRoomId?: string;
|
|
1316
|
+
/** PIN for decrypting signing key */
|
|
1317
|
+
pin: string;
|
|
1318
|
+
/** Expiration time in seconds from now (optional) */
|
|
1319
|
+
expiresInSeconds?: number;
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* Response from creating a UDID
|
|
1323
|
+
*/
|
|
1324
|
+
interface CreateUdidResponse {
|
|
1325
|
+
/** Whether the UDID was created successfully */
|
|
1326
|
+
success: boolean;
|
|
1327
|
+
/** The signed UDID */
|
|
1328
|
+
udid: SignedUdid;
|
|
1329
|
+
/** CID of the stored UDID in public storage (IPFS/Matrix) */
|
|
1330
|
+
cid: string;
|
|
1331
|
+
/** URL to fetch the UDID from public storage */
|
|
1332
|
+
url: string;
|
|
1333
|
+
/** Transaction hash if submitted on-chain */
|
|
1334
|
+
transactionHash?: string;
|
|
1335
|
+
}
|
|
1336
|
+
interface VoteParams {
|
|
1337
|
+
proposalId: number;
|
|
1338
|
+
rationale?: string;
|
|
1339
|
+
vote: Vote;
|
|
1340
|
+
proposalContractAddress: string;
|
|
1341
|
+
}
|
|
1342
|
+
interface CreateProposalParams {
|
|
1343
|
+
preProposalContractAddress: string;
|
|
1344
|
+
title: string;
|
|
1345
|
+
description: string;
|
|
1346
|
+
actions?: ProposalAction[];
|
|
1347
|
+
coreAddress?: string;
|
|
1348
|
+
groupContractAddress?: string;
|
|
1349
|
+
}
|
|
1350
|
+
interface EmailNotificationParams {
|
|
1351
|
+
channel: 'email';
|
|
1352
|
+
to: string[];
|
|
1353
|
+
cc?: string[];
|
|
1354
|
+
bcc?: string[];
|
|
1355
|
+
subject: string;
|
|
1356
|
+
body: string;
|
|
1357
|
+
bodyType?: 'text' | 'html';
|
|
1358
|
+
from?: string;
|
|
1359
|
+
replyTo?: string;
|
|
1360
|
+
}
|
|
1361
|
+
interface SmsNotificationParams {
|
|
1362
|
+
channel: 'sms';
|
|
1363
|
+
to: string[];
|
|
1364
|
+
body: string;
|
|
1365
|
+
}
|
|
1366
|
+
interface WhatsAppNotificationParams {
|
|
1367
|
+
channel: 'whatsapp';
|
|
1368
|
+
to: string[];
|
|
1369
|
+
body: string;
|
|
1370
|
+
templateId?: string;
|
|
1371
|
+
templateVariables?: Record<string, string>;
|
|
1372
|
+
}
|
|
1373
|
+
type NotificationParams = EmailNotificationParams | SmsNotificationParams | WhatsAppNotificationParams;
|
|
1374
|
+
interface NotificationResponse {
|
|
1375
|
+
messageId: string;
|
|
1376
|
+
status: 'accepted' | 'rejected';
|
|
1377
|
+
timestamp: string;
|
|
1378
|
+
}
|
|
1379
|
+
interface WorkspacePage {
|
|
1380
|
+
id: string;
|
|
1381
|
+
type: string;
|
|
1382
|
+
description: string;
|
|
1383
|
+
serviceEndpoint: string;
|
|
1384
|
+
mediaType: string;
|
|
1385
|
+
}
|
|
1386
|
+
interface BlocknoteHandlers {
|
|
1387
|
+
getVote: (proposalContractAddress: string, proposalId: string, userAddress: string) => Promise<VoteResponse>;
|
|
1388
|
+
getProposal: (proposalContractAddress: string, proposalId: string) => Promise<ProposalResponse>;
|
|
1389
|
+
getCurrentUser: () => User;
|
|
1390
|
+
getRoomMembers: (roomId: string, mx: MatrixClient) => Promise<AwarenessDocActor[]>;
|
|
1391
|
+
getMatrixInfoPerDid: (did: string) => Promise<IUserMatrixProfile>;
|
|
1392
|
+
getDaoGroupsIds: () => Promise<string[] | undefined>;
|
|
1393
|
+
getDAOGroups: () => Promise<DAOGroup[]>;
|
|
1394
|
+
getRelayerDid: () => string | undefined;
|
|
1395
|
+
getEntityDid: () => string | undefined;
|
|
1396
|
+
getAdminAccountAddress: (deedDid: string) => Promise<string>;
|
|
1397
|
+
getOnlyClaimCollections: (deedDid: string) => Promise<ClaimCollection[]>;
|
|
1398
|
+
vote: ({ proposalId, rationale, vote, proposalContractAddress }: VoteParams) => Promise<void>;
|
|
1399
|
+
createProposal: (params: CreateProposalParams) => Promise<string>;
|
|
1400
|
+
getEntity: (did: string) => Promise<EntityResponse$1>;
|
|
1401
|
+
getDomainCard: () => Promise<DomainCard>;
|
|
1402
|
+
askCompanion: (prompt: string) => Promise<void>;
|
|
1403
|
+
getCryptoAssets: () => Promise<IAssetsListItem[]>;
|
|
1404
|
+
getAssets: (collectionDid: string, page: number, ownerAddress?: string) => Promise<{
|
|
1405
|
+
data: Asset[];
|
|
1406
|
+
totalCount: number;
|
|
1407
|
+
}>;
|
|
1408
|
+
getDeedSubscriptions: (relayerDid: string, page: number) => Promise<{
|
|
1409
|
+
data: DeedSubscription[];
|
|
1410
|
+
totalCount: number;
|
|
1411
|
+
}>;
|
|
1412
|
+
getCollections: (relayerDid: string, page: number) => Promise<{
|
|
1413
|
+
data: Collection[];
|
|
1414
|
+
totalCount: number;
|
|
1415
|
+
}>;
|
|
1416
|
+
getTransactions: (address: string, page: number) => Promise<{
|
|
1417
|
+
data: Transaction[];
|
|
1418
|
+
totalCount: number;
|
|
1419
|
+
}>;
|
|
1420
|
+
getInvestments: (relayerDid: string, page: number) => Promise<{
|
|
1421
|
+
data: Investment[];
|
|
1422
|
+
totalCount: number;
|
|
1423
|
+
}>;
|
|
1424
|
+
getOracles: (relayerDid: string, page: number) => Promise<{
|
|
1425
|
+
data: Oracle[];
|
|
1426
|
+
totalCount: number;
|
|
1427
|
+
}>;
|
|
1428
|
+
getPODs: (relayerDid: string, page: number) => Promise<{
|
|
1429
|
+
data: POD[];
|
|
1430
|
+
totalCount: number;
|
|
1431
|
+
}>;
|
|
1432
|
+
getProposals: (relayerDid: string, page: number) => Promise<{
|
|
1433
|
+
data: Proposal[];
|
|
1434
|
+
totalCount: number;
|
|
1435
|
+
}>;
|
|
1436
|
+
getRequests: (relayerDid: string, page: number) => Promise<{
|
|
1437
|
+
data: Request[];
|
|
1438
|
+
totalCount: number;
|
|
1439
|
+
}>;
|
|
1440
|
+
getDaos: (relayerDid: string, page: number) => Promise<{
|
|
1441
|
+
data: Dao[];
|
|
1442
|
+
totalCount: number;
|
|
1443
|
+
}>;
|
|
1444
|
+
getProjects: (relayerDid: string, page: number) => Promise<{
|
|
1445
|
+
data: Project[];
|
|
1446
|
+
totalCount: number;
|
|
1447
|
+
}>;
|
|
1448
|
+
getMembers: (address: string, groupCoreAddress: string, withBalance: boolean, page: number) => Promise<{
|
|
1449
|
+
data: Member[];
|
|
1450
|
+
totalCount: number;
|
|
1451
|
+
}>;
|
|
1452
|
+
getDaoMembers: (address: string, groupIds: string[], withBalance: boolean, page: number) => Promise<{
|
|
1453
|
+
data: Member[];
|
|
1454
|
+
totalCount: number;
|
|
1455
|
+
}>;
|
|
1456
|
+
getValidators: (relayerDid: string, page: number) => Promise<{
|
|
1457
|
+
data: Validator[];
|
|
1458
|
+
totalCount: number;
|
|
1459
|
+
}>;
|
|
1460
|
+
executeProposal: (params: {
|
|
1461
|
+
proposalId: number;
|
|
1462
|
+
proposalContractAddress: string;
|
|
1463
|
+
}) => Promise<void>;
|
|
1464
|
+
getProposalContractAddress: (params: {
|
|
1465
|
+
coreAddress: string;
|
|
1466
|
+
}) => Promise<{
|
|
1467
|
+
proposalContractAddress: string;
|
|
1468
|
+
}>;
|
|
1469
|
+
getPreProposalContractAddress: (params: {
|
|
1470
|
+
coreAddress: string;
|
|
1471
|
+
}) => Promise<{
|
|
1472
|
+
preProposalContractAddress: string;
|
|
1473
|
+
}>;
|
|
1474
|
+
getGroupContractAddress: (params: {
|
|
1475
|
+
coreAddress: string;
|
|
1476
|
+
}) => Promise<{
|
|
1477
|
+
groupContractAddress: string;
|
|
1478
|
+
}>;
|
|
1479
|
+
getBalances: (address: string) => Promise<{
|
|
1480
|
+
data: Balance[];
|
|
1481
|
+
}>;
|
|
1482
|
+
sendNotification: (params: NotificationParams) => Promise<NotificationResponse>;
|
|
1483
|
+
getAssetDetails?: (id: string) => Promise<AssetDetails>;
|
|
1484
|
+
getCollectionDetails?: (id: string) => Promise<CollectionDetails>;
|
|
1485
|
+
getTransactionDetails?: (id: string) => Promise<TransactionDetails>;
|
|
1486
|
+
getInvestmentDetails?: (id: string) => Promise<InvestmentDetails>;
|
|
1487
|
+
getOracleDetails?: (id: string) => Promise<OracleDetails>;
|
|
1488
|
+
getPODDetails?: (id: string) => Promise<PODDetails>;
|
|
1489
|
+
getProposalDetails?: (id: string) => Promise<ProposalDetails>;
|
|
1490
|
+
getRequestDetails?: (id: string) => Promise<RequestDetails>;
|
|
1491
|
+
getMemberDetails?: (id: string) => Promise<MemberDetails>;
|
|
1492
|
+
getValidatorDetails?: (id: string) => Promise<ValidatorDetails>;
|
|
1493
|
+
getLinkedResourceDetails?: (id: string) => Promise<LinkedResourceDetails>;
|
|
1494
|
+
getDaoMemberDetails?: (id: string) => Promise<MemberDetails>;
|
|
1495
|
+
getDeedSurveyTemplate: (deedDid: string) => Promise<{
|
|
1496
|
+
surveyTemplate: any;
|
|
1497
|
+
claimCollectionId: string;
|
|
1498
|
+
} | null>;
|
|
1499
|
+
submitClaim: (params: {
|
|
1500
|
+
surveyData: any;
|
|
1501
|
+
deedDid: string;
|
|
1502
|
+
collectionId: string;
|
|
1503
|
+
adminAddress: string;
|
|
1504
|
+
pin: string;
|
|
1505
|
+
}) => Promise<{
|
|
1506
|
+
transactionHash: string;
|
|
1507
|
+
claimId: string;
|
|
1508
|
+
}>;
|
|
1509
|
+
requestPin: (config?: {
|
|
1510
|
+
title?: string;
|
|
1511
|
+
description?: string;
|
|
1512
|
+
submitText?: string;
|
|
1513
|
+
}) => Promise<string>;
|
|
1514
|
+
getClaimCollections: (deedDid: string) => Promise<ClaimCollectionResponse>;
|
|
1515
|
+
getClaimsPerCollectionId: (params: GetClaimsPerCollectionIdParams) => Promise<Claim[]>;
|
|
1516
|
+
getClaimsPerUserAddress: (params: GetClaimsPerUserAddressParams) => Promise<Claim[]>;
|
|
1517
|
+
getClaimData: (collectionId: string, claimId: string) => Promise<any>;
|
|
1518
|
+
evaluateClaim: (granteeAddress: string, did: string, payload: {
|
|
1519
|
+
claimId: string;
|
|
1520
|
+
collectionId: string;
|
|
1521
|
+
adminAddress: string;
|
|
1522
|
+
status?: number;
|
|
1523
|
+
verificationProof: string;
|
|
1524
|
+
amount?: Coin | Coin[];
|
|
1525
|
+
}) => Promise<void>;
|
|
1526
|
+
submitBid: (params: SubmitBidParams) => Promise<BidResponse>;
|
|
1527
|
+
queryBids: (params: QueryBidsParams) => Promise<QueryBidsResponse>;
|
|
1528
|
+
queryBidsByDid: (params: QueryBidsByDidParams) => Promise<{
|
|
1529
|
+
data: Bid[];
|
|
1530
|
+
}>;
|
|
1531
|
+
approveBid: (params: ApproveBidParams) => Promise<BidResponse>;
|
|
1532
|
+
rejectBid: (params: RejectBidParams) => Promise<BidResponse>;
|
|
1533
|
+
getUserRoles: (params: CheckUserRoleParams) => Promise<ClaimCollectionRole[]>;
|
|
1534
|
+
getBidContributorSurveyTemplate: (deedId: string) => Promise<{
|
|
1535
|
+
surveyTemplate: any;
|
|
1536
|
+
} | null>;
|
|
1537
|
+
getBidEvaluatorSurveyTemplate: (deedId: string) => Promise<{
|
|
1538
|
+
surveyTemplate: any;
|
|
1539
|
+
} | null>;
|
|
1540
|
+
approveServiceAgentApplication: (params: {
|
|
1541
|
+
adminAddress: string;
|
|
1542
|
+
collectionId: string;
|
|
1543
|
+
agentQuota: number;
|
|
1544
|
+
deedDid: string;
|
|
1545
|
+
currentUserAddress: string;
|
|
1546
|
+
}) => Promise<void>;
|
|
1547
|
+
approveEvaluatorApplication: (params: {
|
|
1548
|
+
adminAddress: string;
|
|
1549
|
+
collectionId: string;
|
|
1550
|
+
deedDid: string;
|
|
1551
|
+
evaluatorAddress: string;
|
|
1552
|
+
agentQuota?: number;
|
|
1553
|
+
claimIds?: string[];
|
|
1554
|
+
maxAmounts?: Coin[];
|
|
1555
|
+
}) => Promise<void>;
|
|
1556
|
+
publicFileUpload: (file: File) => Promise<{
|
|
1557
|
+
encrypted: string;
|
|
1558
|
+
cid: string;
|
|
1559
|
+
proof: string;
|
|
1560
|
+
serviceEndpoint: string;
|
|
1561
|
+
url: string;
|
|
1562
|
+
mxc: string;
|
|
1563
|
+
}>;
|
|
1564
|
+
/**
|
|
1565
|
+
* Check if entity has signing key set up
|
|
1566
|
+
*/
|
|
1567
|
+
checkEntitySigningSetup?: (entityDid: string) => Promise<{
|
|
1568
|
+
hasSigningKey: boolean;
|
|
1569
|
+
keyId?: string;
|
|
1570
|
+
}>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Set up entity signing (generates mnemonic, adds verification method)
|
|
1573
|
+
* Requires wallet signature
|
|
1574
|
+
*/
|
|
1575
|
+
setupEntitySigning?: (params: {
|
|
1576
|
+
entityDid: string;
|
|
1577
|
+
entityRoomId: string;
|
|
1578
|
+
pin: string;
|
|
1579
|
+
}) => Promise<{
|
|
1580
|
+
transactionHash: string;
|
|
1581
|
+
keyId: string;
|
|
1582
|
+
}>;
|
|
1583
|
+
/**
|
|
1584
|
+
* Check if current user has signing key set up
|
|
1585
|
+
*/
|
|
1586
|
+
checkUserSigningSetup?: () => Promise<{
|
|
1587
|
+
hasSigningKey: boolean;
|
|
1588
|
+
keyId?: string;
|
|
1589
|
+
}>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Sign a capability delegation
|
|
1592
|
+
* @deprecated Use createDelegation instead for @ixo/ucan CAR format
|
|
1593
|
+
*/
|
|
1594
|
+
signCapability?: (params: {
|
|
1595
|
+
/** DID of issuer (entity or user) */
|
|
1596
|
+
issuerDid: string;
|
|
1597
|
+
/** Whether signing as entity or user */
|
|
1598
|
+
issuerType: 'entity' | 'user';
|
|
1599
|
+
/** Entity room ID (required if issuerType is 'entity') */
|
|
1600
|
+
entityRoomId?: string;
|
|
1601
|
+
/** DID of recipient */
|
|
1602
|
+
audience: string;
|
|
1603
|
+
/** Capabilities to grant */
|
|
1604
|
+
capabilities: Array<{
|
|
1605
|
+
can: string;
|
|
1606
|
+
with: string;
|
|
1607
|
+
nb?: Record<string, any>;
|
|
1608
|
+
}>;
|
|
1609
|
+
/** IDs of parent capabilities (proofs) */
|
|
1610
|
+
proofs?: string[];
|
|
1611
|
+
/** Expiration timestamp */
|
|
1612
|
+
expiration?: number;
|
|
1613
|
+
/** PIN to decrypt signing mnemonic */
|
|
1614
|
+
pin: string;
|
|
1615
|
+
}) => Promise<{
|
|
1616
|
+
id: string;
|
|
1617
|
+
raw: string;
|
|
1618
|
+
signature: string;
|
|
1619
|
+
}>;
|
|
1620
|
+
/**
|
|
1621
|
+
* Verify a capability signature against issuer's DID document
|
|
1622
|
+
* @deprecated Use validateInvocation instead
|
|
1623
|
+
*/
|
|
1624
|
+
verifyCapabilitySignature?: (params: {
|
|
1625
|
+
/** Raw capability JSON */
|
|
1626
|
+
capabilityRaw: string;
|
|
1627
|
+
/** Expected issuer DID */
|
|
1628
|
+
issuerDid: string;
|
|
1629
|
+
}) => Promise<{
|
|
1630
|
+
valid: boolean;
|
|
1631
|
+
error?: string;
|
|
1632
|
+
}>;
|
|
1633
|
+
/**
|
|
1634
|
+
* Create a delegation using @ixo/ucan (CAR format)
|
|
1635
|
+
*/
|
|
1636
|
+
createDelegation?: (params: {
|
|
1637
|
+
/** DID of issuer */
|
|
1638
|
+
issuerDid: string;
|
|
1639
|
+
/** Whether signing as entity or user */
|
|
1640
|
+
issuerType: 'entity' | 'user';
|
|
1641
|
+
/** Entity room ID (required if issuerType is 'entity') */
|
|
1642
|
+
entityRoomId?: string;
|
|
1643
|
+
/** DID of recipient */
|
|
1644
|
+
audience: string;
|
|
1645
|
+
/** Capabilities to grant */
|
|
1646
|
+
capabilities: Array<{
|
|
1647
|
+
can: string;
|
|
1648
|
+
with: string;
|
|
1649
|
+
nb?: Record<string, unknown>;
|
|
1650
|
+
}>;
|
|
1651
|
+
/** CIDs of proof delegations */
|
|
1652
|
+
proofs?: string[];
|
|
1653
|
+
/** Expiration timestamp (milliseconds) */
|
|
1654
|
+
expiration?: number;
|
|
1655
|
+
/** PIN to decrypt signing mnemonic */
|
|
1656
|
+
pin: string;
|
|
1657
|
+
}) => Promise<{
|
|
1658
|
+
/** Content ID of the delegation */
|
|
1659
|
+
cid: string;
|
|
1660
|
+
/** Base64-encoded CAR bytes */
|
|
1661
|
+
delegation: string;
|
|
1662
|
+
}>;
|
|
1663
|
+
/**
|
|
1664
|
+
* Create an invocation using @ixo/ucan (CAR format)
|
|
1665
|
+
*/
|
|
1666
|
+
createInvocation?: (params: {
|
|
1667
|
+
/** DID of invoker */
|
|
1668
|
+
invokerDid: string;
|
|
1669
|
+
/** Whether signing as entity or user */
|
|
1670
|
+
invokerType: 'entity' | 'user';
|
|
1671
|
+
/** Entity room ID (required if invokerType is 'entity') */
|
|
1672
|
+
entityRoomId?: string;
|
|
1673
|
+
/** Capability to invoke */
|
|
1674
|
+
capability: {
|
|
1675
|
+
can: string;
|
|
1676
|
+
with: string;
|
|
1677
|
+
nb?: Record<string, unknown>;
|
|
1678
|
+
};
|
|
1679
|
+
/** CIDs of proof delegations */
|
|
1680
|
+
proofs: string[];
|
|
1681
|
+
/** Additional facts/context */
|
|
1682
|
+
facts?: Record<string, unknown>;
|
|
1683
|
+
/** PIN to decrypt signing mnemonic */
|
|
1684
|
+
pin: string;
|
|
1685
|
+
}) => Promise<{
|
|
1686
|
+
/** Content ID of the invocation */
|
|
1687
|
+
cid: string;
|
|
1688
|
+
/** Base64-encoded CAR bytes */
|
|
1689
|
+
invocation: string;
|
|
1690
|
+
}>;
|
|
1691
|
+
/**
|
|
1692
|
+
* Validate an invocation against its proof chain
|
|
1693
|
+
*/
|
|
1694
|
+
validateInvocation?: (params: {
|
|
1695
|
+
/** Base64-encoded CAR invocation */
|
|
1696
|
+
invocation: string;
|
|
1697
|
+
/** Base64-encoded CAR delegations (proofs) */
|
|
1698
|
+
delegations: string[];
|
|
1699
|
+
}) => Promise<{
|
|
1700
|
+
valid: boolean;
|
|
1701
|
+
error?: string;
|
|
1702
|
+
/** Issuer DID if valid */
|
|
1703
|
+
issuer?: string;
|
|
1704
|
+
/** Validated capability if valid */
|
|
1705
|
+
capability?: {
|
|
1706
|
+
can: string;
|
|
1707
|
+
with: string;
|
|
1708
|
+
nb?: Record<string, unknown>;
|
|
1709
|
+
};
|
|
1710
|
+
}>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Parse a delegation from Base64 CAR format
|
|
1713
|
+
*/
|
|
1714
|
+
parseDelegation?: (
|
|
1715
|
+
/** Base64-encoded CAR delegation */
|
|
1716
|
+
delegation: string) => Promise<{
|
|
1717
|
+
cid: string;
|
|
1718
|
+
issuer: string;
|
|
1719
|
+
audience: string;
|
|
1720
|
+
capabilities: Array<{
|
|
1721
|
+
can: string;
|
|
1722
|
+
with: string;
|
|
1723
|
+
nb?: Record<string, unknown>;
|
|
1724
|
+
}>;
|
|
1725
|
+
expiration?: number;
|
|
1726
|
+
proofs: string[];
|
|
1727
|
+
}>;
|
|
1728
|
+
/**
|
|
1729
|
+
* Search for users by name or DID
|
|
1730
|
+
*/
|
|
1731
|
+
searchUsers?: (query: string) => Promise<Array<{
|
|
1732
|
+
did: string;
|
|
1733
|
+
displayName: string;
|
|
1734
|
+
avatarUrl?: string;
|
|
1735
|
+
address?: string;
|
|
1736
|
+
}>>;
|
|
1737
|
+
/**
|
|
1738
|
+
* Get registered oracles for an entity
|
|
1739
|
+
*/
|
|
1740
|
+
getRegisteredOracles?: (entityDid: string) => Promise<Array<{
|
|
1741
|
+
did: string;
|
|
1742
|
+
name: string;
|
|
1743
|
+
description?: string;
|
|
1744
|
+
capabilities?: string[];
|
|
1745
|
+
}>>;
|
|
1746
|
+
/**
|
|
1747
|
+
* Get entity info including room ID
|
|
1748
|
+
*/
|
|
1749
|
+
getEntityInfo?: (entityDid: string) => Promise<{
|
|
1750
|
+
did: string;
|
|
1751
|
+
name: string;
|
|
1752
|
+
roomId: string;
|
|
1753
|
+
adminAddress: string;
|
|
1754
|
+
controllerDid: string;
|
|
1755
|
+
}>;
|
|
1756
|
+
/**
|
|
1757
|
+
* Sign a Verifiable Credential using entity or user key.
|
|
1758
|
+
* Creates a DataIntegrityProof using eddsa-rdfc-2022 cryptosuite.
|
|
1759
|
+
*/
|
|
1760
|
+
signCredential?: (params: {
|
|
1761
|
+
/** DID of issuer (entity or user) */
|
|
1762
|
+
issuerDid: string;
|
|
1763
|
+
/** Whether signing as entity or user */
|
|
1764
|
+
issuerType: 'entity' | 'user';
|
|
1765
|
+
/** Entity room ID (required if issuerType is 'entity') */
|
|
1766
|
+
entityRoomId?: string;
|
|
1767
|
+
/** The unsigned credential to sign */
|
|
1768
|
+
credential: {
|
|
1769
|
+
'@context': any;
|
|
1770
|
+
id: string;
|
|
1771
|
+
type: string[];
|
|
1772
|
+
issuer: {
|
|
1773
|
+
id: string;
|
|
1774
|
+
};
|
|
1775
|
+
validFrom: string;
|
|
1776
|
+
validUntil: string;
|
|
1777
|
+
credentialSchema: {
|
|
1778
|
+
id: string;
|
|
1779
|
+
type: string;
|
|
1780
|
+
};
|
|
1781
|
+
credentialSubject: any;
|
|
1782
|
+
};
|
|
1783
|
+
/** PIN to decrypt signing mnemonic */
|
|
1784
|
+
pin: string;
|
|
1785
|
+
}) => Promise<{
|
|
1786
|
+
/** The signed credential with proof attached */
|
|
1787
|
+
signedCredential: {
|
|
1788
|
+
'@context': any;
|
|
1789
|
+
id: string;
|
|
1790
|
+
type: string[];
|
|
1791
|
+
issuer: {
|
|
1792
|
+
id: string;
|
|
1793
|
+
};
|
|
1794
|
+
validFrom: string;
|
|
1795
|
+
validUntil: string;
|
|
1796
|
+
credentialSchema: {
|
|
1797
|
+
id: string;
|
|
1798
|
+
type: string;
|
|
1799
|
+
};
|
|
1800
|
+
credentialSubject: any;
|
|
1801
|
+
proof: {
|
|
1802
|
+
type: 'DataIntegrityProof';
|
|
1803
|
+
created: string;
|
|
1804
|
+
verificationMethod: string;
|
|
1805
|
+
cryptosuite: 'eddsa-rdfc-2022';
|
|
1806
|
+
proofPurpose: 'assertionMethod';
|
|
1807
|
+
proofValue: string;
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
}>;
|
|
1811
|
+
/**
|
|
1812
|
+
* Redirect to entity overview page
|
|
1813
|
+
*/
|
|
1814
|
+
redirectToEntityOverview?: (did: string, type: string) => void;
|
|
1815
|
+
/**
|
|
1816
|
+
* Create a new domain entity with the provided linked resources.
|
|
1817
|
+
* This is called after the domain card credential has been uploaded.
|
|
1818
|
+
*/
|
|
1819
|
+
createDomain?: (params: {
|
|
1820
|
+
/** Entity type from survey (e.g., 'dao', 'protocol') */
|
|
1821
|
+
entityType: string;
|
|
1822
|
+
/** Linked resources to attach to the entity (includes domain card) */
|
|
1823
|
+
linkedResource: Array<{
|
|
1824
|
+
id: string;
|
|
1825
|
+
type: string;
|
|
1826
|
+
proof: string;
|
|
1827
|
+
right: string;
|
|
1828
|
+
encrypted: string;
|
|
1829
|
+
mediaType: string;
|
|
1830
|
+
description: string;
|
|
1831
|
+
serviceEndpoint: string;
|
|
1832
|
+
}>;
|
|
1833
|
+
/** Linked entities (e.g., governance groups) */
|
|
1834
|
+
linkedEntity?: Array<{
|
|
1835
|
+
id: string;
|
|
1836
|
+
type: string;
|
|
1837
|
+
relationship: string;
|
|
1838
|
+
service: string;
|
|
1839
|
+
}>;
|
|
1840
|
+
/** Start date for the entity (from validFrom) */
|
|
1841
|
+
startDate?: string;
|
|
1842
|
+
/** End date for the entity (from validUntil) */
|
|
1843
|
+
endDate?: string;
|
|
1844
|
+
}) => Promise<{
|
|
1845
|
+
/** The DID of the newly created entity */
|
|
1846
|
+
entityDid: string;
|
|
1847
|
+
/** Transaction hash */
|
|
1848
|
+
transactionHash: string;
|
|
1849
|
+
}>;
|
|
1850
|
+
/**
|
|
1851
|
+
* List available email templates from Mailgun
|
|
1852
|
+
*/
|
|
1853
|
+
listEmailTemplates?: (params: {
|
|
1854
|
+
limit?: number;
|
|
1855
|
+
page?: string;
|
|
1856
|
+
}) => Promise<{
|
|
1857
|
+
items: Array<{
|
|
1858
|
+
name: string;
|
|
1859
|
+
description?: string;
|
|
1860
|
+
createdAt: string;
|
|
1861
|
+
}>;
|
|
1862
|
+
paging?: {
|
|
1863
|
+
first: string;
|
|
1864
|
+
last: string;
|
|
1865
|
+
next?: string;
|
|
1866
|
+
previous?: string;
|
|
1867
|
+
};
|
|
1868
|
+
}>;
|
|
1869
|
+
/**
|
|
1870
|
+
* Get a specific email template with optional active version content
|
|
1871
|
+
*/
|
|
1872
|
+
getEmailTemplate?: (params: {
|
|
1873
|
+
templateName: string;
|
|
1874
|
+
active?: boolean;
|
|
1875
|
+
}) => Promise<{
|
|
1876
|
+
name: string;
|
|
1877
|
+
description?: string;
|
|
1878
|
+
version?: {
|
|
1879
|
+
tag: string;
|
|
1880
|
+
template: string;
|
|
1881
|
+
engine: string;
|
|
1882
|
+
active: boolean;
|
|
1883
|
+
createdAt: string;
|
|
1884
|
+
};
|
|
1885
|
+
}>;
|
|
1886
|
+
/**
|
|
1887
|
+
* Send an email using a template
|
|
1888
|
+
*/
|
|
1889
|
+
sendEmail?: (params: {
|
|
1890
|
+
to: string;
|
|
1891
|
+
subject: string;
|
|
1892
|
+
template: string;
|
|
1893
|
+
templateVersion?: string;
|
|
1894
|
+
variables?: Record<string, any>;
|
|
1895
|
+
cc?: string;
|
|
1896
|
+
bcc?: string;
|
|
1897
|
+
replyTo?: string;
|
|
1898
|
+
}) => Promise<{
|
|
1899
|
+
id: string;
|
|
1900
|
+
message: string;
|
|
1901
|
+
}>;
|
|
1902
|
+
/**
|
|
1903
|
+
* Store a verifiable credential in Matrix room state.
|
|
1904
|
+
* Used by the credential.store action type.
|
|
1905
|
+
*/
|
|
1906
|
+
storeMatrixCredential?: (params: {
|
|
1907
|
+
roomId: string;
|
|
1908
|
+
credentialKey: string;
|
|
1909
|
+
credential: Record<string, any>;
|
|
1910
|
+
cid: string;
|
|
1911
|
+
}) => Promise<{
|
|
1912
|
+
storedAt: string;
|
|
1913
|
+
duplicate: boolean;
|
|
1914
|
+
}>;
|
|
1915
|
+
/**
|
|
1916
|
+
* Get the evaluation template linked resource for a deed
|
|
1917
|
+
*/
|
|
1918
|
+
getEvaluationTemplate?: (deedDid: string) => Promise<{
|
|
1919
|
+
surveyTemplate: any;
|
|
1920
|
+
claimCollectionId: string;
|
|
1921
|
+
} | null>;
|
|
1922
|
+
/**
|
|
1923
|
+
* Get the rubric linked resource for a deed
|
|
1924
|
+
*/
|
|
1925
|
+
getDeedRubric?: (deedDid: string) => Promise<{
|
|
1926
|
+
rubric: any;
|
|
1927
|
+
claimCollectionId: string;
|
|
1928
|
+
} | null>;
|
|
1929
|
+
/**
|
|
1930
|
+
* Evaluate a claim using a rubric via the rubric engine
|
|
1931
|
+
*/
|
|
1932
|
+
evaluateWithRubric?: (params: {
|
|
1933
|
+
rubric: string;
|
|
1934
|
+
claim: Record<string, any>;
|
|
1935
|
+
}) => Promise<{
|
|
1936
|
+
success: boolean;
|
|
1937
|
+
trace?: {
|
|
1938
|
+
traceId: string;
|
|
1939
|
+
rubricVersion: number;
|
|
1940
|
+
rubricName: string | null;
|
|
1941
|
+
actor: {
|
|
1942
|
+
type: 'ai' | 'human';
|
|
1943
|
+
id?: string;
|
|
1944
|
+
} | null;
|
|
1945
|
+
result: {
|
|
1946
|
+
outcome: 'pass' | 'fail' | 'escalated';
|
|
1947
|
+
steps: Array<{
|
|
1948
|
+
stepId: string;
|
|
1949
|
+
kind: 'compute' | 'fetch' | 'check';
|
|
1950
|
+
success: boolean;
|
|
1951
|
+
outputs?: Record<string, any>;
|
|
1952
|
+
message?: string;
|
|
1953
|
+
error?: string;
|
|
1954
|
+
duration?: number;
|
|
1955
|
+
timestamp: string;
|
|
1956
|
+
}>;
|
|
1957
|
+
executionId: string;
|
|
1958
|
+
startTime: string;
|
|
1959
|
+
endTime: string;
|
|
1960
|
+
totalDuration: number;
|
|
1961
|
+
escalatedTo?: string;
|
|
1962
|
+
};
|
|
1963
|
+
claim: Record<string, any>;
|
|
1964
|
+
};
|
|
1965
|
+
error?: string;
|
|
1966
|
+
}>;
|
|
1967
|
+
/**
|
|
1968
|
+
* Create a Universal Decentralized Identifier (UDID) for an evaluation result
|
|
1969
|
+
*/
|
|
1970
|
+
createUdid?: (params: CreateUdidParams) => Promise<CreateUdidResponse>;
|
|
1971
|
+
/**
|
|
1972
|
+
* Create a new governance group (categorical, multisig, NFT staking, or token staking).
|
|
1973
|
+
* The implementation is provided by the host application.
|
|
1974
|
+
*/
|
|
1975
|
+
createGovernanceGroup?: (params: {
|
|
1976
|
+
/** Type of governance group to create */
|
|
1977
|
+
groupType: 'categorical' | 'multisig' | 'nftStaking' | 'tokenStaking';
|
|
1978
|
+
/** Name of the group */
|
|
1979
|
+
name: string;
|
|
1980
|
+
/** Optional description */
|
|
1981
|
+
description?: string;
|
|
1982
|
+
/** Group-type specific configuration from the survey */
|
|
1983
|
+
config: Record<string, unknown>;
|
|
1984
|
+
}) => Promise<{
|
|
1985
|
+
/** The DAO core contract address */
|
|
1986
|
+
coreAddress: string;
|
|
1987
|
+
/** The voting group contract address */
|
|
1988
|
+
groupAddress: string;
|
|
1989
|
+
/** Transaction hash */
|
|
1990
|
+
transactionHash: string;
|
|
1991
|
+
}>;
|
|
1992
|
+
/**
|
|
1993
|
+
* Navigate to a flow link URL
|
|
1994
|
+
* @param url - HTTP URL of the target flow or page
|
|
1995
|
+
*/
|
|
1996
|
+
navigateToFlow?: (url: string) => void;
|
|
1997
|
+
/**
|
|
1998
|
+
* Get the status of a flow document
|
|
1999
|
+
* @param url - HTTP URL of the flow document
|
|
2000
|
+
* @returns Flow status with optional completion timestamp
|
|
2001
|
+
*/
|
|
2002
|
+
getFlowStatus?: (url: string) => Promise<{
|
|
2003
|
+
status: 'not_started' | 'in_progress' | 'completed';
|
|
2004
|
+
completedAt?: string;
|
|
2005
|
+
}>;
|
|
2006
|
+
/**
|
|
2007
|
+
* Get workspace pages from protocol deed entity.
|
|
2008
|
+
* The host app automatically determines the network context.
|
|
2009
|
+
* @returns Array of workspace pages with type "Page" and mediaType "application/matrix"
|
|
2010
|
+
*/
|
|
2011
|
+
getWorkspacePages?: () => Promise<WorkspacePage[]>;
|
|
2012
|
+
/**
|
|
2013
|
+
* Create a new signer session for handle-based signing.
|
|
2014
|
+
*
|
|
2015
|
+
* This allows the editor to request signing operations without receiving
|
|
2016
|
+
* raw key material. The host app manages the session lifecycle and key security.
|
|
2017
|
+
*
|
|
2018
|
+
* @example
|
|
2019
|
+
* ```typescript
|
|
2020
|
+
* // Create a session-scoped signer for batch operations
|
|
2021
|
+
* const session = await handlers.createSignerSession({
|
|
2022
|
+
* did: 'did:ixo:entity:abc123',
|
|
2023
|
+
* didType: 'entity',
|
|
2024
|
+
* entityRoomId: '!room:matrix.ixo.world',
|
|
2025
|
+
* pin: '123456',
|
|
2026
|
+
* scope: 'session',
|
|
2027
|
+
* ttlSeconds: 300
|
|
2028
|
+
* });
|
|
2029
|
+
*
|
|
2030
|
+
* // Use for multiple signatures without re-entering PIN
|
|
2031
|
+
* const sig1 = await handlers.signWithSession({ sessionId: session.sessionId, data: '...' });
|
|
2032
|
+
* const sig2 = await handlers.signWithSession({ sessionId: session.sessionId, data: '...' });
|
|
2033
|
+
*
|
|
2034
|
+
* // Release when done
|
|
2035
|
+
* await handlers.releaseSignerSession({ sessionId: session.sessionId });
|
|
2036
|
+
* ```
|
|
2037
|
+
*/
|
|
2038
|
+
createSignerSession?: (params: {
|
|
2039
|
+
/** DID of the signer (entity or user) */
|
|
2040
|
+
did: string;
|
|
2041
|
+
/** Whether signing as entity or user */
|
|
2042
|
+
didType: 'entity' | 'user';
|
|
2043
|
+
/** Entity room ID (required if didType is 'entity') */
|
|
2044
|
+
entityRoomId?: string;
|
|
2045
|
+
/** PIN to decrypt signing mnemonic */
|
|
2046
|
+
pin: string;
|
|
2047
|
+
/**
|
|
2048
|
+
* Session scope:
|
|
2049
|
+
* - 'session': Remains valid for multiple sign operations until TTL or explicit release
|
|
2050
|
+
* - 'operation': Automatically invalidated after first sign operation
|
|
2051
|
+
*/
|
|
2052
|
+
scope: 'session' | 'operation';
|
|
2053
|
+
/**
|
|
2054
|
+
* Time-to-live in seconds (only applicable for 'session' scope)
|
|
2055
|
+
* Default: 300 (5 minutes), Maximum: 3600 (1 hour)
|
|
2056
|
+
*/
|
|
2057
|
+
ttlSeconds?: number;
|
|
2058
|
+
}) => Promise<{
|
|
2059
|
+
/** Opaque session identifier */
|
|
2060
|
+
sessionId: string;
|
|
2061
|
+
/** DID of the signer */
|
|
2062
|
+
did: string;
|
|
2063
|
+
/** Public key in multibase format (for verification) */
|
|
2064
|
+
publicKey: string;
|
|
2065
|
+
/** Key ID (verification method ID) */
|
|
2066
|
+
keyId: string;
|
|
2067
|
+
/** Unix timestamp when the session expires */
|
|
2068
|
+
expiresAt: number;
|
|
2069
|
+
/** The scope this session was created with */
|
|
2070
|
+
scope: 'session' | 'operation';
|
|
2071
|
+
}>;
|
|
2072
|
+
/**
|
|
2073
|
+
* Sign data using an existing signer session.
|
|
2074
|
+
*
|
|
2075
|
+
* For 'operation' scoped sessions, the session is automatically
|
|
2076
|
+
* invalidated after this call succeeds.
|
|
2077
|
+
*
|
|
2078
|
+
* @throws If session not found, expired, or signing fails
|
|
2079
|
+
*/
|
|
2080
|
+
signWithSession?: (params: {
|
|
2081
|
+
/** The session ID returned from createSignerSession */
|
|
2082
|
+
sessionId: string;
|
|
2083
|
+
/** Data to sign (passed as-is to Ed25519 sign) */
|
|
2084
|
+
data: string;
|
|
2085
|
+
/** Algorithm hint (currently only Ed25519 supported) */
|
|
2086
|
+
algorithm?: 'Ed25519';
|
|
2087
|
+
}) => Promise<{
|
|
2088
|
+
/** The signature in hex format */
|
|
2089
|
+
signature: string;
|
|
2090
|
+
/** The algorithm used */
|
|
2091
|
+
algorithm: 'Ed25519';
|
|
2092
|
+
/** Key ID that was used for signing */
|
|
2093
|
+
keyId: string;
|
|
2094
|
+
}>;
|
|
2095
|
+
/**
|
|
2096
|
+
* Release a signer session before it expires.
|
|
2097
|
+
*
|
|
2098
|
+
* This immediately clears the session from host memory, preventing
|
|
2099
|
+
* any further signing operations. Idempotent - safe to call on
|
|
2100
|
+
* already-expired or released sessions.
|
|
2101
|
+
*/
|
|
2102
|
+
releaseSignerSession?: (params: {
|
|
2103
|
+
/** The session ID to release */
|
|
2104
|
+
sessionId: string;
|
|
2105
|
+
}) => Promise<{
|
|
2106
|
+
/** Whether the session was successfully released */
|
|
2107
|
+
released: boolean;
|
|
2108
|
+
/** Reason if not released (e.g., already expired) */
|
|
2109
|
+
reason?: string;
|
|
2110
|
+
}>;
|
|
2111
|
+
/**
|
|
2112
|
+
* Fetch available skills (capsules) from the skills registry
|
|
2113
|
+
*/
|
|
2114
|
+
getSkills?: () => Promise<{
|
|
2115
|
+
capsules: Array<{
|
|
2116
|
+
cid: string;
|
|
2117
|
+
name: string;
|
|
2118
|
+
description: string;
|
|
2119
|
+
license: string;
|
|
2120
|
+
compatibility: string;
|
|
2121
|
+
allowedTools: string;
|
|
2122
|
+
metadata: unknown;
|
|
2123
|
+
archiveSize: number;
|
|
2124
|
+
createdAt: string;
|
|
2125
|
+
}>;
|
|
2126
|
+
pagination: {
|
|
2127
|
+
total: number;
|
|
2128
|
+
limit: number;
|
|
2129
|
+
offset: number;
|
|
2130
|
+
hasMore: boolean;
|
|
2131
|
+
};
|
|
2132
|
+
}>;
|
|
2133
|
+
}
|
|
2134
|
+
type DocType = 'template' | 'page' | 'flow';
|
|
2135
|
+
/**
|
|
2136
|
+
* Visualization renderer type for AG-UI integration.
|
|
2137
|
+
* This function is called by visualization blocks to render the actual AG-UI component.
|
|
2138
|
+
* @param vizType - The type of visualization (e.g., 'lineChart', 'barChart', 'dataTable', etc.)
|
|
2139
|
+
* @param config - The configuration object for the visualization
|
|
2140
|
+
* @param preferences - Optional user customizations (e.g., { pageSize: 25 }) persisted to the block
|
|
2141
|
+
* @param onPreferencesChange - Optional callback to update preferences (persists via CRDT)
|
|
2142
|
+
* @returns React node with the rendered visualization, or null if type is not supported
|
|
2143
|
+
*/
|
|
2144
|
+
type VisualizationRenderer = (vizType: string, config: object, preferences?: object, onPreferencesChange?: (prefs: object) => void) => React.ReactNode | null;
|
|
2145
|
+
/**
|
|
2146
|
+
* Domain card data structure for rendering domain card previews
|
|
2147
|
+
*/
|
|
2148
|
+
interface DomainCardData {
|
|
2149
|
+
name?: string;
|
|
2150
|
+
summary?: string;
|
|
2151
|
+
description?: string;
|
|
2152
|
+
entity_type?: string[];
|
|
2153
|
+
faq?: Array<{
|
|
2154
|
+
question: string;
|
|
2155
|
+
answer: string;
|
|
2156
|
+
}>;
|
|
2157
|
+
logo_url?: {
|
|
2158
|
+
url?: string;
|
|
2159
|
+
alt?: string;
|
|
2160
|
+
};
|
|
2161
|
+
image_urls?: Array<{
|
|
2162
|
+
url: string;
|
|
2163
|
+
alt: string;
|
|
2164
|
+
}>;
|
|
2165
|
+
keywords?: string[];
|
|
2166
|
+
valid_from?: string;
|
|
2167
|
+
issuer?: string;
|
|
2168
|
+
area_served?: string;
|
|
2169
|
+
address?: string;
|
|
2170
|
+
coordinates?: {
|
|
2171
|
+
type: string;
|
|
2172
|
+
coordinates: [number, number];
|
|
2173
|
+
};
|
|
2174
|
+
contact?: {
|
|
2175
|
+
email?: string;
|
|
2176
|
+
website?: string;
|
|
2177
|
+
location?: string;
|
|
2178
|
+
socialLinks?: string[];
|
|
2179
|
+
};
|
|
2180
|
+
[key: string]: unknown;
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* Renderer for domain card previews in the domainCardViewer block.
|
|
2184
|
+
* The web app provides this renderer to display domain card data with proper styling.
|
|
2185
|
+
*/
|
|
2186
|
+
type DomainCardRenderer = (domainCardData: DomainCardData) => React.ReactNode;
|
|
2187
|
+
/**
|
|
2188
|
+
* Dynamic list data returned by the data provider
|
|
2189
|
+
*/
|
|
2190
|
+
interface DynamicListData {
|
|
2191
|
+
items: any[] | null;
|
|
2192
|
+
loading: boolean;
|
|
2193
|
+
error: string | null;
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* Function type for getting dynamic list data from context
|
|
2197
|
+
*/
|
|
2198
|
+
type DynamicListDataProvider = (listId: string) => DynamicListData;
|
|
2199
|
+
/**
|
|
2200
|
+
* Dynamic list column definition (imported from types for context)
|
|
2201
|
+
*/
|
|
2202
|
+
interface DynamicListColumn {
|
|
2203
|
+
key: string;
|
|
2204
|
+
label: string;
|
|
2205
|
+
position?: 'topLeft' | 'bottomLeft' | 'topRight' | 'bottomRight';
|
|
2206
|
+
type?: 'string' | 'number' | 'date';
|
|
2207
|
+
color?: string;
|
|
2208
|
+
}
|
|
2209
|
+
/**
|
|
2210
|
+
* DataSource for dynamic lists
|
|
2211
|
+
*/
|
|
2212
|
+
interface DataSource {
|
|
2213
|
+
oracleDid: string;
|
|
2214
|
+
oracleName?: string;
|
|
2215
|
+
query: string;
|
|
2216
|
+
toolName?: string;
|
|
2217
|
+
params?: Record<string, any>;
|
|
2218
|
+
description?: string;
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* Action that can be performed on a dynamic list item
|
|
2222
|
+
*/
|
|
2223
|
+
interface DynamicListAction {
|
|
2224
|
+
id: string;
|
|
2225
|
+
label: string;
|
|
2226
|
+
color?: string;
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* Panel renderer type for dynamic list selection panel.
|
|
2230
|
+
* This function is called when an item is selected in a dynamic list.
|
|
2231
|
+
* If provided, renders custom content. If not provided, shows default key-value view.
|
|
2232
|
+
* @param item - The selected item data
|
|
2233
|
+
* @param columns - Column definitions from the dynamic list
|
|
2234
|
+
* @param dataSource - Data source info (oracle, query, etc.)
|
|
2235
|
+
* @returns React node with custom panel content, or null to use default
|
|
2236
|
+
*/
|
|
2237
|
+
type DynamicListPanelRenderer = (item: any, columns: DynamicListColumn[], dataSource: DataSource | null, panelDescription?: string, actions?: DynamicListAction[], onClose?: () => void) => React.ReactNode | null;
|
|
2238
|
+
interface BlocknoteContextValue {
|
|
2239
|
+
editor?: IxoEditorType;
|
|
2240
|
+
handlers?: BlocknoteHandlers;
|
|
2241
|
+
blockRequirements?: BlockRequirements;
|
|
2242
|
+
mapConfig?: UnlMapConfig;
|
|
2243
|
+
editable?: boolean;
|
|
2244
|
+
docType: DocType;
|
|
2245
|
+
sharedProposals: SharedProposalData;
|
|
2246
|
+
fetchSharedProposal: (proposalId: string, contractAddress: string, force?: boolean) => Promise<ProposalResponse>;
|
|
2247
|
+
invalidateProposal: (proposalId: string) => void;
|
|
2248
|
+
subscribeToProposal: (proposalId: string) => ProposalResponse | undefined;
|
|
2249
|
+
activeDrawerId: string | null;
|
|
2250
|
+
drawerContent: React.ReactNode | null;
|
|
2251
|
+
openDrawer: (id: string, content: React.ReactNode) => void;
|
|
2252
|
+
closeDrawer: () => void;
|
|
2253
|
+
visualizationRenderer?: VisualizationRenderer;
|
|
2254
|
+
getDynamicListData?: DynamicListDataProvider;
|
|
2255
|
+
dynamicListPanelRenderer?: DynamicListPanelRenderer;
|
|
2256
|
+
domainCardRenderer?: DomainCardRenderer;
|
|
2257
|
+
connectedUsers?: Array<{
|
|
2258
|
+
clientId: string;
|
|
2259
|
+
state: any;
|
|
2260
|
+
}>;
|
|
2261
|
+
awarenessInstance?: any;
|
|
2262
|
+
}
|
|
2263
|
+
declare const BlocknoteProvider: React.FC<{
|
|
2264
|
+
children: React.ReactNode;
|
|
2265
|
+
editor?: IxoEditorType;
|
|
2266
|
+
handlers?: BlocknoteHandlers;
|
|
2267
|
+
blockRequirements?: BlockRequirements;
|
|
2268
|
+
editable?: boolean;
|
|
2269
|
+
visualizationRenderer?: VisualizationRenderer;
|
|
2270
|
+
getDynamicListData?: DynamicListDataProvider;
|
|
2271
|
+
dynamicListPanelRenderer?: DynamicListPanelRenderer;
|
|
2272
|
+
domainCardRenderer?: DomainCardRenderer;
|
|
2273
|
+
mapConfig?: UnlMapConfig;
|
|
2274
|
+
connectedUsers?: Array<{
|
|
2275
|
+
clientId: string;
|
|
2276
|
+
state: any;
|
|
2277
|
+
}>;
|
|
2278
|
+
awarenessInstance?: any;
|
|
2279
|
+
}>;
|
|
2280
|
+
declare const useBlocknoteContext: () => BlocknoteContextValue;
|
|
2281
|
+
declare const useBlocknoteHandlers: () => BlocknoteHandlers;
|
|
2282
|
+
|
|
2283
|
+
interface SelectionActionItem {
|
|
2284
|
+
id: string;
|
|
2285
|
+
label: string;
|
|
2286
|
+
icon?: string;
|
|
2287
|
+
onClick: (itemId: string, itemData: any) => void | Promise<void>;
|
|
2288
|
+
}
|
|
2289
|
+
interface SelectionActionSection {
|
|
2290
|
+
title: string;
|
|
2291
|
+
description?: string;
|
|
2292
|
+
actions: SelectionActionItem[];
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
interface OverviewBlockProps {
|
|
2296
|
+
block: any;
|
|
2297
|
+
editor: any;
|
|
2298
|
+
}
|
|
2299
|
+
declare const OverviewBlock: {
|
|
2300
|
+
config: {
|
|
2301
|
+
readonly type: "overview";
|
|
2302
|
+
readonly propSchema: {
|
|
2303
|
+
readonly skill: {
|
|
2304
|
+
readonly default: "";
|
|
2305
|
+
};
|
|
2306
|
+
};
|
|
2307
|
+
readonly content: "none";
|
|
2308
|
+
};
|
|
2309
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2310
|
+
readonly type: "overview";
|
|
2311
|
+
readonly propSchema: {
|
|
2312
|
+
readonly skill: {
|
|
2313
|
+
readonly default: "";
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
readonly content: "none";
|
|
2317
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
declare const ProposalBlockSpec: {
|
|
2321
|
+
config: {
|
|
2322
|
+
readonly type: "proposal";
|
|
2323
|
+
readonly propSchema: {
|
|
2324
|
+
readonly status: {
|
|
2325
|
+
readonly default: "draft";
|
|
2326
|
+
readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
2327
|
+
};
|
|
2328
|
+
readonly title: {
|
|
2329
|
+
readonly default: "";
|
|
2330
|
+
};
|
|
2331
|
+
readonly description: {
|
|
2332
|
+
readonly default: "";
|
|
2333
|
+
};
|
|
2334
|
+
readonly icon: {
|
|
2335
|
+
readonly default: "file-text";
|
|
2336
|
+
};
|
|
2337
|
+
readonly proposalId: {
|
|
2338
|
+
readonly default: "";
|
|
2339
|
+
};
|
|
2340
|
+
readonly actions: {
|
|
2341
|
+
readonly default: "[]";
|
|
2342
|
+
};
|
|
2343
|
+
readonly voteEnabled: {
|
|
2344
|
+
readonly default: true;
|
|
2345
|
+
};
|
|
2346
|
+
readonly voteTitle: {
|
|
2347
|
+
readonly default: "";
|
|
2348
|
+
};
|
|
2349
|
+
readonly voteSubtitle: {
|
|
2350
|
+
readonly default: "";
|
|
2351
|
+
};
|
|
2352
|
+
readonly voteIcon: {
|
|
2353
|
+
readonly default: "checklist";
|
|
2354
|
+
};
|
|
2355
|
+
readonly daysLeft: {
|
|
2356
|
+
readonly default: 0;
|
|
2357
|
+
};
|
|
2358
|
+
readonly proposalContractAddress: {
|
|
2359
|
+
readonly default: "";
|
|
2360
|
+
};
|
|
2361
|
+
readonly coreAddress: {
|
|
2362
|
+
readonly default: "";
|
|
2363
|
+
};
|
|
2364
|
+
readonly conditions: {
|
|
2365
|
+
readonly default: "";
|
|
2366
|
+
};
|
|
2367
|
+
readonly ttlAbsoluteDueDate: {
|
|
2368
|
+
readonly default: "";
|
|
2369
|
+
};
|
|
2370
|
+
readonly ttlFromEnablement: {
|
|
2371
|
+
readonly default: "";
|
|
2372
|
+
};
|
|
2373
|
+
readonly ttlFromCommitment: {
|
|
2374
|
+
readonly default: "";
|
|
2375
|
+
};
|
|
2376
|
+
readonly skill: {
|
|
2377
|
+
readonly default: "";
|
|
2378
|
+
};
|
|
2379
|
+
};
|
|
2380
|
+
readonly content: "none";
|
|
2381
|
+
};
|
|
2382
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2383
|
+
readonly type: "proposal";
|
|
2384
|
+
readonly propSchema: {
|
|
2385
|
+
readonly status: {
|
|
2386
|
+
readonly default: "draft";
|
|
2387
|
+
readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
2388
|
+
};
|
|
2389
|
+
readonly title: {
|
|
2390
|
+
readonly default: "";
|
|
2391
|
+
};
|
|
2392
|
+
readonly description: {
|
|
2393
|
+
readonly default: "";
|
|
2394
|
+
};
|
|
2395
|
+
readonly icon: {
|
|
2396
|
+
readonly default: "file-text";
|
|
2397
|
+
};
|
|
2398
|
+
readonly proposalId: {
|
|
2399
|
+
readonly default: "";
|
|
2400
|
+
};
|
|
2401
|
+
readonly actions: {
|
|
2402
|
+
readonly default: "[]";
|
|
2403
|
+
};
|
|
2404
|
+
readonly voteEnabled: {
|
|
2405
|
+
readonly default: true;
|
|
2406
|
+
};
|
|
2407
|
+
readonly voteTitle: {
|
|
2408
|
+
readonly default: "";
|
|
2409
|
+
};
|
|
2410
|
+
readonly voteSubtitle: {
|
|
2411
|
+
readonly default: "";
|
|
2412
|
+
};
|
|
2413
|
+
readonly voteIcon: {
|
|
2414
|
+
readonly default: "checklist";
|
|
2415
|
+
};
|
|
2416
|
+
readonly daysLeft: {
|
|
2417
|
+
readonly default: 0;
|
|
2418
|
+
};
|
|
2419
|
+
readonly proposalContractAddress: {
|
|
2420
|
+
readonly default: "";
|
|
2421
|
+
};
|
|
2422
|
+
readonly coreAddress: {
|
|
2423
|
+
readonly default: "";
|
|
2424
|
+
};
|
|
2425
|
+
readonly conditions: {
|
|
2426
|
+
readonly default: "";
|
|
2427
|
+
};
|
|
2428
|
+
readonly ttlAbsoluteDueDate: {
|
|
2429
|
+
readonly default: "";
|
|
2430
|
+
};
|
|
2431
|
+
readonly ttlFromEnablement: {
|
|
2432
|
+
readonly default: "";
|
|
2433
|
+
};
|
|
2434
|
+
readonly ttlFromCommitment: {
|
|
2435
|
+
readonly default: "";
|
|
2436
|
+
};
|
|
2437
|
+
readonly skill: {
|
|
2438
|
+
readonly default: "";
|
|
2439
|
+
};
|
|
2440
|
+
};
|
|
2441
|
+
readonly content: "none";
|
|
2442
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2443
|
+
};
|
|
2444
|
+
|
|
2445
|
+
type ProposalBlockProps = IxoBlockProps;
|
|
2446
|
+
|
|
2447
|
+
declare const ApiRequestBlockSpec: {
|
|
2448
|
+
config: {
|
|
2449
|
+
readonly type: "apiRequest";
|
|
2450
|
+
readonly propSchema: {
|
|
2451
|
+
readonly title: {
|
|
2452
|
+
readonly default: "";
|
|
2453
|
+
};
|
|
2454
|
+
readonly description: {
|
|
2455
|
+
readonly default: "";
|
|
2456
|
+
};
|
|
2457
|
+
readonly icon: {
|
|
2458
|
+
readonly default: "square-check";
|
|
2459
|
+
};
|
|
2460
|
+
readonly endpoint: {
|
|
2461
|
+
readonly default: "";
|
|
2462
|
+
};
|
|
2463
|
+
readonly method: {
|
|
2464
|
+
readonly default: "GET";
|
|
2465
|
+
};
|
|
2466
|
+
readonly headers: {
|
|
2467
|
+
readonly default: "[]";
|
|
2468
|
+
};
|
|
2469
|
+
readonly body: {
|
|
2470
|
+
readonly default: "[]";
|
|
2471
|
+
};
|
|
2472
|
+
readonly response: {
|
|
2473
|
+
readonly default: "";
|
|
2474
|
+
};
|
|
2475
|
+
readonly status: {
|
|
2476
|
+
readonly default: "idle";
|
|
2477
|
+
};
|
|
2478
|
+
readonly responseSchema: {
|
|
2479
|
+
readonly default: "";
|
|
2480
|
+
};
|
|
2481
|
+
readonly conditions: {
|
|
2482
|
+
readonly default: "";
|
|
2483
|
+
};
|
|
2484
|
+
readonly ttlAbsoluteDueDate: {
|
|
2485
|
+
readonly default: "";
|
|
2486
|
+
};
|
|
2487
|
+
readonly ttlFromEnablement: {
|
|
2488
|
+
readonly default: "";
|
|
2489
|
+
};
|
|
2490
|
+
readonly ttlFromCommitment: {
|
|
2491
|
+
readonly default: "";
|
|
2492
|
+
};
|
|
2493
|
+
readonly assignment: {
|
|
2494
|
+
readonly default: string;
|
|
2495
|
+
};
|
|
2496
|
+
readonly commitment: {
|
|
2497
|
+
readonly default: string;
|
|
2498
|
+
};
|
|
2499
|
+
readonly skill: {
|
|
2500
|
+
readonly default: "";
|
|
2501
|
+
};
|
|
2502
|
+
};
|
|
2503
|
+
readonly content: "none";
|
|
2504
|
+
};
|
|
2505
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2506
|
+
readonly type: "apiRequest";
|
|
2507
|
+
readonly propSchema: {
|
|
2508
|
+
readonly title: {
|
|
2509
|
+
readonly default: "";
|
|
2510
|
+
};
|
|
2511
|
+
readonly description: {
|
|
2512
|
+
readonly default: "";
|
|
2513
|
+
};
|
|
2514
|
+
readonly icon: {
|
|
2515
|
+
readonly default: "square-check";
|
|
2516
|
+
};
|
|
2517
|
+
readonly endpoint: {
|
|
2518
|
+
readonly default: "";
|
|
2519
|
+
};
|
|
2520
|
+
readonly method: {
|
|
2521
|
+
readonly default: "GET";
|
|
2522
|
+
};
|
|
2523
|
+
readonly headers: {
|
|
2524
|
+
readonly default: "[]";
|
|
2525
|
+
};
|
|
2526
|
+
readonly body: {
|
|
2527
|
+
readonly default: "[]";
|
|
2528
|
+
};
|
|
2529
|
+
readonly response: {
|
|
2530
|
+
readonly default: "";
|
|
2531
|
+
};
|
|
2532
|
+
readonly status: {
|
|
2533
|
+
readonly default: "idle";
|
|
2534
|
+
};
|
|
2535
|
+
readonly responseSchema: {
|
|
2536
|
+
readonly default: "";
|
|
2537
|
+
};
|
|
2538
|
+
readonly conditions: {
|
|
2539
|
+
readonly default: "";
|
|
2540
|
+
};
|
|
2541
|
+
readonly ttlAbsoluteDueDate: {
|
|
2542
|
+
readonly default: "";
|
|
2543
|
+
};
|
|
2544
|
+
readonly ttlFromEnablement: {
|
|
2545
|
+
readonly default: "";
|
|
2546
|
+
};
|
|
2547
|
+
readonly ttlFromCommitment: {
|
|
2548
|
+
readonly default: "";
|
|
2549
|
+
};
|
|
2550
|
+
readonly assignment: {
|
|
2551
|
+
readonly default: string;
|
|
2552
|
+
};
|
|
2553
|
+
readonly commitment: {
|
|
2554
|
+
readonly default: string;
|
|
2555
|
+
};
|
|
2556
|
+
readonly skill: {
|
|
2557
|
+
readonly default: "";
|
|
2558
|
+
};
|
|
2559
|
+
};
|
|
2560
|
+
readonly content: "none";
|
|
2561
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2562
|
+
};
|
|
2563
|
+
|
|
2564
|
+
type ApiRequestBlockProps = IxoBlockProps;
|
|
2565
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
2566
|
+
type KeyValuePair = {
|
|
2567
|
+
key: string;
|
|
2568
|
+
value: string;
|
|
2569
|
+
};
|
|
2570
|
+
|
|
2571
|
+
/**
|
|
2572
|
+
* Custom hook that wraps useCreateBlockNote with IXO-specific configurations (Mantine version)
|
|
2573
|
+
* @param options - Configuration options for the IxoEditor
|
|
2574
|
+
* @returns A configured IxoEditor instance with augmented type properties
|
|
2575
|
+
*/
|
|
2576
|
+
declare function useCreateIxoEditor(options?: IxoEditorOptions): IxoEditorType | undefined;
|
|
2577
|
+
|
|
2578
|
+
/**
|
|
2579
|
+
* Custom hook that wraps useCreateBlockNote with IXO-specific configurations (Mantine version)
|
|
2580
|
+
* @param options - Configuration options for the IxoEditor
|
|
2581
|
+
* @returns A configured collaborative IxoEditor instance with augmented type properties
|
|
2582
|
+
*/
|
|
2583
|
+
declare function useCreateCollaborativeIxoEditor(options: IxoCollaborativeEditorOptions): {
|
|
2584
|
+
editor: IxoEditorType | undefined;
|
|
2585
|
+
connectionStatus: string;
|
|
2586
|
+
title: Text;
|
|
2587
|
+
yDoc: Doc;
|
|
2588
|
+
root: Map<any>;
|
|
2589
|
+
flowArray: Array$1<any>;
|
|
2590
|
+
connectedUsers: Array<{
|
|
2591
|
+
clientId: string;
|
|
2592
|
+
state: any;
|
|
2593
|
+
}>;
|
|
2594
|
+
awarenessInstance: any;
|
|
2595
|
+
};
|
|
2596
|
+
|
|
2597
|
+
interface PageHeaderMenuItem {
|
|
2598
|
+
label: string;
|
|
2599
|
+
onClick: () => void;
|
|
2600
|
+
icon?: React.ReactNode;
|
|
2601
|
+
disabled?: boolean;
|
|
2602
|
+
divider?: boolean;
|
|
2603
|
+
}
|
|
2604
|
+
interface PageHeaderProps {
|
|
2605
|
+
title?: string;
|
|
2606
|
+
icon?: React.ReactNode;
|
|
2607
|
+
isPrivate?: boolean;
|
|
2608
|
+
onPrivacyChange?: (isPrivate: boolean) => void;
|
|
2609
|
+
lastEdited?: string;
|
|
2610
|
+
onShare?: () => void;
|
|
2611
|
+
onFavorite?: () => void;
|
|
2612
|
+
isFavorited?: boolean;
|
|
2613
|
+
menuItems?: PageHeaderMenuItem[];
|
|
2614
|
+
}
|
|
2615
|
+
/**
|
|
2616
|
+
* PageHeader component - A Notion-style page header with title, privacy badge, and actions
|
|
2617
|
+
*/
|
|
2618
|
+
declare function PageHeader({ title, icon, isPrivate, onPrivacyChange, lastEdited, onShare, onFavorite, isFavorited, menuItems, }: PageHeaderProps): React.ReactElement;
|
|
2619
|
+
|
|
2620
|
+
/** Position info passed to drop callback */
|
|
2621
|
+
interface DropPosition {
|
|
2622
|
+
blockId: string;
|
|
2623
|
+
placement: 'before' | 'after';
|
|
2624
|
+
index: number;
|
|
2625
|
+
}
|
|
2626
|
+
interface ExternalDropZoneProps {
|
|
2627
|
+
/** Editor instance to get block positions from */
|
|
2628
|
+
editor: any;
|
|
2629
|
+
/** Callback when external data is dropped or placed - position only, caller handles data */
|
|
2630
|
+
onDrop: (position: DropPosition) => void;
|
|
2631
|
+
/** MIME type to accept (default: 'application/x-artifact') */
|
|
2632
|
+
acceptedType?: string;
|
|
2633
|
+
/** Drop indicator element to show (provided by caller, already has data) */
|
|
2634
|
+
dropIndicator?: React.ReactNode;
|
|
2635
|
+
/** Whether placement mode is active (click-to-place) */
|
|
2636
|
+
isPlacementMode?: boolean;
|
|
2637
|
+
/** Callback when placement mode should be canceled */
|
|
2638
|
+
onPlacementCancel?: () => void;
|
|
2639
|
+
/** Children (the editor content) */
|
|
2640
|
+
children: React.ReactNode;
|
|
2641
|
+
}
|
|
2642
|
+
declare const ExternalDropZone: React.FC<ExternalDropZoneProps>;
|
|
2643
|
+
|
|
2644
|
+
interface IxoEditorProps {
|
|
2645
|
+
editor: IxoEditorType | undefined;
|
|
2646
|
+
editable?: boolean;
|
|
2647
|
+
className?: string;
|
|
2648
|
+
onChange?: () => void;
|
|
2649
|
+
onSelectionChange?: () => void;
|
|
2650
|
+
children?: React.ReactNode;
|
|
2651
|
+
mantineTheme?: any;
|
|
2652
|
+
handlers?: BlocknoteHandlers;
|
|
2653
|
+
blockRequirements?: BlockRequirements;
|
|
2654
|
+
mapConfig?: UnlMapConfig;
|
|
2655
|
+
isPanelVisible?: boolean;
|
|
2656
|
+
coverImageUrl?: string;
|
|
2657
|
+
logoUrl?: string;
|
|
2658
|
+
selfNav?: boolean;
|
|
2659
|
+
pageHeaderProps?: Omit<PageHeaderProps, 'children'>;
|
|
2660
|
+
visualizationRenderer?: (vizType: string, config: object) => React.ReactNode;
|
|
2661
|
+
getDynamicListData?: DynamicListDataProvider;
|
|
2662
|
+
dynamicListPanelRenderer?: DynamicListPanelRenderer;
|
|
2663
|
+
domainCardRenderer?: DomainCardRenderer;
|
|
2664
|
+
/** Callback when external content is dropped into the editor (receives position only) */
|
|
2665
|
+
onExternalDrop?: (position: DropPosition) => void;
|
|
2666
|
+
/** MIME type to accept for external drops (default: 'application/x-artifact') */
|
|
2667
|
+
externalDropType?: string;
|
|
2668
|
+
/** Drop indicator element to show during drag (caller provides with data already populated) */
|
|
2669
|
+
dropIndicator?: React.ReactNode;
|
|
2670
|
+
/** Whether placement mode is active (click-to-place) */
|
|
2671
|
+
isPlacementMode?: boolean;
|
|
2672
|
+
/** Callback when placement mode should be canceled */
|
|
2673
|
+
onPlacementCancel?: () => void;
|
|
2674
|
+
/** Connected users from awareness (for block presence) */
|
|
2675
|
+
connectedUsers?: Array<{
|
|
2676
|
+
clientId: string;
|
|
2677
|
+
state: any;
|
|
2678
|
+
}>;
|
|
2679
|
+
/** Yjs awareness instance (for block presence) */
|
|
2680
|
+
awarenessInstance?: any;
|
|
2681
|
+
}
|
|
2682
|
+
/**
|
|
2683
|
+
* IxoEditor component - A customized BlockNote editor for IXO (Mantine UI)
|
|
2684
|
+
*/
|
|
2685
|
+
declare function IxoEditor({ editor, editable, className, onChange, onSelectionChange, children, mantineTheme, handlers, blockRequirements, isPanelVisible, coverImageUrl, logoUrl, selfNav, pageHeaderProps, visualizationRenderer, getDynamicListData, dynamicListPanelRenderer, domainCardRenderer, onExternalDrop, externalDropType, dropIndicator, isPlacementMode, onPlacementCancel, mapConfig, connectedUsers, awarenessInstance, }: IxoEditorProps): React.ReactElement | null;
|
|
2686
|
+
|
|
2687
|
+
interface CoverImageProps {
|
|
2688
|
+
coverImageUrl?: string;
|
|
2689
|
+
logoUrl?: string;
|
|
2690
|
+
}
|
|
2691
|
+
declare function CoverImage({ coverImageUrl, logoUrl }: CoverImageProps): React.ReactElement | null;
|
|
2692
|
+
|
|
2693
|
+
type AuthorizationTabState = {
|
|
2694
|
+
parentCapability: string;
|
|
2695
|
+
authorisedActors: string;
|
|
2696
|
+
activationUpstreamNodeId: string;
|
|
2697
|
+
activationRequiredStatus: 'pending' | 'approved' | 'rejected' | '';
|
|
2698
|
+
activationRequireAuthorisedActor: boolean;
|
|
2699
|
+
};
|
|
2700
|
+
interface AuthorizationTabProps extends IxoBlockProps {
|
|
2701
|
+
/** Flow URI for capability scoping */
|
|
2702
|
+
flowUri?: string;
|
|
2703
|
+
/** Entity DID that owns this flow */
|
|
2704
|
+
entityDid?: string;
|
|
2705
|
+
/** Flow permissions (actors with flow-level access) */
|
|
2706
|
+
flowActors?: Array<{
|
|
2707
|
+
did: string;
|
|
2708
|
+
displayName: string;
|
|
2709
|
+
}>;
|
|
2710
|
+
/** Callback to open flow permissions panel */
|
|
2711
|
+
onOpenFlowPermissions?: () => void;
|
|
2712
|
+
}
|
|
2713
|
+
declare const AuthorizationTab: React.FC<AuthorizationTabProps>;
|
|
2714
|
+
|
|
2715
|
+
type EvaluationTabState = {
|
|
2716
|
+
linkedClaimCollectionId: string;
|
|
2717
|
+
};
|
|
2718
|
+
interface EvaluationTabProps extends IxoBlockProps {
|
|
2719
|
+
}
|
|
2720
|
+
declare const EvaluationTab: React.FC<EvaluationTabProps>;
|
|
2721
|
+
|
|
2722
|
+
interface EntitySigningSetupProps {
|
|
2723
|
+
opened: boolean;
|
|
2724
|
+
onClose: () => void;
|
|
2725
|
+
entityDid: string;
|
|
2726
|
+
entityName?: string;
|
|
2727
|
+
onSetup: (pin: string) => Promise<{
|
|
2728
|
+
success: boolean;
|
|
2729
|
+
error?: string;
|
|
2730
|
+
}>;
|
|
2731
|
+
}
|
|
2732
|
+
declare const EntitySigningSetup: React.FC<EntitySigningSetupProps>;
|
|
2733
|
+
|
|
2734
|
+
interface FlowPermissionsPanelProps {
|
|
2735
|
+
editor: IxoEditorType;
|
|
2736
|
+
entityDid: string;
|
|
2737
|
+
entityName?: string;
|
|
2738
|
+
currentUserDid: string;
|
|
2739
|
+
onGrantPermission: () => void;
|
|
2740
|
+
onRevokePermission: (capabilityId: string) => Promise<void>;
|
|
2741
|
+
getUserDisplayName?: (did: string) => Promise<string>;
|
|
2742
|
+
}
|
|
2743
|
+
declare const FlowPermissionsPanel: React.FC<FlowPermissionsPanelProps>;
|
|
2744
|
+
|
|
2745
|
+
interface GrantPermissionModalProps {
|
|
2746
|
+
opened: boolean;
|
|
2747
|
+
onClose: () => void;
|
|
2748
|
+
flowUri: string;
|
|
2749
|
+
/** Blocks available for scope selection. If single block, scope UI is hidden. */
|
|
2750
|
+
blocks: Array<{
|
|
2751
|
+
id: string;
|
|
2752
|
+
type: string;
|
|
2753
|
+
name?: string;
|
|
2754
|
+
}>;
|
|
2755
|
+
/** Optional: specific block to grant permission for (hides scope selection) */
|
|
2756
|
+
targetBlockId?: string;
|
|
2757
|
+
searchUsers: (query: string) => Promise<Array<{
|
|
2758
|
+
did: string;
|
|
2759
|
+
displayName: string;
|
|
2760
|
+
avatarUrl?: string;
|
|
2761
|
+
}>>;
|
|
2762
|
+
getOracles?: () => Promise<Array<{
|
|
2763
|
+
did: string;
|
|
2764
|
+
name: string;
|
|
2765
|
+
}>>;
|
|
2766
|
+
onGrant: (grant: DelegationGrant, pin: string) => Promise<{
|
|
2767
|
+
success: boolean;
|
|
2768
|
+
error?: string;
|
|
2769
|
+
}>;
|
|
2770
|
+
}
|
|
2771
|
+
declare const GrantPermissionModal: React.FC<GrantPermissionModalProps>;
|
|
2772
|
+
|
|
2773
|
+
interface BlockPresenceUser {
|
|
2774
|
+
clientId: string;
|
|
2775
|
+
name: string;
|
|
2776
|
+
color: string;
|
|
2777
|
+
avatar?: string;
|
|
2778
|
+
}
|
|
2779
|
+
/**
|
|
2780
|
+
* Hook that returns the list of users currently active on a specific block.
|
|
2781
|
+
* Subscribes directly to awareness changes for reliable updates.
|
|
2782
|
+
* @param blockId - The block ID to check presence for
|
|
2783
|
+
* @param options.includeSelf - If true, includes the local user in the results (default: false)
|
|
2784
|
+
*/
|
|
2785
|
+
declare function useBlockPresence(blockId: string | undefined, options?: {
|
|
2786
|
+
includeSelf?: boolean;
|
|
2787
|
+
}): BlockPresenceUser[];
|
|
2788
|
+
|
|
2789
|
+
/**
|
|
2790
|
+
* Hook that tracks when a user interacts with a block and updates awareness state.
|
|
2791
|
+
* Returns event handlers (onPointerDown) to attach to block containers.
|
|
2792
|
+
*
|
|
2793
|
+
* For custom (non-editable) blocks: attach the returned onPointerDown to the container.
|
|
2794
|
+
* For text blocks: use editor-level onSelectionChange instead.
|
|
2795
|
+
*/
|
|
2796
|
+
declare function useTrackBlockFocus(blockId: string | undefined, editor: IxoEditorType | undefined): {
|
|
2797
|
+
onPointerDown: () => void;
|
|
2798
|
+
};
|
|
2799
|
+
|
|
2800
|
+
/**
|
|
2801
|
+
* GraphQL queries and types for IXO network
|
|
2802
|
+
*/
|
|
2803
|
+
interface Entity {
|
|
2804
|
+
context: string;
|
|
2805
|
+
relayerNode: string;
|
|
2806
|
+
controller: string;
|
|
2807
|
+
id: string;
|
|
2808
|
+
type: string;
|
|
2809
|
+
startDate: string;
|
|
2810
|
+
endDate: string;
|
|
2811
|
+
metadata: string;
|
|
2812
|
+
linkedResource: any[];
|
|
2813
|
+
settings: Record<string, Record<string, any>>;
|
|
2814
|
+
service: string;
|
|
2815
|
+
externalId: string;
|
|
2816
|
+
}
|
|
2817
|
+
interface EntityResponse {
|
|
2818
|
+
entity: Entity;
|
|
2819
|
+
}
|
|
2820
|
+
interface EntityVariables {
|
|
2821
|
+
entityId: string;
|
|
2822
|
+
}
|
|
2823
|
+
/**
|
|
2824
|
+
* Fetches entity data by ID from the IXO network
|
|
2825
|
+
* @param entityId - The unique identifier for the entity
|
|
2826
|
+
* @returns Promise resolving to the entity data
|
|
2827
|
+
*/
|
|
2828
|
+
declare function getEntity(entityId: string): Promise<Entity>;
|
|
2829
|
+
|
|
2830
|
+
/**
|
|
2831
|
+
* Lightweight GraphQL client for IXO network queries
|
|
2832
|
+
*/
|
|
2833
|
+
interface GraphQLResponse<T = any> {
|
|
2834
|
+
data?: T;
|
|
2835
|
+
errors?: Array<{
|
|
2836
|
+
message: string;
|
|
2837
|
+
locations?: Array<{
|
|
2838
|
+
line: number;
|
|
2839
|
+
column: number;
|
|
2840
|
+
}>;
|
|
2841
|
+
path?: Array<string | number>;
|
|
2842
|
+
}>;
|
|
2843
|
+
}
|
|
2844
|
+
interface GraphQLRequest {
|
|
2845
|
+
query: string;
|
|
2846
|
+
variables?: Record<string, any>;
|
|
2847
|
+
operationName?: string;
|
|
2848
|
+
}
|
|
2849
|
+
declare class GraphQLClient {
|
|
2850
|
+
private endpoint;
|
|
2851
|
+
private headers;
|
|
2852
|
+
constructor(endpoint: string, headers?: Record<string, string>);
|
|
2853
|
+
request<T = any>(request: GraphQLRequest): Promise<T>;
|
|
2854
|
+
}
|
|
2855
|
+
declare const ixoGraphQLClient: GraphQLClient;
|
|
2856
|
+
|
|
2857
|
+
export { getEntity as $, AuthorizationTab as A, type BlockPresenceUser as B, CoverImage as C, type VoteResponse as D, EvaluationTab as E, FlowPermissionsPanel as F, GrantPermissionModal as G, type HttpMethod as H, IxoEditor as I, type VoteInfo as J, type KeyValuePair as K, ListBlockSpec as L, type Vote as M, type Addr as N, OverviewBlock as O, ProposalBlockSpec as P, type Uint128 as Q, type Expiration as R, StakeType as S, type Timestamp as T, type User as U, ValidatorActionType as V, type Status as W, type Threshold as X, type Votes as Y, type CosmosMsgForEmpty as Z, type ProposalAction as _, useCreateCollaborativeIxoEditor as a, type Entity as a0, type EntityResponse as a1, type EntityVariables as a2, GraphQLClient as a3, ixoGraphQLClient as a4, type GraphQLResponse as a5, type GraphQLRequest as a6, ExternalDropZone as a7, type DropPosition as a8, PageHeader as a9, type PageHeaderProps as aa, type PageHeaderMenuItem as ab, type VisualizationRenderer as ac, type DynamicListData as ad, type DynamicListDataProvider as ae, type DynamicListPanelRenderer as af, type DomainCardRenderer as ag, type DomainCardData as ah, type IxoEditorProps as b, type CoverImageProps as c, type AuthorizationTabState as d, type EvaluationTabState as e, EntitySigningSetup as f, CheckboxBlockSpec as g, ApiRequestBlockSpec as h, type CheckboxBlockProps as i, type ListBlockSettings as j, type ListBlockProps as k, type OverviewBlockProps as l, type ProposalBlockProps as m, type ApiRequestBlockProps as n, useBlockPresence as o, useTrackBlockFocus as p, BlocknoteProvider as q, useBlocknoteContext as r, useBlocknoteHandlers as s, AuthzExecActionTypes as t, useCreateIxoEditor as u, type BlocknoteHandlers as v, type BlocknoteContextValue as w, type BlockRequirements as x, type ProposalResponse as y, type SingleChoiceProposal as z };
|