@dfns/sdk 0.3.4 → 0.4.0-alpha.1
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/generated/policies/types.d.ts +552 -327
- package/package.json +1 -1
- package/utils/crypto.js +2 -1
|
@@ -3,16 +3,21 @@ export type ArchivePolicyParams = {
|
|
|
3
3
|
};
|
|
4
4
|
export type ArchivePolicyResponse = ({
|
|
5
5
|
name: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
action: {
|
|
7
|
+
kind: "RequestApproval";
|
|
8
|
+
approvalGroups: {
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
quorum: number;
|
|
11
|
+
approvers: {
|
|
12
|
+
[x: string]: {
|
|
13
|
+
[x: string]: string[];
|
|
14
|
+
};
|
|
12
15
|
};
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
}[];
|
|
17
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
18
|
+
} | {
|
|
19
|
+
kind: "Block";
|
|
20
|
+
};
|
|
16
21
|
activityKind: "Permissions:Assign";
|
|
17
22
|
rule: {
|
|
18
23
|
kind: "AlwaysRequireApproval";
|
|
@@ -25,16 +30,21 @@ export type ArchivePolicyResponse = ({
|
|
|
25
30
|
} | undefined;
|
|
26
31
|
} | {
|
|
27
32
|
name: string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
action: {
|
|
34
|
+
kind: "RequestApproval";
|
|
35
|
+
approvalGroups: {
|
|
36
|
+
name?: string | undefined;
|
|
37
|
+
quorum: number;
|
|
38
|
+
approvers: {
|
|
39
|
+
[x: string]: {
|
|
40
|
+
[x: string]: string[];
|
|
41
|
+
};
|
|
34
42
|
};
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
}[];
|
|
44
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
45
|
+
} | {
|
|
46
|
+
kind: "Block";
|
|
47
|
+
};
|
|
38
48
|
activityKind: "Permissions:Modify";
|
|
39
49
|
rule: {
|
|
40
50
|
kind: "AlwaysRequireApproval";
|
|
@@ -47,16 +57,21 @@ export type ArchivePolicyResponse = ({
|
|
|
47
57
|
} | undefined;
|
|
48
58
|
} | {
|
|
49
59
|
name: string;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
action: {
|
|
61
|
+
kind: "RequestApproval";
|
|
62
|
+
approvalGroups: {
|
|
63
|
+
name?: string | undefined;
|
|
64
|
+
quorum: number;
|
|
65
|
+
approvers: {
|
|
66
|
+
[x: string]: {
|
|
67
|
+
[x: string]: string[];
|
|
68
|
+
};
|
|
56
69
|
};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
}[];
|
|
71
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
72
|
+
} | {
|
|
73
|
+
kind: "Block";
|
|
74
|
+
};
|
|
60
75
|
activityKind: "Policies:Modify";
|
|
61
76
|
rule: {
|
|
62
77
|
kind: "AlwaysRequireApproval";
|
|
@@ -69,20 +84,30 @@ export type ArchivePolicyResponse = ({
|
|
|
69
84
|
} | undefined;
|
|
70
85
|
} | {
|
|
71
86
|
name: string;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
87
|
+
action: {
|
|
88
|
+
kind: "RequestApproval";
|
|
89
|
+
approvalGroups: {
|
|
90
|
+
name?: string | undefined;
|
|
91
|
+
quorum: number;
|
|
92
|
+
approvers: {
|
|
93
|
+
[x: string]: {
|
|
94
|
+
[x: string]: string[];
|
|
95
|
+
};
|
|
78
96
|
};
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
|
|
97
|
+
}[];
|
|
98
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
99
|
+
} | {
|
|
100
|
+
kind: "Block";
|
|
101
|
+
};
|
|
82
102
|
activityKind: "Wallets:Sign";
|
|
83
103
|
rule: {
|
|
84
104
|
kind: "AlwaysRequireApproval";
|
|
85
105
|
configuration: {};
|
|
106
|
+
} | {
|
|
107
|
+
kind: "TransactionRecipientWhitelist";
|
|
108
|
+
configuration: {
|
|
109
|
+
addresses: string[];
|
|
110
|
+
};
|
|
86
111
|
} | {
|
|
87
112
|
kind: "TransactionAmountLimit";
|
|
88
113
|
configuration: {
|
|
@@ -130,7 +155,7 @@ export type CreateApprovalDecisionResponse = {
|
|
|
130
155
|
activity: {
|
|
131
156
|
[x: string]: unknown;
|
|
132
157
|
};
|
|
133
|
-
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired";
|
|
158
|
+
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired";
|
|
134
159
|
expirationDate?: string | undefined;
|
|
135
160
|
dateCreated?: string | undefined;
|
|
136
161
|
dateUpdated: string;
|
|
@@ -152,16 +177,21 @@ export type CreateApprovalDecisionRequest = CreateApprovalDecisionParams & {
|
|
|
152
177
|
};
|
|
153
178
|
export type CreatePolicyBody = {
|
|
154
179
|
name: string;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
180
|
+
action: {
|
|
181
|
+
kind: "RequestApproval";
|
|
182
|
+
approvalGroups: {
|
|
183
|
+
name?: string | undefined;
|
|
184
|
+
quorum: number;
|
|
185
|
+
approvers: {
|
|
186
|
+
[x: string]: {
|
|
187
|
+
[x: string]: string[];
|
|
188
|
+
};
|
|
161
189
|
};
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
|
|
190
|
+
}[];
|
|
191
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
192
|
+
} | {
|
|
193
|
+
kind: "Block";
|
|
194
|
+
};
|
|
165
195
|
activityKind: "Permissions:Assign";
|
|
166
196
|
rule: {
|
|
167
197
|
kind: "AlwaysRequireApproval";
|
|
@@ -174,16 +204,21 @@ export type CreatePolicyBody = {
|
|
|
174
204
|
} | undefined;
|
|
175
205
|
} | {
|
|
176
206
|
name: string;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
207
|
+
action: {
|
|
208
|
+
kind: "RequestApproval";
|
|
209
|
+
approvalGroups: {
|
|
210
|
+
name?: string | undefined;
|
|
211
|
+
quorum: number;
|
|
212
|
+
approvers: {
|
|
213
|
+
[x: string]: {
|
|
214
|
+
[x: string]: string[];
|
|
215
|
+
};
|
|
183
216
|
};
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
|
|
217
|
+
}[];
|
|
218
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
219
|
+
} | {
|
|
220
|
+
kind: "Block";
|
|
221
|
+
};
|
|
187
222
|
activityKind: "Permissions:Modify";
|
|
188
223
|
rule: {
|
|
189
224
|
kind: "AlwaysRequireApproval";
|
|
@@ -196,16 +231,21 @@ export type CreatePolicyBody = {
|
|
|
196
231
|
} | undefined;
|
|
197
232
|
} | {
|
|
198
233
|
name: string;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
234
|
+
action: {
|
|
235
|
+
kind: "RequestApproval";
|
|
236
|
+
approvalGroups: {
|
|
237
|
+
name?: string | undefined;
|
|
238
|
+
quorum: number;
|
|
239
|
+
approvers: {
|
|
240
|
+
[x: string]: {
|
|
241
|
+
[x: string]: string[];
|
|
242
|
+
};
|
|
205
243
|
};
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
|
|
244
|
+
}[];
|
|
245
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
246
|
+
} | {
|
|
247
|
+
kind: "Block";
|
|
248
|
+
};
|
|
209
249
|
activityKind: "Policies:Modify";
|
|
210
250
|
rule: {
|
|
211
251
|
kind: "AlwaysRequireApproval";
|
|
@@ -218,20 +258,30 @@ export type CreatePolicyBody = {
|
|
|
218
258
|
} | undefined;
|
|
219
259
|
} | {
|
|
220
260
|
name: string;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
261
|
+
action: {
|
|
262
|
+
kind: "RequestApproval";
|
|
263
|
+
approvalGroups: {
|
|
264
|
+
name?: string | undefined;
|
|
265
|
+
quorum: number;
|
|
266
|
+
approvers: {
|
|
267
|
+
[x: string]: {
|
|
268
|
+
[x: string]: string[];
|
|
269
|
+
};
|
|
227
270
|
};
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
|
|
271
|
+
}[];
|
|
272
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
273
|
+
} | {
|
|
274
|
+
kind: "Block";
|
|
275
|
+
};
|
|
231
276
|
activityKind: "Wallets:Sign";
|
|
232
277
|
rule: {
|
|
233
278
|
kind: "AlwaysRequireApproval";
|
|
234
279
|
configuration: {};
|
|
280
|
+
} | {
|
|
281
|
+
kind: "TransactionRecipientWhitelist";
|
|
282
|
+
configuration: {
|
|
283
|
+
addresses: string[];
|
|
284
|
+
};
|
|
235
285
|
} | {
|
|
236
286
|
kind: "TransactionAmountLimit";
|
|
237
287
|
configuration: {
|
|
@@ -260,16 +310,21 @@ export type CreatePolicyBody = {
|
|
|
260
310
|
};
|
|
261
311
|
export type CreatePolicyResponse = ({
|
|
262
312
|
name: string;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
313
|
+
action: {
|
|
314
|
+
kind: "RequestApproval";
|
|
315
|
+
approvalGroups: {
|
|
316
|
+
name?: string | undefined;
|
|
317
|
+
quorum: number;
|
|
318
|
+
approvers: {
|
|
319
|
+
[x: string]: {
|
|
320
|
+
[x: string]: string[];
|
|
321
|
+
};
|
|
269
322
|
};
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
|
|
323
|
+
}[];
|
|
324
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
325
|
+
} | {
|
|
326
|
+
kind: "Block";
|
|
327
|
+
};
|
|
273
328
|
activityKind: "Permissions:Assign";
|
|
274
329
|
rule: {
|
|
275
330
|
kind: "AlwaysRequireApproval";
|
|
@@ -282,16 +337,21 @@ export type CreatePolicyResponse = ({
|
|
|
282
337
|
} | undefined;
|
|
283
338
|
} | {
|
|
284
339
|
name: string;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
340
|
+
action: {
|
|
341
|
+
kind: "RequestApproval";
|
|
342
|
+
approvalGroups: {
|
|
343
|
+
name?: string | undefined;
|
|
344
|
+
quorum: number;
|
|
345
|
+
approvers: {
|
|
346
|
+
[x: string]: {
|
|
347
|
+
[x: string]: string[];
|
|
348
|
+
};
|
|
291
349
|
};
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
|
|
350
|
+
}[];
|
|
351
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
352
|
+
} | {
|
|
353
|
+
kind: "Block";
|
|
354
|
+
};
|
|
295
355
|
activityKind: "Permissions:Modify";
|
|
296
356
|
rule: {
|
|
297
357
|
kind: "AlwaysRequireApproval";
|
|
@@ -304,16 +364,21 @@ export type CreatePolicyResponse = ({
|
|
|
304
364
|
} | undefined;
|
|
305
365
|
} | {
|
|
306
366
|
name: string;
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
367
|
+
action: {
|
|
368
|
+
kind: "RequestApproval";
|
|
369
|
+
approvalGroups: {
|
|
370
|
+
name?: string | undefined;
|
|
371
|
+
quorum: number;
|
|
372
|
+
approvers: {
|
|
373
|
+
[x: string]: {
|
|
374
|
+
[x: string]: string[];
|
|
375
|
+
};
|
|
313
376
|
};
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
|
|
377
|
+
}[];
|
|
378
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
379
|
+
} | {
|
|
380
|
+
kind: "Block";
|
|
381
|
+
};
|
|
317
382
|
activityKind: "Policies:Modify";
|
|
318
383
|
rule: {
|
|
319
384
|
kind: "AlwaysRequireApproval";
|
|
@@ -326,20 +391,30 @@ export type CreatePolicyResponse = ({
|
|
|
326
391
|
} | undefined;
|
|
327
392
|
} | {
|
|
328
393
|
name: string;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
394
|
+
action: {
|
|
395
|
+
kind: "RequestApproval";
|
|
396
|
+
approvalGroups: {
|
|
397
|
+
name?: string | undefined;
|
|
398
|
+
quorum: number;
|
|
399
|
+
approvers: {
|
|
400
|
+
[x: string]: {
|
|
401
|
+
[x: string]: string[];
|
|
402
|
+
};
|
|
335
403
|
};
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
|
|
404
|
+
}[];
|
|
405
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
406
|
+
} | {
|
|
407
|
+
kind: "Block";
|
|
408
|
+
};
|
|
339
409
|
activityKind: "Wallets:Sign";
|
|
340
410
|
rule: {
|
|
341
411
|
kind: "AlwaysRequireApproval";
|
|
342
412
|
configuration: {};
|
|
413
|
+
} | {
|
|
414
|
+
kind: "TransactionRecipientWhitelist";
|
|
415
|
+
configuration: {
|
|
416
|
+
addresses: string[];
|
|
417
|
+
};
|
|
343
418
|
} | {
|
|
344
419
|
kind: "TransactionAmountLimit";
|
|
345
420
|
configuration: {
|
|
@@ -379,16 +454,21 @@ export type GetPolicyParams = {
|
|
|
379
454
|
};
|
|
380
455
|
export type GetPolicyResponse = (({
|
|
381
456
|
name: string;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
457
|
+
action: {
|
|
458
|
+
kind: "RequestApproval";
|
|
459
|
+
approvalGroups: {
|
|
460
|
+
name?: string | undefined;
|
|
461
|
+
quorum: number;
|
|
462
|
+
approvers: {
|
|
463
|
+
[x: string]: {
|
|
464
|
+
[x: string]: string[];
|
|
465
|
+
};
|
|
388
466
|
};
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
|
|
467
|
+
}[];
|
|
468
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
469
|
+
} | {
|
|
470
|
+
kind: "Block";
|
|
471
|
+
};
|
|
392
472
|
activityKind: "Permissions:Assign";
|
|
393
473
|
rule: {
|
|
394
474
|
kind: "AlwaysRequireApproval";
|
|
@@ -401,16 +481,21 @@ export type GetPolicyResponse = (({
|
|
|
401
481
|
} | undefined;
|
|
402
482
|
} | {
|
|
403
483
|
name: string;
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
484
|
+
action: {
|
|
485
|
+
kind: "RequestApproval";
|
|
486
|
+
approvalGroups: {
|
|
487
|
+
name?: string | undefined;
|
|
488
|
+
quorum: number;
|
|
489
|
+
approvers: {
|
|
490
|
+
[x: string]: {
|
|
491
|
+
[x: string]: string[];
|
|
492
|
+
};
|
|
410
493
|
};
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
|
|
494
|
+
}[];
|
|
495
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
496
|
+
} | {
|
|
497
|
+
kind: "Block";
|
|
498
|
+
};
|
|
414
499
|
activityKind: "Permissions:Modify";
|
|
415
500
|
rule: {
|
|
416
501
|
kind: "AlwaysRequireApproval";
|
|
@@ -423,16 +508,21 @@ export type GetPolicyResponse = (({
|
|
|
423
508
|
} | undefined;
|
|
424
509
|
} | {
|
|
425
510
|
name: string;
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
511
|
+
action: {
|
|
512
|
+
kind: "RequestApproval";
|
|
513
|
+
approvalGroups: {
|
|
514
|
+
name?: string | undefined;
|
|
515
|
+
quorum: number;
|
|
516
|
+
approvers: {
|
|
517
|
+
[x: string]: {
|
|
518
|
+
[x: string]: string[];
|
|
519
|
+
};
|
|
432
520
|
};
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
|
|
521
|
+
}[];
|
|
522
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
523
|
+
} | {
|
|
524
|
+
kind: "Block";
|
|
525
|
+
};
|
|
436
526
|
activityKind: "Policies:Modify";
|
|
437
527
|
rule: {
|
|
438
528
|
kind: "AlwaysRequireApproval";
|
|
@@ -445,20 +535,30 @@ export type GetPolicyResponse = (({
|
|
|
445
535
|
} | undefined;
|
|
446
536
|
} | {
|
|
447
537
|
name: string;
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
538
|
+
action: {
|
|
539
|
+
kind: "RequestApproval";
|
|
540
|
+
approvalGroups: {
|
|
541
|
+
name?: string | undefined;
|
|
542
|
+
quorum: number;
|
|
543
|
+
approvers: {
|
|
544
|
+
[x: string]: {
|
|
545
|
+
[x: string]: string[];
|
|
546
|
+
};
|
|
454
547
|
};
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
|
|
548
|
+
}[];
|
|
549
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
550
|
+
} | {
|
|
551
|
+
kind: "Block";
|
|
552
|
+
};
|
|
458
553
|
activityKind: "Wallets:Sign";
|
|
459
554
|
rule: {
|
|
460
555
|
kind: "AlwaysRequireApproval";
|
|
461
556
|
configuration: {};
|
|
557
|
+
} | {
|
|
558
|
+
kind: "TransactionRecipientWhitelist";
|
|
559
|
+
configuration: {
|
|
560
|
+
addresses: string[];
|
|
561
|
+
};
|
|
462
562
|
} | {
|
|
463
563
|
kind: "TransactionAmountLimit";
|
|
464
564
|
configuration: {
|
|
@@ -503,16 +603,21 @@ export type GetPolicyResponse = (({
|
|
|
503
603
|
entityId: string;
|
|
504
604
|
body: ({
|
|
505
605
|
name: string;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
606
|
+
action: {
|
|
607
|
+
kind: "RequestApproval";
|
|
608
|
+
approvalGroups: {
|
|
609
|
+
name?: string | undefined;
|
|
610
|
+
quorum: number;
|
|
611
|
+
approvers: {
|
|
612
|
+
[x: string]: {
|
|
613
|
+
[x: string]: string[];
|
|
614
|
+
};
|
|
512
615
|
};
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
|
|
616
|
+
}[];
|
|
617
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
618
|
+
} | {
|
|
619
|
+
kind: "Block";
|
|
620
|
+
};
|
|
516
621
|
activityKind: "Permissions:Assign";
|
|
517
622
|
rule: {
|
|
518
623
|
kind: "AlwaysRequireApproval";
|
|
@@ -525,16 +630,21 @@ export type GetPolicyResponse = (({
|
|
|
525
630
|
} | undefined;
|
|
526
631
|
} | {
|
|
527
632
|
name: string;
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
633
|
+
action: {
|
|
634
|
+
kind: "RequestApproval";
|
|
635
|
+
approvalGroups: {
|
|
636
|
+
name?: string | undefined;
|
|
637
|
+
quorum: number;
|
|
638
|
+
approvers: {
|
|
639
|
+
[x: string]: {
|
|
640
|
+
[x: string]: string[];
|
|
641
|
+
};
|
|
534
642
|
};
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
|
|
643
|
+
}[];
|
|
644
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
645
|
+
} | {
|
|
646
|
+
kind: "Block";
|
|
647
|
+
};
|
|
538
648
|
activityKind: "Permissions:Modify";
|
|
539
649
|
rule: {
|
|
540
650
|
kind: "AlwaysRequireApproval";
|
|
@@ -547,16 +657,21 @@ export type GetPolicyResponse = (({
|
|
|
547
657
|
} | undefined;
|
|
548
658
|
} | {
|
|
549
659
|
name: string;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
660
|
+
action: {
|
|
661
|
+
kind: "RequestApproval";
|
|
662
|
+
approvalGroups: {
|
|
663
|
+
name?: string | undefined;
|
|
664
|
+
quorum: number;
|
|
665
|
+
approvers: {
|
|
666
|
+
[x: string]: {
|
|
667
|
+
[x: string]: string[];
|
|
668
|
+
};
|
|
556
669
|
};
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
|
|
670
|
+
}[];
|
|
671
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
672
|
+
} | {
|
|
673
|
+
kind: "Block";
|
|
674
|
+
};
|
|
560
675
|
activityKind: "Policies:Modify";
|
|
561
676
|
rule: {
|
|
562
677
|
kind: "AlwaysRequireApproval";
|
|
@@ -569,20 +684,30 @@ export type GetPolicyResponse = (({
|
|
|
569
684
|
} | undefined;
|
|
570
685
|
} | {
|
|
571
686
|
name: string;
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
687
|
+
action: {
|
|
688
|
+
kind: "RequestApproval";
|
|
689
|
+
approvalGroups: {
|
|
690
|
+
name?: string | undefined;
|
|
691
|
+
quorum: number;
|
|
692
|
+
approvers: {
|
|
693
|
+
[x: string]: {
|
|
694
|
+
[x: string]: string[];
|
|
695
|
+
};
|
|
578
696
|
};
|
|
579
|
-
};
|
|
580
|
-
|
|
581
|
-
|
|
697
|
+
}[];
|
|
698
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
699
|
+
} | {
|
|
700
|
+
kind: "Block";
|
|
701
|
+
};
|
|
582
702
|
activityKind: "Wallets:Sign";
|
|
583
703
|
rule: {
|
|
584
704
|
kind: "AlwaysRequireApproval";
|
|
585
705
|
configuration: {};
|
|
706
|
+
} | {
|
|
707
|
+
kind: "TransactionRecipientWhitelist";
|
|
708
|
+
configuration: {
|
|
709
|
+
addresses: string[];
|
|
710
|
+
};
|
|
586
711
|
} | {
|
|
587
712
|
kind: "TransactionAmountLimit";
|
|
588
713
|
configuration: {
|
|
@@ -622,7 +747,7 @@ export type GetPolicyRequest = GetPolicyParams;
|
|
|
622
747
|
export type ListApprovalsQuery = {
|
|
623
748
|
limit?: string | undefined;
|
|
624
749
|
paginationToken?: string | undefined;
|
|
625
|
-
status?: ("Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired") | undefined;
|
|
750
|
+
status?: ("Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired") | undefined;
|
|
626
751
|
triggerStatus?: ("Triggered" | "Skipped") | undefined;
|
|
627
752
|
initiatorId?: string | undefined;
|
|
628
753
|
approverId?: string | undefined;
|
|
@@ -636,7 +761,7 @@ export type ListApprovalsResponse = {
|
|
|
636
761
|
activity: {
|
|
637
762
|
[x: string]: unknown;
|
|
638
763
|
};
|
|
639
|
-
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired";
|
|
764
|
+
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired";
|
|
640
765
|
expirationDate?: string | undefined;
|
|
641
766
|
dateCreated?: string | undefined;
|
|
642
767
|
dateUpdated: string;
|
|
@@ -666,16 +791,21 @@ export type ListPoliciesQuery = {
|
|
|
666
791
|
export type ListPoliciesResponse = {
|
|
667
792
|
items: ((({
|
|
668
793
|
name: string;
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
794
|
+
action: {
|
|
795
|
+
kind: "RequestApproval";
|
|
796
|
+
approvalGroups: {
|
|
797
|
+
name?: string | undefined;
|
|
798
|
+
quorum: number;
|
|
799
|
+
approvers: {
|
|
800
|
+
[x: string]: {
|
|
801
|
+
[x: string]: string[];
|
|
802
|
+
};
|
|
675
803
|
};
|
|
676
|
-
};
|
|
677
|
-
|
|
678
|
-
|
|
804
|
+
}[];
|
|
805
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
806
|
+
} | {
|
|
807
|
+
kind: "Block";
|
|
808
|
+
};
|
|
679
809
|
activityKind: "Permissions:Assign";
|
|
680
810
|
rule: {
|
|
681
811
|
kind: "AlwaysRequireApproval";
|
|
@@ -688,16 +818,21 @@ export type ListPoliciesResponse = {
|
|
|
688
818
|
} | undefined;
|
|
689
819
|
} | {
|
|
690
820
|
name: string;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
821
|
+
action: {
|
|
822
|
+
kind: "RequestApproval";
|
|
823
|
+
approvalGroups: {
|
|
824
|
+
name?: string | undefined;
|
|
825
|
+
quorum: number;
|
|
826
|
+
approvers: {
|
|
827
|
+
[x: string]: {
|
|
828
|
+
[x: string]: string[];
|
|
829
|
+
};
|
|
697
830
|
};
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
|
|
831
|
+
}[];
|
|
832
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
833
|
+
} | {
|
|
834
|
+
kind: "Block";
|
|
835
|
+
};
|
|
701
836
|
activityKind: "Permissions:Modify";
|
|
702
837
|
rule: {
|
|
703
838
|
kind: "AlwaysRequireApproval";
|
|
@@ -710,16 +845,21 @@ export type ListPoliciesResponse = {
|
|
|
710
845
|
} | undefined;
|
|
711
846
|
} | {
|
|
712
847
|
name: string;
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
848
|
+
action: {
|
|
849
|
+
kind: "RequestApproval";
|
|
850
|
+
approvalGroups: {
|
|
851
|
+
name?: string | undefined;
|
|
852
|
+
quorum: number;
|
|
853
|
+
approvers: {
|
|
854
|
+
[x: string]: {
|
|
855
|
+
[x: string]: string[];
|
|
856
|
+
};
|
|
719
857
|
};
|
|
720
|
-
};
|
|
721
|
-
|
|
722
|
-
|
|
858
|
+
}[];
|
|
859
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
860
|
+
} | {
|
|
861
|
+
kind: "Block";
|
|
862
|
+
};
|
|
723
863
|
activityKind: "Policies:Modify";
|
|
724
864
|
rule: {
|
|
725
865
|
kind: "AlwaysRequireApproval";
|
|
@@ -732,20 +872,30 @@ export type ListPoliciesResponse = {
|
|
|
732
872
|
} | undefined;
|
|
733
873
|
} | {
|
|
734
874
|
name: string;
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
875
|
+
action: {
|
|
876
|
+
kind: "RequestApproval";
|
|
877
|
+
approvalGroups: {
|
|
878
|
+
name?: string | undefined;
|
|
879
|
+
quorum: number;
|
|
880
|
+
approvers: {
|
|
881
|
+
[x: string]: {
|
|
882
|
+
[x: string]: string[];
|
|
883
|
+
};
|
|
741
884
|
};
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
|
|
885
|
+
}[];
|
|
886
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
887
|
+
} | {
|
|
888
|
+
kind: "Block";
|
|
889
|
+
};
|
|
745
890
|
activityKind: "Wallets:Sign";
|
|
746
891
|
rule: {
|
|
747
892
|
kind: "AlwaysRequireApproval";
|
|
748
893
|
configuration: {};
|
|
894
|
+
} | {
|
|
895
|
+
kind: "TransactionRecipientWhitelist";
|
|
896
|
+
configuration: {
|
|
897
|
+
addresses: string[];
|
|
898
|
+
};
|
|
749
899
|
} | {
|
|
750
900
|
kind: "TransactionAmountLimit";
|
|
751
901
|
configuration: {
|
|
@@ -790,16 +940,21 @@ export type ListPoliciesResponse = {
|
|
|
790
940
|
entityId: string;
|
|
791
941
|
body: ({
|
|
792
942
|
name: string;
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
943
|
+
action: {
|
|
944
|
+
kind: "RequestApproval";
|
|
945
|
+
approvalGroups: {
|
|
946
|
+
name?: string | undefined;
|
|
947
|
+
quorum: number;
|
|
948
|
+
approvers: {
|
|
949
|
+
[x: string]: {
|
|
950
|
+
[x: string]: string[];
|
|
951
|
+
};
|
|
799
952
|
};
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
|
|
953
|
+
}[];
|
|
954
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
955
|
+
} | {
|
|
956
|
+
kind: "Block";
|
|
957
|
+
};
|
|
803
958
|
activityKind: "Permissions:Assign";
|
|
804
959
|
rule: {
|
|
805
960
|
kind: "AlwaysRequireApproval";
|
|
@@ -812,16 +967,21 @@ export type ListPoliciesResponse = {
|
|
|
812
967
|
} | undefined;
|
|
813
968
|
} | {
|
|
814
969
|
name: string;
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
970
|
+
action: {
|
|
971
|
+
kind: "RequestApproval";
|
|
972
|
+
approvalGroups: {
|
|
973
|
+
name?: string | undefined;
|
|
974
|
+
quorum: number;
|
|
975
|
+
approvers: {
|
|
976
|
+
[x: string]: {
|
|
977
|
+
[x: string]: string[];
|
|
978
|
+
};
|
|
821
979
|
};
|
|
822
|
-
};
|
|
823
|
-
|
|
824
|
-
|
|
980
|
+
}[];
|
|
981
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
982
|
+
} | {
|
|
983
|
+
kind: "Block";
|
|
984
|
+
};
|
|
825
985
|
activityKind: "Permissions:Modify";
|
|
826
986
|
rule: {
|
|
827
987
|
kind: "AlwaysRequireApproval";
|
|
@@ -834,16 +994,21 @@ export type ListPoliciesResponse = {
|
|
|
834
994
|
} | undefined;
|
|
835
995
|
} | {
|
|
836
996
|
name: string;
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
997
|
+
action: {
|
|
998
|
+
kind: "RequestApproval";
|
|
999
|
+
approvalGroups: {
|
|
1000
|
+
name?: string | undefined;
|
|
1001
|
+
quorum: number;
|
|
1002
|
+
approvers: {
|
|
1003
|
+
[x: string]: {
|
|
1004
|
+
[x: string]: string[];
|
|
1005
|
+
};
|
|
843
1006
|
};
|
|
844
|
-
};
|
|
845
|
-
|
|
846
|
-
|
|
1007
|
+
}[];
|
|
1008
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1009
|
+
} | {
|
|
1010
|
+
kind: "Block";
|
|
1011
|
+
};
|
|
847
1012
|
activityKind: "Policies:Modify";
|
|
848
1013
|
rule: {
|
|
849
1014
|
kind: "AlwaysRequireApproval";
|
|
@@ -856,20 +1021,30 @@ export type ListPoliciesResponse = {
|
|
|
856
1021
|
} | undefined;
|
|
857
1022
|
} | {
|
|
858
1023
|
name: string;
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
1024
|
+
action: {
|
|
1025
|
+
kind: "RequestApproval";
|
|
1026
|
+
approvalGroups: {
|
|
1027
|
+
name?: string | undefined;
|
|
1028
|
+
quorum: number;
|
|
1029
|
+
approvers: {
|
|
1030
|
+
[x: string]: {
|
|
1031
|
+
[x: string]: string[];
|
|
1032
|
+
};
|
|
865
1033
|
};
|
|
866
|
-
};
|
|
867
|
-
|
|
868
|
-
|
|
1034
|
+
}[];
|
|
1035
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1036
|
+
} | {
|
|
1037
|
+
kind: "Block";
|
|
1038
|
+
};
|
|
869
1039
|
activityKind: "Wallets:Sign";
|
|
870
1040
|
rule: {
|
|
871
1041
|
kind: "AlwaysRequireApproval";
|
|
872
1042
|
configuration: {};
|
|
1043
|
+
} | {
|
|
1044
|
+
kind: "TransactionRecipientWhitelist";
|
|
1045
|
+
configuration: {
|
|
1046
|
+
addresses: string[];
|
|
1047
|
+
};
|
|
873
1048
|
} | {
|
|
874
1049
|
kind: "TransactionAmountLimit";
|
|
875
1050
|
configuration: {
|
|
@@ -912,16 +1087,21 @@ export type ListPoliciesRequest = {
|
|
|
912
1087
|
};
|
|
913
1088
|
export type UpdatePolicyBody = {
|
|
914
1089
|
name: string;
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
1090
|
+
action: {
|
|
1091
|
+
kind: "RequestApproval";
|
|
1092
|
+
approvalGroups: {
|
|
1093
|
+
name?: string | undefined;
|
|
1094
|
+
quorum: number;
|
|
1095
|
+
approvers: {
|
|
1096
|
+
[x: string]: {
|
|
1097
|
+
[x: string]: string[];
|
|
1098
|
+
};
|
|
921
1099
|
};
|
|
922
|
-
};
|
|
923
|
-
|
|
924
|
-
|
|
1100
|
+
}[];
|
|
1101
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1102
|
+
} | {
|
|
1103
|
+
kind: "Block";
|
|
1104
|
+
};
|
|
925
1105
|
activityKind: "Permissions:Assign";
|
|
926
1106
|
rule: {
|
|
927
1107
|
kind: "AlwaysRequireApproval";
|
|
@@ -934,16 +1114,21 @@ export type UpdatePolicyBody = {
|
|
|
934
1114
|
} | undefined;
|
|
935
1115
|
} | {
|
|
936
1116
|
name: string;
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1117
|
+
action: {
|
|
1118
|
+
kind: "RequestApproval";
|
|
1119
|
+
approvalGroups: {
|
|
1120
|
+
name?: string | undefined;
|
|
1121
|
+
quorum: number;
|
|
1122
|
+
approvers: {
|
|
1123
|
+
[x: string]: {
|
|
1124
|
+
[x: string]: string[];
|
|
1125
|
+
};
|
|
943
1126
|
};
|
|
944
|
-
};
|
|
945
|
-
|
|
946
|
-
|
|
1127
|
+
}[];
|
|
1128
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1129
|
+
} | {
|
|
1130
|
+
kind: "Block";
|
|
1131
|
+
};
|
|
947
1132
|
activityKind: "Permissions:Modify";
|
|
948
1133
|
rule: {
|
|
949
1134
|
kind: "AlwaysRequireApproval";
|
|
@@ -956,16 +1141,21 @@ export type UpdatePolicyBody = {
|
|
|
956
1141
|
} | undefined;
|
|
957
1142
|
} | {
|
|
958
1143
|
name: string;
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1144
|
+
action: {
|
|
1145
|
+
kind: "RequestApproval";
|
|
1146
|
+
approvalGroups: {
|
|
1147
|
+
name?: string | undefined;
|
|
1148
|
+
quorum: number;
|
|
1149
|
+
approvers: {
|
|
1150
|
+
[x: string]: {
|
|
1151
|
+
[x: string]: string[];
|
|
1152
|
+
};
|
|
965
1153
|
};
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
|
|
1154
|
+
}[];
|
|
1155
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1156
|
+
} | {
|
|
1157
|
+
kind: "Block";
|
|
1158
|
+
};
|
|
969
1159
|
activityKind: "Policies:Modify";
|
|
970
1160
|
rule: {
|
|
971
1161
|
kind: "AlwaysRequireApproval";
|
|
@@ -978,20 +1168,30 @@ export type UpdatePolicyBody = {
|
|
|
978
1168
|
} | undefined;
|
|
979
1169
|
} | {
|
|
980
1170
|
name: string;
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
1171
|
+
action: {
|
|
1172
|
+
kind: "RequestApproval";
|
|
1173
|
+
approvalGroups: {
|
|
1174
|
+
name?: string | undefined;
|
|
1175
|
+
quorum: number;
|
|
1176
|
+
approvers: {
|
|
1177
|
+
[x: string]: {
|
|
1178
|
+
[x: string]: string[];
|
|
1179
|
+
};
|
|
987
1180
|
};
|
|
988
|
-
};
|
|
989
|
-
|
|
990
|
-
|
|
1181
|
+
}[];
|
|
1182
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1183
|
+
} | {
|
|
1184
|
+
kind: "Block";
|
|
1185
|
+
};
|
|
991
1186
|
activityKind: "Wallets:Sign";
|
|
992
1187
|
rule: {
|
|
993
1188
|
kind: "AlwaysRequireApproval";
|
|
994
1189
|
configuration: {};
|
|
1190
|
+
} | {
|
|
1191
|
+
kind: "TransactionRecipientWhitelist";
|
|
1192
|
+
configuration: {
|
|
1193
|
+
addresses: string[];
|
|
1194
|
+
};
|
|
995
1195
|
} | {
|
|
996
1196
|
kind: "TransactionAmountLimit";
|
|
997
1197
|
configuration: {
|
|
@@ -1023,16 +1223,21 @@ export type UpdatePolicyParams = {
|
|
|
1023
1223
|
};
|
|
1024
1224
|
export type UpdatePolicyResponse = ({
|
|
1025
1225
|
name: string;
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1226
|
+
action: {
|
|
1227
|
+
kind: "RequestApproval";
|
|
1228
|
+
approvalGroups: {
|
|
1229
|
+
name?: string | undefined;
|
|
1230
|
+
quorum: number;
|
|
1231
|
+
approvers: {
|
|
1232
|
+
[x: string]: {
|
|
1233
|
+
[x: string]: string[];
|
|
1234
|
+
};
|
|
1032
1235
|
};
|
|
1033
|
-
};
|
|
1034
|
-
|
|
1035
|
-
|
|
1236
|
+
}[];
|
|
1237
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1238
|
+
} | {
|
|
1239
|
+
kind: "Block";
|
|
1240
|
+
};
|
|
1036
1241
|
activityKind: "Permissions:Assign";
|
|
1037
1242
|
rule: {
|
|
1038
1243
|
kind: "AlwaysRequireApproval";
|
|
@@ -1045,16 +1250,21 @@ export type UpdatePolicyResponse = ({
|
|
|
1045
1250
|
} | undefined;
|
|
1046
1251
|
} | {
|
|
1047
1252
|
name: string;
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1253
|
+
action: {
|
|
1254
|
+
kind: "RequestApproval";
|
|
1255
|
+
approvalGroups: {
|
|
1256
|
+
name?: string | undefined;
|
|
1257
|
+
quorum: number;
|
|
1258
|
+
approvers: {
|
|
1259
|
+
[x: string]: {
|
|
1260
|
+
[x: string]: string[];
|
|
1261
|
+
};
|
|
1054
1262
|
};
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
|
|
1263
|
+
}[];
|
|
1264
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1265
|
+
} | {
|
|
1266
|
+
kind: "Block";
|
|
1267
|
+
};
|
|
1058
1268
|
activityKind: "Permissions:Modify";
|
|
1059
1269
|
rule: {
|
|
1060
1270
|
kind: "AlwaysRequireApproval";
|
|
@@ -1067,16 +1277,21 @@ export type UpdatePolicyResponse = ({
|
|
|
1067
1277
|
} | undefined;
|
|
1068
1278
|
} | {
|
|
1069
1279
|
name: string;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1280
|
+
action: {
|
|
1281
|
+
kind: "RequestApproval";
|
|
1282
|
+
approvalGroups: {
|
|
1283
|
+
name?: string | undefined;
|
|
1284
|
+
quorum: number;
|
|
1285
|
+
approvers: {
|
|
1286
|
+
[x: string]: {
|
|
1287
|
+
[x: string]: string[];
|
|
1288
|
+
};
|
|
1076
1289
|
};
|
|
1077
|
-
};
|
|
1078
|
-
|
|
1079
|
-
|
|
1290
|
+
}[];
|
|
1291
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1292
|
+
} | {
|
|
1293
|
+
kind: "Block";
|
|
1294
|
+
};
|
|
1080
1295
|
activityKind: "Policies:Modify";
|
|
1081
1296
|
rule: {
|
|
1082
1297
|
kind: "AlwaysRequireApproval";
|
|
@@ -1089,20 +1304,30 @@ export type UpdatePolicyResponse = ({
|
|
|
1089
1304
|
} | undefined;
|
|
1090
1305
|
} | {
|
|
1091
1306
|
name: string;
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1307
|
+
action: {
|
|
1308
|
+
kind: "RequestApproval";
|
|
1309
|
+
approvalGroups: {
|
|
1310
|
+
name?: string | undefined;
|
|
1311
|
+
quorum: number;
|
|
1312
|
+
approvers: {
|
|
1313
|
+
[x: string]: {
|
|
1314
|
+
[x: string]: string[];
|
|
1315
|
+
};
|
|
1098
1316
|
};
|
|
1099
|
-
};
|
|
1100
|
-
|
|
1101
|
-
|
|
1317
|
+
}[];
|
|
1318
|
+
autoRejectTimeout?: (number | undefined) | null;
|
|
1319
|
+
} | {
|
|
1320
|
+
kind: "Block";
|
|
1321
|
+
};
|
|
1102
1322
|
activityKind: "Wallets:Sign";
|
|
1103
1323
|
rule: {
|
|
1104
1324
|
kind: "AlwaysRequireApproval";
|
|
1105
1325
|
configuration: {};
|
|
1326
|
+
} | {
|
|
1327
|
+
kind: "TransactionRecipientWhitelist";
|
|
1328
|
+
configuration: {
|
|
1329
|
+
addresses: string[];
|
|
1330
|
+
};
|
|
1106
1331
|
} | {
|
|
1107
1332
|
kind: "TransactionAmountLimit";
|
|
1108
1333
|
configuration: {
|
package/package.json
CHANGED
package/utils/crypto.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.rawSignatureToAns1 = exports.exportPublicKeyInPemFormatBrowser = void 0;
|
|
4
|
+
const buffer_1 = require("buffer");
|
|
4
5
|
const base64_1 = require("./base64");
|
|
5
6
|
const string_1 = require("./string");
|
|
6
7
|
const bigint_1 = require("./bigint");
|
|
@@ -8,7 +9,7 @@ const bigint_1 = require("./bigint");
|
|
|
8
9
|
// Adding `Browser` in the function name to distinguish with native node crypto module usage
|
|
9
10
|
const exportPublicKeyInPemFormatBrowser = async (key) => {
|
|
10
11
|
const exported = await crypto.subtle.exportKey('spki', key.publicKey);
|
|
11
|
-
const b64Exported = (0, base64_1.toBase64)(Buffer.from(exported));
|
|
12
|
+
const b64Exported = (0, base64_1.toBase64)(buffer_1.Buffer.from(exported));
|
|
12
13
|
const pem = `-----BEGIN PUBLIC KEY-----\n${(0, string_1.splitString)(b64Exported).join("\n")}\n-----END PUBLIC KEY-----`;
|
|
13
14
|
return pem;
|
|
14
15
|
};
|