@dfinity/ckbtc 6.0.1 → 7.0.0-beta-2025-12-11
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.
- package/README.md +3 -3
- package/dist/index.d.ts +25 -13
- package/dist/index.js +1 -6
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1 -6
- package/dist/index.mjs.map +4 -4
- package/package.json +4 -10
- package/dist/bitcoin.canister.d.ts +0 -35
- package/dist/candid/bitcoin.certified.idl.d.ts +0 -2
- package/dist/candid/bitcoin.certified.idl.js +0 -177
- package/dist/candid/bitcoin.d.ts +0 -128
- package/dist/candid/bitcoin.did +0 -149
- package/dist/candid/bitcoin.idl.d.ts +0 -2
- package/dist/candid/bitcoin.idl.js +0 -181
- package/dist/candid/minter.certified.idl.d.ts +0 -2
- package/dist/candid/minter.certified.idl.js +0 -474
- package/dist/candid/minter.d.ts +0 -843
- package/dist/candid/minter.did +0 -602
- package/dist/candid/minter.idl.d.ts +0 -2
- package/dist/candid/minter.idl.js +0 -474
- package/dist/enums/btc.enums.d.ts +0 -12
- package/dist/errors/btc.errors.d.ts +0 -18
- package/dist/errors/minter.errors.d.ts +0 -30
- package/dist/minter.canister.d.ts +0 -120
- package/dist/types/bitcoin.params.d.ts +0 -17
- package/dist/types/btc.d.ts +0 -9
- package/dist/types/canister.options.d.ts +0 -5
- package/dist/types/minter.params.d.ts +0 -36
- package/dist/types/minter.responses.d.ts +0 -25
- package/dist/utils/btc.utils.d.ts +0 -13
|
@@ -1,474 +0,0 @@
|
|
|
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
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const Mode = IDL.Variant({
|
|
11
|
-
RestrictedTo: IDL.Vec(IDL.Principal),
|
|
12
|
-
DepositsRestrictedTo: IDL.Vec(IDL.Principal),
|
|
13
|
-
ReadOnly: IDL.Null,
|
|
14
|
-
GeneralAvailability: IDL.Null,
|
|
15
|
-
});
|
|
16
|
-
const UpgradeArgs = IDL.Record({
|
|
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),
|
|
26
|
-
});
|
|
27
|
-
const BtcNetwork = IDL.Variant({
|
|
28
|
-
Mainnet: IDL.Null,
|
|
29
|
-
Regtest: IDL.Null,
|
|
30
|
-
Testnet: IDL.Null,
|
|
31
|
-
});
|
|
32
|
-
const InitArgs = IDL.Record({
|
|
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),
|
|
45
|
-
});
|
|
46
|
-
const MinterArg = IDL.Variant({
|
|
47
|
-
Upgrade: IDL.Opt(UpgradeArgs),
|
|
48
|
-
Init: InitArgs,
|
|
49
|
-
});
|
|
50
|
-
const MemoryMetrics = IDL.Record({
|
|
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,
|
|
59
|
-
});
|
|
60
|
-
const CanisterStatusType = IDL.Variant({
|
|
61
|
-
stopped: IDL.Null,
|
|
62
|
-
stopping: IDL.Null,
|
|
63
|
-
running: IDL.Null,
|
|
64
|
-
});
|
|
65
|
-
const LogVisibility = IDL.Variant({
|
|
66
|
-
controllers: IDL.Null,
|
|
67
|
-
public: IDL.Null,
|
|
68
|
-
allowed_viewers: IDL.Vec(IDL.Principal),
|
|
69
|
-
});
|
|
70
|
-
const DefiniteCanisterSettings = IDL.Record({
|
|
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,
|
|
79
|
-
});
|
|
80
|
-
const QueryStats = IDL.Record({
|
|
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,
|
|
85
|
-
});
|
|
86
|
-
const CanisterStatusResponse = IDL.Record({
|
|
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,
|
|
96
|
-
});
|
|
97
|
-
const Account = IDL.Record({
|
|
98
|
-
owner: IDL.Principal,
|
|
99
|
-
subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
100
|
-
});
|
|
101
|
-
const Utxo = IDL.Record({
|
|
102
|
-
height: IDL.Nat32,
|
|
103
|
-
value: IDL.Nat64,
|
|
104
|
-
outpoint: IDL.Record({ txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32 }),
|
|
105
|
-
});
|
|
106
|
-
const ReimbursementReason = IDL.Variant({
|
|
107
|
-
CallFailed: IDL.Null,
|
|
108
|
-
TaintedDestination: IDL.Record({
|
|
109
|
-
kyt_fee: IDL.Nat64,
|
|
110
|
-
kyt_provider: IDL.Principal,
|
|
111
|
-
}),
|
|
112
|
-
});
|
|
113
|
-
const WithdrawalFee = IDL.Record({
|
|
114
|
-
minter_fee: IDL.Nat64,
|
|
115
|
-
bitcoin_fee: IDL.Nat64,
|
|
116
|
-
});
|
|
117
|
-
const SuspendedReason = IDL.Variant({
|
|
118
|
-
ValueTooSmall: IDL.Null,
|
|
119
|
-
Quarantined: IDL.Null,
|
|
120
|
-
});
|
|
121
|
-
const BitcoinAddress = IDL.Variant({
|
|
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),
|
|
127
|
-
});
|
|
128
|
-
const InvalidTransactionError = IDL.Variant({
|
|
129
|
-
too_many_inputs: IDL.Record({
|
|
130
|
-
max_num_inputs: IDL.Nat64,
|
|
131
|
-
num_inputs: IDL.Nat64,
|
|
132
|
-
}),
|
|
133
|
-
});
|
|
134
|
-
const WithdrawalReimbursementReason = IDL.Variant({
|
|
135
|
-
invalid_transaction: InvalidTransactionError,
|
|
136
|
-
});
|
|
137
|
-
const ReplacedReason = IDL.Variant({
|
|
138
|
-
to_cancel: IDL.Record({ reason: WithdrawalReimbursementReason }),
|
|
139
|
-
to_retry: IDL.Null,
|
|
140
|
-
});
|
|
141
|
-
const EventType = IDL.Variant({
|
|
142
|
-
received_utxos: IDL.Record({
|
|
143
|
-
to_account: Account,
|
|
144
|
-
mint_txid: IDL.Opt(IDL.Nat64),
|
|
145
|
-
utxos: IDL.Vec(Utxo),
|
|
146
|
-
}),
|
|
147
|
-
schedule_deposit_reimbursement: IDL.Record({
|
|
148
|
-
burn_block_index: IDL.Nat64,
|
|
149
|
-
account: Account,
|
|
150
|
-
amount: IDL.Nat64,
|
|
151
|
-
reason: ReimbursementReason,
|
|
152
|
-
}),
|
|
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,
|
|
161
|
-
}),
|
|
162
|
-
distributed_kyt_fee: IDL.Record({
|
|
163
|
-
block_index: IDL.Nat64,
|
|
164
|
-
amount: IDL.Nat64,
|
|
165
|
-
kyt_provider: IDL.Principal,
|
|
166
|
-
}),
|
|
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,
|
|
176
|
-
}),
|
|
177
|
-
suspended_utxo: IDL.Record({
|
|
178
|
-
utxo: Utxo,
|
|
179
|
-
account: Account,
|
|
180
|
-
reason: SuspendedReason,
|
|
181
|
-
}),
|
|
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),
|
|
189
|
-
}),
|
|
190
|
-
checked_utxo: IDL.Record({
|
|
191
|
-
clean: IDL.Bool,
|
|
192
|
-
utxo: Utxo,
|
|
193
|
-
uuid: IDL.Text,
|
|
194
|
-
kyt_provider: IDL.Opt(IDL.Principal),
|
|
195
|
-
}),
|
|
196
|
-
schedule_withdrawal_reimbursement: IDL.Record({
|
|
197
|
-
burn_block_index: IDL.Nat64,
|
|
198
|
-
account: Account,
|
|
199
|
-
amount: IDL.Nat64,
|
|
200
|
-
reason: WithdrawalReimbursementReason,
|
|
201
|
-
}),
|
|
202
|
-
quarantined_withdrawal_reimbursement: IDL.Record({
|
|
203
|
-
burn_block_index: IDL.Nat64,
|
|
204
|
-
}),
|
|
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),
|
|
216
|
-
}),
|
|
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,
|
|
222
|
-
}),
|
|
223
|
-
reimbursed_failed_deposit: IDL.Record({
|
|
224
|
-
burn_block_index: IDL.Nat64,
|
|
225
|
-
mint_block_index: IDL.Nat64,
|
|
226
|
-
}),
|
|
227
|
-
reimbursed_withdrawal: IDL.Record({
|
|
228
|
-
burn_block_index: IDL.Nat64,
|
|
229
|
-
mint_block_index: IDL.Nat64,
|
|
230
|
-
}),
|
|
231
|
-
});
|
|
232
|
-
const Event = IDL.Record({
|
|
233
|
-
timestamp: IDL.Opt(IDL.Nat64),
|
|
234
|
-
payload: EventType,
|
|
235
|
-
});
|
|
236
|
-
const MinterInfo = IDL.Record({
|
|
237
|
-
retrieve_btc_min_amount: IDL.Nat64,
|
|
238
|
-
min_confirmations: IDL.Nat32,
|
|
239
|
-
kyt_fee: IDL.Nat64,
|
|
240
|
-
});
|
|
241
|
-
const RetrieveBtcArgs = IDL.Record({
|
|
242
|
-
address: IDL.Text,
|
|
243
|
-
amount: IDL.Nat64,
|
|
244
|
-
});
|
|
245
|
-
const RetrieveBtcOk = IDL.Record({ block_index: IDL.Nat64 });
|
|
246
|
-
const RetrieveBtcError = IDL.Variant({
|
|
247
|
-
MalformedAddress: IDL.Text,
|
|
248
|
-
GenericError: IDL.Record({
|
|
249
|
-
error_message: IDL.Text,
|
|
250
|
-
error_code: IDL.Nat64,
|
|
251
|
-
}),
|
|
252
|
-
TemporarilyUnavailable: IDL.Text,
|
|
253
|
-
AlreadyProcessing: IDL.Null,
|
|
254
|
-
AmountTooLow: IDL.Nat64,
|
|
255
|
-
InsufficientFunds: IDL.Record({ balance: IDL.Nat64 }),
|
|
256
|
-
});
|
|
257
|
-
const RetrieveBtcStatus = IDL.Variant({
|
|
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,
|
|
265
|
-
});
|
|
266
|
-
const ReimbursementRequest = IDL.Record({
|
|
267
|
-
account: Account,
|
|
268
|
-
amount: IDL.Nat64,
|
|
269
|
-
reason: ReimbursementReason,
|
|
270
|
-
});
|
|
271
|
-
const ReimbursedDeposit = IDL.Record({
|
|
272
|
-
account: Account,
|
|
273
|
-
mint_block_index: IDL.Nat64,
|
|
274
|
-
amount: IDL.Nat64,
|
|
275
|
-
reason: ReimbursementReason,
|
|
276
|
-
});
|
|
277
|
-
const RetrieveBtcStatusV2 = IDL.Variant({
|
|
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,
|
|
287
|
-
});
|
|
288
|
-
const RetrieveBtcWithApprovalArgs = IDL.Record({
|
|
289
|
-
from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
290
|
-
address: IDL.Text,
|
|
291
|
-
amount: IDL.Nat64,
|
|
292
|
-
});
|
|
293
|
-
const RetrieveBtcWithApprovalError = IDL.Variant({
|
|
294
|
-
MalformedAddress: IDL.Text,
|
|
295
|
-
GenericError: IDL.Record({
|
|
296
|
-
error_message: IDL.Text,
|
|
297
|
-
error_code: IDL.Nat64,
|
|
298
|
-
}),
|
|
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 }),
|
|
304
|
-
});
|
|
305
|
-
const UtxoStatus = IDL.Variant({
|
|
306
|
-
ValueTooSmall: Utxo,
|
|
307
|
-
Tainted: Utxo,
|
|
308
|
-
Minted: IDL.Record({
|
|
309
|
-
minted_amount: IDL.Nat64,
|
|
310
|
-
block_index: IDL.Nat64,
|
|
311
|
-
utxo: Utxo,
|
|
312
|
-
}),
|
|
313
|
-
Checked: Utxo,
|
|
314
|
-
});
|
|
315
|
-
const Timestamp = IDL.Nat64;
|
|
316
|
-
const SuspendedUtxo = IDL.Record({
|
|
317
|
-
utxo: Utxo,
|
|
318
|
-
earliest_retry: Timestamp,
|
|
319
|
-
reason: SuspendedReason,
|
|
320
|
-
});
|
|
321
|
-
const PendingUtxo = IDL.Record({
|
|
322
|
-
confirmations: IDL.Nat32,
|
|
323
|
-
value: IDL.Nat64,
|
|
324
|
-
outpoint: IDL.Record({ txid: IDL.Vec(IDL.Nat8), vout: IDL.Nat32 }),
|
|
325
|
-
});
|
|
326
|
-
const UpdateBalanceError = IDL.Variant({
|
|
327
|
-
GenericError: IDL.Record({
|
|
328
|
-
error_message: IDL.Text,
|
|
329
|
-
error_code: IDL.Nat64,
|
|
330
|
-
}),
|
|
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),
|
|
338
|
-
}),
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
return IDL.Service({
|
|
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
|
-
[],
|
|
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], []),
|
|
359
|
-
get_events: IDL.Func(
|
|
360
|
-
[IDL.Record({ start: IDL.Nat64, length: IDL.Nat64 })],
|
|
361
|
-
[IDL.Vec(Event)],
|
|
362
|
-
[],
|
|
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
|
-
[],
|
|
373
|
-
),
|
|
374
|
-
get_minter_info: IDL.Func([], [MinterInfo], []),
|
|
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
|
-
[],
|
|
385
|
-
),
|
|
386
|
-
retrieve_btc_status_v2: IDL.Func(
|
|
387
|
-
[IDL.Record({ block_index: IDL.Nat64 })],
|
|
388
|
-
[RetrieveBtcStatusV2],
|
|
389
|
-
[],
|
|
390
|
-
),
|
|
391
|
-
retrieve_btc_status_v2_by_account: IDL.Func(
|
|
392
|
-
[IDL.Opt(Account)],
|
|
393
|
-
[
|
|
394
|
-
IDL.Vec(
|
|
395
|
-
IDL.Record({
|
|
396
|
-
block_index: IDL.Nat64,
|
|
397
|
-
status_v2: IDL.Opt(RetrieveBtcStatusV2),
|
|
398
|
-
}),
|
|
399
|
-
),
|
|
400
|
-
],
|
|
401
|
-
[],
|
|
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
|
-
),
|
|
428
|
-
});
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
export const init = ({ IDL }) => {
|
|
432
|
-
const Mode = IDL.Variant({
|
|
433
|
-
RestrictedTo: IDL.Vec(IDL.Principal),
|
|
434
|
-
DepositsRestrictedTo: IDL.Vec(IDL.Principal),
|
|
435
|
-
ReadOnly: IDL.Null,
|
|
436
|
-
GeneralAvailability: IDL.Null,
|
|
437
|
-
});
|
|
438
|
-
const UpgradeArgs = IDL.Record({
|
|
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),
|
|
448
|
-
});
|
|
449
|
-
const BtcNetwork = IDL.Variant({
|
|
450
|
-
Mainnet: IDL.Null,
|
|
451
|
-
Regtest: IDL.Null,
|
|
452
|
-
Testnet: IDL.Null,
|
|
453
|
-
});
|
|
454
|
-
const InitArgs = IDL.Record({
|
|
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),
|
|
467
|
-
});
|
|
468
|
-
const MinterArg = IDL.Variant({
|
|
469
|
-
Upgrade: IDL.Opt(UpgradeArgs),
|
|
470
|
-
Init: InitArgs,
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
return [MinterArg];
|
|
474
|
-
};
|