@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,878 @@
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 BlockTag = IDL.Variant({
12
+ Safe: IDL.Null,
13
+ Finalized: IDL.Null,
14
+ Latest: IDL.Null
15
+ });
16
+ export const UpgradeArg = IDL.Record({
17
+ deposit_with_subaccount_helper_contract_address: IDL.Opt(IDL.Text),
18
+ next_transaction_nonce: IDL.Opt(IDL.Nat),
19
+ evm_rpc_id: IDL.Opt(IDL.Principal),
20
+ ledger_suite_orchestrator_id: IDL.Opt(IDL.Principal),
21
+ erc20_helper_contract_address: IDL.Opt(IDL.Text),
22
+ last_erc20_scraped_block_number: IDL.Opt(IDL.Nat),
23
+ ethereum_contract_address: IDL.Opt(IDL.Text),
24
+ minimum_withdrawal_amount: IDL.Opt(IDL.Nat),
25
+ last_deposit_with_subaccount_scraped_block_number: IDL.Opt(IDL.Nat),
26
+ ethereum_block_height: IDL.Opt(BlockTag)
27
+ });
28
+ export const EthereumNetwork = IDL.Variant({
29
+ Mainnet: IDL.Null,
30
+ Sepolia: IDL.Null
31
+ });
32
+ export const InitArg = IDL.Record({
33
+ ethereum_network: EthereumNetwork,
34
+ last_scraped_block_number: IDL.Nat,
35
+ ecdsa_key_name: IDL.Text,
36
+ next_transaction_nonce: IDL.Nat,
37
+ evm_rpc_id: IDL.Opt(IDL.Principal),
38
+ ledger_id: IDL.Principal,
39
+ ethereum_contract_address: IDL.Opt(IDL.Text),
40
+ minimum_withdrawal_amount: IDL.Nat,
41
+ ethereum_block_height: BlockTag
42
+ });
43
+ export const MinterArg = IDL.Variant({
44
+ UpgradeArg: UpgradeArg,
45
+ InitArg: InitArg
46
+ });
47
+ export const AddCkErc20Token = IDL.Record({
48
+ ckerc20_ledger_id: IDL.Principal,
49
+ chain_id: IDL.Nat,
50
+ address: IDL.Text,
51
+ ckerc20_token_symbol: IDL.Text
52
+ });
53
+ export const Eip1559TransactionPriceArg = IDL.Record({
54
+ ckerc20_ledger_id: IDL.Principal
55
+ });
56
+ export const Eip1559TransactionPrice = IDL.Record({
57
+ max_priority_fee_per_gas: IDL.Nat,
58
+ max_fee_per_gas: IDL.Nat,
59
+ max_transaction_fee: IDL.Nat,
60
+ timestamp: IDL.Opt(IDL.Nat64),
61
+ gas_limit: IDL.Nat
62
+ });
63
+ export const CanisterStatusType = IDL.Variant({
64
+ stopped: IDL.Null,
65
+ stopping: IDL.Null,
66
+ running: IDL.Null
67
+ });
68
+ export const LogVisibility = IDL.Variant({
69
+ controllers: IDL.Null,
70
+ public: IDL.Null,
71
+ allowed_viewers: IDL.Vec(IDL.Principal)
72
+ });
73
+ export const DefiniteCanisterSettings = IDL.Record({
74
+ freezing_threshold: IDL.Nat,
75
+ controllers: IDL.Vec(IDL.Principal),
76
+ reserved_cycles_limit: IDL.Nat,
77
+ log_visibility: LogVisibility,
78
+ wasm_memory_limit: IDL.Nat,
79
+ memory_allocation: IDL.Nat,
80
+ compute_allocation: IDL.Nat
81
+ });
82
+ export const QueryStats = IDL.Record({
83
+ response_payload_bytes_total: IDL.Nat,
84
+ num_instructions_total: IDL.Nat,
85
+ num_calls_total: IDL.Nat,
86
+ request_payload_bytes_total: IDL.Nat
87
+ });
88
+ export const CanisterStatusResponse = IDL.Record({
89
+ status: CanisterStatusType,
90
+ memory_size: IDL.Nat,
91
+ cycles: IDL.Nat,
92
+ settings: DefiniteCanisterSettings,
93
+ query_stats: QueryStats,
94
+ idle_cycles_burned_per_day: IDL.Nat,
95
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
96
+ reserved_cycles: IDL.Nat
97
+ });
98
+ export const Subaccount = IDL.Vec(IDL.Nat8);
99
+ export const EventSource = IDL.Record({
100
+ transaction_hash: IDL.Text,
101
+ log_index: IDL.Nat
102
+ });
103
+ export const UnsignedTransaction = IDL.Record({
104
+ destination: IDL.Text,
105
+ value: IDL.Nat,
106
+ max_priority_fee_per_gas: IDL.Nat,
107
+ data: IDL.Vec(IDL.Nat8),
108
+ max_fee_per_gas: IDL.Nat,
109
+ chain_id: IDL.Nat,
110
+ nonce: IDL.Nat,
111
+ gas_limit: IDL.Nat,
112
+ access_list: IDL.Vec(
113
+ IDL.Record({
114
+ storage_keys: IDL.Vec(IDL.Vec(IDL.Nat8)),
115
+ address: IDL.Text
116
+ })
117
+ )
118
+ });
119
+ export const ReimbursementIndex = IDL.Variant({
120
+ CkErc20: IDL.Record({
121
+ cketh_ledger_burn_index: IDL.Nat,
122
+ ledger_id: IDL.Principal,
123
+ ckerc20_ledger_burn_index: IDL.Nat
124
+ }),
125
+ CkEth: IDL.Record({ledger_burn_index: IDL.Nat})
126
+ });
127
+ export const TransactionReceipt = IDL.Record({
128
+ effective_gas_price: IDL.Nat,
129
+ status: IDL.Variant({Success: IDL.Null, Failure: IDL.Null}),
130
+ transaction_hash: IDL.Text,
131
+ block_hash: IDL.Text,
132
+ block_number: IDL.Nat,
133
+ gas_used: IDL.Nat
134
+ });
135
+ export const Event = IDL.Record({
136
+ timestamp: IDL.Nat64,
137
+ payload: IDL.Variant({
138
+ SkippedBlock: IDL.Record({
139
+ block_number: IDL.Nat,
140
+ contract_address: IDL.Opt(IDL.Text)
141
+ }),
142
+ AcceptedErc20Deposit: IDL.Record({
143
+ principal: IDL.Principal,
144
+ transaction_hash: IDL.Text,
145
+ value: IDL.Nat,
146
+ log_index: IDL.Nat,
147
+ subaccount: IDL.Opt(Subaccount),
148
+ block_number: IDL.Nat,
149
+ erc20_contract_address: IDL.Text,
150
+ from_address: IDL.Text
151
+ }),
152
+ SignedTransaction: IDL.Record({
153
+ raw_transaction: IDL.Text,
154
+ withdrawal_id: IDL.Nat
155
+ }),
156
+ Upgrade: UpgradeArg,
157
+ Init: InitArg,
158
+ AddedCkErc20Token: IDL.Record({
159
+ ckerc20_ledger_id: IDL.Principal,
160
+ chain_id: IDL.Nat,
161
+ address: IDL.Text,
162
+ ckerc20_token_symbol: IDL.Text
163
+ }),
164
+ SyncedDepositWithSubaccountToBlock: IDL.Record({
165
+ block_number: IDL.Nat
166
+ }),
167
+ QuarantinedDeposit: IDL.Record({event_source: EventSource}),
168
+ SyncedToBlock: IDL.Record({block_number: IDL.Nat}),
169
+ AcceptedDeposit: IDL.Record({
170
+ principal: IDL.Principal,
171
+ transaction_hash: IDL.Text,
172
+ value: IDL.Nat,
173
+ log_index: IDL.Nat,
174
+ subaccount: IDL.Opt(Subaccount),
175
+ block_number: IDL.Nat,
176
+ from_address: IDL.Text
177
+ }),
178
+ ReplacedTransaction: IDL.Record({
179
+ withdrawal_id: IDL.Nat,
180
+ transaction: UnsignedTransaction
181
+ }),
182
+ QuarantinedReimbursement: IDL.Record({index: ReimbursementIndex}),
183
+ MintedCkEth: IDL.Record({
184
+ event_source: EventSource,
185
+ mint_block_index: IDL.Nat
186
+ }),
187
+ ReimbursedEthWithdrawal: IDL.Record({
188
+ transaction_hash: IDL.Opt(IDL.Text),
189
+ withdrawal_id: IDL.Nat,
190
+ reimbursed_amount: IDL.Nat,
191
+ reimbursed_in_block: IDL.Nat
192
+ }),
193
+ FailedErc20WithdrawalRequest: IDL.Record({
194
+ to: IDL.Principal,
195
+ withdrawal_id: IDL.Nat,
196
+ reimbursed_amount: IDL.Nat,
197
+ to_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
198
+ }),
199
+ ReimbursedErc20Withdrawal: IDL.Record({
200
+ burn_in_block: IDL.Nat,
201
+ transaction_hash: IDL.Opt(IDL.Text),
202
+ withdrawal_id: IDL.Nat,
203
+ reimbursed_amount: IDL.Nat,
204
+ ledger_id: IDL.Principal,
205
+ reimbursed_in_block: IDL.Nat
206
+ }),
207
+ MintedCkErc20: IDL.Record({
208
+ event_source: EventSource,
209
+ erc20_contract_address: IDL.Text,
210
+ mint_block_index: IDL.Nat,
211
+ ckerc20_token_symbol: IDL.Text
212
+ }),
213
+ CreatedTransaction: IDL.Record({
214
+ withdrawal_id: IDL.Nat,
215
+ transaction: UnsignedTransaction
216
+ }),
217
+ InvalidDeposit: IDL.Record({
218
+ event_source: EventSource,
219
+ reason: IDL.Text
220
+ }),
221
+ SyncedErc20ToBlock: IDL.Record({block_number: IDL.Nat}),
222
+ AcceptedErc20WithdrawalRequest: IDL.Record({
223
+ cketh_ledger_burn_index: IDL.Nat,
224
+ destination: IDL.Text,
225
+ ckerc20_ledger_id: IDL.Principal,
226
+ withdrawal_amount: IDL.Nat,
227
+ from: IDL.Principal,
228
+ created_at: IDL.Nat64,
229
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
230
+ erc20_contract_address: IDL.Text,
231
+ ckerc20_ledger_burn_index: IDL.Nat,
232
+ max_transaction_fee: IDL.Nat
233
+ }),
234
+ AcceptedEthWithdrawalRequest: IDL.Record({
235
+ ledger_burn_index: IDL.Nat,
236
+ destination: IDL.Text,
237
+ withdrawal_amount: IDL.Nat,
238
+ from: IDL.Principal,
239
+ created_at: IDL.Opt(IDL.Nat64),
240
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
241
+ }),
242
+ FinalizedTransaction: IDL.Record({
243
+ withdrawal_id: IDL.Nat,
244
+ transaction_receipt: TransactionReceipt
245
+ })
246
+ })
247
+ });
248
+ export const CkErc20Token = IDL.Record({
249
+ erc20_contract_address: IDL.Text,
250
+ ledger_canister_id: IDL.Principal,
251
+ ckerc20_token_symbol: IDL.Text
252
+ });
253
+ export const GasFeeEstimate = IDL.Record({
254
+ max_priority_fee_per_gas: IDL.Nat,
255
+ max_fee_per_gas: IDL.Nat,
256
+ timestamp: IDL.Nat64
257
+ });
258
+ export const MinterInfo = IDL.Record({
259
+ deposit_with_subaccount_helper_contract_address: IDL.Opt(IDL.Text),
260
+ eth_balance: IDL.Opt(IDL.Nat),
261
+ eth_helper_contract_address: IDL.Opt(IDL.Text),
262
+ last_observed_block_number: IDL.Opt(IDL.Nat),
263
+ evm_rpc_id: IDL.Opt(IDL.Principal),
264
+ erc20_helper_contract_address: IDL.Opt(IDL.Text),
265
+ last_erc20_scraped_block_number: IDL.Opt(IDL.Nat),
266
+ supported_ckerc20_tokens: IDL.Opt(IDL.Vec(CkErc20Token)),
267
+ last_gas_fee_estimate: IDL.Opt(GasFeeEstimate),
268
+ cketh_ledger_id: IDL.Opt(IDL.Principal),
269
+ smart_contract_address: IDL.Opt(IDL.Text),
270
+ last_eth_scraped_block_number: IDL.Opt(IDL.Nat),
271
+ minimum_withdrawal_amount: IDL.Opt(IDL.Nat),
272
+ erc20_balances: IDL.Opt(
273
+ IDL.Vec(IDL.Record({balance: IDL.Nat, erc20_contract_address: IDL.Text}))
274
+ ),
275
+ minter_address: IDL.Opt(IDL.Text),
276
+ last_deposit_with_subaccount_scraped_block_number: IDL.Opt(IDL.Nat),
277
+ ethereum_block_height: IDL.Opt(BlockTag)
278
+ });
279
+ export const EthTransaction = IDL.Record({transaction_hash: IDL.Text});
280
+ export const TxFinalizedStatus = IDL.Variant({
281
+ Success: IDL.Record({
282
+ transaction_hash: IDL.Text,
283
+ effective_transaction_fee: IDL.Opt(IDL.Nat)
284
+ }),
285
+ Reimbursed: IDL.Record({
286
+ transaction_hash: IDL.Text,
287
+ reimbursed_amount: IDL.Nat,
288
+ reimbursed_in_block: IDL.Nat
289
+ }),
290
+ PendingReimbursement: EthTransaction
291
+ });
292
+ export const RetrieveEthStatus = IDL.Variant({
293
+ NotFound: IDL.Null,
294
+ TxFinalized: TxFinalizedStatus,
295
+ TxSent: EthTransaction,
296
+ TxCreated: IDL.Null,
297
+ Pending: IDL.Null
298
+ });
299
+ export const WithdrawErc20Arg = IDL.Record({
300
+ ckerc20_ledger_id: IDL.Principal,
301
+ recipient: IDL.Text,
302
+ from_cketh_subaccount: IDL.Opt(Subaccount),
303
+ from_ckerc20_subaccount: IDL.Opt(Subaccount),
304
+ amount: IDL.Nat
305
+ });
306
+ export const RetrieveErc20Request = IDL.Record({
307
+ ckerc20_block_index: IDL.Nat,
308
+ cketh_block_index: IDL.Nat
309
+ });
310
+ export const LedgerError = IDL.Variant({
311
+ TemporarilyUnavailable: IDL.Text,
312
+ InsufficientAllowance: IDL.Record({
313
+ token_symbol: IDL.Text,
314
+ ledger_id: IDL.Principal,
315
+ allowance: IDL.Nat,
316
+ failed_burn_amount: IDL.Nat
317
+ }),
318
+ AmountTooLow: IDL.Record({
319
+ minimum_burn_amount: IDL.Nat,
320
+ token_symbol: IDL.Text,
321
+ ledger_id: IDL.Principal,
322
+ failed_burn_amount: IDL.Nat
323
+ }),
324
+ InsufficientFunds: IDL.Record({
325
+ balance: IDL.Nat,
326
+ token_symbol: IDL.Text,
327
+ ledger_id: IDL.Principal,
328
+ failed_burn_amount: IDL.Nat
329
+ })
330
+ });
331
+ export const WithdrawErc20Error = IDL.Variant({
332
+ TokenNotSupported: IDL.Record({
333
+ supported_tokens: IDL.Vec(CkErc20Token)
334
+ }),
335
+ TemporarilyUnavailable: IDL.Text,
336
+ CkErc20LedgerError: IDL.Record({
337
+ error: LedgerError,
338
+ cketh_block_index: IDL.Nat
339
+ }),
340
+ CkEthLedgerError: IDL.Record({error: LedgerError}),
341
+ RecipientAddressBlocked: IDL.Record({address: IDL.Text})
342
+ });
343
+ export const WithdrawalArg = IDL.Record({
344
+ recipient: IDL.Text,
345
+ from_subaccount: IDL.Opt(Subaccount),
346
+ amount: IDL.Nat
347
+ });
348
+ export const RetrieveEthRequest = IDL.Record({block_index: IDL.Nat});
349
+ export const WithdrawalError = IDL.Variant({
350
+ TemporarilyUnavailable: IDL.Text,
351
+ InsufficientAllowance: IDL.Record({allowance: IDL.Nat}),
352
+ AmountTooLow: IDL.Record({min_withdrawal_amount: IDL.Nat}),
353
+ RecipientAddressBlocked: IDL.Record({address: IDL.Text}),
354
+ InsufficientFunds: IDL.Record({balance: IDL.Nat})
355
+ });
356
+ export const Account = IDL.Record({
357
+ owner: IDL.Principal,
358
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
359
+ });
360
+ export const WithdrawalSearchParameter = IDL.Variant({
361
+ ByRecipient: IDL.Text,
362
+ BySenderAccount: Account,
363
+ ByWithdrawalId: IDL.Nat64
364
+ });
365
+ export const WithdrawalStatus = IDL.Variant({
366
+ TxFinalized: TxFinalizedStatus,
367
+ TxSent: EthTransaction,
368
+ TxCreated: IDL.Null,
369
+ Pending: IDL.Null
370
+ });
371
+ export const WithdrawalDetail = IDL.Record({
372
+ status: WithdrawalStatus,
373
+ token_symbol: IDL.Text,
374
+ withdrawal_amount: IDL.Nat,
375
+ withdrawal_id: IDL.Nat64,
376
+ from: IDL.Principal,
377
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
378
+ max_transaction_fee: IDL.Opt(IDL.Nat),
379
+ recipient_address: IDL.Text
380
+ });
381
+
382
+ export const idlService = IDL.Service({
383
+ add_ckerc20_token: IDL.Func([AddCkErc20Token], [], []),
384
+ eip_1559_transaction_price: IDL.Func(
385
+ [IDL.Opt(Eip1559TransactionPriceArg)],
386
+ [Eip1559TransactionPrice],
387
+ ['query']
388
+ ),
389
+ get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
390
+ get_events: IDL.Func(
391
+ [IDL.Record({start: IDL.Nat64, length: IDL.Nat64})],
392
+ [
393
+ IDL.Record({
394
+ total_event_count: IDL.Nat64,
395
+ events: IDL.Vec(Event)
396
+ })
397
+ ],
398
+ ['query']
399
+ ),
400
+ get_minter_info: IDL.Func([], [MinterInfo], ['query']),
401
+ is_address_blocked: IDL.Func([IDL.Text], [IDL.Bool], ['query']),
402
+ minter_address: IDL.Func([], [IDL.Text], []),
403
+ retrieve_eth_status: IDL.Func([IDL.Nat64], [RetrieveEthStatus], []),
404
+ smart_contract_address: IDL.Func([], [IDL.Text], ['query']),
405
+ withdraw_erc20: IDL.Func(
406
+ [WithdrawErc20Arg],
407
+ [
408
+ IDL.Variant({
409
+ Ok: RetrieveErc20Request,
410
+ Err: WithdrawErc20Error
411
+ })
412
+ ],
413
+ []
414
+ ),
415
+ withdraw_eth: IDL.Func(
416
+ [WithdrawalArg],
417
+ [IDL.Variant({Ok: RetrieveEthRequest, Err: WithdrawalError})],
418
+ []
419
+ ),
420
+ withdrawal_status: IDL.Func([WithdrawalSearchParameter], [IDL.Vec(WithdrawalDetail)], ['query'])
421
+ });
422
+
423
+ export const idlInitArgs = [MinterArg];
424
+
425
+ export const idlFactory = ({IDL}) => {
426
+ const BlockTag = IDL.Variant({
427
+ Safe: IDL.Null,
428
+ Finalized: IDL.Null,
429
+ Latest: IDL.Null
430
+ });
431
+ const UpgradeArg = IDL.Record({
432
+ deposit_with_subaccount_helper_contract_address: IDL.Opt(IDL.Text),
433
+ next_transaction_nonce: IDL.Opt(IDL.Nat),
434
+ evm_rpc_id: IDL.Opt(IDL.Principal),
435
+ ledger_suite_orchestrator_id: IDL.Opt(IDL.Principal),
436
+ erc20_helper_contract_address: IDL.Opt(IDL.Text),
437
+ last_erc20_scraped_block_number: IDL.Opt(IDL.Nat),
438
+ ethereum_contract_address: IDL.Opt(IDL.Text),
439
+ minimum_withdrawal_amount: IDL.Opt(IDL.Nat),
440
+ last_deposit_with_subaccount_scraped_block_number: IDL.Opt(IDL.Nat),
441
+ ethereum_block_height: IDL.Opt(BlockTag)
442
+ });
443
+ const EthereumNetwork = IDL.Variant({
444
+ Mainnet: IDL.Null,
445
+ Sepolia: IDL.Null
446
+ });
447
+ const InitArg = IDL.Record({
448
+ ethereum_network: EthereumNetwork,
449
+ last_scraped_block_number: IDL.Nat,
450
+ ecdsa_key_name: IDL.Text,
451
+ next_transaction_nonce: IDL.Nat,
452
+ evm_rpc_id: IDL.Opt(IDL.Principal),
453
+ ledger_id: IDL.Principal,
454
+ ethereum_contract_address: IDL.Opt(IDL.Text),
455
+ minimum_withdrawal_amount: IDL.Nat,
456
+ ethereum_block_height: BlockTag
457
+ });
458
+ const MinterArg = IDL.Variant({
459
+ UpgradeArg: UpgradeArg,
460
+ InitArg: InitArg
461
+ });
462
+ const AddCkErc20Token = IDL.Record({
463
+ ckerc20_ledger_id: IDL.Principal,
464
+ chain_id: IDL.Nat,
465
+ address: IDL.Text,
466
+ ckerc20_token_symbol: IDL.Text
467
+ });
468
+ const Eip1559TransactionPriceArg = IDL.Record({
469
+ ckerc20_ledger_id: IDL.Principal
470
+ });
471
+ const Eip1559TransactionPrice = IDL.Record({
472
+ max_priority_fee_per_gas: IDL.Nat,
473
+ max_fee_per_gas: IDL.Nat,
474
+ max_transaction_fee: IDL.Nat,
475
+ timestamp: IDL.Opt(IDL.Nat64),
476
+ gas_limit: IDL.Nat
477
+ });
478
+ const CanisterStatusType = IDL.Variant({
479
+ stopped: IDL.Null,
480
+ stopping: IDL.Null,
481
+ running: IDL.Null
482
+ });
483
+ const LogVisibility = IDL.Variant({
484
+ controllers: IDL.Null,
485
+ public: IDL.Null,
486
+ allowed_viewers: IDL.Vec(IDL.Principal)
487
+ });
488
+ const DefiniteCanisterSettings = IDL.Record({
489
+ freezing_threshold: IDL.Nat,
490
+ controllers: IDL.Vec(IDL.Principal),
491
+ reserved_cycles_limit: IDL.Nat,
492
+ log_visibility: LogVisibility,
493
+ wasm_memory_limit: IDL.Nat,
494
+ memory_allocation: IDL.Nat,
495
+ compute_allocation: IDL.Nat
496
+ });
497
+ const QueryStats = IDL.Record({
498
+ response_payload_bytes_total: IDL.Nat,
499
+ num_instructions_total: IDL.Nat,
500
+ num_calls_total: IDL.Nat,
501
+ request_payload_bytes_total: IDL.Nat
502
+ });
503
+ const CanisterStatusResponse = IDL.Record({
504
+ status: CanisterStatusType,
505
+ memory_size: IDL.Nat,
506
+ cycles: IDL.Nat,
507
+ settings: DefiniteCanisterSettings,
508
+ query_stats: QueryStats,
509
+ idle_cycles_burned_per_day: IDL.Nat,
510
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
511
+ reserved_cycles: IDL.Nat
512
+ });
513
+ const Subaccount = IDL.Vec(IDL.Nat8);
514
+ const EventSource = IDL.Record({
515
+ transaction_hash: IDL.Text,
516
+ log_index: IDL.Nat
517
+ });
518
+ const UnsignedTransaction = IDL.Record({
519
+ destination: IDL.Text,
520
+ value: IDL.Nat,
521
+ max_priority_fee_per_gas: IDL.Nat,
522
+ data: IDL.Vec(IDL.Nat8),
523
+ max_fee_per_gas: IDL.Nat,
524
+ chain_id: IDL.Nat,
525
+ nonce: IDL.Nat,
526
+ gas_limit: IDL.Nat,
527
+ access_list: IDL.Vec(
528
+ IDL.Record({
529
+ storage_keys: IDL.Vec(IDL.Vec(IDL.Nat8)),
530
+ address: IDL.Text
531
+ })
532
+ )
533
+ });
534
+ const ReimbursementIndex = IDL.Variant({
535
+ CkErc20: IDL.Record({
536
+ cketh_ledger_burn_index: IDL.Nat,
537
+ ledger_id: IDL.Principal,
538
+ ckerc20_ledger_burn_index: IDL.Nat
539
+ }),
540
+ CkEth: IDL.Record({ledger_burn_index: IDL.Nat})
541
+ });
542
+ const TransactionReceipt = IDL.Record({
543
+ effective_gas_price: IDL.Nat,
544
+ status: IDL.Variant({Success: IDL.Null, Failure: IDL.Null}),
545
+ transaction_hash: IDL.Text,
546
+ block_hash: IDL.Text,
547
+ block_number: IDL.Nat,
548
+ gas_used: IDL.Nat
549
+ });
550
+ const Event = IDL.Record({
551
+ timestamp: IDL.Nat64,
552
+ payload: IDL.Variant({
553
+ SkippedBlock: IDL.Record({
554
+ block_number: IDL.Nat,
555
+ contract_address: IDL.Opt(IDL.Text)
556
+ }),
557
+ AcceptedErc20Deposit: IDL.Record({
558
+ principal: IDL.Principal,
559
+ transaction_hash: IDL.Text,
560
+ value: IDL.Nat,
561
+ log_index: IDL.Nat,
562
+ subaccount: IDL.Opt(Subaccount),
563
+ block_number: IDL.Nat,
564
+ erc20_contract_address: IDL.Text,
565
+ from_address: IDL.Text
566
+ }),
567
+ SignedTransaction: IDL.Record({
568
+ raw_transaction: IDL.Text,
569
+ withdrawal_id: IDL.Nat
570
+ }),
571
+ Upgrade: UpgradeArg,
572
+ Init: InitArg,
573
+ AddedCkErc20Token: IDL.Record({
574
+ ckerc20_ledger_id: IDL.Principal,
575
+ chain_id: IDL.Nat,
576
+ address: IDL.Text,
577
+ ckerc20_token_symbol: IDL.Text
578
+ }),
579
+ SyncedDepositWithSubaccountToBlock: IDL.Record({
580
+ block_number: IDL.Nat
581
+ }),
582
+ QuarantinedDeposit: IDL.Record({event_source: EventSource}),
583
+ SyncedToBlock: IDL.Record({block_number: IDL.Nat}),
584
+ AcceptedDeposit: IDL.Record({
585
+ principal: IDL.Principal,
586
+ transaction_hash: IDL.Text,
587
+ value: IDL.Nat,
588
+ log_index: IDL.Nat,
589
+ subaccount: IDL.Opt(Subaccount),
590
+ block_number: IDL.Nat,
591
+ from_address: IDL.Text
592
+ }),
593
+ ReplacedTransaction: IDL.Record({
594
+ withdrawal_id: IDL.Nat,
595
+ transaction: UnsignedTransaction
596
+ }),
597
+ QuarantinedReimbursement: IDL.Record({index: ReimbursementIndex}),
598
+ MintedCkEth: IDL.Record({
599
+ event_source: EventSource,
600
+ mint_block_index: IDL.Nat
601
+ }),
602
+ ReimbursedEthWithdrawal: IDL.Record({
603
+ transaction_hash: IDL.Opt(IDL.Text),
604
+ withdrawal_id: IDL.Nat,
605
+ reimbursed_amount: IDL.Nat,
606
+ reimbursed_in_block: IDL.Nat
607
+ }),
608
+ FailedErc20WithdrawalRequest: IDL.Record({
609
+ to: IDL.Principal,
610
+ withdrawal_id: IDL.Nat,
611
+ reimbursed_amount: IDL.Nat,
612
+ to_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
613
+ }),
614
+ ReimbursedErc20Withdrawal: IDL.Record({
615
+ burn_in_block: IDL.Nat,
616
+ transaction_hash: IDL.Opt(IDL.Text),
617
+ withdrawal_id: IDL.Nat,
618
+ reimbursed_amount: IDL.Nat,
619
+ ledger_id: IDL.Principal,
620
+ reimbursed_in_block: IDL.Nat
621
+ }),
622
+ MintedCkErc20: IDL.Record({
623
+ event_source: EventSource,
624
+ erc20_contract_address: IDL.Text,
625
+ mint_block_index: IDL.Nat,
626
+ ckerc20_token_symbol: IDL.Text
627
+ }),
628
+ CreatedTransaction: IDL.Record({
629
+ withdrawal_id: IDL.Nat,
630
+ transaction: UnsignedTransaction
631
+ }),
632
+ InvalidDeposit: IDL.Record({
633
+ event_source: EventSource,
634
+ reason: IDL.Text
635
+ }),
636
+ SyncedErc20ToBlock: IDL.Record({block_number: IDL.Nat}),
637
+ AcceptedErc20WithdrawalRequest: IDL.Record({
638
+ cketh_ledger_burn_index: IDL.Nat,
639
+ destination: IDL.Text,
640
+ ckerc20_ledger_id: IDL.Principal,
641
+ withdrawal_amount: IDL.Nat,
642
+ from: IDL.Principal,
643
+ created_at: IDL.Nat64,
644
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
645
+ erc20_contract_address: IDL.Text,
646
+ ckerc20_ledger_burn_index: IDL.Nat,
647
+ max_transaction_fee: IDL.Nat
648
+ }),
649
+ AcceptedEthWithdrawalRequest: IDL.Record({
650
+ ledger_burn_index: IDL.Nat,
651
+ destination: IDL.Text,
652
+ withdrawal_amount: IDL.Nat,
653
+ from: IDL.Principal,
654
+ created_at: IDL.Opt(IDL.Nat64),
655
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
656
+ }),
657
+ FinalizedTransaction: IDL.Record({
658
+ withdrawal_id: IDL.Nat,
659
+ transaction_receipt: TransactionReceipt
660
+ })
661
+ })
662
+ });
663
+ const CkErc20Token = IDL.Record({
664
+ erc20_contract_address: IDL.Text,
665
+ ledger_canister_id: IDL.Principal,
666
+ ckerc20_token_symbol: IDL.Text
667
+ });
668
+ const GasFeeEstimate = IDL.Record({
669
+ max_priority_fee_per_gas: IDL.Nat,
670
+ max_fee_per_gas: IDL.Nat,
671
+ timestamp: IDL.Nat64
672
+ });
673
+ const MinterInfo = IDL.Record({
674
+ deposit_with_subaccount_helper_contract_address: IDL.Opt(IDL.Text),
675
+ eth_balance: IDL.Opt(IDL.Nat),
676
+ eth_helper_contract_address: IDL.Opt(IDL.Text),
677
+ last_observed_block_number: IDL.Opt(IDL.Nat),
678
+ evm_rpc_id: IDL.Opt(IDL.Principal),
679
+ erc20_helper_contract_address: IDL.Opt(IDL.Text),
680
+ last_erc20_scraped_block_number: IDL.Opt(IDL.Nat),
681
+ supported_ckerc20_tokens: IDL.Opt(IDL.Vec(CkErc20Token)),
682
+ last_gas_fee_estimate: IDL.Opt(GasFeeEstimate),
683
+ cketh_ledger_id: IDL.Opt(IDL.Principal),
684
+ smart_contract_address: IDL.Opt(IDL.Text),
685
+ last_eth_scraped_block_number: IDL.Opt(IDL.Nat),
686
+ minimum_withdrawal_amount: IDL.Opt(IDL.Nat),
687
+ erc20_balances: IDL.Opt(
688
+ IDL.Vec(IDL.Record({balance: IDL.Nat, erc20_contract_address: IDL.Text}))
689
+ ),
690
+ minter_address: IDL.Opt(IDL.Text),
691
+ last_deposit_with_subaccount_scraped_block_number: IDL.Opt(IDL.Nat),
692
+ ethereum_block_height: IDL.Opt(BlockTag)
693
+ });
694
+ const EthTransaction = IDL.Record({transaction_hash: IDL.Text});
695
+ const TxFinalizedStatus = IDL.Variant({
696
+ Success: IDL.Record({
697
+ transaction_hash: IDL.Text,
698
+ effective_transaction_fee: IDL.Opt(IDL.Nat)
699
+ }),
700
+ Reimbursed: IDL.Record({
701
+ transaction_hash: IDL.Text,
702
+ reimbursed_amount: IDL.Nat,
703
+ reimbursed_in_block: IDL.Nat
704
+ }),
705
+ PendingReimbursement: EthTransaction
706
+ });
707
+ const RetrieveEthStatus = IDL.Variant({
708
+ NotFound: IDL.Null,
709
+ TxFinalized: TxFinalizedStatus,
710
+ TxSent: EthTransaction,
711
+ TxCreated: IDL.Null,
712
+ Pending: IDL.Null
713
+ });
714
+ const WithdrawErc20Arg = IDL.Record({
715
+ ckerc20_ledger_id: IDL.Principal,
716
+ recipient: IDL.Text,
717
+ from_cketh_subaccount: IDL.Opt(Subaccount),
718
+ from_ckerc20_subaccount: IDL.Opt(Subaccount),
719
+ amount: IDL.Nat
720
+ });
721
+ const RetrieveErc20Request = IDL.Record({
722
+ ckerc20_block_index: IDL.Nat,
723
+ cketh_block_index: IDL.Nat
724
+ });
725
+ const LedgerError = IDL.Variant({
726
+ TemporarilyUnavailable: IDL.Text,
727
+ InsufficientAllowance: IDL.Record({
728
+ token_symbol: IDL.Text,
729
+ ledger_id: IDL.Principal,
730
+ allowance: IDL.Nat,
731
+ failed_burn_amount: IDL.Nat
732
+ }),
733
+ AmountTooLow: IDL.Record({
734
+ minimum_burn_amount: IDL.Nat,
735
+ token_symbol: IDL.Text,
736
+ ledger_id: IDL.Principal,
737
+ failed_burn_amount: IDL.Nat
738
+ }),
739
+ InsufficientFunds: IDL.Record({
740
+ balance: IDL.Nat,
741
+ token_symbol: IDL.Text,
742
+ ledger_id: IDL.Principal,
743
+ failed_burn_amount: IDL.Nat
744
+ })
745
+ });
746
+ const WithdrawErc20Error = IDL.Variant({
747
+ TokenNotSupported: IDL.Record({
748
+ supported_tokens: IDL.Vec(CkErc20Token)
749
+ }),
750
+ TemporarilyUnavailable: IDL.Text,
751
+ CkErc20LedgerError: IDL.Record({
752
+ error: LedgerError,
753
+ cketh_block_index: IDL.Nat
754
+ }),
755
+ CkEthLedgerError: IDL.Record({error: LedgerError}),
756
+ RecipientAddressBlocked: IDL.Record({address: IDL.Text})
757
+ });
758
+ const WithdrawalArg = IDL.Record({
759
+ recipient: IDL.Text,
760
+ from_subaccount: IDL.Opt(Subaccount),
761
+ amount: IDL.Nat
762
+ });
763
+ const RetrieveEthRequest = IDL.Record({block_index: IDL.Nat});
764
+ const WithdrawalError = IDL.Variant({
765
+ TemporarilyUnavailable: IDL.Text,
766
+ InsufficientAllowance: IDL.Record({allowance: IDL.Nat}),
767
+ AmountTooLow: IDL.Record({min_withdrawal_amount: IDL.Nat}),
768
+ RecipientAddressBlocked: IDL.Record({address: IDL.Text}),
769
+ InsufficientFunds: IDL.Record({balance: IDL.Nat})
770
+ });
771
+ const Account = IDL.Record({
772
+ owner: IDL.Principal,
773
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
774
+ });
775
+ const WithdrawalSearchParameter = IDL.Variant({
776
+ ByRecipient: IDL.Text,
777
+ BySenderAccount: Account,
778
+ ByWithdrawalId: IDL.Nat64
779
+ });
780
+ const WithdrawalStatus = IDL.Variant({
781
+ TxFinalized: TxFinalizedStatus,
782
+ TxSent: EthTransaction,
783
+ TxCreated: IDL.Null,
784
+ Pending: IDL.Null
785
+ });
786
+ const WithdrawalDetail = IDL.Record({
787
+ status: WithdrawalStatus,
788
+ token_symbol: IDL.Text,
789
+ withdrawal_amount: IDL.Nat,
790
+ withdrawal_id: IDL.Nat64,
791
+ from: IDL.Principal,
792
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
793
+ max_transaction_fee: IDL.Opt(IDL.Nat),
794
+ recipient_address: IDL.Text
795
+ });
796
+
797
+ return IDL.Service({
798
+ add_ckerc20_token: IDL.Func([AddCkErc20Token], [], []),
799
+ eip_1559_transaction_price: IDL.Func(
800
+ [IDL.Opt(Eip1559TransactionPriceArg)],
801
+ [Eip1559TransactionPrice],
802
+ ['query']
803
+ ),
804
+ get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
805
+ get_events: IDL.Func(
806
+ [IDL.Record({start: IDL.Nat64, length: IDL.Nat64})],
807
+ [
808
+ IDL.Record({
809
+ total_event_count: IDL.Nat64,
810
+ events: IDL.Vec(Event)
811
+ })
812
+ ],
813
+ ['query']
814
+ ),
815
+ get_minter_info: IDL.Func([], [MinterInfo], ['query']),
816
+ is_address_blocked: IDL.Func([IDL.Text], [IDL.Bool], ['query']),
817
+ minter_address: IDL.Func([], [IDL.Text], []),
818
+ retrieve_eth_status: IDL.Func([IDL.Nat64], [RetrieveEthStatus], []),
819
+ smart_contract_address: IDL.Func([], [IDL.Text], ['query']),
820
+ withdraw_erc20: IDL.Func(
821
+ [WithdrawErc20Arg],
822
+ [
823
+ IDL.Variant({
824
+ Ok: RetrieveErc20Request,
825
+ Err: WithdrawErc20Error
826
+ })
827
+ ],
828
+ []
829
+ ),
830
+ withdraw_eth: IDL.Func(
831
+ [WithdrawalArg],
832
+ [IDL.Variant({Ok: RetrieveEthRequest, Err: WithdrawalError})],
833
+ []
834
+ ),
835
+ withdrawal_status: IDL.Func([WithdrawalSearchParameter], [IDL.Vec(WithdrawalDetail)], ['query'])
836
+ });
837
+ };
838
+
839
+ export const init = ({IDL}) => {
840
+ const BlockTag = IDL.Variant({
841
+ Safe: IDL.Null,
842
+ Finalized: IDL.Null,
843
+ Latest: IDL.Null
844
+ });
845
+ const UpgradeArg = IDL.Record({
846
+ deposit_with_subaccount_helper_contract_address: IDL.Opt(IDL.Text),
847
+ next_transaction_nonce: IDL.Opt(IDL.Nat),
848
+ evm_rpc_id: IDL.Opt(IDL.Principal),
849
+ ledger_suite_orchestrator_id: IDL.Opt(IDL.Principal),
850
+ erc20_helper_contract_address: IDL.Opt(IDL.Text),
851
+ last_erc20_scraped_block_number: IDL.Opt(IDL.Nat),
852
+ ethereum_contract_address: IDL.Opt(IDL.Text),
853
+ minimum_withdrawal_amount: IDL.Opt(IDL.Nat),
854
+ last_deposit_with_subaccount_scraped_block_number: IDL.Opt(IDL.Nat),
855
+ ethereum_block_height: IDL.Opt(BlockTag)
856
+ });
857
+ const EthereumNetwork = IDL.Variant({
858
+ Mainnet: IDL.Null,
859
+ Sepolia: IDL.Null
860
+ });
861
+ const InitArg = IDL.Record({
862
+ ethereum_network: EthereumNetwork,
863
+ last_scraped_block_number: IDL.Nat,
864
+ ecdsa_key_name: IDL.Text,
865
+ next_transaction_nonce: IDL.Nat,
866
+ evm_rpc_id: IDL.Opt(IDL.Principal),
867
+ ledger_id: IDL.Principal,
868
+ ethereum_contract_address: IDL.Opt(IDL.Text),
869
+ minimum_withdrawal_amount: IDL.Nat,
870
+ ethereum_block_height: BlockTag
871
+ });
872
+ const MinterArg = IDL.Variant({
873
+ UpgradeArg: UpgradeArg,
874
+ InitArg: InitArg
875
+ });
876
+
877
+ return [MinterArg];
878
+ };