@dfinity/ckbtc 4.0.6 → 5.0.0-next-2025-10-20

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/{types/bitcoin.canister.d.ts → bitcoin.canister.d.ts} +1 -1
  3. package/dist/candid/bitcoin.certified.idl.d.ts +1 -1
  4. package/dist/candid/bitcoin.certified.idl.js +130 -128
  5. package/dist/candid/bitcoin.d.ts +11 -3
  6. package/dist/candid/bitcoin.idl.d.ts +1 -1
  7. package/dist/candid/bitcoin.idl.js +134 -128
  8. package/dist/candid/minter.certified.idl.d.ts +1 -1
  9. package/dist/candid/minter.certified.idl.js +363 -355
  10. package/dist/candid/minter.d.ts +11 -3
  11. package/dist/candid/minter.idl.d.ts +1 -1
  12. package/dist/candid/minter.idl.js +363 -355
  13. package/dist/{types/errors → errors}/minter.errors.d.ts +1 -1
  14. package/dist/{types/index.d.ts → index.d.ts} +2 -2
  15. package/dist/index.js +7 -1
  16. package/dist/index.js.map +7 -0
  17. package/dist/index.mjs +9 -0
  18. package/dist/index.mjs.map +7 -0
  19. package/dist/{types/minter.canister.d.ts → minter.canister.d.ts} +1 -1
  20. package/dist/types/{types/bitcoin.params.d.ts → bitcoin.params.d.ts} +1 -1
  21. package/dist/types/{types/canister.options.d.ts → canister.options.d.ts} +1 -1
  22. package/dist/types/{types/minter.params.d.ts → minter.params.d.ts} +2 -2
  23. package/dist/types/{types/minter.responses.d.ts → minter.responses.d.ts} +1 -1
  24. package/package.json +22 -11
  25. package/dist/cjs/index.cjs.js +0 -7
  26. package/dist/cjs/index.cjs.js.map +0 -7
  27. package/dist/esm/bitcoin.canister.js +0 -2
  28. package/dist/esm/bitcoin.canister.js.map +0 -7
  29. package/dist/esm/chunk-7W3XZWUY.js +0 -2
  30. package/dist/esm/chunk-7W3XZWUY.js.map +0 -7
  31. package/dist/esm/chunk-ABDCS67G.js +0 -2
  32. package/dist/esm/chunk-ABDCS67G.js.map +0 -7
  33. package/dist/esm/chunk-FW4363Y4.js +0 -2
  34. package/dist/esm/chunk-FW4363Y4.js.map +0 -7
  35. package/dist/esm/index.js +0 -7
  36. package/dist/esm/index.js.map +0 -7
  37. package/dist/esm/minter.canister.js +0 -2
  38. package/dist/esm/minter.canister.js.map +0 -7
  39. package/dist/index.cjs.js +0 -1
  40. /package/dist/{types/enums → enums}/btc.enums.d.ts +0 -0
  41. /package/dist/{types/errors → errors}/btc.errors.d.ts +0 -0
  42. /package/dist/types/{types/btc.d.ts → btc.d.ts} +0 -0
  43. /package/dist/{types/utils → utils}/btc.utils.d.ts +0 -0
@@ -1,466 +1,474 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/ckbtc/candid/minter.did */
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
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
+
2
9
  export const idlFactory = ({ IDL }) => {
3
10
  const Mode = IDL.Variant({
4
- 'RestrictedTo' : IDL.Vec(IDL.Principal),
5
- 'DepositsRestrictedTo' : IDL.Vec(IDL.Principal),
6
- 'ReadOnly' : IDL.Null,
7
- 'GeneralAvailability' : IDL.Null,
11
+ RestrictedTo: IDL.Vec(IDL.Principal),
12
+ DepositsRestrictedTo: IDL.Vec(IDL.Principal),
13
+ ReadOnly: IDL.Null,
14
+ GeneralAvailability: IDL.Null,
8
15
  });
9
16
  const UpgradeArgs = IDL.Record({
10
- 'get_utxos_cache_expiration_seconds' : IDL.Opt(IDL.Nat64),
11
- 'kyt_principal' : IDL.Opt(IDL.Principal),
12
- 'mode' : IDL.Opt(Mode),
13
- 'retrieve_btc_min_amount' : IDL.Opt(IDL.Nat64),
14
- 'max_time_in_queue_nanos' : IDL.Opt(IDL.Nat64),
15
- 'check_fee' : IDL.Opt(IDL.Nat64),
16
- 'btc_checker_principal' : IDL.Opt(IDL.Principal),
17
- 'min_confirmations' : IDL.Opt(IDL.Nat32),
18
- 'kyt_fee' : IDL.Opt(IDL.Nat64),
17
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
18
+ kyt_principal: IDL.Opt(IDL.Principal),
19
+ mode: IDL.Opt(Mode),
20
+ retrieve_btc_min_amount: IDL.Opt(IDL.Nat64),
21
+ max_time_in_queue_nanos: IDL.Opt(IDL.Nat64),
22
+ check_fee: IDL.Opt(IDL.Nat64),
23
+ btc_checker_principal: IDL.Opt(IDL.Principal),
24
+ min_confirmations: IDL.Opt(IDL.Nat32),
25
+ kyt_fee: IDL.Opt(IDL.Nat64),
19
26
  });
20
27
  const BtcNetwork = IDL.Variant({
21
- 'Mainnet' : IDL.Null,
22
- 'Regtest' : IDL.Null,
23
- 'Testnet' : IDL.Null,
28
+ Mainnet: IDL.Null,
29
+ Regtest: IDL.Null,
30
+ Testnet: IDL.Null,
24
31
  });
25
32
  const InitArgs = IDL.Record({
26
- 'get_utxos_cache_expiration_seconds' : IDL.Opt(IDL.Nat64),
27
- 'kyt_principal' : IDL.Opt(IDL.Principal),
28
- 'ecdsa_key_name' : IDL.Text,
29
- 'mode' : Mode,
30
- 'retrieve_btc_min_amount' : IDL.Nat64,
31
- 'ledger_id' : IDL.Principal,
32
- 'max_time_in_queue_nanos' : IDL.Nat64,
33
- 'btc_network' : BtcNetwork,
34
- 'check_fee' : IDL.Opt(IDL.Nat64),
35
- 'btc_checker_principal' : IDL.Opt(IDL.Principal),
36
- 'min_confirmations' : IDL.Opt(IDL.Nat32),
37
- 'kyt_fee' : IDL.Opt(IDL.Nat64),
33
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
34
+ kyt_principal: IDL.Opt(IDL.Principal),
35
+ ecdsa_key_name: IDL.Text,
36
+ mode: Mode,
37
+ retrieve_btc_min_amount: IDL.Nat64,
38
+ ledger_id: IDL.Principal,
39
+ max_time_in_queue_nanos: IDL.Nat64,
40
+ btc_network: BtcNetwork,
41
+ check_fee: IDL.Opt(IDL.Nat64),
42
+ btc_checker_principal: IDL.Opt(IDL.Principal),
43
+ min_confirmations: IDL.Opt(IDL.Nat32),
44
+ kyt_fee: IDL.Opt(IDL.Nat64),
38
45
  });
39
46
  const MinterArg = IDL.Variant({
40
- 'Upgrade' : IDL.Opt(UpgradeArgs),
41
- 'Init' : InitArgs,
47
+ Upgrade: IDL.Opt(UpgradeArgs),
48
+ Init: InitArgs,
42
49
  });
43
50
  const MemoryMetrics = IDL.Record({
44
- 'wasm_binary_size' : IDL.Nat,
45
- 'wasm_chunk_store_size' : IDL.Nat,
46
- 'canister_history_size' : IDL.Nat,
47
- 'stable_memory_size' : IDL.Nat,
48
- 'snapshots_size' : IDL.Nat,
49
- 'wasm_memory_size' : IDL.Nat,
50
- 'global_memory_size' : IDL.Nat,
51
- 'custom_sections_size' : IDL.Nat,
51
+ wasm_binary_size: IDL.Nat,
52
+ wasm_chunk_store_size: IDL.Nat,
53
+ canister_history_size: IDL.Nat,
54
+ stable_memory_size: IDL.Nat,
55
+ snapshots_size: IDL.Nat,
56
+ wasm_memory_size: IDL.Nat,
57
+ global_memory_size: IDL.Nat,
58
+ custom_sections_size: IDL.Nat,
52
59
  });
53
60
  const CanisterStatusType = IDL.Variant({
54
- 'stopped' : IDL.Null,
55
- 'stopping' : IDL.Null,
56
- 'running' : IDL.Null,
61
+ stopped: IDL.Null,
62
+ stopping: IDL.Null,
63
+ running: IDL.Null,
57
64
  });
58
65
  const LogVisibility = IDL.Variant({
59
- 'controllers' : IDL.Null,
60
- 'public' : IDL.Null,
61
- 'allowed_viewers' : IDL.Vec(IDL.Principal),
66
+ controllers: IDL.Null,
67
+ public: IDL.Null,
68
+ allowed_viewers: IDL.Vec(IDL.Principal),
62
69
  });
63
70
  const DefiniteCanisterSettings = IDL.Record({
64
- 'freezing_threshold' : IDL.Nat,
65
- 'wasm_memory_threshold' : IDL.Nat,
66
- 'controllers' : IDL.Vec(IDL.Principal),
67
- 'reserved_cycles_limit' : IDL.Nat,
68
- 'log_visibility' : LogVisibility,
69
- 'wasm_memory_limit' : IDL.Nat,
70
- 'memory_allocation' : IDL.Nat,
71
- 'compute_allocation' : IDL.Nat,
71
+ freezing_threshold: IDL.Nat,
72
+ wasm_memory_threshold: IDL.Nat,
73
+ controllers: IDL.Vec(IDL.Principal),
74
+ reserved_cycles_limit: IDL.Nat,
75
+ log_visibility: LogVisibility,
76
+ wasm_memory_limit: IDL.Nat,
77
+ memory_allocation: IDL.Nat,
78
+ compute_allocation: IDL.Nat,
72
79
  });
73
80
  const QueryStats = IDL.Record({
74
- 'response_payload_bytes_total' : IDL.Nat,
75
- 'num_instructions_total' : IDL.Nat,
76
- 'num_calls_total' : IDL.Nat,
77
- 'request_payload_bytes_total' : IDL.Nat,
81
+ response_payload_bytes_total: IDL.Nat,
82
+ num_instructions_total: IDL.Nat,
83
+ num_calls_total: IDL.Nat,
84
+ request_payload_bytes_total: IDL.Nat,
78
85
  });
79
86
  const CanisterStatusResponse = IDL.Record({
80
- 'memory_metrics' : MemoryMetrics,
81
- 'status' : CanisterStatusType,
82
- 'memory_size' : IDL.Nat,
83
- 'cycles' : IDL.Nat,
84
- 'settings' : DefiniteCanisterSettings,
85
- 'query_stats' : QueryStats,
86
- 'idle_cycles_burned_per_day' : IDL.Nat,
87
- 'module_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
88
- 'reserved_cycles' : IDL.Nat,
87
+ memory_metrics: MemoryMetrics,
88
+ status: CanisterStatusType,
89
+ memory_size: IDL.Nat,
90
+ cycles: IDL.Nat,
91
+ settings: DefiniteCanisterSettings,
92
+ query_stats: QueryStats,
93
+ idle_cycles_burned_per_day: IDL.Nat,
94
+ module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
95
+ reserved_cycles: IDL.Nat,
89
96
  });
90
97
  const Account = IDL.Record({
91
- 'owner' : IDL.Principal,
92
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
98
+ owner: IDL.Principal,
99
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
93
100
  });
94
101
  const Utxo = IDL.Record({
95
- 'height' : IDL.Nat32,
96
- 'value' : IDL.Nat64,
97
- 'outpoint' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8), 'vout' : IDL.Nat32 }),
102
+ height: IDL.Nat32,
103
+ value: IDL.Nat64,
104
+ outpoint: IDL.Record({ txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32 }),
98
105
  });
99
106
  const ReimbursementReason = IDL.Variant({
100
- 'CallFailed' : IDL.Null,
101
- 'TaintedDestination' : IDL.Record({
102
- 'kyt_fee' : IDL.Nat64,
103
- 'kyt_provider' : IDL.Principal,
107
+ CallFailed: IDL.Null,
108
+ TaintedDestination: IDL.Record({
109
+ kyt_fee: IDL.Nat64,
110
+ kyt_provider: IDL.Principal,
104
111
  }),
105
112
  });
106
113
  const WithdrawalFee = IDL.Record({
107
- 'minter_fee' : IDL.Nat64,
108
- 'bitcoin_fee' : IDL.Nat64,
114
+ minter_fee: IDL.Nat64,
115
+ bitcoin_fee: IDL.Nat64,
109
116
  });
110
117
  const SuspendedReason = IDL.Variant({
111
- 'ValueTooSmall' : IDL.Null,
112
- 'Quarantined' : IDL.Null,
118
+ ValueTooSmall: IDL.Null,
119
+ Quarantined: IDL.Null,
113
120
  });
114
121
  const BitcoinAddress = IDL.Variant({
115
- 'p2wsh_v0' : IDL.Vec(IDL.Nat8),
116
- 'p2tr_v1' : IDL.Vec(IDL.Nat8),
117
- 'p2sh' : IDL.Vec(IDL.Nat8),
118
- 'p2wpkh_v0' : IDL.Vec(IDL.Nat8),
119
- 'p2pkh' : IDL.Vec(IDL.Nat8),
122
+ p2wsh_v0: IDL.Vec(IDL.Nat8),
123
+ p2tr_v1: IDL.Vec(IDL.Nat8),
124
+ p2sh: IDL.Vec(IDL.Nat8),
125
+ p2wpkh_v0: IDL.Vec(IDL.Nat8),
126
+ p2pkh: IDL.Vec(IDL.Nat8),
120
127
  });
121
128
  const InvalidTransactionError = IDL.Variant({
122
- 'too_many_inputs' : IDL.Record({
123
- 'max_num_inputs' : IDL.Nat64,
124
- 'num_inputs' : IDL.Nat64,
129
+ too_many_inputs: IDL.Record({
130
+ max_num_inputs: IDL.Nat64,
131
+ num_inputs: IDL.Nat64,
125
132
  }),
126
133
  });
127
134
  const WithdrawalReimbursementReason = IDL.Variant({
128
- 'invalid_transaction' : InvalidTransactionError,
135
+ invalid_transaction: InvalidTransactionError,
129
136
  });
130
137
  const ReplacedReason = IDL.Variant({
131
- 'to_cancel' : IDL.Record({ 'reason' : WithdrawalReimbursementReason }),
132
- 'to_retry' : IDL.Null,
138
+ to_cancel: IDL.Record({ reason: WithdrawalReimbursementReason }),
139
+ to_retry: IDL.Null,
133
140
  });
134
141
  const EventType = IDL.Variant({
135
- 'received_utxos' : IDL.Record({
136
- 'to_account' : Account,
137
- 'mint_txid' : IDL.Opt(IDL.Nat64),
138
- 'utxos' : IDL.Vec(Utxo),
142
+ received_utxos: IDL.Record({
143
+ to_account: Account,
144
+ mint_txid: IDL.Opt(IDL.Nat64),
145
+ utxos: IDL.Vec(Utxo),
139
146
  }),
140
- 'schedule_deposit_reimbursement' : IDL.Record({
141
- 'burn_block_index' : IDL.Nat64,
142
- 'account' : Account,
143
- 'amount' : IDL.Nat64,
144
- 'reason' : ReimbursementReason,
147
+ schedule_deposit_reimbursement: IDL.Record({
148
+ burn_block_index: IDL.Nat64,
149
+ account: Account,
150
+ amount: IDL.Nat64,
151
+ reason: ReimbursementReason,
145
152
  }),
146
- 'sent_transaction' : IDL.Record({
147
- 'fee' : IDL.Opt(IDL.Nat64),
148
- 'change_output' : IDL.Opt(
149
- IDL.Record({ 'value' : IDL.Nat64, 'vout' : IDL.Nat32 })
150
- ),
151
- 'txid' : IDL.Vec(IDL.Nat8),
152
- 'withdrawal_fee' : IDL.Opt(WithdrawalFee),
153
- 'utxos' : IDL.Vec(Utxo),
154
- 'requests' : IDL.Vec(IDL.Nat64),
155
- 'submitted_at' : IDL.Nat64,
153
+ sent_transaction: IDL.Record({
154
+ fee: IDL.Opt(IDL.Nat64),
155
+ change_output: IDL.Opt(IDL.Record({ value: IDL.Nat64, vout: IDL.Nat32 })),
156
+ txid: IDL.Vec(IDL.Nat8),
157
+ withdrawal_fee: IDL.Opt(WithdrawalFee),
158
+ utxos: IDL.Vec(Utxo),
159
+ requests: IDL.Vec(IDL.Nat64),
160
+ submitted_at: IDL.Nat64,
156
161
  }),
157
- 'distributed_kyt_fee' : IDL.Record({
158
- 'block_index' : IDL.Nat64,
159
- 'amount' : IDL.Nat64,
160
- 'kyt_provider' : IDL.Principal,
162
+ distributed_kyt_fee: IDL.Record({
163
+ block_index: IDL.Nat64,
164
+ amount: IDL.Nat64,
165
+ kyt_provider: IDL.Principal,
161
166
  }),
162
- 'init' : InitArgs,
163
- 'upgrade' : UpgradeArgs,
164
- 'retrieve_btc_kyt_failed' : IDL.Record({
165
- 'block_index' : IDL.Nat64,
166
- 'owner' : IDL.Principal,
167
- 'uuid' : IDL.Text,
168
- 'address' : IDL.Text,
169
- 'amount' : IDL.Nat64,
170
- 'kyt_provider' : IDL.Principal,
167
+ init: InitArgs,
168
+ upgrade: UpgradeArgs,
169
+ retrieve_btc_kyt_failed: IDL.Record({
170
+ block_index: IDL.Nat64,
171
+ owner: IDL.Principal,
172
+ uuid: IDL.Text,
173
+ address: IDL.Text,
174
+ amount: IDL.Nat64,
175
+ kyt_provider: IDL.Principal,
171
176
  }),
172
- 'suspended_utxo' : IDL.Record({
173
- 'utxo' : Utxo,
174
- 'account' : Account,
175
- 'reason' : SuspendedReason,
177
+ suspended_utxo: IDL.Record({
178
+ utxo: Utxo,
179
+ account: Account,
180
+ reason: SuspendedReason,
176
181
  }),
177
- 'accepted_retrieve_btc_request' : IDL.Record({
178
- 'received_at' : IDL.Nat64,
179
- 'block_index' : IDL.Nat64,
180
- 'address' : BitcoinAddress,
181
- 'reimbursement_account' : IDL.Opt(Account),
182
- 'amount' : IDL.Nat64,
183
- 'kyt_provider' : IDL.Opt(IDL.Principal),
182
+ accepted_retrieve_btc_request: IDL.Record({
183
+ received_at: IDL.Nat64,
184
+ block_index: IDL.Nat64,
185
+ address: BitcoinAddress,
186
+ reimbursement_account: IDL.Opt(Account),
187
+ amount: IDL.Nat64,
188
+ kyt_provider: IDL.Opt(IDL.Principal),
184
189
  }),
185
- 'checked_utxo' : IDL.Record({
186
- 'clean' : IDL.Bool,
187
- 'utxo' : Utxo,
188
- 'uuid' : IDL.Text,
189
- 'kyt_provider' : IDL.Opt(IDL.Principal),
190
+ checked_utxo: IDL.Record({
191
+ clean: IDL.Bool,
192
+ utxo: Utxo,
193
+ uuid: IDL.Text,
194
+ kyt_provider: IDL.Opt(IDL.Principal),
190
195
  }),
191
- 'schedule_withdrawal_reimbursement' : IDL.Record({
192
- 'burn_block_index' : IDL.Nat64,
193
- 'account' : Account,
194
- 'amount' : IDL.Nat64,
195
- 'reason' : WithdrawalReimbursementReason,
196
+ schedule_withdrawal_reimbursement: IDL.Record({
197
+ burn_block_index: IDL.Nat64,
198
+ account: Account,
199
+ amount: IDL.Nat64,
200
+ reason: WithdrawalReimbursementReason,
196
201
  }),
197
- 'quarantined_withdrawal_reimbursement' : IDL.Record({
198
- 'burn_block_index' : IDL.Nat64,
202
+ quarantined_withdrawal_reimbursement: IDL.Record({
203
+ burn_block_index: IDL.Nat64,
199
204
  }),
200
- 'removed_retrieve_btc_request' : IDL.Record({ 'block_index' : IDL.Nat64 }),
201
- 'confirmed_transaction' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
202
- 'replaced_transaction' : IDL.Record({
203
- 'fee' : IDL.Nat64,
204
- 'change_output' : IDL.Record({ 'value' : IDL.Nat64, 'vout' : IDL.Nat32 }),
205
- 'new_utxos' : IDL.Opt(IDL.Vec(Utxo)),
206
- 'old_txid' : IDL.Vec(IDL.Nat8),
207
- 'withdrawal_fee' : IDL.Opt(WithdrawalFee),
208
- 'new_txid' : IDL.Vec(IDL.Nat8),
209
- 'submitted_at' : IDL.Nat64,
210
- 'reason' : IDL.Opt(ReplacedReason),
205
+ removed_retrieve_btc_request: IDL.Record({ block_index: IDL.Nat64 }),
206
+ confirmed_transaction: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
207
+ replaced_transaction: IDL.Record({
208
+ fee: IDL.Nat64,
209
+ change_output: IDL.Record({ value: IDL.Nat64, vout: IDL.Nat32 }),
210
+ new_utxos: IDL.Opt(IDL.Vec(Utxo)),
211
+ old_txid: IDL.Vec(IDL.Nat8),
212
+ withdrawal_fee: IDL.Opt(WithdrawalFee),
213
+ new_txid: IDL.Vec(IDL.Nat8),
214
+ submitted_at: IDL.Nat64,
215
+ reason: IDL.Opt(ReplacedReason),
211
216
  }),
212
- 'checked_utxo_v2' : IDL.Record({ 'utxo' : Utxo, 'account' : Account }),
213
- 'ignored_utxo' : IDL.Record({ 'utxo' : Utxo }),
214
- 'checked_utxo_mint_unknown' : IDL.Record({
215
- 'utxo' : Utxo,
216
- 'account' : Account,
217
+ checked_utxo_v2: IDL.Record({ utxo: Utxo, account: Account }),
218
+ ignored_utxo: IDL.Record({ utxo: Utxo }),
219
+ checked_utxo_mint_unknown: IDL.Record({
220
+ utxo: Utxo,
221
+ account: Account,
217
222
  }),
218
- 'reimbursed_failed_deposit' : IDL.Record({
219
- 'burn_block_index' : IDL.Nat64,
220
- 'mint_block_index' : IDL.Nat64,
223
+ reimbursed_failed_deposit: IDL.Record({
224
+ burn_block_index: IDL.Nat64,
225
+ mint_block_index: IDL.Nat64,
221
226
  }),
222
- 'reimbursed_withdrawal' : IDL.Record({
223
- 'burn_block_index' : IDL.Nat64,
224
- 'mint_block_index' : IDL.Nat64,
227
+ reimbursed_withdrawal: IDL.Record({
228
+ burn_block_index: IDL.Nat64,
229
+ mint_block_index: IDL.Nat64,
225
230
  }),
226
231
  });
227
232
  const Event = IDL.Record({
228
- 'timestamp' : IDL.Opt(IDL.Nat64),
229
- 'payload' : EventType,
233
+ timestamp: IDL.Opt(IDL.Nat64),
234
+ payload: EventType,
230
235
  });
231
236
  const MinterInfo = IDL.Record({
232
- 'retrieve_btc_min_amount' : IDL.Nat64,
233
- 'min_confirmations' : IDL.Nat32,
234
- 'kyt_fee' : IDL.Nat64,
237
+ retrieve_btc_min_amount: IDL.Nat64,
238
+ min_confirmations: IDL.Nat32,
239
+ kyt_fee: IDL.Nat64,
235
240
  });
236
241
  const RetrieveBtcArgs = IDL.Record({
237
- 'address' : IDL.Text,
238
- 'amount' : IDL.Nat64,
242
+ address: IDL.Text,
243
+ amount: IDL.Nat64,
239
244
  });
240
- const RetrieveBtcOk = IDL.Record({ 'block_index' : IDL.Nat64 });
245
+ const RetrieveBtcOk = IDL.Record({ block_index: IDL.Nat64 });
241
246
  const RetrieveBtcError = IDL.Variant({
242
- 'MalformedAddress' : IDL.Text,
243
- 'GenericError' : IDL.Record({
244
- 'error_message' : IDL.Text,
245
- 'error_code' : IDL.Nat64,
247
+ MalformedAddress: IDL.Text,
248
+ GenericError: IDL.Record({
249
+ error_message: IDL.Text,
250
+ error_code: IDL.Nat64,
246
251
  }),
247
- 'TemporarilyUnavailable' : IDL.Text,
248
- 'AlreadyProcessing' : IDL.Null,
249
- 'AmountTooLow' : IDL.Nat64,
250
- 'InsufficientFunds' : IDL.Record({ 'balance' : IDL.Nat64 }),
252
+ TemporarilyUnavailable: IDL.Text,
253
+ AlreadyProcessing: IDL.Null,
254
+ AmountTooLow: IDL.Nat64,
255
+ InsufficientFunds: IDL.Record({ balance: IDL.Nat64 }),
251
256
  });
252
257
  const RetrieveBtcStatus = IDL.Variant({
253
- 'Signing' : IDL.Null,
254
- 'Confirmed' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
255
- 'Sending' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
256
- 'AmountTooLow' : IDL.Null,
257
- 'Unknown' : IDL.Null,
258
- 'Submitted' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
259
- 'Pending' : IDL.Null,
258
+ Signing: IDL.Null,
259
+ Confirmed: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
260
+ Sending: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
261
+ AmountTooLow: IDL.Null,
262
+ Unknown: IDL.Null,
263
+ Submitted: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
264
+ Pending: IDL.Null,
260
265
  });
261
266
  const ReimbursementRequest = IDL.Record({
262
- 'account' : Account,
263
- 'amount' : IDL.Nat64,
264
- 'reason' : ReimbursementReason,
267
+ account: Account,
268
+ amount: IDL.Nat64,
269
+ reason: ReimbursementReason,
265
270
  });
266
271
  const ReimbursedDeposit = IDL.Record({
267
- 'account' : Account,
268
- 'mint_block_index' : IDL.Nat64,
269
- 'amount' : IDL.Nat64,
270
- 'reason' : ReimbursementReason,
272
+ account: Account,
273
+ mint_block_index: IDL.Nat64,
274
+ amount: IDL.Nat64,
275
+ reason: ReimbursementReason,
271
276
  });
272
277
  const RetrieveBtcStatusV2 = IDL.Variant({
273
- 'Signing' : IDL.Null,
274
- 'Confirmed' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
275
- 'Sending' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
276
- 'AmountTooLow' : IDL.Null,
277
- 'WillReimburse' : ReimbursementRequest,
278
- 'Unknown' : IDL.Null,
279
- 'Submitted' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
280
- 'Reimbursed' : ReimbursedDeposit,
281
- 'Pending' : IDL.Null,
278
+ Signing: IDL.Null,
279
+ Confirmed: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
280
+ Sending: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
281
+ AmountTooLow: IDL.Null,
282
+ WillReimburse: ReimbursementRequest,
283
+ Unknown: IDL.Null,
284
+ Submitted: IDL.Record({ txid: IDL.Vec(IDL.Nat8) }),
285
+ Reimbursed: ReimbursedDeposit,
286
+ Pending: IDL.Null,
282
287
  });
283
288
  const RetrieveBtcWithApprovalArgs = IDL.Record({
284
- 'from_subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
285
- 'address' : IDL.Text,
286
- 'amount' : IDL.Nat64,
289
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
290
+ address: IDL.Text,
291
+ amount: IDL.Nat64,
287
292
  });
288
293
  const RetrieveBtcWithApprovalError = IDL.Variant({
289
- 'MalformedAddress' : IDL.Text,
290
- 'GenericError' : IDL.Record({
291
- 'error_message' : IDL.Text,
292
- 'error_code' : IDL.Nat64,
294
+ MalformedAddress: IDL.Text,
295
+ GenericError: IDL.Record({
296
+ error_message: IDL.Text,
297
+ error_code: IDL.Nat64,
293
298
  }),
294
- 'TemporarilyUnavailable' : IDL.Text,
295
- 'InsufficientAllowance' : IDL.Record({ 'allowance' : IDL.Nat64 }),
296
- 'AlreadyProcessing' : IDL.Null,
297
- 'AmountTooLow' : IDL.Nat64,
298
- 'InsufficientFunds' : IDL.Record({ 'balance' : IDL.Nat64 }),
299
+ TemporarilyUnavailable: IDL.Text,
300
+ InsufficientAllowance: IDL.Record({ allowance: IDL.Nat64 }),
301
+ AlreadyProcessing: IDL.Null,
302
+ AmountTooLow: IDL.Nat64,
303
+ InsufficientFunds: IDL.Record({ balance: IDL.Nat64 }),
299
304
  });
300
305
  const UtxoStatus = IDL.Variant({
301
- 'ValueTooSmall' : Utxo,
302
- 'Tainted' : Utxo,
303
- 'Minted' : IDL.Record({
304
- 'minted_amount' : IDL.Nat64,
305
- 'block_index' : IDL.Nat64,
306
- 'utxo' : Utxo,
306
+ ValueTooSmall: Utxo,
307
+ Tainted: Utxo,
308
+ Minted: IDL.Record({
309
+ minted_amount: IDL.Nat64,
310
+ block_index: IDL.Nat64,
311
+ utxo: Utxo,
307
312
  }),
308
- 'Checked' : Utxo,
313
+ Checked: Utxo,
309
314
  });
310
315
  const Timestamp = IDL.Nat64;
311
316
  const SuspendedUtxo = IDL.Record({
312
- 'utxo' : Utxo,
313
- 'earliest_retry' : Timestamp,
314
- 'reason' : SuspendedReason,
317
+ utxo: Utxo,
318
+ earliest_retry: Timestamp,
319
+ reason: SuspendedReason,
315
320
  });
316
321
  const PendingUtxo = IDL.Record({
317
- 'confirmations' : IDL.Nat32,
318
- 'value' : IDL.Nat64,
319
- 'outpoint' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8), 'vout' : IDL.Nat32 }),
322
+ confirmations: IDL.Nat32,
323
+ value: IDL.Nat64,
324
+ outpoint: IDL.Record({ txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32 }),
320
325
  });
321
326
  const UpdateBalanceError = IDL.Variant({
322
- 'GenericError' : IDL.Record({
323
- 'error_message' : IDL.Text,
324
- 'error_code' : IDL.Nat64,
327
+ GenericError: IDL.Record({
328
+ error_message: IDL.Text,
329
+ error_code: IDL.Nat64,
325
330
  }),
326
- 'TemporarilyUnavailable' : IDL.Text,
327
- 'AlreadyProcessing' : IDL.Null,
328
- 'NoNewUtxos' : IDL.Record({
329
- 'suspended_utxos' : IDL.Opt(IDL.Vec(SuspendedUtxo)),
330
- 'required_confirmations' : IDL.Nat32,
331
- 'pending_utxos' : IDL.Opt(IDL.Vec(PendingUtxo)),
332
- 'current_confirmations' : IDL.Opt(IDL.Nat32),
331
+ TemporarilyUnavailable: IDL.Text,
332
+ AlreadyProcessing: IDL.Null,
333
+ NoNewUtxos: IDL.Record({
334
+ suspended_utxos: IDL.Opt(IDL.Vec(SuspendedUtxo)),
335
+ required_confirmations: IDL.Nat32,
336
+ pending_utxos: IDL.Opt(IDL.Vec(PendingUtxo)),
337
+ current_confirmations: IDL.Opt(IDL.Nat32),
333
338
  }),
334
339
  });
340
+
335
341
  return IDL.Service({
336
- 'estimate_withdrawal_fee' : IDL.Func(
337
- [IDL.Record({ 'amount' : IDL.Opt(IDL.Nat64) })],
338
- [IDL.Record({ 'minter_fee' : IDL.Nat64, 'bitcoin_fee' : IDL.Nat64 })],
339
- ['query'],
340
- ),
341
- 'get_btc_address' : IDL.Func(
342
- [
342
+ estimate_withdrawal_fee: IDL.Func(
343
+ [IDL.Record({ amount: IDL.Opt(IDL.Nat64) })],
344
+ [IDL.Record({ minter_fee: IDL.Nat64, bitcoin_fee: IDL.Nat64 })],
345
+ ["query"],
346
+ ),
347
+ get_btc_address: IDL.Func(
348
+ [
349
+ IDL.Record({
350
+ owner: IDL.Opt(IDL.Principal),
351
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
352
+ }),
353
+ ],
354
+ [IDL.Text],
355
+ [],
356
+ ),
357
+ get_canister_status: IDL.Func([], [CanisterStatusResponse], []),
358
+ get_deposit_fee: IDL.Func([], [IDL.Nat64], ["query"]),
359
+ get_events: IDL.Func(
360
+ [IDL.Record({ start: IDL.Nat64, length: IDL.Nat64 })],
361
+ [IDL.Vec(Event)],
362
+ ["query"],
363
+ ),
364
+ get_known_utxos: IDL.Func(
365
+ [
366
+ IDL.Record({
367
+ owner: IDL.Opt(IDL.Principal),
368
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
369
+ }),
370
+ ],
371
+ [IDL.Vec(Utxo)],
372
+ ["query"],
373
+ ),
374
+ get_minter_info: IDL.Func([], [MinterInfo], ["query"]),
375
+ get_withdrawal_account: IDL.Func([], [Account], []),
376
+ retrieve_btc: IDL.Func(
377
+ [RetrieveBtcArgs],
378
+ [IDL.Variant({ Ok: RetrieveBtcOk, Err: RetrieveBtcError })],
379
+ [],
380
+ ),
381
+ retrieve_btc_status: IDL.Func(
382
+ [IDL.Record({ block_index: IDL.Nat64 })],
383
+ [RetrieveBtcStatus],
384
+ ["query"],
385
+ ),
386
+ retrieve_btc_status_v2: IDL.Func(
387
+ [IDL.Record({ block_index: IDL.Nat64 })],
388
+ [RetrieveBtcStatusV2],
389
+ ["query"],
390
+ ),
391
+ retrieve_btc_status_v2_by_account: IDL.Func(
392
+ [IDL.Opt(Account)],
393
+ [
394
+ IDL.Vec(
343
395
  IDL.Record({
344
- 'owner' : IDL.Opt(IDL.Principal),
345
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
396
+ block_index: IDL.Nat64,
397
+ status_v2: IDL.Opt(RetrieveBtcStatusV2),
346
398
  }),
347
- ],
348
- [IDL.Text],
349
- [],
350
- ),
351
- 'get_canister_status' : IDL.Func([], [CanisterStatusResponse], []),
352
- 'get_deposit_fee' : IDL.Func([], [IDL.Nat64], ['query']),
353
- 'get_events' : IDL.Func(
354
- [IDL.Record({ 'start' : IDL.Nat64, 'length' : IDL.Nat64 })],
355
- [IDL.Vec(Event)],
356
- ['query'],
357
- ),
358
- 'get_known_utxos' : IDL.Func(
359
- [
360
- IDL.Record({
361
- 'owner' : IDL.Opt(IDL.Principal),
362
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
363
- }),
364
- ],
365
- [IDL.Vec(Utxo)],
366
- ['query'],
367
- ),
368
- 'get_minter_info' : IDL.Func([], [MinterInfo], ['query']),
369
- 'get_withdrawal_account' : IDL.Func([], [Account], []),
370
- 'retrieve_btc' : IDL.Func(
371
- [RetrieveBtcArgs],
372
- [IDL.Variant({ 'Ok' : RetrieveBtcOk, 'Err' : RetrieveBtcError })],
373
- [],
374
- ),
375
- 'retrieve_btc_status' : IDL.Func(
376
- [IDL.Record({ 'block_index' : IDL.Nat64 })],
377
- [RetrieveBtcStatus],
378
- ['query'],
379
- ),
380
- 'retrieve_btc_status_v2' : IDL.Func(
381
- [IDL.Record({ 'block_index' : IDL.Nat64 })],
382
- [RetrieveBtcStatusV2],
383
- ['query'],
384
- ),
385
- 'retrieve_btc_status_v2_by_account' : IDL.Func(
386
- [IDL.Opt(Account)],
387
- [
388
- IDL.Vec(
389
- IDL.Record({
390
- 'block_index' : IDL.Nat64,
391
- 'status_v2' : IDL.Opt(RetrieveBtcStatusV2),
392
- })
393
- ),
394
- ],
395
- ['query'],
396
- ),
397
- 'retrieve_btc_with_approval' : IDL.Func(
398
- [RetrieveBtcWithApprovalArgs],
399
- [
400
- IDL.Variant({
401
- 'Ok' : RetrieveBtcOk,
402
- 'Err' : RetrieveBtcWithApprovalError,
403
- }),
404
- ],
405
- [],
406
- ),
407
- 'update_balance' : IDL.Func(
408
- [
409
- IDL.Record({
410
- 'owner' : IDL.Opt(IDL.Principal),
411
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
412
- }),
413
- ],
414
- [
415
- IDL.Variant({
416
- 'Ok' : IDL.Vec(UtxoStatus),
417
- 'Err' : UpdateBalanceError,
418
- }),
419
- ],
420
- [],
421
- ),
399
+ ),
400
+ ],
401
+ ["query"],
402
+ ),
403
+ retrieve_btc_with_approval: IDL.Func(
404
+ [RetrieveBtcWithApprovalArgs],
405
+ [
406
+ IDL.Variant({
407
+ Ok: RetrieveBtcOk,
408
+ Err: RetrieveBtcWithApprovalError,
409
+ }),
410
+ ],
411
+ [],
412
+ ),
413
+ update_balance: IDL.Func(
414
+ [
415
+ IDL.Record({
416
+ owner: IDL.Opt(IDL.Principal),
417
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
418
+ }),
419
+ ],
420
+ [
421
+ IDL.Variant({
422
+ Ok: IDL.Vec(UtxoStatus),
423
+ Err: UpdateBalanceError,
424
+ }),
425
+ ],
426
+ [],
427
+ ),
422
428
  });
423
429
  };
430
+
424
431
  export const init = ({ IDL }) => {
425
432
  const Mode = IDL.Variant({
426
- 'RestrictedTo' : IDL.Vec(IDL.Principal),
427
- 'DepositsRestrictedTo' : IDL.Vec(IDL.Principal),
428
- 'ReadOnly' : IDL.Null,
429
- 'GeneralAvailability' : IDL.Null,
433
+ RestrictedTo: IDL.Vec(IDL.Principal),
434
+ DepositsRestrictedTo: IDL.Vec(IDL.Principal),
435
+ ReadOnly: IDL.Null,
436
+ GeneralAvailability: IDL.Null,
430
437
  });
431
438
  const UpgradeArgs = IDL.Record({
432
- 'get_utxos_cache_expiration_seconds' : IDL.Opt(IDL.Nat64),
433
- 'kyt_principal' : IDL.Opt(IDL.Principal),
434
- 'mode' : IDL.Opt(Mode),
435
- 'retrieve_btc_min_amount' : IDL.Opt(IDL.Nat64),
436
- 'max_time_in_queue_nanos' : IDL.Opt(IDL.Nat64),
437
- 'check_fee' : IDL.Opt(IDL.Nat64),
438
- 'btc_checker_principal' : IDL.Opt(IDL.Principal),
439
- 'min_confirmations' : IDL.Opt(IDL.Nat32),
440
- 'kyt_fee' : IDL.Opt(IDL.Nat64),
439
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
440
+ kyt_principal: IDL.Opt(IDL.Principal),
441
+ mode: IDL.Opt(Mode),
442
+ retrieve_btc_min_amount: IDL.Opt(IDL.Nat64),
443
+ max_time_in_queue_nanos: IDL.Opt(IDL.Nat64),
444
+ check_fee: IDL.Opt(IDL.Nat64),
445
+ btc_checker_principal: IDL.Opt(IDL.Principal),
446
+ min_confirmations: IDL.Opt(IDL.Nat32),
447
+ kyt_fee: IDL.Opt(IDL.Nat64),
441
448
  });
442
449
  const BtcNetwork = IDL.Variant({
443
- 'Mainnet' : IDL.Null,
444
- 'Regtest' : IDL.Null,
445
- 'Testnet' : IDL.Null,
450
+ Mainnet: IDL.Null,
451
+ Regtest: IDL.Null,
452
+ Testnet: IDL.Null,
446
453
  });
447
454
  const InitArgs = IDL.Record({
448
- 'get_utxos_cache_expiration_seconds' : IDL.Opt(IDL.Nat64),
449
- 'kyt_principal' : IDL.Opt(IDL.Principal),
450
- 'ecdsa_key_name' : IDL.Text,
451
- 'mode' : Mode,
452
- 'retrieve_btc_min_amount' : IDL.Nat64,
453
- 'ledger_id' : IDL.Principal,
454
- 'max_time_in_queue_nanos' : IDL.Nat64,
455
- 'btc_network' : BtcNetwork,
456
- 'check_fee' : IDL.Opt(IDL.Nat64),
457
- 'btc_checker_principal' : IDL.Opt(IDL.Principal),
458
- 'min_confirmations' : IDL.Opt(IDL.Nat32),
459
- 'kyt_fee' : IDL.Opt(IDL.Nat64),
455
+ get_utxos_cache_expiration_seconds: IDL.Opt(IDL.Nat64),
456
+ kyt_principal: IDL.Opt(IDL.Principal),
457
+ ecdsa_key_name: IDL.Text,
458
+ mode: Mode,
459
+ retrieve_btc_min_amount: IDL.Nat64,
460
+ ledger_id: IDL.Principal,
461
+ max_time_in_queue_nanos: IDL.Nat64,
462
+ btc_network: BtcNetwork,
463
+ check_fee: IDL.Opt(IDL.Nat64),
464
+ btc_checker_principal: IDL.Opt(IDL.Principal),
465
+ min_confirmations: IDL.Opt(IDL.Nat32),
466
+ kyt_fee: IDL.Opt(IDL.Nat64),
460
467
  });
461
468
  const MinterArg = IDL.Variant({
462
- 'Upgrade' : IDL.Opt(UpgradeArgs),
463
- 'Init' : InitArgs,
469
+ Upgrade: IDL.Opt(UpgradeArgs),
470
+ Init: InitArgs,
464
471
  });
472
+
465
473
  return [MinterArg];
466
474
  };