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