@junobuild/ic-client 7.1.0 → 7.1.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/actor.js +1 -1
- package/actor.js.map +3 -3
- package/actor.mjs +1 -1
- package/actor.mjs.map +3 -3
- package/declarations/console/console.did.d.ts +85 -15
- package/declarations/console/console.factory.certified.did.js +86 -15
- package/declarations/console/console.factory.did.js +90 -15
- package/declarations/console/console.factory.did.mjs +90 -15
- package/declarations/deprecated/console-0-2-0.did.d.ts +457 -0
- package/declarations/deprecated/console-0-2-0.factory.did.js +487 -0
- package/declarations/mission_control/mission_control.did.d.ts +1 -1
- package/declarations/mission_control/mission_control.factory.certified.did.js +1 -1
- package/declarations/mission_control/mission_control.factory.did.js +1 -1
- package/declarations/observatory/observatory.did.d.ts +3 -2
- package/declarations/observatory/observatory.factory.certified.did.js +4 -3
- package/declarations/observatory/observatory.factory.did.js +4 -3
- package/declarations/observatory/observatory.factory.did.mjs +4 -3
- package/declarations/orbiter/orbiter.did.d.ts +1 -1
- package/declarations/orbiter/orbiter.factory.certified.did.js +1 -1
- package/declarations/orbiter/orbiter.factory.did.js +1 -1
- package/declarations/orbiter/orbiter.factory.did.mjs +1 -1
- package/declarations/satellite/satellite.did.d.ts +1 -1
- package/declarations/satellite/satellite.factory.certified.did.js +1 -1
- package/declarations/satellite/satellite.factory.did.js +1 -1
- package/declarations/satellite/satellite.factory.did.mjs +1 -1
- package/declarations/sputnik/sputnik.did.d.ts +1 -1
- package/declarations/sputnik/sputnik.factory.certified.did.js +1 -1
- package/declarations/sputnik/sputnik.factory.did.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.
|
|
5
|
+
// This file was automatically generated by @icp-sdk/bindgen@0.2.1.
|
|
6
6
|
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
7
|
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
8
|
|
|
@@ -100,9 +100,13 @@ export const idlFactory = ({IDL}) => {
|
|
|
100
100
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
101
101
|
chunk_ids: IDL.Vec(IDL.Nat)
|
|
102
102
|
});
|
|
103
|
-
const
|
|
103
|
+
const CreateMissionControlArgs = IDL.Record({
|
|
104
|
+
subnet_id: IDL.Opt(IDL.Principal)
|
|
105
|
+
});
|
|
106
|
+
const CreateOrbiterArgs = IDL.Record({
|
|
104
107
|
block_index: IDL.Opt(IDL.Nat64),
|
|
105
108
|
subnet_id: IDL.Opt(IDL.Principal),
|
|
109
|
+
name: IDL.Opt(IDL.Text),
|
|
106
110
|
user: IDL.Principal
|
|
107
111
|
});
|
|
108
112
|
const InitStorageMemory = IDL.Variant({
|
|
@@ -116,6 +120,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
116
120
|
block_index: IDL.Opt(IDL.Nat64),
|
|
117
121
|
subnet_id: IDL.Opt(IDL.Principal),
|
|
118
122
|
storage: IDL.Opt(InitStorageArgs),
|
|
123
|
+
name: IDL.Opt(IDL.Text),
|
|
119
124
|
user: IDL.Principal
|
|
120
125
|
});
|
|
121
126
|
const DeleteControllersArgs = IDL.Record({
|
|
@@ -212,6 +217,17 @@ export const idlFactory = ({IDL}) => {
|
|
|
212
217
|
Ok: SignedDelegation,
|
|
213
218
|
Err: GetDelegationError
|
|
214
219
|
});
|
|
220
|
+
const SegmentKind = IDL.Variant({
|
|
221
|
+
Orbiter: IDL.Null,
|
|
222
|
+
MissionControl: IDL.Null,
|
|
223
|
+
Satellite: IDL.Null
|
|
224
|
+
});
|
|
225
|
+
const CyclesTokens = IDL.Record({e12s: IDL.Nat64});
|
|
226
|
+
const FactoryFee = IDL.Record({
|
|
227
|
+
updated_at: IDL.Nat64,
|
|
228
|
+
fee_cycles: CyclesTokens,
|
|
229
|
+
fee_icp: IDL.Opt(Tokens)
|
|
230
|
+
});
|
|
215
231
|
const ProposalStatus = IDL.Variant({
|
|
216
232
|
Initialized: IDL.Null,
|
|
217
233
|
Failed: IDL.Null,
|
|
@@ -242,6 +258,10 @@ export const idlFactory = ({IDL}) => {
|
|
|
242
258
|
version: IDL.Opt(IDL.Nat64),
|
|
243
259
|
proposal_type: ProposalType
|
|
244
260
|
});
|
|
261
|
+
const RateConfig = IDL.Record({
|
|
262
|
+
max_tokens: IDL.Nat64,
|
|
263
|
+
time_per_token_ns: IDL.Nat64
|
|
264
|
+
});
|
|
245
265
|
const HttpRequest = IDL.Record({
|
|
246
266
|
url: IDL.Text,
|
|
247
267
|
method: IDL.Text,
|
|
@@ -363,7 +383,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
363
383
|
Acknowledged: IDL.Null,
|
|
364
384
|
Completed: IDL.Null
|
|
365
385
|
});
|
|
366
|
-
const
|
|
386
|
+
const IcpPayment = IDL.Record({
|
|
367
387
|
status: PaymentStatus,
|
|
368
388
|
updated_at: IDL.Nat64,
|
|
369
389
|
block_index_payment: IDL.Nat64,
|
|
@@ -371,6 +391,21 @@ export const idlFactory = ({IDL}) => {
|
|
|
371
391
|
created_at: IDL.Nat64,
|
|
372
392
|
block_index_refunded: IDL.Opt(IDL.Nat64)
|
|
373
393
|
});
|
|
394
|
+
const IcrcPaymentKey = IDL.Record({
|
|
395
|
+
block_index: IDL.Nat64,
|
|
396
|
+
ledger_id: IDL.Principal
|
|
397
|
+
});
|
|
398
|
+
const Account_1 = IDL.Record({
|
|
399
|
+
owner: IDL.Principal,
|
|
400
|
+
subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
|
|
401
|
+
});
|
|
402
|
+
const IcrcPayment = IDL.Record({
|
|
403
|
+
status: PaymentStatus,
|
|
404
|
+
updated_at: IDL.Nat64,
|
|
405
|
+
created_at: IDL.Nat64,
|
|
406
|
+
block_index_refunded: IDL.Opt(IDL.Nat64),
|
|
407
|
+
purchaser: Account_1
|
|
408
|
+
});
|
|
374
409
|
const ListProposalsOrder = IDL.Record({desc: IDL.Bool});
|
|
375
410
|
const ListProposalsPaginate = IDL.Record({
|
|
376
411
|
start_after: IDL.Opt(IDL.Nat),
|
|
@@ -386,6 +421,25 @@ export const idlFactory = ({IDL}) => {
|
|
|
386
421
|
items: IDL.Vec(IDL.Tuple(ProposalKey, Proposal)),
|
|
387
422
|
items_length: IDL.Nat64
|
|
388
423
|
});
|
|
424
|
+
const StorableSegmentKind = IDL.Variant({
|
|
425
|
+
Orbiter: IDL.Null,
|
|
426
|
+
Satellite: IDL.Null
|
|
427
|
+
});
|
|
428
|
+
const ListSegmentsArgs = IDL.Record({
|
|
429
|
+
segment_id: IDL.Opt(IDL.Principal),
|
|
430
|
+
segment_kind: IDL.Opt(StorableSegmentKind)
|
|
431
|
+
});
|
|
432
|
+
const SegmentKey = IDL.Record({
|
|
433
|
+
user: IDL.Principal,
|
|
434
|
+
segment_id: IDL.Principal,
|
|
435
|
+
segment_kind: StorableSegmentKind
|
|
436
|
+
});
|
|
437
|
+
const Segment = IDL.Record({
|
|
438
|
+
updated_at: IDL.Nat64,
|
|
439
|
+
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
440
|
+
segment_id: IDL.Principal,
|
|
441
|
+
created_at: IDL.Nat64
|
|
442
|
+
});
|
|
389
443
|
const SetAuthenticationConfig = IDL.Record({
|
|
390
444
|
openid: IDL.Opt(AuthenticationConfigOpenId),
|
|
391
445
|
version: IDL.Opt(IDL.Nat64),
|
|
@@ -401,10 +455,19 @@ export const idlFactory = ({IDL}) => {
|
|
|
401
455
|
controller: SetController,
|
|
402
456
|
controllers: IDL.Vec(IDL.Principal)
|
|
403
457
|
});
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
458
|
+
const FeesArgs = IDL.Record({
|
|
459
|
+
fee_cycles: CyclesTokens,
|
|
460
|
+
fee_icp: IDL.Opt(Tokens)
|
|
461
|
+
});
|
|
462
|
+
const SetSegmentsArgs = IDL.Record({
|
|
463
|
+
metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
|
|
464
|
+
segment_id: IDL.Principal,
|
|
465
|
+
segment_kind: StorableSegmentKind
|
|
466
|
+
});
|
|
467
|
+
const SetSegmentMetadataArgs = IDL.Record({
|
|
468
|
+
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
469
|
+
segment_id: IDL.Principal,
|
|
470
|
+
segment_kind: StorableSegmentKind
|
|
408
471
|
});
|
|
409
472
|
const SetStorageConfig = IDL.Record({
|
|
410
473
|
iframe: IDL.Opt(StorageConfigIFrame),
|
|
@@ -415,9 +478,9 @@ export const idlFactory = ({IDL}) => {
|
|
|
415
478
|
raw_access: IDL.Opt(StorageConfigRawAccess),
|
|
416
479
|
redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
|
|
417
480
|
});
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
481
|
+
const UnsetSegmentsArgs = IDL.Record({
|
|
482
|
+
segment_id: IDL.Principal,
|
|
483
|
+
segment_kind: StorableSegmentKind
|
|
421
484
|
});
|
|
422
485
|
const UploadChunk = IDL.Record({
|
|
423
486
|
content: IDL.Vec(IDL.Nat8),
|
|
@@ -435,7 +498,8 @@ export const idlFactory = ({IDL}) => {
|
|
|
435
498
|
commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
436
499
|
commit_proposal_many_assets_upload: IDL.Func([IDL.Vec(CommitBatch)], [], []),
|
|
437
500
|
count_proposals: IDL.Func([], [IDL.Nat64], ['query']),
|
|
438
|
-
|
|
501
|
+
create_mission_control: IDL.Func([CreateMissionControlArgs], [IDL.Principal], []),
|
|
502
|
+
create_orbiter: IDL.Func([CreateOrbiterArgs], [IDL.Principal], []),
|
|
439
503
|
create_satellite: IDL.Func([CreateSatelliteArgs], [IDL.Principal], []),
|
|
440
504
|
del_controllers: IDL.Func([DeleteControllersArgs], [], []),
|
|
441
505
|
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
@@ -447,7 +511,10 @@ export const idlFactory = ({IDL}) => {
|
|
|
447
511
|
get_create_satellite_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], ['query']),
|
|
448
512
|
get_credits: IDL.Func([], [Tokens], ['query']),
|
|
449
513
|
get_delegation: IDL.Func([GetDelegationArgs], [Result_1], ['query']),
|
|
514
|
+
get_fee: IDL.Func([SegmentKind], [FactoryFee], ['query']),
|
|
515
|
+
get_or_init_account: IDL.Func([], [Account], []),
|
|
450
516
|
get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], ['query']),
|
|
517
|
+
get_rate_config: IDL.Func([SegmentKind], [RateConfig], ['query']),
|
|
451
518
|
get_storage_config: IDL.Func([], [StorageConfig], ['query']),
|
|
452
519
|
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
453
520
|
http_request_streaming_callback: IDL.Func(
|
|
@@ -462,21 +529,29 @@ export const idlFactory = ({IDL}) => {
|
|
|
462
529
|
[IDL.Vec(IDL.Tuple(IDL.Text, InitUploadResult))],
|
|
463
530
|
[]
|
|
464
531
|
),
|
|
465
|
-
init_user_mission_control_center: IDL.Func([], [Account], []),
|
|
466
532
|
list_accounts: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Account))], ['query']),
|
|
467
533
|
list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
|
|
468
534
|
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
|
|
469
535
|
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
|
|
470
|
-
|
|
536
|
+
list_icp_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, IcpPayment))], ['query']),
|
|
537
|
+
list_icrc_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IcrcPaymentKey, IcrcPayment))], ['query']),
|
|
471
538
|
list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], ['query']),
|
|
539
|
+
list_segments: IDL.Func(
|
|
540
|
+
[ListSegmentsArgs],
|
|
541
|
+
[IDL.Vec(IDL.Tuple(SegmentKey, Segment))],
|
|
542
|
+
['query']
|
|
543
|
+
),
|
|
472
544
|
reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
|
|
473
545
|
set_auth_config: IDL.Func([SetAuthenticationConfig], [AuthenticationConfig], []),
|
|
474
546
|
set_controllers: IDL.Func([SetControllersArgs], [], []),
|
|
475
547
|
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
476
|
-
set_fee: IDL.Func([SegmentKind,
|
|
548
|
+
set_fee: IDL.Func([SegmentKind, FeesArgs], [], []),
|
|
549
|
+
set_rate_config: IDL.Func([SegmentKind, RateConfig], [], []),
|
|
550
|
+
set_segment: IDL.Func([SetSegmentsArgs], [Segment], []),
|
|
551
|
+
set_segment_metadata: IDL.Func([SetSegmentMetadataArgs], [Segment], []),
|
|
477
552
|
set_storage_config: IDL.Func([SetStorageConfig], [StorageConfig], []),
|
|
478
553
|
submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
|
|
479
|
-
|
|
554
|
+
unset_segment: IDL.Func([UnsetSegmentsArgs], [], []),
|
|
480
555
|
upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
|
|
481
556
|
});
|
|
482
557
|
};
|
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
+
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
+
|
|
9
|
+
import type { ActorMethod } from '@icp-sdk/core/agent';
|
|
10
|
+
import type { IDL } from '@icp-sdk/core/candid';
|
|
11
|
+
import type { Principal } from '@icp-sdk/core/principal';
|
|
12
|
+
|
|
13
|
+
export interface Account {
|
|
14
|
+
updated_at: bigint;
|
|
15
|
+
credits: Tokens;
|
|
16
|
+
mission_control_id: [] | [Principal];
|
|
17
|
+
provider: [] | [Provider];
|
|
18
|
+
owner: Principal;
|
|
19
|
+
created_at: bigint;
|
|
20
|
+
}
|
|
21
|
+
export interface AssertMissionControlCenterArgs {
|
|
22
|
+
mission_control_id: Principal;
|
|
23
|
+
user: Principal;
|
|
24
|
+
}
|
|
25
|
+
export interface AssetEncodingNoContent {
|
|
26
|
+
modified: bigint;
|
|
27
|
+
sha256: Uint8Array;
|
|
28
|
+
total_length: bigint;
|
|
29
|
+
}
|
|
30
|
+
export interface AssetKey {
|
|
31
|
+
token: [] | [string];
|
|
32
|
+
collection: string;
|
|
33
|
+
owner: Principal;
|
|
34
|
+
name: string;
|
|
35
|
+
description: [] | [string];
|
|
36
|
+
full_path: string;
|
|
37
|
+
}
|
|
38
|
+
export interface AssetNoContent {
|
|
39
|
+
key: AssetKey;
|
|
40
|
+
updated_at: bigint;
|
|
41
|
+
encodings: Array<[string, AssetEncodingNoContent]>;
|
|
42
|
+
headers: Array<[string, string]>;
|
|
43
|
+
created_at: bigint;
|
|
44
|
+
version: [] | [bigint];
|
|
45
|
+
}
|
|
46
|
+
export interface AssetsUpgradeOptions {
|
|
47
|
+
clear_existing_assets: [] | [boolean];
|
|
48
|
+
}
|
|
49
|
+
export interface Authentication {
|
|
50
|
+
delegation: PreparedDelegation;
|
|
51
|
+
account: Account;
|
|
52
|
+
}
|
|
53
|
+
export type AuthenticationArgs = { OpenId: OpenIdPrepareDelegationArgs };
|
|
54
|
+
export interface AuthenticationConfig {
|
|
55
|
+
updated_at: [] | [bigint];
|
|
56
|
+
openid: [] | [AuthenticationConfigOpenId];
|
|
57
|
+
created_at: [] | [bigint];
|
|
58
|
+
version: [] | [bigint];
|
|
59
|
+
internet_identity: [] | [AuthenticationConfigInternetIdentity];
|
|
60
|
+
rules: [] | [AuthenticationRules];
|
|
61
|
+
}
|
|
62
|
+
export interface AuthenticationConfigInternetIdentity {
|
|
63
|
+
derivation_origin: [] | [string];
|
|
64
|
+
external_alternative_origins: [] | [Array<string>];
|
|
65
|
+
}
|
|
66
|
+
export interface AuthenticationConfigOpenId {
|
|
67
|
+
observatory_id: [] | [Principal];
|
|
68
|
+
providers: Array<[OpenIdProvider, OpenIdProviderConfig]>;
|
|
69
|
+
}
|
|
70
|
+
export type AuthenticationError =
|
|
71
|
+
| {
|
|
72
|
+
PrepareDelegation: PrepareDelegationError;
|
|
73
|
+
}
|
|
74
|
+
| { RegisterUser: string };
|
|
75
|
+
export interface AuthenticationRules {
|
|
76
|
+
allowed_callers: Array<Principal>;
|
|
77
|
+
}
|
|
78
|
+
export interface CommitBatch {
|
|
79
|
+
batch_id: bigint;
|
|
80
|
+
headers: Array<[string, string]>;
|
|
81
|
+
chunk_ids: Array<bigint>;
|
|
82
|
+
}
|
|
83
|
+
export interface CommitProposal {
|
|
84
|
+
sha256: Uint8Array;
|
|
85
|
+
proposal_id: bigint;
|
|
86
|
+
}
|
|
87
|
+
export interface Config {
|
|
88
|
+
authentication: [] | [AuthenticationConfig];
|
|
89
|
+
storage: StorageConfig;
|
|
90
|
+
}
|
|
91
|
+
export interface ConfigMaxMemorySize {
|
|
92
|
+
stable: [] | [bigint];
|
|
93
|
+
heap: [] | [bigint];
|
|
94
|
+
}
|
|
95
|
+
export interface Controller {
|
|
96
|
+
updated_at: bigint;
|
|
97
|
+
metadata: Array<[string, string]>;
|
|
98
|
+
created_at: bigint;
|
|
99
|
+
scope: ControllerScope;
|
|
100
|
+
expires_at: [] | [bigint];
|
|
101
|
+
}
|
|
102
|
+
export type ControllerScope = { Write: null } | { Admin: null } | { Submit: null };
|
|
103
|
+
export interface CreateOrbiterArgs {
|
|
104
|
+
block_index: [] | [bigint];
|
|
105
|
+
subnet_id: [] | [Principal];
|
|
106
|
+
user: Principal;
|
|
107
|
+
}
|
|
108
|
+
export interface CreateSatelliteArgs {
|
|
109
|
+
block_index: [] | [bigint];
|
|
110
|
+
subnet_id: [] | [Principal];
|
|
111
|
+
storage: [] | [InitStorageArgs];
|
|
112
|
+
user: Principal;
|
|
113
|
+
}
|
|
114
|
+
export interface CustomDomain {
|
|
115
|
+
updated_at: bigint;
|
|
116
|
+
created_at: bigint;
|
|
117
|
+
version: [] | [bigint];
|
|
118
|
+
bn_id: [] | [string];
|
|
119
|
+
}
|
|
120
|
+
export interface Delegation {
|
|
121
|
+
pubkey: Uint8Array;
|
|
122
|
+
targets: [] | [Array<Principal>];
|
|
123
|
+
expiration: bigint;
|
|
124
|
+
}
|
|
125
|
+
export interface DeleteControllersArgs {
|
|
126
|
+
controllers: Array<Principal>;
|
|
127
|
+
}
|
|
128
|
+
export interface DeleteProposalAssets {
|
|
129
|
+
proposal_ids: Array<bigint>;
|
|
130
|
+
}
|
|
131
|
+
export interface GetCreateCanisterFeeArgs {
|
|
132
|
+
user: Principal;
|
|
133
|
+
}
|
|
134
|
+
export type GetDelegationArgs = { OpenId: OpenIdGetDelegationArgs };
|
|
135
|
+
export type GetDelegationError =
|
|
136
|
+
| { JwtFindProvider: JwtFindProviderError }
|
|
137
|
+
| { GetCachedJwks: null }
|
|
138
|
+
| { NoSuchDelegation: null }
|
|
139
|
+
| { JwtVerify: JwtVerifyError }
|
|
140
|
+
| { GetOrFetchJwks: GetOrRefreshJwksError }
|
|
141
|
+
| { DeriveSeedFailed: string };
|
|
142
|
+
export type GetOrRefreshJwksError =
|
|
143
|
+
| { InvalidConfig: string }
|
|
144
|
+
| { MissingKid: null }
|
|
145
|
+
| { BadClaim: string }
|
|
146
|
+
| { KeyNotFoundCooldown: null }
|
|
147
|
+
| { CertificateNotFound: null }
|
|
148
|
+
| { BadSig: string }
|
|
149
|
+
| { MissingLastAttempt: string }
|
|
150
|
+
| { KeyNotFound: null }
|
|
151
|
+
| { FetchFailed: string };
|
|
152
|
+
export interface HttpRequest {
|
|
153
|
+
url: string;
|
|
154
|
+
method: string;
|
|
155
|
+
body: Uint8Array;
|
|
156
|
+
headers: Array<[string, string]>;
|
|
157
|
+
certificate_version: [] | [number];
|
|
158
|
+
}
|
|
159
|
+
export interface HttpResponse {
|
|
160
|
+
body: Uint8Array;
|
|
161
|
+
headers: Array<[string, string]>;
|
|
162
|
+
streaming_strategy: [] | [StreamingStrategy];
|
|
163
|
+
status_code: number;
|
|
164
|
+
}
|
|
165
|
+
export interface InitAssetKey {
|
|
166
|
+
token: [] | [string];
|
|
167
|
+
collection: string;
|
|
168
|
+
name: string;
|
|
169
|
+
description: [] | [string];
|
|
170
|
+
encoding_type: [] | [string];
|
|
171
|
+
full_path: string;
|
|
172
|
+
}
|
|
173
|
+
export interface InitStorageArgs {
|
|
174
|
+
system_memory: [] | [InitStorageMemory];
|
|
175
|
+
}
|
|
176
|
+
export type InitStorageMemory = { Heap: null } | { Stable: null };
|
|
177
|
+
export interface InitUploadResult {
|
|
178
|
+
batch_id: bigint;
|
|
179
|
+
}
|
|
180
|
+
export type JwtFindProviderError =
|
|
181
|
+
| { BadClaim: string }
|
|
182
|
+
| { BadSig: string }
|
|
183
|
+
| { NoMatchingProvider: null };
|
|
184
|
+
export type JwtVerifyError =
|
|
185
|
+
| { WrongKeyType: null }
|
|
186
|
+
| { MissingKid: null }
|
|
187
|
+
| { BadClaim: string }
|
|
188
|
+
| { BadSig: string }
|
|
189
|
+
| { NoKeyForKid: null };
|
|
190
|
+
export interface ListMatcher {
|
|
191
|
+
key: [] | [string];
|
|
192
|
+
updated_at: [] | [TimestampMatcher];
|
|
193
|
+
description: [] | [string];
|
|
194
|
+
created_at: [] | [TimestampMatcher];
|
|
195
|
+
}
|
|
196
|
+
export interface ListOrder {
|
|
197
|
+
field: ListOrderField;
|
|
198
|
+
desc: boolean;
|
|
199
|
+
}
|
|
200
|
+
export type ListOrderField = { UpdatedAt: null } | { Keys: null } | { CreatedAt: null };
|
|
201
|
+
export interface ListPaginate {
|
|
202
|
+
start_after: [] | [string];
|
|
203
|
+
limit: [] | [bigint];
|
|
204
|
+
}
|
|
205
|
+
export interface ListParams {
|
|
206
|
+
order: [] | [ListOrder];
|
|
207
|
+
owner: [] | [Principal];
|
|
208
|
+
matcher: [] | [ListMatcher];
|
|
209
|
+
paginate: [] | [ListPaginate];
|
|
210
|
+
}
|
|
211
|
+
export interface ListProposalResults {
|
|
212
|
+
matches_length: bigint;
|
|
213
|
+
items: Array<[ProposalKey, Proposal]>;
|
|
214
|
+
items_length: bigint;
|
|
215
|
+
}
|
|
216
|
+
export interface ListProposalsOrder {
|
|
217
|
+
desc: boolean;
|
|
218
|
+
}
|
|
219
|
+
export interface ListProposalsPaginate {
|
|
220
|
+
start_after: [] | [bigint];
|
|
221
|
+
limit: [] | [bigint];
|
|
222
|
+
}
|
|
223
|
+
export interface ListProposalsParams {
|
|
224
|
+
order: [] | [ListProposalsOrder];
|
|
225
|
+
paginate: [] | [ListProposalsPaginate];
|
|
226
|
+
}
|
|
227
|
+
export interface ListResults {
|
|
228
|
+
matches_pages: [] | [bigint];
|
|
229
|
+
matches_length: bigint;
|
|
230
|
+
items_page: [] | [bigint];
|
|
231
|
+
items: Array<[string, AssetNoContent]>;
|
|
232
|
+
items_length: bigint;
|
|
233
|
+
}
|
|
234
|
+
export type Memory = { Heap: null } | { Stable: null };
|
|
235
|
+
export interface OpenId {
|
|
236
|
+
provider: OpenIdProvider;
|
|
237
|
+
data: OpenIdData;
|
|
238
|
+
}
|
|
239
|
+
export interface OpenIdData {
|
|
240
|
+
name: [] | [string];
|
|
241
|
+
locale: [] | [string];
|
|
242
|
+
family_name: [] | [string];
|
|
243
|
+
email: [] | [string];
|
|
244
|
+
picture: [] | [string];
|
|
245
|
+
given_name: [] | [string];
|
|
246
|
+
}
|
|
247
|
+
export interface OpenIdGetDelegationArgs {
|
|
248
|
+
jwt: string;
|
|
249
|
+
session_key: Uint8Array;
|
|
250
|
+
salt: Uint8Array;
|
|
251
|
+
expiration: bigint;
|
|
252
|
+
}
|
|
253
|
+
export interface OpenIdPrepareDelegationArgs {
|
|
254
|
+
jwt: string;
|
|
255
|
+
session_key: Uint8Array;
|
|
256
|
+
salt: Uint8Array;
|
|
257
|
+
}
|
|
258
|
+
export type OpenIdProvider = { Google: null };
|
|
259
|
+
export interface OpenIdProviderConfig {
|
|
260
|
+
delegation: [] | [OpenIdProviderDelegationConfig];
|
|
261
|
+
client_id: string;
|
|
262
|
+
}
|
|
263
|
+
export interface OpenIdProviderDelegationConfig {
|
|
264
|
+
targets: [] | [Array<Principal>];
|
|
265
|
+
max_time_to_live: [] | [bigint];
|
|
266
|
+
}
|
|
267
|
+
export interface Payment {
|
|
268
|
+
status: PaymentStatus;
|
|
269
|
+
updated_at: bigint;
|
|
270
|
+
block_index_payment: bigint;
|
|
271
|
+
mission_control_id: [] | [Principal];
|
|
272
|
+
created_at: bigint;
|
|
273
|
+
block_index_refunded: [] | [bigint];
|
|
274
|
+
}
|
|
275
|
+
export type PaymentStatus = { Refunded: null } | { Acknowledged: null } | { Completed: null };
|
|
276
|
+
export type PrepareDelegationError =
|
|
277
|
+
| {
|
|
278
|
+
JwtFindProvider: JwtFindProviderError;
|
|
279
|
+
}
|
|
280
|
+
| { GetCachedJwks: null }
|
|
281
|
+
| { JwtVerify: JwtVerifyError }
|
|
282
|
+
| { GetOrFetchJwks: GetOrRefreshJwksError }
|
|
283
|
+
| { DeriveSeedFailed: string };
|
|
284
|
+
export interface PreparedDelegation {
|
|
285
|
+
user_key: Uint8Array;
|
|
286
|
+
expiration: bigint;
|
|
287
|
+
}
|
|
288
|
+
export interface Proposal {
|
|
289
|
+
status: ProposalStatus;
|
|
290
|
+
updated_at: bigint;
|
|
291
|
+
sha256: [] | [Uint8Array];
|
|
292
|
+
executed_at: [] | [bigint];
|
|
293
|
+
owner: Principal;
|
|
294
|
+
created_at: bigint;
|
|
295
|
+
version: [] | [bigint];
|
|
296
|
+
proposal_type: ProposalType;
|
|
297
|
+
}
|
|
298
|
+
export interface ProposalKey {
|
|
299
|
+
proposal_id: bigint;
|
|
300
|
+
}
|
|
301
|
+
export type ProposalStatus =
|
|
302
|
+
| { Initialized: null }
|
|
303
|
+
| { Failed: null }
|
|
304
|
+
| { Open: null }
|
|
305
|
+
| { Rejected: null }
|
|
306
|
+
| { Executed: null }
|
|
307
|
+
| { Accepted: null };
|
|
308
|
+
export type ProposalType =
|
|
309
|
+
| { AssetsUpgrade: AssetsUpgradeOptions }
|
|
310
|
+
| { SegmentsDeployment: SegmentsDeploymentOptions };
|
|
311
|
+
export type Provider = { InternetIdentity: null } | { OpenId: OpenId };
|
|
312
|
+
export interface RateConfig {
|
|
313
|
+
max_tokens: bigint;
|
|
314
|
+
time_per_token_ns: bigint;
|
|
315
|
+
}
|
|
316
|
+
export type Result = { Ok: Authentication } | { Err: AuthenticationError };
|
|
317
|
+
export type Result_1 = { Ok: SignedDelegation } | { Err: GetDelegationError };
|
|
318
|
+
export type SegmentKind = { Orbiter: null } | { MissionControl: null } | { Satellite: null };
|
|
319
|
+
export interface SegmentsDeploymentOptions {
|
|
320
|
+
orbiter: [] | [string];
|
|
321
|
+
mission_control_version: [] | [string];
|
|
322
|
+
satellite_version: [] | [string];
|
|
323
|
+
}
|
|
324
|
+
export interface SetAuthenticationConfig {
|
|
325
|
+
openid: [] | [AuthenticationConfigOpenId];
|
|
326
|
+
version: [] | [bigint];
|
|
327
|
+
internet_identity: [] | [AuthenticationConfigInternetIdentity];
|
|
328
|
+
rules: [] | [AuthenticationRules];
|
|
329
|
+
}
|
|
330
|
+
export interface SetController {
|
|
331
|
+
metadata: Array<[string, string]>;
|
|
332
|
+
scope: ControllerScope;
|
|
333
|
+
expires_at: [] | [bigint];
|
|
334
|
+
}
|
|
335
|
+
export interface SetControllersArgs {
|
|
336
|
+
controller: SetController;
|
|
337
|
+
controllers: Array<Principal>;
|
|
338
|
+
}
|
|
339
|
+
export interface SetStorageConfig {
|
|
340
|
+
iframe: [] | [StorageConfigIFrame];
|
|
341
|
+
rewrites: Array<[string, string]>;
|
|
342
|
+
headers: Array<[string, Array<[string, string]>]>;
|
|
343
|
+
version: [] | [bigint];
|
|
344
|
+
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
345
|
+
raw_access: [] | [StorageConfigRawAccess];
|
|
346
|
+
redirects: [] | [Array<[string, StorageConfigRedirect]>];
|
|
347
|
+
}
|
|
348
|
+
export interface SignedDelegation {
|
|
349
|
+
signature: Uint8Array;
|
|
350
|
+
delegation: Delegation;
|
|
351
|
+
}
|
|
352
|
+
export interface StorageConfig {
|
|
353
|
+
iframe: [] | [StorageConfigIFrame];
|
|
354
|
+
updated_at: [] | [bigint];
|
|
355
|
+
rewrites: Array<[string, string]>;
|
|
356
|
+
headers: Array<[string, Array<[string, string]>]>;
|
|
357
|
+
created_at: [] | [bigint];
|
|
358
|
+
version: [] | [bigint];
|
|
359
|
+
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
360
|
+
raw_access: [] | [StorageConfigRawAccess];
|
|
361
|
+
redirects: [] | [Array<[string, StorageConfigRedirect]>];
|
|
362
|
+
}
|
|
363
|
+
export type StorageConfigIFrame = { Deny: null } | { AllowAny: null } | { SameOrigin: null };
|
|
364
|
+
export type StorageConfigRawAccess = { Deny: null } | { Allow: null };
|
|
365
|
+
export interface StorageConfigRedirect {
|
|
366
|
+
status_code: number;
|
|
367
|
+
location: string;
|
|
368
|
+
}
|
|
369
|
+
export interface StreamingCallbackHttpResponse {
|
|
370
|
+
token: [] | [StreamingCallbackToken];
|
|
371
|
+
body: Uint8Array;
|
|
372
|
+
}
|
|
373
|
+
export interface StreamingCallbackToken {
|
|
374
|
+
memory: Memory;
|
|
375
|
+
token: [] | [string];
|
|
376
|
+
sha256: [] | [Uint8Array];
|
|
377
|
+
headers: Array<[string, string]>;
|
|
378
|
+
index: bigint;
|
|
379
|
+
encoding_type: string;
|
|
380
|
+
full_path: string;
|
|
381
|
+
}
|
|
382
|
+
export type StreamingStrategy = {
|
|
383
|
+
Callback: {
|
|
384
|
+
token: StreamingCallbackToken;
|
|
385
|
+
callback: [Principal, string];
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
export type TimestampMatcher =
|
|
389
|
+
| { Equal: bigint }
|
|
390
|
+
| { Between: [bigint, bigint] }
|
|
391
|
+
| { GreaterThan: bigint }
|
|
392
|
+
| { LessThan: bigint };
|
|
393
|
+
export interface Tokens {
|
|
394
|
+
e8s: bigint;
|
|
395
|
+
}
|
|
396
|
+
export interface UploadChunk {
|
|
397
|
+
content: Uint8Array;
|
|
398
|
+
batch_id: bigint;
|
|
399
|
+
order_id: [] | [bigint];
|
|
400
|
+
}
|
|
401
|
+
export interface UploadChunkResult {
|
|
402
|
+
chunk_id: bigint;
|
|
403
|
+
}
|
|
404
|
+
export interface _SERVICE {
|
|
405
|
+
add_credits: ActorMethod<[Principal, Tokens], undefined>;
|
|
406
|
+
add_invitation_code: ActorMethod<[string], undefined>;
|
|
407
|
+
assert_mission_control_center: ActorMethod<[AssertMissionControlCenterArgs], undefined>;
|
|
408
|
+
authenticate: ActorMethod<[AuthenticationArgs], Result>;
|
|
409
|
+
commit_proposal: ActorMethod<[CommitProposal], null>;
|
|
410
|
+
commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
|
|
411
|
+
commit_proposal_many_assets_upload: ActorMethod<[Array<CommitBatch>], undefined>;
|
|
412
|
+
count_proposals: ActorMethod<[], bigint>;
|
|
413
|
+
create_orbiter: ActorMethod<[CreateOrbiterArgs], Principal>;
|
|
414
|
+
create_satellite: ActorMethod<[CreateSatelliteArgs], Principal>;
|
|
415
|
+
del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
|
|
416
|
+
del_custom_domain: ActorMethod<[string], undefined>;
|
|
417
|
+
delete_proposal_assets: ActorMethod<[DeleteProposalAssets], undefined>;
|
|
418
|
+
get_account: ActorMethod<[], [] | [Account]>;
|
|
419
|
+
get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>;
|
|
420
|
+
get_config: ActorMethod<[], Config>;
|
|
421
|
+
get_create_fee: ActorMethod<[SegmentKind], [] | [Tokens]>;
|
|
422
|
+
get_create_orbiter_fee: ActorMethod<[GetCreateCanisterFeeArgs], [] | [Tokens]>;
|
|
423
|
+
get_create_satellite_fee: ActorMethod<[GetCreateCanisterFeeArgs], [] | [Tokens]>;
|
|
424
|
+
get_credits: ActorMethod<[], Tokens>;
|
|
425
|
+
get_delegation: ActorMethod<[GetDelegationArgs], Result_1>;
|
|
426
|
+
get_proposal: ActorMethod<[bigint], [] | [Proposal]>;
|
|
427
|
+
get_storage_config: ActorMethod<[], StorageConfig>;
|
|
428
|
+
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
429
|
+
http_request_streaming_callback: ActorMethod<
|
|
430
|
+
[StreamingCallbackToken],
|
|
431
|
+
StreamingCallbackHttpResponse
|
|
432
|
+
>;
|
|
433
|
+
init_proposal: ActorMethod<[ProposalType], [bigint, Proposal]>;
|
|
434
|
+
init_proposal_asset_upload: ActorMethod<[InitAssetKey, bigint], InitUploadResult>;
|
|
435
|
+
init_proposal_many_assets_upload: ActorMethod<
|
|
436
|
+
[Array<InitAssetKey>, bigint],
|
|
437
|
+
Array<[string, InitUploadResult]>
|
|
438
|
+
>;
|
|
439
|
+
init_user_mission_control_center: ActorMethod<[], Account>;
|
|
440
|
+
list_accounts: ActorMethod<[], Array<[Principal, Account]>>;
|
|
441
|
+
list_assets: ActorMethod<[string, ListParams], ListResults>;
|
|
442
|
+
list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
443
|
+
list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
|
|
444
|
+
list_payments: ActorMethod<[], Array<[bigint, Payment]>>;
|
|
445
|
+
list_proposals: ActorMethod<[ListProposalsParams], ListProposalResults>;
|
|
446
|
+
reject_proposal: ActorMethod<[CommitProposal], null>;
|
|
447
|
+
set_auth_config: ActorMethod<[SetAuthenticationConfig], AuthenticationConfig>;
|
|
448
|
+
set_controllers: ActorMethod<[SetControllersArgs], undefined>;
|
|
449
|
+
set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
|
|
450
|
+
set_fee: ActorMethod<[SegmentKind, Tokens], undefined>;
|
|
451
|
+
set_storage_config: ActorMethod<[SetStorageConfig], StorageConfig>;
|
|
452
|
+
submit_proposal: ActorMethod<[bigint], [bigint, Proposal]>;
|
|
453
|
+
update_rate_config: ActorMethod<[SegmentKind, RateConfig], undefined>;
|
|
454
|
+
upload_proposal_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
|
|
455
|
+
}
|
|
456
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
457
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|