@junobuild/ic-client 0.0.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.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist/browser/index.js +2 -0
  4. package/dist/browser/index.js.map +7 -0
  5. package/dist/declarations/console/console.did.d.ts +311 -0
  6. package/dist/declarations/console/console.factory.certified.did.js +326 -0
  7. package/dist/declarations/console/console.factory.did.js +326 -0
  8. package/dist/declarations/console/console.factory.did.mjs +326 -0
  9. package/dist/declarations/deprecated/console-0-0-14.did.d.ts +267 -0
  10. package/dist/declarations/deprecated/console-0-0-14.factory.did.js +285 -0
  11. package/dist/declarations/deprecated/console-0-0-8-patch1.did.d.ts +75 -0
  12. package/dist/declarations/deprecated/console-0-0-8-patch1.factory.did.js +80 -0
  13. package/dist/declarations/deprecated/mission_control-0-0-13.did.d.ts +246 -0
  14. package/dist/declarations/deprecated/mission_control-0-0-13.factory.did.js +280 -0
  15. package/dist/declarations/deprecated/mission_control-0-0-14.did.d.ts +241 -0
  16. package/dist/declarations/deprecated/mission_control-0-0-14.factory.did.js +258 -0
  17. package/dist/declarations/deprecated/mission_control-0-0-4.did.d.ts +80 -0
  18. package/dist/declarations/deprecated/mission_control-0-0-4.factory.did.js +99 -0
  19. package/dist/declarations/deprecated/mission_control-deprecated-version.did.d.ts +231 -0
  20. package/dist/declarations/deprecated/mission_control-deprecated-version.factory.did.js +247 -0
  21. package/dist/declarations/deprecated/observatory-0-0-9.did.d.ts +70 -0
  22. package/dist/declarations/deprecated/observatory-0-0-9.factory.did.js +76 -0
  23. package/dist/declarations/deprecated/orbiter-0-0-6.did.d.ts +161 -0
  24. package/dist/declarations/deprecated/orbiter-0-0-6.factory.did.js +192 -0
  25. package/dist/declarations/deprecated/orbiter-0-0-7.did.d.ts +166 -0
  26. package/dist/declarations/deprecated/orbiter-0-0-7.factory.did.js +197 -0
  27. package/dist/declarations/deprecated/orbiter-0-0-8.did.d.ts +245 -0
  28. package/dist/declarations/deprecated/orbiter-0-0-8.factory.did.js +287 -0
  29. package/dist/declarations/deprecated/orbiter-0-2-0.did.d.ts +277 -0
  30. package/dist/declarations/deprecated/orbiter-0-2-0.factory.did.js +319 -0
  31. package/dist/declarations/deprecated/orbiter-deprecated-version.did.d.ts +229 -0
  32. package/dist/declarations/deprecated/orbiter-deprecated-version.factory.did.js +271 -0
  33. package/dist/declarations/deprecated/satellite-0-0-16.did.d.ts +240 -0
  34. package/dist/declarations/deprecated/satellite-0-0-16.factory.did.js +264 -0
  35. package/dist/declarations/deprecated/satellite-0-0-17.did.d.ts +254 -0
  36. package/dist/declarations/deprecated/satellite-0-0-17.factory.did.js +281 -0
  37. package/dist/declarations/deprecated/satellite-0-0-21.did.d.ts +299 -0
  38. package/dist/declarations/deprecated/satellite-0-0-21.factory.did.js +333 -0
  39. package/dist/declarations/deprecated/satellite-0-0-22.did.d.ts +290 -0
  40. package/dist/declarations/deprecated/satellite-0-0-22.factory.did.js +318 -0
  41. package/dist/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
  42. package/dist/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
  43. package/dist/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
  44. package/dist/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
  45. package/dist/declarations/deprecated/satellite-deprecated-no-scope.did.d.ts +183 -0
  46. package/dist/declarations/deprecated/satellite-deprecated-no-scope.factory.did.js +194 -0
  47. package/dist/declarations/deprecated/satellite-deprecated-no-scope.factory.did.mjs +192 -0
  48. package/dist/declarations/deprecated/satellite-deprecated-version.did.d.ts +291 -0
  49. package/dist/declarations/deprecated/satellite-deprecated-version.factory.did.js +319 -0
  50. package/dist/declarations/deprecated/satellite-deprecated.did.d.ts +182 -0
  51. package/dist/declarations/deprecated/satellite-deprecated.factory.did.js +191 -0
  52. package/dist/declarations/deprecated/satellite-deprecated.factory.did.mjs +191 -0
  53. package/dist/declarations/mission_control/mission_control.did.d.ts +241 -0
  54. package/dist/declarations/mission_control/mission_control.factory.certified.did.js +259 -0
  55. package/dist/declarations/mission_control/mission_control.factory.did.js +259 -0
  56. package/dist/declarations/observatory/observatory.did.d.ts +86 -0
  57. package/dist/declarations/observatory/observatory.factory.certified.did.js +93 -0
  58. package/dist/declarations/observatory/observatory.factory.did.js +93 -0
  59. package/dist/declarations/observatory/observatory.factory.did.mjs +93 -0
  60. package/dist/declarations/orbiter/orbiter.did.d.ts +277 -0
  61. package/dist/declarations/orbiter/orbiter.factory.certified.did.js +304 -0
  62. package/dist/declarations/orbiter/orbiter.factory.did.js +320 -0
  63. package/dist/declarations/orbiter/orbiter.factory.did.mjs +320 -0
  64. package/dist/declarations/satellite/satellite.did.d.ts +396 -0
  65. package/dist/declarations/satellite/satellite.factory.certified.did.js +419 -0
  66. package/dist/declarations/satellite/satellite.factory.did.js +419 -0
  67. package/dist/declarations/satellite/satellite.factory.did.mjs +419 -0
  68. package/dist/declarations/sputnik/sputnik.did.d.ts +396 -0
  69. package/dist/declarations/sputnik/sputnik.factory.certified.did.js +419 -0
  70. package/dist/declarations/sputnik/sputnik.factory.did.js +419 -0
  71. package/dist/index.js +1 -0
  72. package/dist/node/index.mjs +4 -0
  73. package/dist/node/index.mjs.map +7 -0
  74. package/dist/types/api/_agent.api.d.ts +3 -0
  75. package/dist/types/api/actor.api.d.ts +34 -0
  76. package/dist/types/api/actor.factory.d.ts +19 -0
  77. package/dist/types/index.d.ts +2 -0
  78. package/dist/types/types/actor.d.ts +74 -0
  79. package/dist/types/utils/agent.utils.d.ts +6 -0
  80. package/package.json +63 -0
@@ -0,0 +1,259 @@
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 FundingErrorCode = IDL.Variant({
65
+ BalanceCheckFailed: IDL.Null,
66
+ ObtainCyclesFailed: IDL.Null,
67
+ DepositFailed: IDL.Null,
68
+ InsufficientCycles: IDL.Null,
69
+ Other: IDL.Text
70
+ });
71
+ const FundingFailure = IDL.Record({
72
+ timestamp: IDL.Nat64,
73
+ error_code: FundingErrorCode
74
+ });
75
+ const MonitoringHistoryCycles = IDL.Record({
76
+ deposited_cycles: IDL.Opt(CyclesBalance),
77
+ cycles: CyclesBalance,
78
+ funding_failure: IDL.Opt(FundingFailure)
79
+ });
80
+ const MonitoringHistory = IDL.Record({
81
+ cycles: IDL.Opt(MonitoringHistoryCycles)
82
+ });
83
+ const CyclesMonitoringStatus = IDL.Record({
84
+ monitored_ids: IDL.Vec(IDL.Principal),
85
+ running: IDL.Bool
86
+ });
87
+ const MonitoringStatus = IDL.Record({
88
+ cycles: IDL.Opt(CyclesMonitoringStatus)
89
+ });
90
+ const MissionControlSettings = IDL.Record({
91
+ updated_at: IDL.Nat64,
92
+ created_at: IDL.Nat64,
93
+ monitoring: IDL.Opt(Monitoring)
94
+ });
95
+ const User = IDL.Record({
96
+ updated_at: IDL.Nat64,
97
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
98
+ user: IDL.Opt(IDL.Principal),
99
+ created_at: IDL.Nat64,
100
+ config: IDL.Opt(Config)
101
+ });
102
+ const Tokens = IDL.Record({e8s: IDL.Nat64});
103
+ const Timestamp = IDL.Record({timestamp_nanos: IDL.Nat64});
104
+ const TransferArgs = IDL.Record({
105
+ to: IDL.Vec(IDL.Nat8),
106
+ fee: Tokens,
107
+ memo: IDL.Nat64,
108
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
109
+ created_at_time: IDL.Opt(Timestamp),
110
+ amount: Tokens
111
+ });
112
+ const TransferError = IDL.Variant({
113
+ TxTooOld: IDL.Record({allowed_window_nanos: IDL.Nat64}),
114
+ BadFee: IDL.Record({expected_fee: Tokens}),
115
+ TxDuplicate: IDL.Record({duplicate_of: IDL.Nat64}),
116
+ TxCreatedInFuture: IDL.Null,
117
+ InsufficientFunds: IDL.Record({balance: Tokens})
118
+ });
119
+ const Result = IDL.Variant({Ok: IDL.Nat64, Err: TransferError});
120
+ const Account = IDL.Record({
121
+ owner: IDL.Principal,
122
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
123
+ });
124
+ const TransferArg = IDL.Record({
125
+ to: Account,
126
+ fee: IDL.Opt(IDL.Nat),
127
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
128
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
129
+ created_at_time: IDL.Opt(IDL.Nat64),
130
+ amount: IDL.Nat
131
+ });
132
+ const TransferError_1 = IDL.Variant({
133
+ GenericError: IDL.Record({
134
+ message: IDL.Text,
135
+ error_code: IDL.Nat
136
+ }),
137
+ TemporarilyUnavailable: IDL.Null,
138
+ BadBurn: IDL.Record({min_burn_amount: IDL.Nat}),
139
+ Duplicate: IDL.Record({duplicate_of: IDL.Nat}),
140
+ BadFee: IDL.Record({expected_fee: IDL.Nat}),
141
+ CreatedInFuture: IDL.Record({ledger_time: IDL.Nat64}),
142
+ TooOld: IDL.Null,
143
+ InsufficientFunds: IDL.Record({balance: IDL.Nat})
144
+ });
145
+ const Result_1 = IDL.Variant({Ok: IDL.Nat, Err: TransferError_1});
146
+ const ControllerScope = IDL.Variant({
147
+ Write: IDL.Null,
148
+ Admin: IDL.Null,
149
+ Submit: IDL.Null
150
+ });
151
+ const Controller = IDL.Record({
152
+ updated_at: IDL.Nat64,
153
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
154
+ created_at: IDL.Nat64,
155
+ scope: ControllerScope,
156
+ expires_at: IDL.Opt(IDL.Nat64)
157
+ });
158
+ const SetController = IDL.Record({
159
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
160
+ scope: ControllerScope,
161
+ expires_at: IDL.Opt(IDL.Nat64)
162
+ });
163
+ const SegmentsMonitoringStrategy = IDL.Record({
164
+ ids: IDL.Vec(IDL.Principal),
165
+ strategy: CyclesMonitoringStrategy
166
+ });
167
+ const CyclesMonitoringStartConfig = IDL.Record({
168
+ orbiters_strategy: IDL.Opt(SegmentsMonitoringStrategy),
169
+ mission_control_strategy: IDL.Opt(CyclesMonitoringStrategy),
170
+ satellites_strategy: IDL.Opt(SegmentsMonitoringStrategy)
171
+ });
172
+ const MonitoringStartConfig = IDL.Record({
173
+ cycles_config: IDL.Opt(CyclesMonitoringStartConfig)
174
+ });
175
+ const CyclesMonitoringStopConfig = IDL.Record({
176
+ satellite_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
177
+ try_mission_control: IDL.Opt(IDL.Bool),
178
+ orbiter_ids: IDL.Opt(IDL.Vec(IDL.Principal))
179
+ });
180
+ const MonitoringStopConfig = IDL.Record({
181
+ cycles_config: IDL.Opt(CyclesMonitoringStopConfig)
182
+ });
183
+ return IDL.Service({
184
+ add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
185
+ add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
186
+ create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
187
+ create_orbiter_with_config: IDL.Func([CreateCanisterConfig], [Orbiter], []),
188
+ create_satellite: IDL.Func([IDL.Text], [Satellite], []),
189
+ create_satellite_with_config: IDL.Func([CreateCanisterConfig], [Satellite], []),
190
+ del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
191
+ del_orbiter: IDL.Func([IDL.Principal, IDL.Nat], [], []),
192
+ del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
193
+ del_satellite: IDL.Func([IDL.Principal, IDL.Nat], [], []),
194
+ del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
195
+ deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
196
+ get_config: IDL.Func([], [IDL.Opt(Config)], ['query']),
197
+ get_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], ['query']),
198
+ get_monitoring_history: IDL.Func(
199
+ [GetMonitoringHistory],
200
+ [IDL.Vec(IDL.Tuple(MonitoringHistoryKey, MonitoringHistory))],
201
+ ['query']
202
+ ),
203
+ get_monitoring_status: IDL.Func([], [MonitoringStatus], ['query']),
204
+ get_settings: IDL.Func([], [IDL.Opt(MissionControlSettings)], ['query']),
205
+ get_user: IDL.Func([], [IDL.Principal], ['query']),
206
+ get_user_data: IDL.Func([], [User], ['query']),
207
+ icp_transfer: IDL.Func([TransferArgs], [Result], []),
208
+ icrc_transfer: IDL.Func([IDL.Principal, TransferArg], [Result_1], []),
209
+ list_mission_control_controllers: IDL.Func(
210
+ [],
211
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
212
+ ['query']
213
+ ),
214
+ list_orbiters: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Orbiter))], ['query']),
215
+ list_satellites: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Satellite))], ['query']),
216
+ remove_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
217
+ remove_satellites_controllers: IDL.Func(
218
+ [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)],
219
+ [],
220
+ []
221
+ ),
222
+ set_config: IDL.Func([IDL.Opt(Config)], [], []),
223
+ set_metadata: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
224
+ set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []),
225
+ set_orbiter: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Orbiter], []),
226
+ set_orbiter_metadata: IDL.Func(
227
+ [IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
228
+ [Orbiter],
229
+ []
230
+ ),
231
+ set_orbiters_controllers: IDL.Func(
232
+ [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
233
+ [],
234
+ []
235
+ ),
236
+ set_satellite: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Satellite], []),
237
+ set_satellite_metadata: IDL.Func(
238
+ [IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
239
+ [Satellite],
240
+ []
241
+ ),
242
+ set_satellites_controllers: IDL.Func(
243
+ [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
244
+ [],
245
+ []
246
+ ),
247
+ start_monitoring: IDL.Func([], [], []),
248
+ stop_monitoring: IDL.Func([], [], []),
249
+ top_up: IDL.Func([IDL.Principal, Tokens], [], []),
250
+ unset_orbiter: IDL.Func([IDL.Principal], [], []),
251
+ unset_satellite: IDL.Func([IDL.Principal], [], []),
252
+ update_and_start_monitoring: IDL.Func([MonitoringStartConfig], [], []),
253
+ update_and_stop_monitoring: IDL.Func([MonitoringStopConfig], [], [])
254
+ });
255
+ };
256
+ // @ts-ignore
257
+ export const init = ({IDL}) => {
258
+ return [];
259
+ };
@@ -0,0 +1,86 @@
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 Controller {
6
+ updated_at: bigint;
7
+ metadata: Array<[string, string]>;
8
+ created_at: bigint;
9
+ scope: ControllerScope;
10
+ expires_at: [] | [bigint];
11
+ }
12
+ export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null};
13
+ export interface CyclesBalance {
14
+ timestamp: bigint;
15
+ amount: bigint;
16
+ }
17
+ export interface DeleteControllersArgs {
18
+ controllers: Array<Principal>;
19
+ }
20
+ export interface DepositedCyclesEmailNotification {
21
+ to: string;
22
+ deposited_cycles: CyclesBalance;
23
+ }
24
+ export interface Env {
25
+ email_api_key: [] | [string];
26
+ }
27
+ export interface FailedCyclesDepositEmailNotification {
28
+ to: string;
29
+ funding_failure: FundingFailure;
30
+ }
31
+ export type FundingErrorCode =
32
+ | {BalanceCheckFailed: null}
33
+ | {ObtainCyclesFailed: null}
34
+ | {DepositFailed: null}
35
+ | {InsufficientCycles: null}
36
+ | {Other: string};
37
+ export interface FundingFailure {
38
+ timestamp: bigint;
39
+ error_code: FundingErrorCode;
40
+ }
41
+ export interface GetNotifications {
42
+ to: [] | [bigint];
43
+ from: [] | [bigint];
44
+ segment_id: [] | [Principal];
45
+ }
46
+ export type NotificationKind =
47
+ | {
48
+ DepositedCyclesEmail: DepositedCyclesEmailNotification;
49
+ }
50
+ | {FailedCyclesDepositEmail: FailedCyclesDepositEmailNotification};
51
+ export interface NotifyArgs {
52
+ kind: NotificationKind;
53
+ user: Principal;
54
+ segment: Segment;
55
+ }
56
+ export interface NotifyStatus {
57
+ pending: bigint;
58
+ sent: bigint;
59
+ failed: bigint;
60
+ }
61
+ export interface Segment {
62
+ id: Principal;
63
+ metadata: [] | [Array<[string, string]>];
64
+ kind: SegmentKind;
65
+ }
66
+ export type SegmentKind = {Orbiter: null} | {MissionControl: null} | {Satellite: null};
67
+ export interface SetController {
68
+ metadata: Array<[string, string]>;
69
+ scope: ControllerScope;
70
+ expires_at: [] | [bigint];
71
+ }
72
+ export interface SetControllersArgs {
73
+ controller: SetController;
74
+ controllers: Array<Principal>;
75
+ }
76
+ export interface _SERVICE {
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
+ }
85
+ export declare const idlFactory: IDL.InterfaceFactory;
86
+ export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -0,0 +1,93 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const DeleteControllersArgs = IDL.Record({
4
+ controllers: IDL.Vec(IDL.Principal)
5
+ });
6
+ const GetNotifications = IDL.Record({
7
+ to: IDL.Opt(IDL.Nat64),
8
+ from: IDL.Opt(IDL.Nat64),
9
+ segment_id: IDL.Opt(IDL.Principal)
10
+ });
11
+ const NotifyStatus = IDL.Record({
12
+ pending: IDL.Nat64,
13
+ sent: IDL.Nat64,
14
+ failed: IDL.Nat64
15
+ });
16
+ const ControllerScope = IDL.Variant({
17
+ Write: IDL.Null,
18
+ Admin: IDL.Null,
19
+ Submit: IDL.Null
20
+ });
21
+ const Controller = IDL.Record({
22
+ updated_at: IDL.Nat64,
23
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
24
+ created_at: IDL.Nat64,
25
+ scope: ControllerScope,
26
+ expires_at: IDL.Opt(IDL.Nat64)
27
+ });
28
+ const CyclesBalance = IDL.Record({
29
+ timestamp: IDL.Nat64,
30
+ amount: IDL.Nat
31
+ });
32
+ const DepositedCyclesEmailNotification = IDL.Record({
33
+ to: IDL.Text,
34
+ deposited_cycles: CyclesBalance
35
+ });
36
+ const FundingErrorCode = IDL.Variant({
37
+ BalanceCheckFailed: IDL.Null,
38
+ ObtainCyclesFailed: IDL.Null,
39
+ DepositFailed: IDL.Null,
40
+ InsufficientCycles: IDL.Null,
41
+ Other: IDL.Text
42
+ });
43
+ const FundingFailure = IDL.Record({
44
+ timestamp: IDL.Nat64,
45
+ error_code: FundingErrorCode
46
+ });
47
+ const FailedCyclesDepositEmailNotification = IDL.Record({
48
+ to: IDL.Text,
49
+ funding_failure: FundingFailure
50
+ });
51
+ const NotificationKind = IDL.Variant({
52
+ DepositedCyclesEmail: DepositedCyclesEmailNotification,
53
+ FailedCyclesDepositEmail: FailedCyclesDepositEmailNotification
54
+ });
55
+ const SegmentKind = IDL.Variant({
56
+ Orbiter: IDL.Null,
57
+ MissionControl: IDL.Null,
58
+ Satellite: IDL.Null
59
+ });
60
+ const Segment = IDL.Record({
61
+ id: IDL.Principal,
62
+ metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
63
+ kind: SegmentKind
64
+ });
65
+ const NotifyArgs = IDL.Record({
66
+ kind: NotificationKind,
67
+ user: IDL.Principal,
68
+ segment: Segment
69
+ });
70
+ const SetController = IDL.Record({
71
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
72
+ scope: ControllerScope,
73
+ expires_at: IDL.Opt(IDL.Nat64)
74
+ });
75
+ const SetControllersArgs = IDL.Record({
76
+ controller: SetController,
77
+ controllers: IDL.Vec(IDL.Principal)
78
+ });
79
+ const Env = IDL.Record({email_api_key: IDL.Opt(IDL.Text)});
80
+ return IDL.Service({
81
+ del_controllers: IDL.Func([DeleteControllersArgs], [], []),
82
+ get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], []),
83
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], []),
84
+ notify: IDL.Func([NotifyArgs], [], []),
85
+ ping: IDL.Func([NotifyArgs], [], []),
86
+ set_controllers: IDL.Func([SetControllersArgs], [], []),
87
+ set_env: IDL.Func([Env], [], [])
88
+ });
89
+ };
90
+ // @ts-ignore
91
+ export const init = ({IDL}) => {
92
+ return [];
93
+ };
@@ -0,0 +1,93 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const DeleteControllersArgs = IDL.Record({
4
+ controllers: IDL.Vec(IDL.Principal)
5
+ });
6
+ const GetNotifications = IDL.Record({
7
+ to: IDL.Opt(IDL.Nat64),
8
+ from: IDL.Opt(IDL.Nat64),
9
+ segment_id: IDL.Opt(IDL.Principal)
10
+ });
11
+ const NotifyStatus = IDL.Record({
12
+ pending: IDL.Nat64,
13
+ sent: IDL.Nat64,
14
+ failed: IDL.Nat64
15
+ });
16
+ const ControllerScope = IDL.Variant({
17
+ Write: IDL.Null,
18
+ Admin: IDL.Null,
19
+ Submit: IDL.Null
20
+ });
21
+ const Controller = IDL.Record({
22
+ updated_at: IDL.Nat64,
23
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
24
+ created_at: IDL.Nat64,
25
+ scope: ControllerScope,
26
+ expires_at: IDL.Opt(IDL.Nat64)
27
+ });
28
+ const CyclesBalance = IDL.Record({
29
+ timestamp: IDL.Nat64,
30
+ amount: IDL.Nat
31
+ });
32
+ const DepositedCyclesEmailNotification = IDL.Record({
33
+ to: IDL.Text,
34
+ deposited_cycles: CyclesBalance
35
+ });
36
+ const FundingErrorCode = IDL.Variant({
37
+ BalanceCheckFailed: IDL.Null,
38
+ ObtainCyclesFailed: IDL.Null,
39
+ DepositFailed: IDL.Null,
40
+ InsufficientCycles: IDL.Null,
41
+ Other: IDL.Text
42
+ });
43
+ const FundingFailure = IDL.Record({
44
+ timestamp: IDL.Nat64,
45
+ error_code: FundingErrorCode
46
+ });
47
+ const FailedCyclesDepositEmailNotification = IDL.Record({
48
+ to: IDL.Text,
49
+ funding_failure: FundingFailure
50
+ });
51
+ const NotificationKind = IDL.Variant({
52
+ DepositedCyclesEmail: DepositedCyclesEmailNotification,
53
+ FailedCyclesDepositEmail: FailedCyclesDepositEmailNotification
54
+ });
55
+ const SegmentKind = IDL.Variant({
56
+ Orbiter: IDL.Null,
57
+ MissionControl: IDL.Null,
58
+ Satellite: IDL.Null
59
+ });
60
+ const Segment = IDL.Record({
61
+ id: IDL.Principal,
62
+ metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
63
+ kind: SegmentKind
64
+ });
65
+ const NotifyArgs = IDL.Record({
66
+ kind: NotificationKind,
67
+ user: IDL.Principal,
68
+ segment: Segment
69
+ });
70
+ const SetController = IDL.Record({
71
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
72
+ scope: ControllerScope,
73
+ expires_at: IDL.Opt(IDL.Nat64)
74
+ });
75
+ const SetControllersArgs = IDL.Record({
76
+ controller: SetController,
77
+ controllers: IDL.Vec(IDL.Principal)
78
+ });
79
+ const Env = IDL.Record({email_api_key: IDL.Opt(IDL.Text)});
80
+ return IDL.Service({
81
+ del_controllers: IDL.Func([DeleteControllersArgs], [], []),
82
+ get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], ['query']),
83
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
84
+ notify: IDL.Func([NotifyArgs], [], []),
85
+ ping: IDL.Func([NotifyArgs], [], []),
86
+ set_controllers: IDL.Func([SetControllersArgs], [], []),
87
+ set_env: IDL.Func([Env], [], [])
88
+ });
89
+ };
90
+ // @ts-ignore
91
+ export const init = ({IDL}) => {
92
+ return [];
93
+ };
@@ -0,0 +1,93 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const DeleteControllersArgs = IDL.Record({
4
+ controllers: IDL.Vec(IDL.Principal)
5
+ });
6
+ const GetNotifications = IDL.Record({
7
+ to: IDL.Opt(IDL.Nat64),
8
+ from: IDL.Opt(IDL.Nat64),
9
+ segment_id: IDL.Opt(IDL.Principal)
10
+ });
11
+ const NotifyStatus = IDL.Record({
12
+ pending: IDL.Nat64,
13
+ sent: IDL.Nat64,
14
+ failed: IDL.Nat64
15
+ });
16
+ const ControllerScope = IDL.Variant({
17
+ Write: IDL.Null,
18
+ Admin: IDL.Null,
19
+ Submit: IDL.Null
20
+ });
21
+ const Controller = IDL.Record({
22
+ updated_at: IDL.Nat64,
23
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
24
+ created_at: IDL.Nat64,
25
+ scope: ControllerScope,
26
+ expires_at: IDL.Opt(IDL.Nat64)
27
+ });
28
+ const CyclesBalance = IDL.Record({
29
+ timestamp: IDL.Nat64,
30
+ amount: IDL.Nat
31
+ });
32
+ const DepositedCyclesEmailNotification = IDL.Record({
33
+ to: IDL.Text,
34
+ deposited_cycles: CyclesBalance
35
+ });
36
+ const FundingErrorCode = IDL.Variant({
37
+ BalanceCheckFailed: IDL.Null,
38
+ ObtainCyclesFailed: IDL.Null,
39
+ DepositFailed: IDL.Null,
40
+ InsufficientCycles: IDL.Null,
41
+ Other: IDL.Text
42
+ });
43
+ const FundingFailure = IDL.Record({
44
+ timestamp: IDL.Nat64,
45
+ error_code: FundingErrorCode
46
+ });
47
+ const FailedCyclesDepositEmailNotification = IDL.Record({
48
+ to: IDL.Text,
49
+ funding_failure: FundingFailure
50
+ });
51
+ const NotificationKind = IDL.Variant({
52
+ DepositedCyclesEmail: DepositedCyclesEmailNotification,
53
+ FailedCyclesDepositEmail: FailedCyclesDepositEmailNotification
54
+ });
55
+ const SegmentKind = IDL.Variant({
56
+ Orbiter: IDL.Null,
57
+ MissionControl: IDL.Null,
58
+ Satellite: IDL.Null
59
+ });
60
+ const Segment = IDL.Record({
61
+ id: IDL.Principal,
62
+ metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
63
+ kind: SegmentKind
64
+ });
65
+ const NotifyArgs = IDL.Record({
66
+ kind: NotificationKind,
67
+ user: IDL.Principal,
68
+ segment: Segment
69
+ });
70
+ const SetController = IDL.Record({
71
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
72
+ scope: ControllerScope,
73
+ expires_at: IDL.Opt(IDL.Nat64)
74
+ });
75
+ const SetControllersArgs = IDL.Record({
76
+ controller: SetController,
77
+ controllers: IDL.Vec(IDL.Principal)
78
+ });
79
+ const Env = IDL.Record({email_api_key: IDL.Opt(IDL.Text)});
80
+ return IDL.Service({
81
+ del_controllers: IDL.Func([DeleteControllersArgs], [], []),
82
+ get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], ['query']),
83
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
84
+ notify: IDL.Func([NotifyArgs], [], []),
85
+ ping: IDL.Func([NotifyArgs], [], []),
86
+ set_controllers: IDL.Func([SetControllersArgs], [], []),
87
+ set_env: IDL.Func([Env], [], [])
88
+ });
89
+ };
90
+ // @ts-ignore
91
+ export const init = ({IDL}) => {
92
+ return [];
93
+ };