@junobuild/functions 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +39 -2
  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,893 @@
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 Mode = IDL.Variant({
12
+ RestrictedTo: IDL.Vec(IDL.Principal),
13
+ DepositsRestrictedTo: IDL.Vec(IDL.Principal),
14
+ ReadOnly: IDL.Null,
15
+ GeneralAvailability: IDL.Null
16
+ });
17
+ export const UpgradeArgs = IDL.Record({
18
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
19
+ kyt_principal: IDL.Opt(IDL.Principal),
20
+ mode: IDL.Opt(Mode),
21
+ retrieve_btc_min_amount: IDL.Opt(IDL.Nat64),
22
+ max_time_in_queue_nanos: IDL.Opt(IDL.Nat64),
23
+ check_fee: IDL.Opt(IDL.Nat64),
24
+ btc_checker_principal: IDL.Opt(IDL.Principal),
25
+ min_confirmations: IDL.Opt(IDL.Nat32),
26
+ kyt_fee: IDL.Opt(IDL.Nat64)
27
+ });
28
+ export const BtcNetwork = IDL.Variant({
29
+ Mainnet: IDL.Null,
30
+ Regtest: IDL.Null,
31
+ Testnet: IDL.Null
32
+ });
33
+ export const InitArgs = IDL.Record({
34
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
35
+ kyt_principal: IDL.Opt(IDL.Principal),
36
+ ecdsa_key_name: IDL.Text,
37
+ mode: Mode,
38
+ retrieve_btc_min_amount: IDL.Nat64,
39
+ ledger_id: IDL.Principal,
40
+ max_time_in_queue_nanos: IDL.Nat64,
41
+ btc_network: BtcNetwork,
42
+ check_fee: IDL.Opt(IDL.Nat64),
43
+ btc_checker_principal: IDL.Opt(IDL.Principal),
44
+ min_confirmations: IDL.Opt(IDL.Nat32),
45
+ kyt_fee: IDL.Opt(IDL.Nat64)
46
+ });
47
+ export const MinterArg = IDL.Variant({
48
+ Upgrade: IDL.Opt(UpgradeArgs),
49
+ Init: InitArgs
50
+ });
51
+ export const MemoryMetrics = IDL.Record({
52
+ wasm_binary_size: IDL.Nat,
53
+ wasm_chunk_store_size: IDL.Nat,
54
+ canister_history_size: IDL.Nat,
55
+ stable_memory_size: IDL.Nat,
56
+ snapshots_size: IDL.Nat,
57
+ wasm_memory_size: IDL.Nat,
58
+ global_memory_size: IDL.Nat,
59
+ custom_sections_size: IDL.Nat
60
+ });
61
+ export const CanisterStatusType = IDL.Variant({
62
+ stopped: IDL.Null,
63
+ stopping: IDL.Null,
64
+ running: IDL.Null
65
+ });
66
+ export const LogVisibility = IDL.Variant({
67
+ controllers: IDL.Null,
68
+ public: IDL.Null,
69
+ allowed_viewers: IDL.Vec(IDL.Principal)
70
+ });
71
+ export const DefiniteCanisterSettings = IDL.Record({
72
+ freezing_threshold: IDL.Nat,
73
+ wasm_memory_threshold: IDL.Nat,
74
+ controllers: IDL.Vec(IDL.Principal),
75
+ reserved_cycles_limit: IDL.Nat,
76
+ log_visibility: LogVisibility,
77
+ wasm_memory_limit: IDL.Nat,
78
+ memory_allocation: IDL.Nat,
79
+ compute_allocation: IDL.Nat
80
+ });
81
+ export const QueryStats = IDL.Record({
82
+ response_payload_bytes_total: IDL.Nat,
83
+ num_instructions_total: IDL.Nat,
84
+ num_calls_total: IDL.Nat,
85
+ request_payload_bytes_total: IDL.Nat
86
+ });
87
+ export const CanisterStatusResponse = IDL.Record({
88
+ memory_metrics: MemoryMetrics,
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 Account = IDL.Record({
99
+ owner: IDL.Principal,
100
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
101
+ });
102
+ export const Utxo = IDL.Record({
103
+ height: IDL.Nat32,
104
+ value: IDL.Nat64,
105
+ outpoint: IDL.Record({txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32})
106
+ });
107
+ export const ReimbursementReason = IDL.Variant({
108
+ CallFailed: IDL.Null,
109
+ TaintedDestination: IDL.Record({
110
+ kyt_fee: IDL.Nat64,
111
+ kyt_provider: IDL.Principal
112
+ })
113
+ });
114
+ export const WithdrawalFee = IDL.Record({
115
+ minter_fee: IDL.Nat64,
116
+ bitcoin_fee: IDL.Nat64
117
+ });
118
+ export const SuspendedReason = IDL.Variant({
119
+ ValueTooSmall: IDL.Null,
120
+ Quarantined: IDL.Null
121
+ });
122
+ export const BitcoinAddress = IDL.Variant({
123
+ p2wsh_v0: IDL.Vec(IDL.Nat8),
124
+ p2tr_v1: IDL.Vec(IDL.Nat8),
125
+ p2sh: IDL.Vec(IDL.Nat8),
126
+ p2wpkh_v0: IDL.Vec(IDL.Nat8),
127
+ p2pkh: IDL.Vec(IDL.Nat8)
128
+ });
129
+ export const InvalidTransactionError = IDL.Variant({
130
+ too_many_inputs: IDL.Record({
131
+ max_num_inputs: IDL.Nat64,
132
+ num_inputs: IDL.Nat64
133
+ })
134
+ });
135
+ export const WithdrawalReimbursementReason = IDL.Variant({
136
+ invalid_transaction: InvalidTransactionError
137
+ });
138
+ export const ReplacedReason = IDL.Variant({
139
+ to_cancel: IDL.Record({reason: WithdrawalReimbursementReason}),
140
+ to_retry: IDL.Null
141
+ });
142
+ export const EventType = IDL.Variant({
143
+ received_utxos: IDL.Record({
144
+ to_account: Account,
145
+ mint_txid: IDL.Opt(IDL.Nat64),
146
+ utxos: IDL.Vec(Utxo)
147
+ }),
148
+ schedule_deposit_reimbursement: IDL.Record({
149
+ burn_block_index: IDL.Nat64,
150
+ account: Account,
151
+ amount: IDL.Nat64,
152
+ reason: ReimbursementReason
153
+ }),
154
+ sent_transaction: IDL.Record({
155
+ fee: IDL.Opt(IDL.Nat64),
156
+ change_output: IDL.Opt(IDL.Record({value: IDL.Nat64, vout: IDL.Nat32})),
157
+ txid: IDL.Vec(IDL.Nat8),
158
+ withdrawal_fee: IDL.Opt(WithdrawalFee),
159
+ utxos: IDL.Vec(Utxo),
160
+ requests: IDL.Vec(IDL.Nat64),
161
+ submitted_at: IDL.Nat64
162
+ }),
163
+ distributed_kyt_fee: IDL.Record({
164
+ block_index: IDL.Nat64,
165
+ amount: IDL.Nat64,
166
+ kyt_provider: IDL.Principal
167
+ }),
168
+ init: InitArgs,
169
+ upgrade: UpgradeArgs,
170
+ retrieve_btc_kyt_failed: IDL.Record({
171
+ block_index: IDL.Nat64,
172
+ owner: IDL.Principal,
173
+ uuid: IDL.Text,
174
+ address: IDL.Text,
175
+ amount: IDL.Nat64,
176
+ kyt_provider: IDL.Principal
177
+ }),
178
+ suspended_utxo: IDL.Record({
179
+ utxo: Utxo,
180
+ account: Account,
181
+ reason: SuspendedReason
182
+ }),
183
+ accepted_retrieve_btc_request: IDL.Record({
184
+ received_at: IDL.Nat64,
185
+ block_index: IDL.Nat64,
186
+ address: BitcoinAddress,
187
+ reimbursement_account: IDL.Opt(Account),
188
+ amount: IDL.Nat64,
189
+ kyt_provider: IDL.Opt(IDL.Principal)
190
+ }),
191
+ checked_utxo: IDL.Record({
192
+ clean: IDL.Bool,
193
+ utxo: Utxo,
194
+ uuid: IDL.Text,
195
+ kyt_provider: IDL.Opt(IDL.Principal)
196
+ }),
197
+ schedule_withdrawal_reimbursement: IDL.Record({
198
+ burn_block_index: IDL.Nat64,
199
+ account: Account,
200
+ amount: IDL.Nat64,
201
+ reason: WithdrawalReimbursementReason
202
+ }),
203
+ quarantined_withdrawal_reimbursement: IDL.Record({
204
+ burn_block_index: IDL.Nat64
205
+ }),
206
+ removed_retrieve_btc_request: IDL.Record({block_index: IDL.Nat64}),
207
+ confirmed_transaction: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
208
+ replaced_transaction: IDL.Record({
209
+ fee: IDL.Nat64,
210
+ change_output: IDL.Record({value: IDL.Nat64, vout: IDL.Nat32}),
211
+ new_utxos: IDL.Opt(IDL.Vec(Utxo)),
212
+ old_txid: IDL.Vec(IDL.Nat8),
213
+ withdrawal_fee: IDL.Opt(WithdrawalFee),
214
+ new_txid: IDL.Vec(IDL.Nat8),
215
+ submitted_at: IDL.Nat64,
216
+ reason: IDL.Opt(ReplacedReason)
217
+ }),
218
+ checked_utxo_v2: IDL.Record({utxo: Utxo, account: Account}),
219
+ ignored_utxo: IDL.Record({utxo: Utxo}),
220
+ checked_utxo_mint_unknown: IDL.Record({
221
+ utxo: Utxo,
222
+ account: Account
223
+ }),
224
+ reimbursed_failed_deposit: IDL.Record({
225
+ burn_block_index: IDL.Nat64,
226
+ mint_block_index: IDL.Nat64
227
+ }),
228
+ reimbursed_withdrawal: IDL.Record({
229
+ burn_block_index: IDL.Nat64,
230
+ mint_block_index: IDL.Nat64
231
+ })
232
+ });
233
+ export const Event = IDL.Record({
234
+ timestamp: IDL.Opt(IDL.Nat64),
235
+ payload: EventType
236
+ });
237
+ export const MinterInfo = IDL.Record({
238
+ retrieve_btc_min_amount: IDL.Nat64,
239
+ min_confirmations: IDL.Nat32,
240
+ kyt_fee: IDL.Nat64
241
+ });
242
+ export const RetrieveBtcArgs = IDL.Record({
243
+ address: IDL.Text,
244
+ amount: IDL.Nat64
245
+ });
246
+ export const RetrieveBtcOk = IDL.Record({block_index: IDL.Nat64});
247
+ export const RetrieveBtcError = IDL.Variant({
248
+ MalformedAddress: IDL.Text,
249
+ GenericError: IDL.Record({
250
+ error_message: IDL.Text,
251
+ error_code: IDL.Nat64
252
+ }),
253
+ TemporarilyUnavailable: IDL.Text,
254
+ AlreadyProcessing: IDL.Null,
255
+ AmountTooLow: IDL.Nat64,
256
+ InsufficientFunds: IDL.Record({balance: IDL.Nat64})
257
+ });
258
+ export const RetrieveBtcStatus = IDL.Variant({
259
+ Signing: IDL.Null,
260
+ Confirmed: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
261
+ Sending: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
262
+ AmountTooLow: IDL.Null,
263
+ Unknown: IDL.Null,
264
+ Submitted: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
265
+ Pending: IDL.Null
266
+ });
267
+ export const ReimbursementRequest = IDL.Record({
268
+ account: Account,
269
+ amount: IDL.Nat64,
270
+ reason: ReimbursementReason
271
+ });
272
+ export const ReimbursedDeposit = IDL.Record({
273
+ account: Account,
274
+ mint_block_index: IDL.Nat64,
275
+ amount: IDL.Nat64,
276
+ reason: ReimbursementReason
277
+ });
278
+ export const RetrieveBtcStatusV2 = IDL.Variant({
279
+ Signing: IDL.Null,
280
+ Confirmed: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
281
+ Sending: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
282
+ AmountTooLow: IDL.Null,
283
+ WillReimburse: ReimbursementRequest,
284
+ Unknown: IDL.Null,
285
+ Submitted: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
286
+ Reimbursed: ReimbursedDeposit,
287
+ Pending: IDL.Null
288
+ });
289
+ export const RetrieveBtcWithApprovalArgs = IDL.Record({
290
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
291
+ address: IDL.Text,
292
+ amount: IDL.Nat64
293
+ });
294
+ export const RetrieveBtcWithApprovalError = IDL.Variant({
295
+ MalformedAddress: IDL.Text,
296
+ GenericError: IDL.Record({
297
+ error_message: IDL.Text,
298
+ error_code: IDL.Nat64
299
+ }),
300
+ TemporarilyUnavailable: IDL.Text,
301
+ InsufficientAllowance: IDL.Record({allowance: IDL.Nat64}),
302
+ AlreadyProcessing: IDL.Null,
303
+ AmountTooLow: IDL.Nat64,
304
+ InsufficientFunds: IDL.Record({balance: IDL.Nat64})
305
+ });
306
+ export const UtxoStatus = IDL.Variant({
307
+ ValueTooSmall: Utxo,
308
+ Tainted: Utxo,
309
+ Minted: IDL.Record({
310
+ minted_amount: IDL.Nat64,
311
+ block_index: IDL.Nat64,
312
+ utxo: Utxo
313
+ }),
314
+ Checked: Utxo
315
+ });
316
+ export const Timestamp = IDL.Nat64;
317
+ export const SuspendedUtxo = IDL.Record({
318
+ utxo: Utxo,
319
+ earliest_retry: Timestamp,
320
+ reason: SuspendedReason
321
+ });
322
+ export const PendingUtxo = IDL.Record({
323
+ confirmations: IDL.Nat32,
324
+ value: IDL.Nat64,
325
+ outpoint: IDL.Record({txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32})
326
+ });
327
+ export const UpdateBalanceError = IDL.Variant({
328
+ GenericError: IDL.Record({
329
+ error_message: IDL.Text,
330
+ error_code: IDL.Nat64
331
+ }),
332
+ TemporarilyUnavailable: IDL.Text,
333
+ AlreadyProcessing: IDL.Null,
334
+ NoNewUtxos: IDL.Record({
335
+ suspended_utxos: IDL.Opt(IDL.Vec(SuspendedUtxo)),
336
+ required_confirmations: IDL.Nat32,
337
+ pending_utxos: IDL.Opt(IDL.Vec(PendingUtxo)),
338
+ current_confirmations: IDL.Opt(IDL.Nat32)
339
+ })
340
+ });
341
+
342
+ export const idlService = IDL.Service({
343
+ estimate_withdrawal_fee: IDL.Func(
344
+ [IDL.Record({amount: IDL.Opt(IDL.Nat64)})],
345
+ [IDL.Record({minter_fee: IDL.Nat64, bitcoin_fee: IDL.Nat64})],
346
+ ['query']
347
+ ),
348
+ get_btc_address: IDL.Func(
349
+ [
350
+ IDL.Record({
351
+ owner: IDL.Opt(IDL.Principal),
352
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
353
+ })
354
+ ],
355
+ [IDL.Text],
356
+ []
357
+ ),
358
+ get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
359
+ get_deposit_fee: IDL.Func([], [IDL.Nat64], ['query']),
360
+ get_events: IDL.Func(
361
+ [IDL.Record({start: IDL.Nat64, length: IDL.Nat64})],
362
+ [IDL.Vec(Event)],
363
+ ['query']
364
+ ),
365
+ get_known_utxos: IDL.Func(
366
+ [
367
+ IDL.Record({
368
+ owner: IDL.Opt(IDL.Principal),
369
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
370
+ })
371
+ ],
372
+ [IDL.Vec(Utxo)],
373
+ ['query']
374
+ ),
375
+ get_minter_info: IDL.Func([], [MinterInfo], ['query']),
376
+ get_withdrawal_account: IDL.Func([], [Account], []),
377
+ retrieve_btc: IDL.Func(
378
+ [RetrieveBtcArgs],
379
+ [IDL.Variant({Ok: RetrieveBtcOk, Err: RetrieveBtcError})],
380
+ []
381
+ ),
382
+ retrieve_btc_status: IDL.Func(
383
+ [IDL.Record({block_index: IDL.Nat64})],
384
+ [RetrieveBtcStatus],
385
+ ['query']
386
+ ),
387
+ retrieve_btc_status_v2: IDL.Func(
388
+ [IDL.Record({block_index: IDL.Nat64})],
389
+ [RetrieveBtcStatusV2],
390
+ ['query']
391
+ ),
392
+ retrieve_btc_status_v2_by_account: IDL.Func(
393
+ [IDL.Opt(Account)],
394
+ [
395
+ IDL.Vec(
396
+ IDL.Record({
397
+ block_index: IDL.Nat64,
398
+ status_v2: IDL.Opt(RetrieveBtcStatusV2)
399
+ })
400
+ )
401
+ ],
402
+ ['query']
403
+ ),
404
+ retrieve_btc_with_approval: IDL.Func(
405
+ [RetrieveBtcWithApprovalArgs],
406
+ [
407
+ IDL.Variant({
408
+ Ok: RetrieveBtcOk,
409
+ Err: RetrieveBtcWithApprovalError
410
+ })
411
+ ],
412
+ []
413
+ ),
414
+ update_balance: IDL.Func(
415
+ [
416
+ IDL.Record({
417
+ owner: IDL.Opt(IDL.Principal),
418
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
419
+ })
420
+ ],
421
+ [IDL.Variant({Ok: IDL.Vec(UtxoStatus), Err: UpdateBalanceError})],
422
+ []
423
+ )
424
+ });
425
+
426
+ export const idlInitArgs = [MinterArg];
427
+
428
+ export const idlFactory = ({IDL}) => {
429
+ const Mode = IDL.Variant({
430
+ RestrictedTo: IDL.Vec(IDL.Principal),
431
+ DepositsRestrictedTo: IDL.Vec(IDL.Principal),
432
+ ReadOnly: IDL.Null,
433
+ GeneralAvailability: IDL.Null
434
+ });
435
+ const UpgradeArgs = IDL.Record({
436
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
437
+ kyt_principal: IDL.Opt(IDL.Principal),
438
+ mode: IDL.Opt(Mode),
439
+ retrieve_btc_min_amount: IDL.Opt(IDL.Nat64),
440
+ max_time_in_queue_nanos: IDL.Opt(IDL.Nat64),
441
+ check_fee: IDL.Opt(IDL.Nat64),
442
+ btc_checker_principal: IDL.Opt(IDL.Principal),
443
+ min_confirmations: IDL.Opt(IDL.Nat32),
444
+ kyt_fee: IDL.Opt(IDL.Nat64)
445
+ });
446
+ const BtcNetwork = IDL.Variant({
447
+ Mainnet: IDL.Null,
448
+ Regtest: IDL.Null,
449
+ Testnet: IDL.Null
450
+ });
451
+ const InitArgs = IDL.Record({
452
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
453
+ kyt_principal: IDL.Opt(IDL.Principal),
454
+ ecdsa_key_name: IDL.Text,
455
+ mode: Mode,
456
+ retrieve_btc_min_amount: IDL.Nat64,
457
+ ledger_id: IDL.Principal,
458
+ max_time_in_queue_nanos: IDL.Nat64,
459
+ btc_network: BtcNetwork,
460
+ check_fee: IDL.Opt(IDL.Nat64),
461
+ btc_checker_principal: IDL.Opt(IDL.Principal),
462
+ min_confirmations: IDL.Opt(IDL.Nat32),
463
+ kyt_fee: IDL.Opt(IDL.Nat64)
464
+ });
465
+ const MinterArg = IDL.Variant({
466
+ Upgrade: IDL.Opt(UpgradeArgs),
467
+ Init: InitArgs
468
+ });
469
+ const MemoryMetrics = IDL.Record({
470
+ wasm_binary_size: IDL.Nat,
471
+ wasm_chunk_store_size: IDL.Nat,
472
+ canister_history_size: IDL.Nat,
473
+ stable_memory_size: IDL.Nat,
474
+ snapshots_size: IDL.Nat,
475
+ wasm_memory_size: IDL.Nat,
476
+ global_memory_size: IDL.Nat,
477
+ custom_sections_size: IDL.Nat
478
+ });
479
+ const CanisterStatusType = IDL.Variant({
480
+ stopped: IDL.Null,
481
+ stopping: IDL.Null,
482
+ running: IDL.Null
483
+ });
484
+ const LogVisibility = IDL.Variant({
485
+ controllers: IDL.Null,
486
+ public: IDL.Null,
487
+ allowed_viewers: IDL.Vec(IDL.Principal)
488
+ });
489
+ const DefiniteCanisterSettings = IDL.Record({
490
+ freezing_threshold: IDL.Nat,
491
+ wasm_memory_threshold: IDL.Nat,
492
+ controllers: IDL.Vec(IDL.Principal),
493
+ reserved_cycles_limit: IDL.Nat,
494
+ log_visibility: LogVisibility,
495
+ wasm_memory_limit: IDL.Nat,
496
+ memory_allocation: IDL.Nat,
497
+ compute_allocation: IDL.Nat
498
+ });
499
+ const QueryStats = IDL.Record({
500
+ response_payload_bytes_total: IDL.Nat,
501
+ num_instructions_total: IDL.Nat,
502
+ num_calls_total: IDL.Nat,
503
+ request_payload_bytes_total: IDL.Nat
504
+ });
505
+ const CanisterStatusResponse = IDL.Record({
506
+ memory_metrics: MemoryMetrics,
507
+ status: CanisterStatusType,
508
+ memory_size: IDL.Nat,
509
+ cycles: IDL.Nat,
510
+ settings: DefiniteCanisterSettings,
511
+ query_stats: QueryStats,
512
+ idle_cycles_burned_per_day: IDL.Nat,
513
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
514
+ reserved_cycles: IDL.Nat
515
+ });
516
+ const Account = IDL.Record({
517
+ owner: IDL.Principal,
518
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
519
+ });
520
+ const Utxo = IDL.Record({
521
+ height: IDL.Nat32,
522
+ value: IDL.Nat64,
523
+ outpoint: IDL.Record({txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32})
524
+ });
525
+ const ReimbursementReason = IDL.Variant({
526
+ CallFailed: IDL.Null,
527
+ TaintedDestination: IDL.Record({
528
+ kyt_fee: IDL.Nat64,
529
+ kyt_provider: IDL.Principal
530
+ })
531
+ });
532
+ const WithdrawalFee = IDL.Record({
533
+ minter_fee: IDL.Nat64,
534
+ bitcoin_fee: IDL.Nat64
535
+ });
536
+ const SuspendedReason = IDL.Variant({
537
+ ValueTooSmall: IDL.Null,
538
+ Quarantined: IDL.Null
539
+ });
540
+ const BitcoinAddress = IDL.Variant({
541
+ p2wsh_v0: IDL.Vec(IDL.Nat8),
542
+ p2tr_v1: IDL.Vec(IDL.Nat8),
543
+ p2sh: IDL.Vec(IDL.Nat8),
544
+ p2wpkh_v0: IDL.Vec(IDL.Nat8),
545
+ p2pkh: IDL.Vec(IDL.Nat8)
546
+ });
547
+ const InvalidTransactionError = IDL.Variant({
548
+ too_many_inputs: IDL.Record({
549
+ max_num_inputs: IDL.Nat64,
550
+ num_inputs: IDL.Nat64
551
+ })
552
+ });
553
+ const WithdrawalReimbursementReason = IDL.Variant({
554
+ invalid_transaction: InvalidTransactionError
555
+ });
556
+ const ReplacedReason = IDL.Variant({
557
+ to_cancel: IDL.Record({reason: WithdrawalReimbursementReason}),
558
+ to_retry: IDL.Null
559
+ });
560
+ const EventType = IDL.Variant({
561
+ received_utxos: IDL.Record({
562
+ to_account: Account,
563
+ mint_txid: IDL.Opt(IDL.Nat64),
564
+ utxos: IDL.Vec(Utxo)
565
+ }),
566
+ schedule_deposit_reimbursement: IDL.Record({
567
+ burn_block_index: IDL.Nat64,
568
+ account: Account,
569
+ amount: IDL.Nat64,
570
+ reason: ReimbursementReason
571
+ }),
572
+ sent_transaction: IDL.Record({
573
+ fee: IDL.Opt(IDL.Nat64),
574
+ change_output: IDL.Opt(IDL.Record({value: IDL.Nat64, vout: IDL.Nat32})),
575
+ txid: IDL.Vec(IDL.Nat8),
576
+ withdrawal_fee: IDL.Opt(WithdrawalFee),
577
+ utxos: IDL.Vec(Utxo),
578
+ requests: IDL.Vec(IDL.Nat64),
579
+ submitted_at: IDL.Nat64
580
+ }),
581
+ distributed_kyt_fee: IDL.Record({
582
+ block_index: IDL.Nat64,
583
+ amount: IDL.Nat64,
584
+ kyt_provider: IDL.Principal
585
+ }),
586
+ init: InitArgs,
587
+ upgrade: UpgradeArgs,
588
+ retrieve_btc_kyt_failed: IDL.Record({
589
+ block_index: IDL.Nat64,
590
+ owner: IDL.Principal,
591
+ uuid: IDL.Text,
592
+ address: IDL.Text,
593
+ amount: IDL.Nat64,
594
+ kyt_provider: IDL.Principal
595
+ }),
596
+ suspended_utxo: IDL.Record({
597
+ utxo: Utxo,
598
+ account: Account,
599
+ reason: SuspendedReason
600
+ }),
601
+ accepted_retrieve_btc_request: IDL.Record({
602
+ received_at: IDL.Nat64,
603
+ block_index: IDL.Nat64,
604
+ address: BitcoinAddress,
605
+ reimbursement_account: IDL.Opt(Account),
606
+ amount: IDL.Nat64,
607
+ kyt_provider: IDL.Opt(IDL.Principal)
608
+ }),
609
+ checked_utxo: IDL.Record({
610
+ clean: IDL.Bool,
611
+ utxo: Utxo,
612
+ uuid: IDL.Text,
613
+ kyt_provider: IDL.Opt(IDL.Principal)
614
+ }),
615
+ schedule_withdrawal_reimbursement: IDL.Record({
616
+ burn_block_index: IDL.Nat64,
617
+ account: Account,
618
+ amount: IDL.Nat64,
619
+ reason: WithdrawalReimbursementReason
620
+ }),
621
+ quarantined_withdrawal_reimbursement: IDL.Record({
622
+ burn_block_index: IDL.Nat64
623
+ }),
624
+ removed_retrieve_btc_request: IDL.Record({block_index: IDL.Nat64}),
625
+ confirmed_transaction: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
626
+ replaced_transaction: IDL.Record({
627
+ fee: IDL.Nat64,
628
+ change_output: IDL.Record({value: IDL.Nat64, vout: IDL.Nat32}),
629
+ new_utxos: IDL.Opt(IDL.Vec(Utxo)),
630
+ old_txid: IDL.Vec(IDL.Nat8),
631
+ withdrawal_fee: IDL.Opt(WithdrawalFee),
632
+ new_txid: IDL.Vec(IDL.Nat8),
633
+ submitted_at: IDL.Nat64,
634
+ reason: IDL.Opt(ReplacedReason)
635
+ }),
636
+ checked_utxo_v2: IDL.Record({utxo: Utxo, account: Account}),
637
+ ignored_utxo: IDL.Record({utxo: Utxo}),
638
+ checked_utxo_mint_unknown: IDL.Record({
639
+ utxo: Utxo,
640
+ account: Account
641
+ }),
642
+ reimbursed_failed_deposit: IDL.Record({
643
+ burn_block_index: IDL.Nat64,
644
+ mint_block_index: IDL.Nat64
645
+ }),
646
+ reimbursed_withdrawal: IDL.Record({
647
+ burn_block_index: IDL.Nat64,
648
+ mint_block_index: IDL.Nat64
649
+ })
650
+ });
651
+ const Event = IDL.Record({
652
+ timestamp: IDL.Opt(IDL.Nat64),
653
+ payload: EventType
654
+ });
655
+ const MinterInfo = IDL.Record({
656
+ retrieve_btc_min_amount: IDL.Nat64,
657
+ min_confirmations: IDL.Nat32,
658
+ kyt_fee: IDL.Nat64
659
+ });
660
+ const RetrieveBtcArgs = IDL.Record({
661
+ address: IDL.Text,
662
+ amount: IDL.Nat64
663
+ });
664
+ const RetrieveBtcOk = IDL.Record({block_index: IDL.Nat64});
665
+ const RetrieveBtcError = IDL.Variant({
666
+ MalformedAddress: IDL.Text,
667
+ GenericError: IDL.Record({
668
+ error_message: IDL.Text,
669
+ error_code: IDL.Nat64
670
+ }),
671
+ TemporarilyUnavailable: IDL.Text,
672
+ AlreadyProcessing: IDL.Null,
673
+ AmountTooLow: IDL.Nat64,
674
+ InsufficientFunds: IDL.Record({balance: IDL.Nat64})
675
+ });
676
+ const RetrieveBtcStatus = IDL.Variant({
677
+ Signing: IDL.Null,
678
+ Confirmed: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
679
+ Sending: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
680
+ AmountTooLow: IDL.Null,
681
+ Unknown: IDL.Null,
682
+ Submitted: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
683
+ Pending: IDL.Null
684
+ });
685
+ const ReimbursementRequest = IDL.Record({
686
+ account: Account,
687
+ amount: IDL.Nat64,
688
+ reason: ReimbursementReason
689
+ });
690
+ const ReimbursedDeposit = IDL.Record({
691
+ account: Account,
692
+ mint_block_index: IDL.Nat64,
693
+ amount: IDL.Nat64,
694
+ reason: ReimbursementReason
695
+ });
696
+ const RetrieveBtcStatusV2 = IDL.Variant({
697
+ Signing: IDL.Null,
698
+ Confirmed: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
699
+ Sending: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
700
+ AmountTooLow: IDL.Null,
701
+ WillReimburse: ReimbursementRequest,
702
+ Unknown: IDL.Null,
703
+ Submitted: IDL.Record({txid: IDL.Vec(IDL.Nat8)}),
704
+ Reimbursed: ReimbursedDeposit,
705
+ Pending: IDL.Null
706
+ });
707
+ const RetrieveBtcWithApprovalArgs = IDL.Record({
708
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
709
+ address: IDL.Text,
710
+ amount: IDL.Nat64
711
+ });
712
+ const RetrieveBtcWithApprovalError = IDL.Variant({
713
+ MalformedAddress: IDL.Text,
714
+ GenericError: IDL.Record({
715
+ error_message: IDL.Text,
716
+ error_code: IDL.Nat64
717
+ }),
718
+ TemporarilyUnavailable: IDL.Text,
719
+ InsufficientAllowance: IDL.Record({allowance: IDL.Nat64}),
720
+ AlreadyProcessing: IDL.Null,
721
+ AmountTooLow: IDL.Nat64,
722
+ InsufficientFunds: IDL.Record({balance: IDL.Nat64})
723
+ });
724
+ const UtxoStatus = IDL.Variant({
725
+ ValueTooSmall: Utxo,
726
+ Tainted: Utxo,
727
+ Minted: IDL.Record({
728
+ minted_amount: IDL.Nat64,
729
+ block_index: IDL.Nat64,
730
+ utxo: Utxo
731
+ }),
732
+ Checked: Utxo
733
+ });
734
+ const Timestamp = IDL.Nat64;
735
+ const SuspendedUtxo = IDL.Record({
736
+ utxo: Utxo,
737
+ earliest_retry: Timestamp,
738
+ reason: SuspendedReason
739
+ });
740
+ const PendingUtxo = IDL.Record({
741
+ confirmations: IDL.Nat32,
742
+ value: IDL.Nat64,
743
+ outpoint: IDL.Record({txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32})
744
+ });
745
+ const UpdateBalanceError = IDL.Variant({
746
+ GenericError: IDL.Record({
747
+ error_message: IDL.Text,
748
+ error_code: IDL.Nat64
749
+ }),
750
+ TemporarilyUnavailable: IDL.Text,
751
+ AlreadyProcessing: IDL.Null,
752
+ NoNewUtxos: IDL.Record({
753
+ suspended_utxos: IDL.Opt(IDL.Vec(SuspendedUtxo)),
754
+ required_confirmations: IDL.Nat32,
755
+ pending_utxos: IDL.Opt(IDL.Vec(PendingUtxo)),
756
+ current_confirmations: IDL.Opt(IDL.Nat32)
757
+ })
758
+ });
759
+
760
+ return IDL.Service({
761
+ estimate_withdrawal_fee: IDL.Func(
762
+ [IDL.Record({amount: IDL.Opt(IDL.Nat64)})],
763
+ [IDL.Record({minter_fee: IDL.Nat64, bitcoin_fee: IDL.Nat64})],
764
+ ['query']
765
+ ),
766
+ get_btc_address: IDL.Func(
767
+ [
768
+ IDL.Record({
769
+ owner: IDL.Opt(IDL.Principal),
770
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
771
+ })
772
+ ],
773
+ [IDL.Text],
774
+ []
775
+ ),
776
+ get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
777
+ get_deposit_fee: IDL.Func([], [IDL.Nat64], ['query']),
778
+ get_events: IDL.Func(
779
+ [IDL.Record({start: IDL.Nat64, length: IDL.Nat64})],
780
+ [IDL.Vec(Event)],
781
+ ['query']
782
+ ),
783
+ get_known_utxos: IDL.Func(
784
+ [
785
+ IDL.Record({
786
+ owner: IDL.Opt(IDL.Principal),
787
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
788
+ })
789
+ ],
790
+ [IDL.Vec(Utxo)],
791
+ ['query']
792
+ ),
793
+ get_minter_info: IDL.Func([], [MinterInfo], ['query']),
794
+ get_withdrawal_account: IDL.Func([], [Account], []),
795
+ retrieve_btc: IDL.Func(
796
+ [RetrieveBtcArgs],
797
+ [IDL.Variant({Ok: RetrieveBtcOk, Err: RetrieveBtcError})],
798
+ []
799
+ ),
800
+ retrieve_btc_status: IDL.Func(
801
+ [IDL.Record({block_index: IDL.Nat64})],
802
+ [RetrieveBtcStatus],
803
+ ['query']
804
+ ),
805
+ retrieve_btc_status_v2: IDL.Func(
806
+ [IDL.Record({block_index: IDL.Nat64})],
807
+ [RetrieveBtcStatusV2],
808
+ ['query']
809
+ ),
810
+ retrieve_btc_status_v2_by_account: IDL.Func(
811
+ [IDL.Opt(Account)],
812
+ [
813
+ IDL.Vec(
814
+ IDL.Record({
815
+ block_index: IDL.Nat64,
816
+ status_v2: IDL.Opt(RetrieveBtcStatusV2)
817
+ })
818
+ )
819
+ ],
820
+ ['query']
821
+ ),
822
+ retrieve_btc_with_approval: IDL.Func(
823
+ [RetrieveBtcWithApprovalArgs],
824
+ [
825
+ IDL.Variant({
826
+ Ok: RetrieveBtcOk,
827
+ Err: RetrieveBtcWithApprovalError
828
+ })
829
+ ],
830
+ []
831
+ ),
832
+ update_balance: IDL.Func(
833
+ [
834
+ IDL.Record({
835
+ owner: IDL.Opt(IDL.Principal),
836
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
837
+ })
838
+ ],
839
+ [
840
+ IDL.Variant({
841
+ Ok: IDL.Vec(UtxoStatus),
842
+ Err: UpdateBalanceError
843
+ })
844
+ ],
845
+ []
846
+ )
847
+ });
848
+ };
849
+
850
+ export const init = ({IDL}) => {
851
+ const Mode = IDL.Variant({
852
+ RestrictedTo: IDL.Vec(IDL.Principal),
853
+ DepositsRestrictedTo: IDL.Vec(IDL.Principal),
854
+ ReadOnly: IDL.Null,
855
+ GeneralAvailability: IDL.Null
856
+ });
857
+ const UpgradeArgs = IDL.Record({
858
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
859
+ kyt_principal: IDL.Opt(IDL.Principal),
860
+ mode: IDL.Opt(Mode),
861
+ retrieve_btc_min_amount: IDL.Opt(IDL.Nat64),
862
+ max_time_in_queue_nanos: IDL.Opt(IDL.Nat64),
863
+ check_fee: IDL.Opt(IDL.Nat64),
864
+ btc_checker_principal: IDL.Opt(IDL.Principal),
865
+ min_confirmations: IDL.Opt(IDL.Nat32),
866
+ kyt_fee: IDL.Opt(IDL.Nat64)
867
+ });
868
+ const BtcNetwork = IDL.Variant({
869
+ Mainnet: IDL.Null,
870
+ Regtest: IDL.Null,
871
+ Testnet: IDL.Null
872
+ });
873
+ const InitArgs = IDL.Record({
874
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
875
+ kyt_principal: IDL.Opt(IDL.Principal),
876
+ ecdsa_key_name: IDL.Text,
877
+ mode: Mode,
878
+ retrieve_btc_min_amount: IDL.Nat64,
879
+ ledger_id: IDL.Principal,
880
+ max_time_in_queue_nanos: IDL.Nat64,
881
+ btc_network: BtcNetwork,
882
+ check_fee: IDL.Opt(IDL.Nat64),
883
+ btc_checker_principal: IDL.Opt(IDL.Principal),
884
+ min_confirmations: IDL.Opt(IDL.Nat32),
885
+ kyt_fee: IDL.Opt(IDL.Nat64)
886
+ });
887
+ const MinterArg = IDL.Variant({
888
+ Upgrade: IDL.Opt(UpgradeArgs),
889
+ Init: InitArgs
890
+ });
891
+
892
+ return [MinterArg];
893
+ };