@junobuild/functions 0.4.1 → 0.5.1-next-2025-11-29

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 (137) hide show
  1. package/canisters/_canister.d.ts +17 -0
  2. package/canisters/_constants.d.ts +3 -0
  3. package/canisters/ckbtc/index.d.ts +1 -0
  4. package/canisters/ckbtc/index.js +2 -0
  5. package/canisters/cketh/index.d.ts +1 -0
  6. package/canisters/cketh/index.js +2 -0
  7. package/canisters/cketh/index.js.map +7 -0
  8. package/canisters/cmc/cmc.canister.d.ts +28 -0
  9. package/canisters/cmc/index.d.ts +2 -0
  10. package/canisters/cmc/index.js +2 -0
  11. package/canisters/cmc/index.js.map +7 -0
  12. package/canisters/declarations/_idl.d.ts +16 -0
  13. package/canisters/declarations/_types.d.ts +16 -0
  14. package/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  15. package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +40 -0
  16. package/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  17. package/canisters/declarations/ckbtc/minter.did.idl.d.ts +61 -0
  18. package/canisters/declarations/cketh/minter.did.d.ts +893 -0
  19. package/canisters/declarations/cketh/minter.did.idl.d.ts +58 -0
  20. package/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  21. package/canisters/declarations/cketh/orchestrator.did.idl.d.ts +34 -0
  22. package/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  23. package/canisters/declarations/cmc/cmc.did.idl.d.ts +53 -0
  24. package/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  25. package/canisters/declarations/ic-management/ic-management.did.idl.d.ts +147 -0
  26. package/canisters/declarations/index.d.ts +2 -0
  27. package/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  28. package/canisters/declarations/ledger-icp/index.did.idl.d.ts +35 -0
  29. package/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  30. package/canisters/declarations/ledger-icp/ledger.did.idl.d.ts +106 -0
  31. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  32. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +44 -0
  33. package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  34. package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +28 -0
  35. package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  36. package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +100 -0
  37. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  38. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.d.ts +39 -0
  39. package/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  40. package/canisters/declarations/nns/genesis_token.did.idl.d.ts +24 -0
  41. package/canisters/declarations/nns/governance.did.d.ts +1254 -0
  42. package/canisters/declarations/nns/governance.did.idl.d.ts +217 -0
  43. package/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  44. package/canisters/declarations/nns/governance_test.did.idl.d.ts +218 -0
  45. package/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  46. package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +80 -0
  47. package/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  48. package/canisters/declarations/sns/sns_governance.did.idl.d.ts +189 -0
  49. package/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  50. package/canisters/declarations/sns/sns_governance_test.did.idl.d.ts +199 -0
  51. package/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  52. package/canisters/declarations/sns/sns_root.did.idl.d.ts +53 -0
  53. package/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  54. package/canisters/declarations/sns/sns_swap.did.idl.d.ts +108 -0
  55. package/canisters/ic-management/index.d.ts +1 -0
  56. package/canisters/ic-management/index.js +2 -0
  57. package/canisters/ic-management/index.js.map +7 -0
  58. package/canisters/index.d.ts +1 -0
  59. package/canisters/index.js +2 -0
  60. package/canisters/index.js.map +7 -0
  61. package/canisters/ledger/icp/index.d.ts +2 -0
  62. package/canisters/ledger/icp/index.js +2 -0
  63. package/canisters/ledger/icp/index.js.map +7 -0
  64. package/canisters/ledger/icp/ledger.canister.d.ts +24 -0
  65. package/canisters/ledger/icrc/index.d.ts +3 -0
  66. package/canisters/ledger/icrc/index.js +2 -0
  67. package/canisters/ledger/icrc/index.js.map +7 -0
  68. package/canisters/ledger/icrc/ledger.canister.d.ts +45 -0
  69. package/canisters/ledger/icrc/schemas.d.ts +11 -0
  70. package/canisters/nns/index.d.ts +1 -0
  71. package/canisters/nns/index.js +2 -0
  72. package/canisters/nns/index.js.map +7 -0
  73. package/canisters/schemas.d.ts +11 -0
  74. package/canisters/sns/index.d.ts +1 -0
  75. package/canisters/sns/index.js +2 -0
  76. package/canisters/sns/index.js.map +7 -0
  77. package/chunk-4C666HHU.js +2 -0
  78. package/chunk-4C666HHU.js.map +7 -0
  79. package/chunk-5NZMOUKF.js +2 -0
  80. package/chunk-5NZMOUKF.js.map +7 -0
  81. package/chunk-BXZ5PSUW.js +2 -0
  82. package/chunk-BXZ5PSUW.js.map +7 -0
  83. package/chunk-EMQQE34V.js +2 -0
  84. package/chunk-EMQQE34V.js.map +7 -0
  85. package/chunk-HANEPD6T.js +2 -0
  86. package/chunk-HANEPD6T.js.map +7 -0
  87. package/chunk-TZVF5LQY.js +2 -0
  88. package/chunk-TZVF5LQY.js.map +7 -0
  89. package/ic-cdk.js +1 -1
  90. package/ic-cdk.js.map +4 -4
  91. package/index.js +1 -1
  92. package/index.js.map +1 -1
  93. package/package.json +43 -6
  94. package/sdk.js +1 -1
  95. package/sdk.js.map +1 -1
  96. package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +134 -0
  97. package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +302 -0
  98. package/src/canisters/declarations/ckbtc/minter.did.d.ts +831 -0
  99. package/src/canisters/declarations/ckbtc/minter.did.idl.js +893 -0
  100. package/src/canisters/declarations/cketh/minter.did.d.ts +893 -0
  101. package/src/canisters/declarations/cketh/minter.did.idl.js +878 -0
  102. package/src/canisters/declarations/cketh/orchestrator.did.d.ts +302 -0
  103. package/src/canisters/declarations/cketh/orchestrator.did.idl.js +343 -0
  104. package/src/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  105. package/src/canisters/declarations/cmc/cmc.did.idl.js +338 -0
  106. package/src/canisters/declarations/ic-management/ic-management.did.d.ts +583 -0
  107. package/src/canisters/declarations/ic-management/ic-management.did.idl.js +1150 -0
  108. package/src/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  109. package/src/canisters/declarations/ledger-icp/index.did.idl.js +225 -0
  110. package/src/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  111. package/src/canisters/declarations/ledger-icp/ledger.did.idl.js +813 -0
  112. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  113. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +274 -0
  114. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  115. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +171 -0
  116. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  117. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +923 -0
  118. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  119. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.js +163 -0
  120. package/src/canisters/declarations/nns/genesis_token.did.d.ts +49 -0
  121. package/src/canisters/declarations/nns/genesis_token.did.idl.js +84 -0
  122. package/src/canisters/declarations/nns/governance.did.d.ts +1254 -0
  123. package/src/canisters/declarations/nns/governance.did.idl.js +2756 -0
  124. package/src/canisters/declarations/nns/governance_test.did.d.ts +1258 -0
  125. package/src/canisters/declarations/nns/governance_test.did.idl.js +2758 -0
  126. package/src/canisters/declarations/nns/sns_wasm.did.d.ts +286 -0
  127. package/src/canisters/declarations/nns/sns_wasm.did.idl.js +589 -0
  128. package/src/canisters/declarations/sns/sns_governance.did.d.ts +834 -0
  129. package/src/canisters/declarations/sns/sns_governance.did.idl.js +2235 -0
  130. package/src/canisters/declarations/sns/sns_governance_test.did.d.ts +861 -0
  131. package/src/canisters/declarations/sns/sns_governance_test.did.idl.js +2283 -0
  132. package/src/canisters/declarations/sns/sns_root.did.d.ts +204 -0
  133. package/src/canisters/declarations/sns/sns_root.did.idl.js +433 -0
  134. package/src/canisters/declarations/sns/sns_swap.did.d.ts +411 -0
  135. package/src/canisters/declarations/sns/sns_swap.did.idl.js +858 -0
  136. package/global.d.js +0 -1
  137. /package/{global.d.js.map → canisters/ckbtc/index.js.map} +0 -0
@@ -0,0 +1,302 @@
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 AddErc20Arg {
14
+ 'contract' : Erc20Contract,
15
+ 'ledger_init_arg' : LedgerInitArg,
16
+ }
17
+ export interface CanisterStatusResponse {
18
+ 'status' : CanisterStatusType,
19
+ 'memory_size' : bigint,
20
+ 'cycles' : bigint,
21
+ 'settings' : DefiniteCanisterSettings,
22
+ 'query_stats' : QueryStats,
23
+ 'idle_cycles_burned_per_day' : bigint,
24
+ 'module_hash' : [] | [Uint8Array],
25
+ 'reserved_cycles' : bigint,
26
+ }
27
+ export type CanisterStatusType = { 'stopped' : null } |
28
+ { 'stopping' : null } |
29
+ { 'running' : null };
30
+ export interface CyclesManagement {
31
+ /**
32
+ * Number of cycles to add to a canister managed by the orchestrator whose cycles balance is running low.
33
+ */
34
+ 'cycles_top_up_increment' : bigint,
35
+ /**
36
+ * Number of cycles when creating a new ICRC1 ledger canister.
37
+ */
38
+ 'cycles_for_ledger_creation' : bigint,
39
+ /**
40
+ * Number of cycles when creating a new ICRC1 archive canister.
41
+ */
42
+ 'cycles_for_archive_creation' : bigint,
43
+ /**
44
+ * Number of cycles when creating a new ICRC1 index canister.
45
+ */
46
+ 'cycles_for_index_creation' : bigint,
47
+ }
48
+ export interface DefiniteCanisterSettings {
49
+ 'freezing_threshold' : bigint,
50
+ 'controllers' : Array<Principal>,
51
+ 'reserved_cycles_limit' : bigint,
52
+ 'log_visibility' : LogVisibility,
53
+ 'wasm_memory_limit' : bigint,
54
+ 'memory_allocation' : bigint,
55
+ 'compute_allocation' : bigint,
56
+ }
57
+ export interface Erc20Contract { 'chain_id' : bigint, 'address' : string }
58
+ export interface InitArg {
59
+ /**
60
+ * Controls the cycles management of the canisters managed by the orchestrator.
61
+ */
62
+ 'cycles_management' : [] | [CyclesManagement],
63
+ /**
64
+ * All canisters that will be spawned off by the orchestrator will be controlled by the orchestrator
65
+ * and *additionally* by the following controllers.
66
+ */
67
+ 'more_controller_ids' : Array<Principal>,
68
+ /**
69
+ * Canister ID of the minter that will be notified when new ERC-20 tokens are added.
70
+ */
71
+ 'minter_id' : [] | [Principal],
72
+ }
73
+ export interface InstalledCanister {
74
+ 'canister_id' : Principal,
75
+ 'installed_wasm_hash' : string,
76
+ }
77
+ export interface InstalledLedgerSuite {
78
+ /**
79
+ * Token symbol on the ledger
80
+ */
81
+ 'token_symbol' : string,
82
+ /**
83
+ * Ledger canister
84
+ */
85
+ 'ledger' : InstalledCanister,
86
+ /**
87
+ * Index canister
88
+ */
89
+ 'index' : InstalledCanister,
90
+ /**
91
+ * List of archive canister ids
92
+ */
93
+ 'archives' : [] | [Array<Principal>],
94
+ }
95
+ /**
96
+ * ICRC1 ledger initialization argument that will be used when the orchestrator spawns a new ledger canister.
97
+ * Other fields, such as `archive_options`, needed to initialize a new ledger will be set by the orchestrator.
98
+ */
99
+ export interface LedgerInitArg {
100
+ 'decimals' : number,
101
+ 'token_symbol' : string,
102
+ 'transfer_fee' : bigint,
103
+ 'token_logo' : string,
104
+ 'token_name' : string,
105
+ }
106
+ export interface LedgerSuiteVersion {
107
+ /**
108
+ * Hexadecimal encoding of the SHA2-256 archive compressed wasm hash, e.g.,
109
+ * "e59ec306ef67d0ec2e8919e8f6366aff31c666346e238d07d52f616bef61ccab".
110
+ */
111
+ 'archive_compressed_wasm_hash' : string,
112
+ /**
113
+ * Hexadecimal encoding of the SHA2-256 ledger compressed wasm hash, e.g.,
114
+ * "3148f7a9f1b0ee39262c8abe3b08813480cf78551eee5a60ab1cf38433b5d9b0".
115
+ * This exact version will be used to spawn off a new ledger canister when an ERC-20 token is added.
116
+ */
117
+ 'ledger_compressed_wasm_hash' : string,
118
+ /**
119
+ * Hexadecimal encoding of the SHA2-256 index compressed wasm hash, e.g.,
120
+ * "3a6d39b5e94cdef5203bca62720e75a28cd071ff434d22b9746403ac7ae59614".
121
+ * This exact version will be used to spawn off a new index canister when an ERC-20 token is added.
122
+ */
123
+ 'index_compressed_wasm_hash' : string,
124
+ }
125
+ export type LogVisibility = { 'controllers' : null } |
126
+ { 'public' : null } |
127
+ { 'allowed_viewers' : Array<Principal> };
128
+ export interface ManagedCanisterIds {
129
+ 'ledger' : [] | [Principal],
130
+ 'index' : [] | [Principal],
131
+ 'archives' : Array<Principal>,
132
+ }
133
+ export type ManagedCanisterStatus = {
134
+ /**
135
+ * Canister created with the given principal but wasm module is not yet installed.
136
+ */
137
+ 'Created' : { 'canister_id' : Principal }
138
+ } |
139
+ {
140
+ /**
141
+ * Canister created and wasm module installed.
142
+ * The wasm_hash reflects the installed wasm module by the orchestrator
143
+ * but *may differ* from the one being currently deployed (if another controller did an upgrade)
144
+ */
145
+ 'Installed' : { 'canister_id' : Principal, 'installed_wasm_hash' : string }
146
+ };
147
+ export interface ManagedCanisters {
148
+ /**
149
+ * Corresponding ERC20 contract
150
+ */
151
+ 'erc20_contract' : Erc20Contract,
152
+ /**
153
+ * Status of the ledger canister
154
+ */
155
+ 'ledger' : [] | [ManagedCanisterStatus],
156
+ /**
157
+ * Status of the index canister
158
+ */
159
+ 'index' : [] | [ManagedCanisterStatus],
160
+ /**
161
+ * List of archive canister ids
162
+ */
163
+ 'archives' : Array<Principal>,
164
+ /**
165
+ * ckERC20 Token symbol
166
+ */
167
+ 'ckerc20_token_symbol' : string,
168
+ }
169
+ export interface ManagedLedgerSuite {
170
+ /**
171
+ * Token symbol
172
+ */
173
+ 'token_symbol' : string,
174
+ /**
175
+ * Status of the ledger canister
176
+ */
177
+ 'ledger' : [] | [ManagedCanisterStatus],
178
+ /**
179
+ * Status of the index canister
180
+ */
181
+ 'index' : [] | [ManagedCanisterStatus],
182
+ /**
183
+ * List of archive canister ids
184
+ */
185
+ 'archives' : Array<Principal>,
186
+ }
187
+ export type OrchestratorArg = { 'UpgradeArg' : UpgradeArg } |
188
+ { 'InitArg' : InitArg } |
189
+ { 'AddErc20Arg' : AddErc20Arg };
190
+ export interface OrchestratorInfo {
191
+ /**
192
+ * Cycle management parameters.
193
+ */
194
+ 'cycles_management' : CyclesManagement,
195
+ /**
196
+ * List of managed canisters data for each ERC20 contract.
197
+ */
198
+ 'managed_canisters' : Array<ManagedCanisters>,
199
+ /**
200
+ * List of managed ledger suites that were not initially installed by the orchestrator.
201
+ * Those ledger suites are *NOT* necessarily ckERC20 tokens.
202
+ */
203
+ 'managed_pre_existing_ledger_suites' : [] | [Array<ManagedLedgerSuite>],
204
+ /**
205
+ * Additional controllers that new canisters will be spawned with.
206
+ */
207
+ 'more_controller_ids' : Array<Principal>,
208
+ /**
209
+ * Ledger suite version that will be used to spawn off a new ledger suite (ledger and index canisters) when an ERC-20 token is added.
210
+ */
211
+ 'ledger_suite_version' : [] | [LedgerSuiteVersion],
212
+ /**
213
+ * ckETH minter canister id.
214
+ */
215
+ 'minter_id' : [] | [Principal],
216
+ }
217
+ export interface QueryStats {
218
+ 'response_payload_bytes_total' : bigint,
219
+ 'num_instructions_total' : bigint,
220
+ 'num_calls_total' : bigint,
221
+ 'request_payload_bytes_total' : bigint,
222
+ }
223
+ export interface UpdateCyclesManagement {
224
+ /**
225
+ * Change the number of cycles to add to a canister managed by the orchestrator whose cycles balance is running low.
226
+ */
227
+ 'cycles_top_up_increment' : [] | [bigint],
228
+ /**
229
+ * Change the number of cycles when creating a new ICRC1 ledger canister.
230
+ * Previously created canisters are not affected.
231
+ */
232
+ 'cycles_for_ledger_creation' : [] | [bigint],
233
+ /**
234
+ * Change the number of cycles when creating a new ICRC1 archive canister.
235
+ * Previously created canisters are not affected.
236
+ */
237
+ 'cycles_for_archive_creation' : [] | [bigint],
238
+ /**
239
+ * Change the number of cycles when creating a new ICRC1 index canister.
240
+ * Previously created canisters are not affected.
241
+ */
242
+ 'cycles_for_index_creation' : [] | [bigint],
243
+ }
244
+ export interface UpgradeArg {
245
+ /**
246
+ * Add already installed ledger suites to the canisters managed by the orchestrator.
247
+ * Those ledger suites are *NOT* necessarily ckERC20 tokens.
248
+ * This assumes that the orchestrator is a controller of all the canisters in the list.
249
+ */
250
+ 'manage_ledger_suites' : [] | [Array<InstalledLedgerSuite>],
251
+ /**
252
+ * Update the cycles management of the canisters managed by the orchestrator.
253
+ */
254
+ 'cycles_management' : [] | [UpdateCyclesManagement],
255
+ /**
256
+ * Hexadecimal encoding of the SHA2-256 archive compressed wasm hash, e.g.,
257
+ * "b24812976b2cc64f12faf813cf592631f3062bfda837334f77ab807361d64e82".
258
+ * This exact version will be used for upgrading all existing archive canisters managed by the orchestrator.
259
+ * Leaving this field empty will not upgrade the archive canisters.
260
+ */
261
+ 'archive_compressed_wasm_hash' : [] | [string],
262
+ /**
263
+ * Hexadecimal encoding of the SHA-1 git commit hash used for this upgrade, e.g.,
264
+ * "51d01d3936498d4010de54505d6433e9ad5cc62b", corresponding to a git revision in the
265
+ * [IC repository](https://github.com/dfinity/ic).
266
+ * If this field is present, the orchestrator will register all embedded wasms (ledger, index, and archive) in its stable memory,
267
+ * so that those exact wasms can be used to upgrade managed canisters as specified below.
268
+ */
269
+ 'git_commit_hash' : [] | [string],
270
+ /**
271
+ * Hexadecimal encoding of the SHA2-256 ledger compressed wasm hash, e.g.,
272
+ * "3148f7a9f1b0ee39262c8abe3b08813480cf78551eee5a60ab1cf38433b5d9b0".
273
+ * This exact version will be used for upgrading all existing ledger canisters managed by the orchestrator.
274
+ * Leaving this field empty will not upgrade the ledger canisters.
275
+ */
276
+ 'ledger_compressed_wasm_hash' : [] | [string],
277
+ /**
278
+ * Hexadecimal encoding of the SHA2-256 index compressed wasm hash, e.g.,
279
+ * "3a6d39b5e94cdef5203bca62720e75a28cd071ff434d22b9746403ac7ae59614".
280
+ * This exact version will be used for upgrading all existing index canisters managed by the orchestrator.
281
+ * Leaving this field empty will not upgrade the index canisters.
282
+ */
283
+ 'index_compressed_wasm_hash' : [] | [string],
284
+ }
285
+ export interface _SERVICE {
286
+ /**
287
+ * Managed canister IDs for a given ERC20 contract
288
+ */
289
+ 'canister_ids' : ActorMethod<[Erc20Contract], [] | [ManagedCanisterIds]>,
290
+ /**
291
+ * Retrieve the status of the canister.
292
+ */
293
+ 'get_canister_status' : ActorMethod<[], CanisterStatusResponse>,
294
+ /**
295
+ * Return internal orchestrator parameters
296
+ */
297
+ 'get_orchestrator_info' : ActorMethod<[], OrchestratorInfo>,
298
+ }
299
+ export declare const idlService: IDL.ServiceClass;
300
+ export declare const idlInitArgs: IDL.Type[];
301
+ export declare const idlFactory: IDL.InterfaceFactory;
302
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -0,0 +1,343 @@
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 {IDL} from '@icp-sdk/core/candid';
10
+
11
+ export const InstalledCanister = IDL.Record({
12
+ canister_id: IDL.Principal,
13
+ installed_wasm_hash: IDL.Text
14
+ });
15
+ export const InstalledLedgerSuite = IDL.Record({
16
+ token_symbol: IDL.Text,
17
+ ledger: InstalledCanister,
18
+ index: InstalledCanister,
19
+ archives: IDL.Opt(IDL.Vec(IDL.Principal))
20
+ });
21
+ export const UpdateCyclesManagement = IDL.Record({
22
+ cycles_top_up_increment: IDL.Opt(IDL.Nat),
23
+ cycles_for_ledger_creation: IDL.Opt(IDL.Nat),
24
+ cycles_for_archive_creation: IDL.Opt(IDL.Nat),
25
+ cycles_for_index_creation: IDL.Opt(IDL.Nat)
26
+ });
27
+ export const UpgradeArg = IDL.Record({
28
+ manage_ledger_suites: IDL.Opt(IDL.Vec(InstalledLedgerSuite)),
29
+ cycles_management: IDL.Opt(UpdateCyclesManagement),
30
+ archive_compressed_wasm_hash: IDL.Opt(IDL.Text),
31
+ git_commit_hash: IDL.Opt(IDL.Text),
32
+ ledger_compressed_wasm_hash: IDL.Opt(IDL.Text),
33
+ index_compressed_wasm_hash: IDL.Opt(IDL.Text)
34
+ });
35
+ export const CyclesManagement = IDL.Record({
36
+ cycles_top_up_increment: IDL.Nat,
37
+ cycles_for_ledger_creation: IDL.Nat,
38
+ cycles_for_archive_creation: IDL.Nat,
39
+ cycles_for_index_creation: IDL.Nat
40
+ });
41
+ export const InitArg = IDL.Record({
42
+ cycles_management: IDL.Opt(CyclesManagement),
43
+ more_controller_ids: IDL.Vec(IDL.Principal),
44
+ minter_id: IDL.Opt(IDL.Principal)
45
+ });
46
+ export const Erc20Contract = IDL.Record({
47
+ chain_id: IDL.Nat,
48
+ address: IDL.Text
49
+ });
50
+ export const LedgerInitArg = IDL.Record({
51
+ decimals: IDL.Nat8,
52
+ token_symbol: IDL.Text,
53
+ transfer_fee: IDL.Nat,
54
+ token_logo: IDL.Text,
55
+ token_name: IDL.Text
56
+ });
57
+ export const AddErc20Arg = IDL.Record({
58
+ contract: Erc20Contract,
59
+ ledger_init_arg: LedgerInitArg
60
+ });
61
+ export const OrchestratorArg = IDL.Variant({
62
+ UpgradeArg: UpgradeArg,
63
+ InitArg: InitArg,
64
+ AddErc20Arg: AddErc20Arg
65
+ });
66
+ export const ManagedCanisterIds = IDL.Record({
67
+ ledger: IDL.Opt(IDL.Principal),
68
+ index: IDL.Opt(IDL.Principal),
69
+ archives: IDL.Vec(IDL.Principal)
70
+ });
71
+ export const CanisterStatusType = IDL.Variant({
72
+ stopped: IDL.Null,
73
+ stopping: IDL.Null,
74
+ running: IDL.Null
75
+ });
76
+ export const LogVisibility = IDL.Variant({
77
+ controllers: IDL.Null,
78
+ public: IDL.Null,
79
+ allowed_viewers: IDL.Vec(IDL.Principal)
80
+ });
81
+ export const DefiniteCanisterSettings = IDL.Record({
82
+ freezing_threshold: IDL.Nat,
83
+ controllers: IDL.Vec(IDL.Principal),
84
+ reserved_cycles_limit: IDL.Nat,
85
+ log_visibility: LogVisibility,
86
+ wasm_memory_limit: IDL.Nat,
87
+ memory_allocation: IDL.Nat,
88
+ compute_allocation: IDL.Nat
89
+ });
90
+ export const QueryStats = IDL.Record({
91
+ response_payload_bytes_total: IDL.Nat,
92
+ num_instructions_total: IDL.Nat,
93
+ num_calls_total: IDL.Nat,
94
+ request_payload_bytes_total: IDL.Nat
95
+ });
96
+ export const CanisterStatusResponse = IDL.Record({
97
+ status: CanisterStatusType,
98
+ memory_size: IDL.Nat,
99
+ cycles: IDL.Nat,
100
+ settings: DefiniteCanisterSettings,
101
+ query_stats: QueryStats,
102
+ idle_cycles_burned_per_day: IDL.Nat,
103
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
104
+ reserved_cycles: IDL.Nat
105
+ });
106
+ export const ManagedCanisterStatus = IDL.Variant({
107
+ Created: IDL.Record({canister_id: IDL.Principal}),
108
+ Installed: IDL.Record({
109
+ canister_id: IDL.Principal,
110
+ installed_wasm_hash: IDL.Text
111
+ })
112
+ });
113
+ export const ManagedCanisters = IDL.Record({
114
+ erc20_contract: Erc20Contract,
115
+ ledger: IDL.Opt(ManagedCanisterStatus),
116
+ index: IDL.Opt(ManagedCanisterStatus),
117
+ archives: IDL.Vec(IDL.Principal),
118
+ ckerc20_token_symbol: IDL.Text
119
+ });
120
+ export const ManagedLedgerSuite = IDL.Record({
121
+ token_symbol: IDL.Text,
122
+ ledger: IDL.Opt(ManagedCanisterStatus),
123
+ index: IDL.Opt(ManagedCanisterStatus),
124
+ archives: IDL.Vec(IDL.Principal)
125
+ });
126
+ export const LedgerSuiteVersion = IDL.Record({
127
+ archive_compressed_wasm_hash: IDL.Text,
128
+ ledger_compressed_wasm_hash: IDL.Text,
129
+ index_compressed_wasm_hash: IDL.Text
130
+ });
131
+ export const OrchestratorInfo = IDL.Record({
132
+ cycles_management: CyclesManagement,
133
+ managed_canisters: IDL.Vec(ManagedCanisters),
134
+ managed_pre_existing_ledger_suites: IDL.Opt(IDL.Vec(ManagedLedgerSuite)),
135
+ more_controller_ids: IDL.Vec(IDL.Principal),
136
+ ledger_suite_version: IDL.Opt(LedgerSuiteVersion),
137
+ minter_id: IDL.Opt(IDL.Principal)
138
+ });
139
+
140
+ export const idlService = IDL.Service({
141
+ canister_ids: IDL.Func([Erc20Contract], [IDL.Opt(ManagedCanisterIds)], ['query']),
142
+ get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
143
+ get_orchestrator_info: IDL.Func([], [OrchestratorInfo], ['query'])
144
+ });
145
+
146
+ export const idlInitArgs = [OrchestratorArg];
147
+
148
+ export const idlFactory = ({IDL}) => {
149
+ const InstalledCanister = IDL.Record({
150
+ canister_id: IDL.Principal,
151
+ installed_wasm_hash: IDL.Text
152
+ });
153
+ const InstalledLedgerSuite = IDL.Record({
154
+ token_symbol: IDL.Text,
155
+ ledger: InstalledCanister,
156
+ index: InstalledCanister,
157
+ archives: IDL.Opt(IDL.Vec(IDL.Principal))
158
+ });
159
+ const UpdateCyclesManagement = IDL.Record({
160
+ cycles_top_up_increment: IDL.Opt(IDL.Nat),
161
+ cycles_for_ledger_creation: IDL.Opt(IDL.Nat),
162
+ cycles_for_archive_creation: IDL.Opt(IDL.Nat),
163
+ cycles_for_index_creation: IDL.Opt(IDL.Nat)
164
+ });
165
+ const UpgradeArg = IDL.Record({
166
+ manage_ledger_suites: IDL.Opt(IDL.Vec(InstalledLedgerSuite)),
167
+ cycles_management: IDL.Opt(UpdateCyclesManagement),
168
+ archive_compressed_wasm_hash: IDL.Opt(IDL.Text),
169
+ git_commit_hash: IDL.Opt(IDL.Text),
170
+ ledger_compressed_wasm_hash: IDL.Opt(IDL.Text),
171
+ index_compressed_wasm_hash: IDL.Opt(IDL.Text)
172
+ });
173
+ const CyclesManagement = IDL.Record({
174
+ cycles_top_up_increment: IDL.Nat,
175
+ cycles_for_ledger_creation: IDL.Nat,
176
+ cycles_for_archive_creation: IDL.Nat,
177
+ cycles_for_index_creation: IDL.Nat
178
+ });
179
+ const InitArg = IDL.Record({
180
+ cycles_management: IDL.Opt(CyclesManagement),
181
+ more_controller_ids: IDL.Vec(IDL.Principal),
182
+ minter_id: IDL.Opt(IDL.Principal)
183
+ });
184
+ const Erc20Contract = IDL.Record({
185
+ chain_id: IDL.Nat,
186
+ address: IDL.Text
187
+ });
188
+ const LedgerInitArg = IDL.Record({
189
+ decimals: IDL.Nat8,
190
+ token_symbol: IDL.Text,
191
+ transfer_fee: IDL.Nat,
192
+ token_logo: IDL.Text,
193
+ token_name: IDL.Text
194
+ });
195
+ const AddErc20Arg = IDL.Record({
196
+ contract: Erc20Contract,
197
+ ledger_init_arg: LedgerInitArg
198
+ });
199
+ const OrchestratorArg = IDL.Variant({
200
+ UpgradeArg: UpgradeArg,
201
+ InitArg: InitArg,
202
+ AddErc20Arg: AddErc20Arg
203
+ });
204
+ const ManagedCanisterIds = IDL.Record({
205
+ ledger: IDL.Opt(IDL.Principal),
206
+ index: IDL.Opt(IDL.Principal),
207
+ archives: IDL.Vec(IDL.Principal)
208
+ });
209
+ const CanisterStatusType = IDL.Variant({
210
+ stopped: IDL.Null,
211
+ stopping: IDL.Null,
212
+ running: IDL.Null
213
+ });
214
+ const LogVisibility = IDL.Variant({
215
+ controllers: IDL.Null,
216
+ public: IDL.Null,
217
+ allowed_viewers: IDL.Vec(IDL.Principal)
218
+ });
219
+ const DefiniteCanisterSettings = IDL.Record({
220
+ freezing_threshold: IDL.Nat,
221
+ controllers: IDL.Vec(IDL.Principal),
222
+ reserved_cycles_limit: IDL.Nat,
223
+ log_visibility: LogVisibility,
224
+ wasm_memory_limit: IDL.Nat,
225
+ memory_allocation: IDL.Nat,
226
+ compute_allocation: IDL.Nat
227
+ });
228
+ const QueryStats = IDL.Record({
229
+ response_payload_bytes_total: IDL.Nat,
230
+ num_instructions_total: IDL.Nat,
231
+ num_calls_total: IDL.Nat,
232
+ request_payload_bytes_total: IDL.Nat
233
+ });
234
+ const CanisterStatusResponse = IDL.Record({
235
+ status: CanisterStatusType,
236
+ memory_size: IDL.Nat,
237
+ cycles: IDL.Nat,
238
+ settings: DefiniteCanisterSettings,
239
+ query_stats: QueryStats,
240
+ idle_cycles_burned_per_day: IDL.Nat,
241
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
242
+ reserved_cycles: IDL.Nat
243
+ });
244
+ const ManagedCanisterStatus = IDL.Variant({
245
+ Created: IDL.Record({canister_id: IDL.Principal}),
246
+ Installed: IDL.Record({
247
+ canister_id: IDL.Principal,
248
+ installed_wasm_hash: IDL.Text
249
+ })
250
+ });
251
+ const ManagedCanisters = IDL.Record({
252
+ erc20_contract: Erc20Contract,
253
+ ledger: IDL.Opt(ManagedCanisterStatus),
254
+ index: IDL.Opt(ManagedCanisterStatus),
255
+ archives: IDL.Vec(IDL.Principal),
256
+ ckerc20_token_symbol: IDL.Text
257
+ });
258
+ const ManagedLedgerSuite = IDL.Record({
259
+ token_symbol: IDL.Text,
260
+ ledger: IDL.Opt(ManagedCanisterStatus),
261
+ index: IDL.Opt(ManagedCanisterStatus),
262
+ archives: IDL.Vec(IDL.Principal)
263
+ });
264
+ const LedgerSuiteVersion = IDL.Record({
265
+ archive_compressed_wasm_hash: IDL.Text,
266
+ ledger_compressed_wasm_hash: IDL.Text,
267
+ index_compressed_wasm_hash: IDL.Text
268
+ });
269
+ const OrchestratorInfo = IDL.Record({
270
+ cycles_management: CyclesManagement,
271
+ managed_canisters: IDL.Vec(ManagedCanisters),
272
+ managed_pre_existing_ledger_suites: IDL.Opt(IDL.Vec(ManagedLedgerSuite)),
273
+ more_controller_ids: IDL.Vec(IDL.Principal),
274
+ ledger_suite_version: IDL.Opt(LedgerSuiteVersion),
275
+ minter_id: IDL.Opt(IDL.Principal)
276
+ });
277
+
278
+ return IDL.Service({
279
+ canister_ids: IDL.Func([Erc20Contract], [IDL.Opt(ManagedCanisterIds)], ['query']),
280
+ get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
281
+ get_orchestrator_info: IDL.Func([], [OrchestratorInfo], ['query'])
282
+ });
283
+ };
284
+
285
+ export const init = ({IDL}) => {
286
+ const InstalledCanister = IDL.Record({
287
+ canister_id: IDL.Principal,
288
+ installed_wasm_hash: IDL.Text
289
+ });
290
+ const InstalledLedgerSuite = IDL.Record({
291
+ token_symbol: IDL.Text,
292
+ ledger: InstalledCanister,
293
+ index: InstalledCanister,
294
+ archives: IDL.Opt(IDL.Vec(IDL.Principal))
295
+ });
296
+ const UpdateCyclesManagement = IDL.Record({
297
+ cycles_top_up_increment: IDL.Opt(IDL.Nat),
298
+ cycles_for_ledger_creation: IDL.Opt(IDL.Nat),
299
+ cycles_for_archive_creation: IDL.Opt(IDL.Nat),
300
+ cycles_for_index_creation: IDL.Opt(IDL.Nat)
301
+ });
302
+ const UpgradeArg = IDL.Record({
303
+ manage_ledger_suites: IDL.Opt(IDL.Vec(InstalledLedgerSuite)),
304
+ cycles_management: IDL.Opt(UpdateCyclesManagement),
305
+ archive_compressed_wasm_hash: IDL.Opt(IDL.Text),
306
+ git_commit_hash: IDL.Opt(IDL.Text),
307
+ ledger_compressed_wasm_hash: IDL.Opt(IDL.Text),
308
+ index_compressed_wasm_hash: IDL.Opt(IDL.Text)
309
+ });
310
+ const CyclesManagement = IDL.Record({
311
+ cycles_top_up_increment: IDL.Nat,
312
+ cycles_for_ledger_creation: IDL.Nat,
313
+ cycles_for_archive_creation: IDL.Nat,
314
+ cycles_for_index_creation: IDL.Nat
315
+ });
316
+ const InitArg = IDL.Record({
317
+ cycles_management: IDL.Opt(CyclesManagement),
318
+ more_controller_ids: IDL.Vec(IDL.Principal),
319
+ minter_id: IDL.Opt(IDL.Principal)
320
+ });
321
+ const Erc20Contract = IDL.Record({
322
+ chain_id: IDL.Nat,
323
+ address: IDL.Text
324
+ });
325
+ const LedgerInitArg = IDL.Record({
326
+ decimals: IDL.Nat8,
327
+ token_symbol: IDL.Text,
328
+ transfer_fee: IDL.Nat,
329
+ token_logo: IDL.Text,
330
+ token_name: IDL.Text
331
+ });
332
+ const AddErc20Arg = IDL.Record({
333
+ contract: Erc20Contract,
334
+ ledger_init_arg: LedgerInitArg
335
+ });
336
+ const OrchestratorArg = IDL.Variant({
337
+ UpgradeArg: UpgradeArg,
338
+ InitArg: InitArg,
339
+ AddErc20Arg: AddErc20Arg
340
+ });
341
+
342
+ return [OrchestratorArg];
343
+ };