@junobuild/ic-client 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +228 -218
- package/declarations/console/console.factory.certified.did.js +14 -1
- package/declarations/console/console.factory.did.js +14 -1
- package/declarations/console/console.factory.did.mjs +14 -1
- package/declarations/deprecated/console-0-0-14.did.d.ts +186 -186
- package/declarations/deprecated/console-0-0-8-patch1.did.d.ts +49 -49
- package/declarations/deprecated/mission_control-0-0-13.did.d.ts +173 -173
- package/declarations/deprecated/mission_control-0-0-14.did.d.ts +167 -167
- package/declarations/deprecated/mission_control-0-0-4.did.d.ts +57 -57
- package/declarations/deprecated/observatory-0-0-9.did.d.ts +42 -42
- package/declarations/deprecated/orbiter-0-0-6.did.d.ts +111 -111
- package/declarations/deprecated/orbiter-0-0-7.did.d.ts +116 -116
- package/declarations/deprecated/orbiter-0-0-8.did.d.ts +177 -177
- package/declarations/deprecated/orbiter-0-2-0.did.d.ts +203 -203
- package/declarations/deprecated/satellite-0-0-16.did.d.ts +174 -170
- package/declarations/deprecated/satellite-0-0-17.did.d.ts +185 -181
- package/declarations/deprecated/satellite-0-0-21.did.d.ts +216 -212
- package/declarations/deprecated/satellite-0-0-22.did.d.ts +211 -207
- package/declarations/deprecated/satellite-0-0-8.did.d.ts +125 -121
- package/declarations/deprecated/satellite-0-0-9.did.d.ts +139 -135
- package/declarations/mission_control/mission_control.did.d.ts +178 -169
- package/declarations/mission_control/mission_control.factory.certified.did.js +16 -4
- package/declarations/mission_control/mission_control.factory.did.js +16 -4
- package/declarations/observatory/observatory.did.d.ts +54 -54
- package/declarations/orbiter/orbiter.did.d.ts +206 -206
- package/declarations/orbiter/orbiter.factory.certified.did.js +7 -3
- package/declarations/orbiter/orbiter.factory.did.js +7 -3
- package/declarations/orbiter/orbiter.factory.did.mjs +7 -3
- package/declarations/satellite/satellite.did.d.ts +294 -285
- package/declarations/satellite/satellite.factory.certified.did.js +1 -0
- package/declarations/satellite/satellite.factory.did.js +1 -0
- package/declarations/satellite/satellite.factory.did.mjs +1 -0
- package/declarations/sputnik/sputnik.did.d.ts +294 -285
- package/declarations/sputnik/sputnik.factory.certified.did.js +1 -0
- package/declarations/sputnik/sputnik.factory.did.js +1 -0
- package/package.json +1 -1
|
@@ -1,244 +1,253 @@
|
|
|
1
|
-
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
-
import type {IDL} from '@dfinity/candid';
|
|
3
|
-
import type {Principal} from '@dfinity/principal';
|
|
1
|
+
import type { ActorMethod } from '@dfinity/agent';
|
|
2
|
+
import type { IDL } from '@dfinity/candid';
|
|
3
|
+
import type { Principal } from '@dfinity/principal';
|
|
4
4
|
|
|
5
5
|
export interface Account {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
owner: Principal;
|
|
7
|
+
subaccount: [] | [Uint8Array | number[]];
|
|
8
8
|
}
|
|
9
9
|
export interface Config {
|
|
10
|
-
|
|
10
|
+
monitoring: [] | [MonitoringConfig];
|
|
11
11
|
}
|
|
12
12
|
export interface Controller {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
updated_at: bigint;
|
|
14
|
+
metadata: Array<[string, string]>;
|
|
15
|
+
created_at: bigint;
|
|
16
|
+
scope: ControllerScope;
|
|
17
|
+
expires_at: [] | [bigint];
|
|
18
18
|
}
|
|
19
|
-
export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null};
|
|
19
|
+
export type ControllerScope = { Write: null } | { Admin: null } | { Submit: null };
|
|
20
20
|
export interface CreateCanisterConfig {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
subnet_id: [] | [Principal];
|
|
22
|
+
name: [] | [string];
|
|
23
|
+
}
|
|
24
|
+
export interface CreateSatelliteConfig {
|
|
25
|
+
subnet_id: [] | [Principal];
|
|
26
|
+
storage: [] | [InitStorageArgs];
|
|
27
|
+
name: [] | [string];
|
|
23
28
|
}
|
|
24
29
|
export interface CyclesBalance {
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
timestamp: bigint;
|
|
31
|
+
amount: bigint;
|
|
27
32
|
}
|
|
28
33
|
export interface CyclesMonitoring {
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
strategy: [] | [CyclesMonitoringStrategy];
|
|
35
|
+
enabled: boolean;
|
|
31
36
|
}
|
|
32
37
|
export interface CyclesMonitoringConfig {
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
notification: [] | [DepositedCyclesEmailNotification];
|
|
39
|
+
default_strategy: [] | [CyclesMonitoringStrategy];
|
|
35
40
|
}
|
|
36
41
|
export interface CyclesMonitoringStartConfig {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
orbiters_strategy: [] | [SegmentsMonitoringStrategy];
|
|
43
|
+
mission_control_strategy: [] | [CyclesMonitoringStrategy];
|
|
44
|
+
satellites_strategy: [] | [SegmentsMonitoringStrategy];
|
|
40
45
|
}
|
|
41
46
|
export interface CyclesMonitoringStatus {
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
monitored_ids: Array<Principal>;
|
|
48
|
+
running: boolean;
|
|
44
49
|
}
|
|
45
50
|
export interface CyclesMonitoringStopConfig {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
satellite_ids: [] | [Array<Principal>];
|
|
52
|
+
try_mission_control: [] | [boolean];
|
|
53
|
+
orbiter_ids: [] | [Array<Principal>];
|
|
49
54
|
}
|
|
50
|
-
export type CyclesMonitoringStrategy = {BelowThreshold: CyclesThreshold};
|
|
55
|
+
export type CyclesMonitoringStrategy = { BelowThreshold: CyclesThreshold };
|
|
51
56
|
export interface CyclesThreshold {
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
fund_cycles: bigint;
|
|
58
|
+
min_cycles: bigint;
|
|
54
59
|
}
|
|
55
60
|
export interface DepositCyclesArgs {
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
cycles: bigint;
|
|
62
|
+
destination_id: Principal;
|
|
58
63
|
}
|
|
59
64
|
export interface DepositedCyclesEmailNotification {
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
to: [] | [string];
|
|
66
|
+
enabled: boolean;
|
|
62
67
|
}
|
|
63
68
|
export type FundingErrorCode =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
| { BalanceCheckFailed: null }
|
|
70
|
+
| { ObtainCyclesFailed: null }
|
|
71
|
+
| { DepositFailed: null }
|
|
72
|
+
| { InsufficientCycles: null }
|
|
73
|
+
| { Other: string };
|
|
69
74
|
export interface FundingFailure {
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
timestamp: bigint;
|
|
76
|
+
error_code: FundingErrorCode;
|
|
72
77
|
}
|
|
73
78
|
export interface GetMonitoringHistory {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
to: [] | [bigint];
|
|
80
|
+
from: [] | [bigint];
|
|
81
|
+
segment_id: Principal;
|
|
82
|
+
}
|
|
83
|
+
export interface InitMissionControlArgs {
|
|
84
|
+
user: Principal;
|
|
77
85
|
}
|
|
78
|
-
export interface
|
|
79
|
-
|
|
86
|
+
export interface InitStorageArgs {
|
|
87
|
+
system_memory: [] | [InitStorageMemory];
|
|
80
88
|
}
|
|
89
|
+
export type InitStorageMemory = { Heap: null } | { Stable: null };
|
|
81
90
|
export interface MissionControlSettings {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
91
|
+
updated_at: bigint;
|
|
92
|
+
created_at: bigint;
|
|
93
|
+
monitoring: [] | [Monitoring];
|
|
85
94
|
}
|
|
86
95
|
export interface Monitoring {
|
|
87
|
-
|
|
96
|
+
cycles: [] | [CyclesMonitoring];
|
|
88
97
|
}
|
|
89
98
|
export interface MonitoringConfig {
|
|
90
|
-
|
|
99
|
+
cycles: [] | [CyclesMonitoringConfig];
|
|
91
100
|
}
|
|
92
101
|
export interface MonitoringHistory {
|
|
93
|
-
|
|
102
|
+
cycles: [] | [MonitoringHistoryCycles];
|
|
94
103
|
}
|
|
95
104
|
export interface MonitoringHistoryCycles {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
105
|
+
deposited_cycles: [] | [CyclesBalance];
|
|
106
|
+
cycles: CyclesBalance;
|
|
107
|
+
funding_failure: [] | [FundingFailure];
|
|
99
108
|
}
|
|
100
109
|
export interface MonitoringHistoryKey {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
segment_id: Principal;
|
|
111
|
+
created_at: bigint;
|
|
112
|
+
nonce: number;
|
|
104
113
|
}
|
|
105
114
|
export interface MonitoringStartConfig {
|
|
106
|
-
|
|
115
|
+
cycles_config: [] | [CyclesMonitoringStartConfig];
|
|
107
116
|
}
|
|
108
117
|
export interface MonitoringStatus {
|
|
109
|
-
|
|
118
|
+
cycles: [] | [CyclesMonitoringStatus];
|
|
110
119
|
}
|
|
111
120
|
export interface MonitoringStopConfig {
|
|
112
|
-
|
|
121
|
+
cycles_config: [] | [CyclesMonitoringStopConfig];
|
|
113
122
|
}
|
|
114
123
|
export interface Orbiter {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
export type Result = {Ok: bigint} | {Err: TransferError};
|
|
122
|
-
export type Result_1 = {Ok: bigint} | {Err: TransferError_1};
|
|
124
|
+
updated_at: bigint;
|
|
125
|
+
orbiter_id: Principal;
|
|
126
|
+
metadata: Array<[string, string]>;
|
|
127
|
+
created_at: bigint;
|
|
128
|
+
settings: [] | [Settings];
|
|
129
|
+
}
|
|
130
|
+
export type Result = { Ok: bigint } | { Err: TransferError };
|
|
131
|
+
export type Result_1 = { Ok: bigint } | { Err: TransferError_1 };
|
|
123
132
|
export interface Satellite {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
133
|
+
updated_at: bigint;
|
|
134
|
+
metadata: Array<[string, string]>;
|
|
135
|
+
created_at: bigint;
|
|
136
|
+
satellite_id: Principal;
|
|
137
|
+
settings: [] | [Settings];
|
|
129
138
|
}
|
|
130
139
|
export interface SegmentsMonitoringStrategy {
|
|
131
|
-
|
|
132
|
-
|
|
140
|
+
ids: Array<Principal>;
|
|
141
|
+
strategy: CyclesMonitoringStrategy;
|
|
133
142
|
}
|
|
134
143
|
export interface SetController {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
144
|
+
metadata: Array<[string, string]>;
|
|
145
|
+
scope: ControllerScope;
|
|
146
|
+
expires_at: [] | [bigint];
|
|
138
147
|
}
|
|
139
148
|
export interface Settings {
|
|
140
|
-
|
|
149
|
+
monitoring: [] | [Monitoring];
|
|
141
150
|
}
|
|
142
151
|
export interface Timestamp {
|
|
143
|
-
|
|
152
|
+
timestamp_nanos: bigint;
|
|
144
153
|
}
|
|
145
154
|
export interface Tokens {
|
|
146
|
-
|
|
155
|
+
e8s: bigint;
|
|
147
156
|
}
|
|
148
157
|
export interface TransferArg {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
to: Account;
|
|
159
|
+
fee: [] | [bigint];
|
|
160
|
+
memo: [] | [Uint8Array | number[]];
|
|
161
|
+
from_subaccount: [] | [Uint8Array | number[]];
|
|
162
|
+
created_at_time: [] | [bigint];
|
|
163
|
+
amount: bigint;
|
|
155
164
|
}
|
|
156
165
|
export interface TransferArgs {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
to: Uint8Array | number[];
|
|
167
|
+
fee: Tokens;
|
|
168
|
+
memo: bigint;
|
|
169
|
+
from_subaccount: [] | [Uint8Array | number[]];
|
|
170
|
+
created_at_time: [] | [Timestamp];
|
|
171
|
+
amount: Tokens;
|
|
163
172
|
}
|
|
164
173
|
export type TransferError =
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
174
|
+
| {
|
|
175
|
+
TxTooOld: { allowed_window_nanos: bigint };
|
|
176
|
+
}
|
|
177
|
+
| { BadFee: { expected_fee: Tokens } }
|
|
178
|
+
| { TxDuplicate: { duplicate_of: bigint } }
|
|
179
|
+
| { TxCreatedInFuture: null }
|
|
180
|
+
| { InsufficientFunds: { balance: Tokens } };
|
|
172
181
|
export type TransferError_1 =
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
| {
|
|
183
|
+
GenericError: { message: string; error_code: bigint };
|
|
184
|
+
}
|
|
185
|
+
| { TemporarilyUnavailable: null }
|
|
186
|
+
| { BadBurn: { min_burn_amount: bigint } }
|
|
187
|
+
| { Duplicate: { duplicate_of: bigint } }
|
|
188
|
+
| { BadFee: { expected_fee: bigint } }
|
|
189
|
+
| { CreatedInFuture: { ledger_time: bigint } }
|
|
190
|
+
| { TooOld: null }
|
|
191
|
+
| { InsufficientFunds: { balance: bigint } };
|
|
183
192
|
export interface User {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
193
|
+
updated_at: bigint;
|
|
194
|
+
metadata: Array<[string, string]>;
|
|
195
|
+
user: [] | [Principal];
|
|
196
|
+
created_at: bigint;
|
|
197
|
+
config: [] | [Config];
|
|
189
198
|
}
|
|
190
199
|
export interface _SERVICE {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
200
|
+
add_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
|
|
201
|
+
add_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
202
|
+
create_orbiter: ActorMethod<[[] | [string]], Orbiter>;
|
|
203
|
+
create_orbiter_with_config: ActorMethod<[CreateCanisterConfig], Orbiter>;
|
|
204
|
+
create_satellite: ActorMethod<[string], Satellite>;
|
|
205
|
+
create_satellite_with_config: ActorMethod<[CreateSatelliteConfig], Satellite>;
|
|
206
|
+
del_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
|
|
207
|
+
del_orbiter: ActorMethod<[Principal, bigint], undefined>;
|
|
208
|
+
del_orbiters_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
209
|
+
del_satellite: ActorMethod<[Principal, bigint], undefined>;
|
|
210
|
+
del_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
211
|
+
deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
|
|
212
|
+
get_config: ActorMethod<[], [] | [Config]>;
|
|
213
|
+
get_metadata: ActorMethod<[], Array<[string, string]>>;
|
|
214
|
+
get_monitoring_history: ActorMethod<
|
|
215
|
+
[GetMonitoringHistory],
|
|
216
|
+
Array<[MonitoringHistoryKey, MonitoringHistory]>
|
|
217
|
+
>;
|
|
218
|
+
get_monitoring_status: ActorMethod<[], MonitoringStatus>;
|
|
219
|
+
get_settings: ActorMethod<[], [] | [MissionControlSettings]>;
|
|
220
|
+
get_user: ActorMethod<[], Principal>;
|
|
221
|
+
get_user_data: ActorMethod<[], User>;
|
|
222
|
+
icp_transfer: ActorMethod<[TransferArgs], Result>;
|
|
223
|
+
icrc_transfer: ActorMethod<[Principal, TransferArg], Result_1>;
|
|
224
|
+
list_mission_control_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
225
|
+
list_orbiters: ActorMethod<[], Array<[Principal, Orbiter]>>;
|
|
226
|
+
list_satellites: ActorMethod<[], Array<[Principal, Satellite]>>;
|
|
227
|
+
remove_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
|
|
228
|
+
remove_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
229
|
+
set_config: ActorMethod<[[] | [Config]], undefined>;
|
|
230
|
+
set_metadata: ActorMethod<[Array<[string, string]>], undefined>;
|
|
231
|
+
set_mission_control_controllers: ActorMethod<[Array<Principal>, SetController], undefined>;
|
|
232
|
+
set_orbiter: ActorMethod<[Principal, [] | [string]], Orbiter>;
|
|
233
|
+
set_orbiter_metadata: ActorMethod<[Principal, Array<[string, string]>], Orbiter>;
|
|
234
|
+
set_orbiters_controllers: ActorMethod<
|
|
235
|
+
[Array<Principal>, Array<Principal>, SetController],
|
|
236
|
+
undefined
|
|
237
|
+
>;
|
|
238
|
+
set_satellite: ActorMethod<[Principal, [] | [string]], Satellite>;
|
|
239
|
+
set_satellite_metadata: ActorMethod<[Principal, Array<[string, string]>], Satellite>;
|
|
240
|
+
set_satellites_controllers: ActorMethod<
|
|
241
|
+
[Array<Principal>, Array<Principal>, SetController],
|
|
242
|
+
undefined
|
|
243
|
+
>;
|
|
244
|
+
start_monitoring: ActorMethod<[], undefined>;
|
|
245
|
+
stop_monitoring: ActorMethod<[], undefined>;
|
|
246
|
+
top_up: ActorMethod<[Principal, Tokens], undefined>;
|
|
247
|
+
unset_orbiter: ActorMethod<[Principal], undefined>;
|
|
248
|
+
unset_satellite: ActorMethod<[Principal], undefined>;
|
|
249
|
+
update_and_start_monitoring: ActorMethod<[MonitoringStartConfig], undefined>;
|
|
250
|
+
update_and_stop_monitoring: ActorMethod<[MonitoringStopConfig], undefined>;
|
|
242
251
|
}
|
|
243
252
|
export declare const idlFactory: IDL.InterfaceFactory;
|
|
244
|
-
export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
|
|
253
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
export const idlFactory = ({IDL}) => {
|
|
3
|
-
const
|
|
3
|
+
const InitMissionControlArgs = IDL.Record({user: IDL.Principal});
|
|
4
4
|
const CyclesThreshold = IDL.Record({
|
|
5
5
|
fund_cycles: IDL.Nat,
|
|
6
6
|
min_cycles: IDL.Nat
|
|
@@ -32,6 +32,18 @@ export const idlFactory = ({IDL}) => {
|
|
|
32
32
|
satellite_id: IDL.Principal,
|
|
33
33
|
settings: IDL.Opt(Settings)
|
|
34
34
|
});
|
|
35
|
+
const InitStorageMemory = IDL.Variant({
|
|
36
|
+
Heap: IDL.Null,
|
|
37
|
+
Stable: IDL.Null
|
|
38
|
+
});
|
|
39
|
+
const InitStorageArgs = IDL.Record({
|
|
40
|
+
system_memory: IDL.Opt(InitStorageMemory)
|
|
41
|
+
});
|
|
42
|
+
const CreateSatelliteConfig = IDL.Record({
|
|
43
|
+
subnet_id: IDL.Opt(IDL.Principal),
|
|
44
|
+
storage: IDL.Opt(InitStorageArgs),
|
|
45
|
+
name: IDL.Opt(IDL.Text)
|
|
46
|
+
});
|
|
35
47
|
const DepositCyclesArgs = IDL.Record({
|
|
36
48
|
cycles: IDL.Nat,
|
|
37
49
|
destination_id: IDL.Principal
|
|
@@ -187,7 +199,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
187
199
|
create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
|
|
188
200
|
create_orbiter_with_config: IDL.Func([CreateCanisterConfig], [Orbiter], []),
|
|
189
201
|
create_satellite: IDL.Func([IDL.Text], [Satellite], []),
|
|
190
|
-
create_satellite_with_config: IDL.Func([
|
|
202
|
+
create_satellite_with_config: IDL.Func([CreateSatelliteConfig], [Satellite], []),
|
|
191
203
|
del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
|
|
192
204
|
del_orbiter: IDL.Func([IDL.Principal, IDL.Nat], [], []),
|
|
193
205
|
del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
|
|
@@ -256,6 +268,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
256
268
|
};
|
|
257
269
|
// @ts-ignore
|
|
258
270
|
export const init = ({IDL}) => {
|
|
259
|
-
const
|
|
260
|
-
return [
|
|
271
|
+
const InitMissionControlArgs = IDL.Record({user: IDL.Principal});
|
|
272
|
+
return [InitMissionControlArgs];
|
|
261
273
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
export const idlFactory = ({IDL}) => {
|
|
3
|
-
const
|
|
3
|
+
const InitMissionControlArgs = IDL.Record({user: IDL.Principal});
|
|
4
4
|
const CyclesThreshold = IDL.Record({
|
|
5
5
|
fund_cycles: IDL.Nat,
|
|
6
6
|
min_cycles: IDL.Nat
|
|
@@ -32,6 +32,18 @@ export const idlFactory = ({IDL}) => {
|
|
|
32
32
|
satellite_id: IDL.Principal,
|
|
33
33
|
settings: IDL.Opt(Settings)
|
|
34
34
|
});
|
|
35
|
+
const InitStorageMemory = IDL.Variant({
|
|
36
|
+
Heap: IDL.Null,
|
|
37
|
+
Stable: IDL.Null
|
|
38
|
+
});
|
|
39
|
+
const InitStorageArgs = IDL.Record({
|
|
40
|
+
system_memory: IDL.Opt(InitStorageMemory)
|
|
41
|
+
});
|
|
42
|
+
const CreateSatelliteConfig = IDL.Record({
|
|
43
|
+
subnet_id: IDL.Opt(IDL.Principal),
|
|
44
|
+
storage: IDL.Opt(InitStorageArgs),
|
|
45
|
+
name: IDL.Opt(IDL.Text)
|
|
46
|
+
});
|
|
35
47
|
const DepositCyclesArgs = IDL.Record({
|
|
36
48
|
cycles: IDL.Nat,
|
|
37
49
|
destination_id: IDL.Principal
|
|
@@ -187,7 +199,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
187
199
|
create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
|
|
188
200
|
create_orbiter_with_config: IDL.Func([CreateCanisterConfig], [Orbiter], []),
|
|
189
201
|
create_satellite: IDL.Func([IDL.Text], [Satellite], []),
|
|
190
|
-
create_satellite_with_config: IDL.Func([
|
|
202
|
+
create_satellite_with_config: IDL.Func([CreateSatelliteConfig], [Satellite], []),
|
|
191
203
|
del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
|
|
192
204
|
del_orbiter: IDL.Func([IDL.Principal, IDL.Nat], [], []),
|
|
193
205
|
del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
|
|
@@ -256,6 +268,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
256
268
|
};
|
|
257
269
|
// @ts-ignore
|
|
258
270
|
export const init = ({IDL}) => {
|
|
259
|
-
const
|
|
260
|
-
return [
|
|
271
|
+
const InitMissionControlArgs = IDL.Record({user: IDL.Principal});
|
|
272
|
+
return [InitMissionControlArgs];
|
|
261
273
|
};
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
-
import type {IDL} from '@dfinity/candid';
|
|
3
|
-
import type {Principal} from '@dfinity/principal';
|
|
1
|
+
import type { ActorMethod } from '@dfinity/agent';
|
|
2
|
+
import type { IDL } from '@dfinity/candid';
|
|
3
|
+
import type { Principal } from '@dfinity/principal';
|
|
4
4
|
|
|
5
5
|
export interface Controller {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
updated_at: bigint;
|
|
7
|
+
metadata: Array<[string, string]>;
|
|
8
|
+
created_at: bigint;
|
|
9
|
+
scope: ControllerScope;
|
|
10
|
+
expires_at: [] | [bigint];
|
|
11
11
|
}
|
|
12
|
-
export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null};
|
|
12
|
+
export type ControllerScope = { Write: null } | { Admin: null } | { Submit: null };
|
|
13
13
|
export interface CyclesBalance {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
timestamp: bigint;
|
|
15
|
+
amount: bigint;
|
|
16
16
|
}
|
|
17
17
|
export interface DeleteControllersArgs {
|
|
18
|
-
|
|
18
|
+
controllers: Array<Principal>;
|
|
19
19
|
}
|
|
20
20
|
export interface DepositedCyclesEmailNotification {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
to: string;
|
|
22
|
+
deposited_cycles: CyclesBalance;
|
|
23
23
|
}
|
|
24
24
|
export interface Env {
|
|
25
|
-
|
|
25
|
+
email_api_key: [] | [string];
|
|
26
26
|
}
|
|
27
27
|
export interface FailedCyclesDepositEmailNotification {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
to: string;
|
|
29
|
+
funding_failure: FundingFailure;
|
|
30
30
|
}
|
|
31
31
|
export type FundingErrorCode =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
| { BalanceCheckFailed: null }
|
|
33
|
+
| { ObtainCyclesFailed: null }
|
|
34
|
+
| { DepositFailed: null }
|
|
35
|
+
| { InsufficientCycles: null }
|
|
36
|
+
| { Other: string };
|
|
37
37
|
export interface FundingFailure {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
timestamp: bigint;
|
|
39
|
+
error_code: FundingErrorCode;
|
|
40
40
|
}
|
|
41
41
|
export interface GetNotifications {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
to: [] | [bigint];
|
|
43
|
+
from: [] | [bigint];
|
|
44
|
+
segment_id: [] | [Principal];
|
|
45
45
|
}
|
|
46
46
|
export type NotificationKind =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
| {
|
|
48
|
+
DepositedCyclesEmail: DepositedCyclesEmailNotification;
|
|
49
|
+
}
|
|
50
|
+
| { FailedCyclesDepositEmail: FailedCyclesDepositEmailNotification };
|
|
51
51
|
export interface NotifyArgs {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
kind: NotificationKind;
|
|
53
|
+
user: Principal;
|
|
54
|
+
segment: Segment;
|
|
55
55
|
}
|
|
56
56
|
export interface NotifyStatus {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
pending: bigint;
|
|
58
|
+
sent: bigint;
|
|
59
|
+
failed: bigint;
|
|
60
60
|
}
|
|
61
61
|
export interface Segment {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
id: Principal;
|
|
63
|
+
metadata: [] | [Array<[string, string]>];
|
|
64
|
+
kind: SegmentKind;
|
|
65
65
|
}
|
|
66
|
-
export type SegmentKind = {Orbiter: null} | {MissionControl: null} | {Satellite: null};
|
|
66
|
+
export type SegmentKind = { Orbiter: null } | { MissionControl: null } | { Satellite: null };
|
|
67
67
|
export interface SetController {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
metadata: Array<[string, string]>;
|
|
69
|
+
scope: ControllerScope;
|
|
70
|
+
expires_at: [] | [bigint];
|
|
71
71
|
}
|
|
72
72
|
export interface SetControllersArgs {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
controller: SetController;
|
|
74
|
+
controllers: Array<Principal>;
|
|
75
75
|
}
|
|
76
76
|
export interface _SERVICE {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
|
|
78
|
+
get_notify_status: ActorMethod<[GetNotifications], NotifyStatus>;
|
|
79
|
+
list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
80
|
+
notify: ActorMethod<[NotifyArgs], undefined>;
|
|
81
|
+
ping: ActorMethod<[NotifyArgs], undefined>;
|
|
82
|
+
set_controllers: ActorMethod<[SetControllersArgs], undefined>;
|
|
83
|
+
set_env: ActorMethod<[Env], undefined>;
|
|
84
84
|
}
|
|
85
85
|
export declare const idlFactory: IDL.InterfaceFactory;
|
|
86
|
-
export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
|
|
86
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|