@dfinity/ckbtc 4.0.0-next-2025-08-14 → 4.0.1-beta-2025-09-25
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/LICENSE +0 -25
- package/README.md +1 -1
- package/dist/candid/bitcoin.certified.idl.d.ts +1 -1
- package/dist/candid/bitcoin.d.ts +3 -3
- package/dist/candid/bitcoin.idl.d.ts +1 -1
- package/dist/candid/minter.certified.idl.d.ts +1 -1
- package/dist/candid/minter.certified.idl.js +46 -0
- package/dist/candid/minter.d.ts +49 -3
- package/dist/candid/minter.did +55 -2
- package/dist/candid/minter.idl.d.ts +1 -1
- package/dist/candid/minter.idl.js +46 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/chunk-7W3XZWUY.js +2 -0
- package/dist/esm/chunk-7W3XZWUY.js.map +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/minter.canister.js +1 -1
- package/dist/types/types/canister.options.d.ts +1 -1
- package/dist/types/types/minter.params.d.ts +1 -1
- package/package.json +4 -5
- package/dist/esm/chunk-HAU7JR75.js +0 -2
- package/dist/esm/chunk-HAU7JR75.js.map +0 -7
package/LICENSE
CHANGED
|
@@ -174,28 +174,3 @@
|
|
|
174
174
|
of your accepting any such warranty or additional liability.
|
|
175
175
|
|
|
176
176
|
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2025 DFINITY Stiftung.
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm i @dfinity/ckbtc
|
|
|
21
21
|
The bundle needs peer dependencies, be sure that following resources are available in your project as well.
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm i @
|
|
24
|
+
npm i @icp-sdk/core @dfinity/utils
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Usage
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IDL } from "@
|
|
1
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
2
2
|
export const idlFactory: IDL.InterfaceFactory;
|
package/dist/candid/bitcoin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ActorMethod } from "@
|
|
2
|
-
import type { IDL } from "@
|
|
3
|
-
import type { Principal } from "@
|
|
1
|
+
import type { ActorMethod } from "@icp-sdk/core/agent";
|
|
2
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
3
|
+
import type { Principal } from "@icp-sdk/core/principal";
|
|
4
4
|
|
|
5
5
|
export type address = string;
|
|
6
6
|
export type block_hash = Uint8Array | number[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IDL } from "@
|
|
1
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
2
2
|
export const idlFactory: IDL.InterfaceFactory;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IDL } from "@
|
|
1
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
2
2
|
export const idlFactory: IDL.InterfaceFactory;
|
|
@@ -40,6 +40,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
40
40
|
'Upgrade' : IDL.Opt(UpgradeArgs),
|
|
41
41
|
'Init' : InitArgs,
|
|
42
42
|
});
|
|
43
|
+
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,
|
|
52
|
+
});
|
|
43
53
|
const CanisterStatusType = IDL.Variant({
|
|
44
54
|
'stopped' : IDL.Null,
|
|
45
55
|
'stopping' : IDL.Null,
|
|
@@ -52,6 +62,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
52
62
|
});
|
|
53
63
|
const DefiniteCanisterSettings = IDL.Record({
|
|
54
64
|
'freezing_threshold' : IDL.Nat,
|
|
65
|
+
'wasm_memory_threshold' : IDL.Nat,
|
|
55
66
|
'controllers' : IDL.Vec(IDL.Principal),
|
|
56
67
|
'reserved_cycles_limit' : IDL.Nat,
|
|
57
68
|
'log_visibility' : LogVisibility,
|
|
@@ -66,6 +77,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
66
77
|
'request_payload_bytes_total' : IDL.Nat,
|
|
67
78
|
});
|
|
68
79
|
const CanisterStatusResponse = IDL.Record({
|
|
80
|
+
'memory_metrics' : MemoryMetrics,
|
|
69
81
|
'status' : CanisterStatusType,
|
|
70
82
|
'memory_size' : IDL.Nat,
|
|
71
83
|
'cycles' : IDL.Nat,
|
|
@@ -91,6 +103,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
91
103
|
'kyt_provider' : IDL.Principal,
|
|
92
104
|
}),
|
|
93
105
|
});
|
|
106
|
+
const WithdrawalFee = IDL.Record({
|
|
107
|
+
'minter_fee' : IDL.Nat64,
|
|
108
|
+
'bitcoin_fee' : IDL.Nat64,
|
|
109
|
+
});
|
|
94
110
|
const SuspendedReason = IDL.Variant({
|
|
95
111
|
'ValueTooSmall' : IDL.Null,
|
|
96
112
|
'Quarantined' : IDL.Null,
|
|
@@ -102,6 +118,19 @@ export const idlFactory = ({ IDL }) => {
|
|
|
102
118
|
'p2wpkh_v0' : IDL.Vec(IDL.Nat8),
|
|
103
119
|
'p2pkh' : IDL.Vec(IDL.Nat8),
|
|
104
120
|
});
|
|
121
|
+
const InvalidTransactionError = IDL.Variant({
|
|
122
|
+
'too_many_inputs' : IDL.Record({
|
|
123
|
+
'max_num_inputs' : IDL.Nat64,
|
|
124
|
+
'num_inputs' : IDL.Nat64,
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
const WithdrawalReimbursementReason = IDL.Variant({
|
|
128
|
+
'invalid_transaction' : InvalidTransactionError,
|
|
129
|
+
});
|
|
130
|
+
const ReplacedReason = IDL.Variant({
|
|
131
|
+
'to_cancel' : IDL.Record({ 'reason' : WithdrawalReimbursementReason }),
|
|
132
|
+
'to_retry' : IDL.Null,
|
|
133
|
+
});
|
|
105
134
|
const EventType = IDL.Variant({
|
|
106
135
|
'received_utxos' : IDL.Record({
|
|
107
136
|
'to_account' : Account,
|
|
@@ -120,6 +149,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
120
149
|
IDL.Record({ 'value' : IDL.Nat64, 'vout' : IDL.Nat32 })
|
|
121
150
|
),
|
|
122
151
|
'txid' : IDL.Vec(IDL.Nat8),
|
|
152
|
+
'withdrawal_fee' : IDL.Opt(WithdrawalFee),
|
|
123
153
|
'utxos' : IDL.Vec(Utxo),
|
|
124
154
|
'requests' : IDL.Vec(IDL.Nat64),
|
|
125
155
|
'submitted_at' : IDL.Nat64,
|
|
@@ -158,14 +188,26 @@ export const idlFactory = ({ IDL }) => {
|
|
|
158
188
|
'uuid' : IDL.Text,
|
|
159
189
|
'kyt_provider' : IDL.Opt(IDL.Principal),
|
|
160
190
|
}),
|
|
191
|
+
'schedule_withdrawal_reimbursement' : IDL.Record({
|
|
192
|
+
'burn_block_index' : IDL.Nat64,
|
|
193
|
+
'account' : Account,
|
|
194
|
+
'amount' : IDL.Nat64,
|
|
195
|
+
'reason' : WithdrawalReimbursementReason,
|
|
196
|
+
}),
|
|
197
|
+
'quarantined_withdrawal_reimbursement' : IDL.Record({
|
|
198
|
+
'burn_block_index' : IDL.Nat64,
|
|
199
|
+
}),
|
|
161
200
|
'removed_retrieve_btc_request' : IDL.Record({ 'block_index' : IDL.Nat64 }),
|
|
162
201
|
'confirmed_transaction' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
|
|
163
202
|
'replaced_transaction' : IDL.Record({
|
|
164
203
|
'fee' : IDL.Nat64,
|
|
165
204
|
'change_output' : IDL.Record({ 'value' : IDL.Nat64, 'vout' : IDL.Nat32 }),
|
|
205
|
+
'new_utxos' : IDL.Opt(IDL.Vec(Utxo)),
|
|
166
206
|
'old_txid' : IDL.Vec(IDL.Nat8),
|
|
207
|
+
'withdrawal_fee' : IDL.Opt(WithdrawalFee),
|
|
167
208
|
'new_txid' : IDL.Vec(IDL.Nat8),
|
|
168
209
|
'submitted_at' : IDL.Nat64,
|
|
210
|
+
'reason' : IDL.Opt(ReplacedReason),
|
|
169
211
|
}),
|
|
170
212
|
'checked_utxo_v2' : IDL.Record({ 'utxo' : Utxo, 'account' : Account }),
|
|
171
213
|
'ignored_utxo' : IDL.Record({ 'utxo' : Utxo }),
|
|
@@ -177,6 +219,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
177
219
|
'burn_block_index' : IDL.Nat64,
|
|
178
220
|
'mint_block_index' : IDL.Nat64,
|
|
179
221
|
}),
|
|
222
|
+
'reimbursed_withdrawal' : IDL.Record({
|
|
223
|
+
'burn_block_index' : IDL.Nat64,
|
|
224
|
+
'mint_block_index' : IDL.Nat64,
|
|
225
|
+
}),
|
|
180
226
|
});
|
|
181
227
|
const Event = IDL.Record({
|
|
182
228
|
'timestamp' : IDL.Opt(IDL.Nat64),
|
package/dist/candid/minter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ActorMethod } from "@
|
|
2
|
-
import type { IDL } from "@
|
|
3
|
-
import type { Principal } from "@
|
|
1
|
+
import type { ActorMethod } from "@icp-sdk/core/agent";
|
|
2
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
3
|
+
import type { Principal } from "@icp-sdk/core/principal";
|
|
4
4
|
|
|
5
5
|
export interface Account {
|
|
6
6
|
owner: Principal;
|
|
@@ -17,6 +17,7 @@ export type BtcNetwork =
|
|
|
17
17
|
| { Regtest: null }
|
|
18
18
|
| { Testnet: null };
|
|
19
19
|
export interface CanisterStatusResponse {
|
|
20
|
+
memory_metrics: MemoryMetrics;
|
|
20
21
|
status: CanisterStatusType;
|
|
21
22
|
memory_size: bigint;
|
|
22
23
|
cycles: bigint;
|
|
@@ -32,6 +33,7 @@ export type CanisterStatusType =
|
|
|
32
33
|
| { running: null };
|
|
33
34
|
export interface DefiniteCanisterSettings {
|
|
34
35
|
freezing_threshold: bigint;
|
|
36
|
+
wasm_memory_threshold: bigint;
|
|
35
37
|
controllers: Array<Principal>;
|
|
36
38
|
reserved_cycles_limit: bigint;
|
|
37
39
|
log_visibility: LogVisibility;
|
|
@@ -64,6 +66,7 @@ export type EventType =
|
|
|
64
66
|
fee: [] | [bigint];
|
|
65
67
|
change_output: [] | [{ value: bigint; vout: number }];
|
|
66
68
|
txid: Uint8Array | number[];
|
|
69
|
+
withdrawal_fee: [] | [WithdrawalFee];
|
|
67
70
|
utxos: Array<Utxo>;
|
|
68
71
|
requests: BigUint64Array | bigint[];
|
|
69
72
|
submitted_at: bigint;
|
|
@@ -113,15 +116,27 @@ export type EventType =
|
|
|
113
116
|
kyt_provider: [] | [Principal];
|
|
114
117
|
};
|
|
115
118
|
}
|
|
119
|
+
| {
|
|
120
|
+
schedule_withdrawal_reimbursement: {
|
|
121
|
+
burn_block_index: bigint;
|
|
122
|
+
account: Account;
|
|
123
|
+
amount: bigint;
|
|
124
|
+
reason: WithdrawalReimbursementReason;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
| { quarantined_withdrawal_reimbursement: { burn_block_index: bigint } }
|
|
116
128
|
| { removed_retrieve_btc_request: { block_index: bigint } }
|
|
117
129
|
| { confirmed_transaction: { txid: Uint8Array | number[] } }
|
|
118
130
|
| {
|
|
119
131
|
replaced_transaction: {
|
|
120
132
|
fee: bigint;
|
|
121
133
|
change_output: { value: bigint; vout: number };
|
|
134
|
+
new_utxos: [] | [Array<Utxo>];
|
|
122
135
|
old_txid: Uint8Array | number[];
|
|
136
|
+
withdrawal_fee: [] | [WithdrawalFee];
|
|
123
137
|
new_txid: Uint8Array | number[];
|
|
124
138
|
submitted_at: bigint;
|
|
139
|
+
reason: [] | [ReplacedReason];
|
|
125
140
|
};
|
|
126
141
|
}
|
|
127
142
|
| { checked_utxo_v2: { utxo: Utxo; account: Account } }
|
|
@@ -132,6 +147,12 @@ export type EventType =
|
|
|
132
147
|
burn_block_index: bigint;
|
|
133
148
|
mint_block_index: bigint;
|
|
134
149
|
};
|
|
150
|
+
}
|
|
151
|
+
| {
|
|
152
|
+
reimbursed_withdrawal: {
|
|
153
|
+
burn_block_index: bigint;
|
|
154
|
+
mint_block_index: bigint;
|
|
155
|
+
};
|
|
135
156
|
};
|
|
136
157
|
export interface InitArgs {
|
|
137
158
|
get_utxos_cache_expiration_seconds: [] | [bigint];
|
|
@@ -147,10 +168,23 @@ export interface InitArgs {
|
|
|
147
168
|
min_confirmations: [] | [number];
|
|
148
169
|
kyt_fee: [] | [bigint];
|
|
149
170
|
}
|
|
171
|
+
export type InvalidTransactionError = {
|
|
172
|
+
too_many_inputs: { max_num_inputs: bigint; num_inputs: bigint };
|
|
173
|
+
};
|
|
150
174
|
export type LogVisibility =
|
|
151
175
|
| { controllers: null }
|
|
152
176
|
| { public: null }
|
|
153
177
|
| { allowed_viewers: Array<Principal> };
|
|
178
|
+
export interface MemoryMetrics {
|
|
179
|
+
wasm_binary_size: bigint;
|
|
180
|
+
wasm_chunk_store_size: bigint;
|
|
181
|
+
canister_history_size: bigint;
|
|
182
|
+
stable_memory_size: bigint;
|
|
183
|
+
snapshots_size: bigint;
|
|
184
|
+
wasm_memory_size: bigint;
|
|
185
|
+
global_memory_size: bigint;
|
|
186
|
+
custom_sections_size: bigint;
|
|
187
|
+
}
|
|
154
188
|
export type MinterArg = { Upgrade: [] | [UpgradeArgs] } | { Init: InitArgs };
|
|
155
189
|
export interface MinterInfo {
|
|
156
190
|
retrieve_btc_min_amount: bigint;
|
|
@@ -187,6 +221,11 @@ export interface ReimbursementRequest {
|
|
|
187
221
|
amount: bigint;
|
|
188
222
|
reason: ReimbursementReason;
|
|
189
223
|
}
|
|
224
|
+
export type ReplacedReason =
|
|
225
|
+
| {
|
|
226
|
+
to_cancel: { reason: WithdrawalReimbursementReason };
|
|
227
|
+
}
|
|
228
|
+
| { to_retry: null };
|
|
190
229
|
export interface RetrieveBtcArgs {
|
|
191
230
|
address: string;
|
|
192
231
|
amount: bigint;
|
|
@@ -280,6 +319,13 @@ export type UtxoStatus =
|
|
|
280
319
|
};
|
|
281
320
|
}
|
|
282
321
|
| { Checked: Utxo };
|
|
322
|
+
export interface WithdrawalFee {
|
|
323
|
+
minter_fee: bigint;
|
|
324
|
+
bitcoin_fee: bigint;
|
|
325
|
+
}
|
|
326
|
+
export type WithdrawalReimbursementReason = {
|
|
327
|
+
invalid_transaction: InvalidTransactionError;
|
|
328
|
+
};
|
|
283
329
|
export interface _SERVICE {
|
|
284
330
|
estimate_withdrawal_fee: ActorMethod<
|
|
285
331
|
[{ amount: [] | [bigint] }],
|
package/dist/candid/minter.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit bf0d4d1 (2025-09-19 tags: release-2025-09-19_10-17-base) 'rs/bitcoin/ckbtc/minter/ckbtc_minter.did' by import-candid
|
|
2
2
|
// Represents an account on the ckBTC ledger.
|
|
3
3
|
type Account = record { owner : principal; subaccount : opt blob };
|
|
4
4
|
|
|
@@ -11,6 +11,7 @@ type CanisterStatusResponse = record {
|
|
|
11
11
|
module_hash : opt vec nat8;
|
|
12
12
|
query_stats : QueryStats;
|
|
13
13
|
reserved_cycles : nat;
|
|
14
|
+
memory_metrics : MemoryMetrics;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
type QueryStats = record {
|
|
@@ -20,6 +21,17 @@ type QueryStats = record {
|
|
|
20
21
|
request_payload_bytes_total : nat;
|
|
21
22
|
};
|
|
22
23
|
|
|
24
|
+
type MemoryMetrics = record {
|
|
25
|
+
wasm_memory_size : nat;
|
|
26
|
+
stable_memory_size : nat;
|
|
27
|
+
global_memory_size : nat;
|
|
28
|
+
wasm_binary_size : nat;
|
|
29
|
+
custom_sections_size : nat;
|
|
30
|
+
canister_history_size : nat;
|
|
31
|
+
wasm_chunk_store_size : nat;
|
|
32
|
+
snapshots_size : nat;
|
|
33
|
+
};
|
|
34
|
+
|
|
23
35
|
type CanisterStatusType = variant { stopped; stopping; running };
|
|
24
36
|
|
|
25
37
|
type DefiniteCanisterSettings = record {
|
|
@@ -30,6 +42,7 @@ type DefiniteCanisterSettings = record {
|
|
|
30
42
|
reserved_cycles_limit : nat;
|
|
31
43
|
log_visibility: LogVisibility;
|
|
32
44
|
wasm_memory_limit : nat;
|
|
45
|
+
wasm_memory_threshold : nat;
|
|
33
46
|
};
|
|
34
47
|
|
|
35
48
|
type LogVisibility = variant {
|
|
@@ -350,6 +363,24 @@ type ReimbursementReason = variant {
|
|
|
350
363
|
};
|
|
351
364
|
};
|
|
352
365
|
|
|
366
|
+
type ReplacedReason = variant {
|
|
367
|
+
to_retry;
|
|
368
|
+
to_cancel : record {
|
|
369
|
+
reason : WithdrawalReimbursementReason;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
type WithdrawalReimbursementReason = variant {
|
|
374
|
+
invalid_transaction : InvalidTransactionError;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
type InvalidTransactionError = variant {
|
|
378
|
+
too_many_inputs : record {
|
|
379
|
+
num_inputs : nat64;
|
|
380
|
+
max_num_inputs : nat64;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
|
|
353
384
|
type SuspendedReason = variant {
|
|
354
385
|
// The minter ignored this UTXO because UTXO's value is too small to pay
|
|
355
386
|
// the check fees.
|
|
@@ -358,6 +389,11 @@ type SuspendedReason = variant {
|
|
|
358
389
|
Quarantined;
|
|
359
390
|
};
|
|
360
391
|
|
|
392
|
+
type WithdrawalFee = record {
|
|
393
|
+
minter_fee : nat64;
|
|
394
|
+
bitcoin_fee : nat64;
|
|
395
|
+
};
|
|
396
|
+
|
|
361
397
|
type Event = record {
|
|
362
398
|
timestamp : opt nat64;
|
|
363
399
|
payload : EventType;
|
|
@@ -388,13 +424,17 @@ type EventType = variant {
|
|
|
388
424
|
change_output : opt record { vout : nat32; value : nat64 };
|
|
389
425
|
submitted_at : nat64;
|
|
390
426
|
fee: opt nat64;
|
|
427
|
+
withdrawal_fee : opt WithdrawalFee;
|
|
391
428
|
};
|
|
392
429
|
replaced_transaction : record {
|
|
393
430
|
new_txid : blob;
|
|
394
431
|
old_txid : blob;
|
|
395
432
|
change_output : record { vout : nat32; value : nat64 };
|
|
396
433
|
submitted_at : nat64;
|
|
397
|
-
fee: nat64;
|
|
434
|
+
fee : nat64;
|
|
435
|
+
withdrawal_fee : opt WithdrawalFee;
|
|
436
|
+
reason : opt ReplacedReason;
|
|
437
|
+
new_utxos : opt vec Utxo;
|
|
398
438
|
};
|
|
399
439
|
confirmed_transaction : record { txid : blob };
|
|
400
440
|
checked_utxo : record {
|
|
@@ -428,6 +468,19 @@ type EventType = variant {
|
|
|
428
468
|
reason : ReimbursementReason;
|
|
429
469
|
};
|
|
430
470
|
reimbursed_failed_deposit : record { burn_block_index : nat64; mint_block_index : nat64 };
|
|
471
|
+
schedule_withdrawal_reimbursement : record {
|
|
472
|
+
account : Account;
|
|
473
|
+
burn_block_index : nat64;
|
|
474
|
+
amount : nat64;
|
|
475
|
+
reason : WithdrawalReimbursementReason;
|
|
476
|
+
};
|
|
477
|
+
quarantined_withdrawal_reimbursement : record {
|
|
478
|
+
burn_block_index : nat64;
|
|
479
|
+
};
|
|
480
|
+
reimbursed_withdrawal : record {
|
|
481
|
+
burn_block_index : nat64;
|
|
482
|
+
mint_block_index : nat64;
|
|
483
|
+
};
|
|
431
484
|
};
|
|
432
485
|
|
|
433
486
|
type MinterArg = variant {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IDL } from "@
|
|
1
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
2
2
|
export const idlFactory: IDL.InterfaceFactory;
|
|
@@ -40,6 +40,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
40
40
|
'Upgrade' : IDL.Opt(UpgradeArgs),
|
|
41
41
|
'Init' : InitArgs,
|
|
42
42
|
});
|
|
43
|
+
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,
|
|
52
|
+
});
|
|
43
53
|
const CanisterStatusType = IDL.Variant({
|
|
44
54
|
'stopped' : IDL.Null,
|
|
45
55
|
'stopping' : IDL.Null,
|
|
@@ -52,6 +62,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
52
62
|
});
|
|
53
63
|
const DefiniteCanisterSettings = IDL.Record({
|
|
54
64
|
'freezing_threshold' : IDL.Nat,
|
|
65
|
+
'wasm_memory_threshold' : IDL.Nat,
|
|
55
66
|
'controllers' : IDL.Vec(IDL.Principal),
|
|
56
67
|
'reserved_cycles_limit' : IDL.Nat,
|
|
57
68
|
'log_visibility' : LogVisibility,
|
|
@@ -66,6 +77,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
66
77
|
'request_payload_bytes_total' : IDL.Nat,
|
|
67
78
|
});
|
|
68
79
|
const CanisterStatusResponse = IDL.Record({
|
|
80
|
+
'memory_metrics' : MemoryMetrics,
|
|
69
81
|
'status' : CanisterStatusType,
|
|
70
82
|
'memory_size' : IDL.Nat,
|
|
71
83
|
'cycles' : IDL.Nat,
|
|
@@ -91,6 +103,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
91
103
|
'kyt_provider' : IDL.Principal,
|
|
92
104
|
}),
|
|
93
105
|
});
|
|
106
|
+
const WithdrawalFee = IDL.Record({
|
|
107
|
+
'minter_fee' : IDL.Nat64,
|
|
108
|
+
'bitcoin_fee' : IDL.Nat64,
|
|
109
|
+
});
|
|
94
110
|
const SuspendedReason = IDL.Variant({
|
|
95
111
|
'ValueTooSmall' : IDL.Null,
|
|
96
112
|
'Quarantined' : IDL.Null,
|
|
@@ -102,6 +118,19 @@ export const idlFactory = ({ IDL }) => {
|
|
|
102
118
|
'p2wpkh_v0' : IDL.Vec(IDL.Nat8),
|
|
103
119
|
'p2pkh' : IDL.Vec(IDL.Nat8),
|
|
104
120
|
});
|
|
121
|
+
const InvalidTransactionError = IDL.Variant({
|
|
122
|
+
'too_many_inputs' : IDL.Record({
|
|
123
|
+
'max_num_inputs' : IDL.Nat64,
|
|
124
|
+
'num_inputs' : IDL.Nat64,
|
|
125
|
+
}),
|
|
126
|
+
});
|
|
127
|
+
const WithdrawalReimbursementReason = IDL.Variant({
|
|
128
|
+
'invalid_transaction' : InvalidTransactionError,
|
|
129
|
+
});
|
|
130
|
+
const ReplacedReason = IDL.Variant({
|
|
131
|
+
'to_cancel' : IDL.Record({ 'reason' : WithdrawalReimbursementReason }),
|
|
132
|
+
'to_retry' : IDL.Null,
|
|
133
|
+
});
|
|
105
134
|
const EventType = IDL.Variant({
|
|
106
135
|
'received_utxos' : IDL.Record({
|
|
107
136
|
'to_account' : Account,
|
|
@@ -120,6 +149,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
120
149
|
IDL.Record({ 'value' : IDL.Nat64, 'vout' : IDL.Nat32 })
|
|
121
150
|
),
|
|
122
151
|
'txid' : IDL.Vec(IDL.Nat8),
|
|
152
|
+
'withdrawal_fee' : IDL.Opt(WithdrawalFee),
|
|
123
153
|
'utxos' : IDL.Vec(Utxo),
|
|
124
154
|
'requests' : IDL.Vec(IDL.Nat64),
|
|
125
155
|
'submitted_at' : IDL.Nat64,
|
|
@@ -158,14 +188,26 @@ export const idlFactory = ({ IDL }) => {
|
|
|
158
188
|
'uuid' : IDL.Text,
|
|
159
189
|
'kyt_provider' : IDL.Opt(IDL.Principal),
|
|
160
190
|
}),
|
|
191
|
+
'schedule_withdrawal_reimbursement' : IDL.Record({
|
|
192
|
+
'burn_block_index' : IDL.Nat64,
|
|
193
|
+
'account' : Account,
|
|
194
|
+
'amount' : IDL.Nat64,
|
|
195
|
+
'reason' : WithdrawalReimbursementReason,
|
|
196
|
+
}),
|
|
197
|
+
'quarantined_withdrawal_reimbursement' : IDL.Record({
|
|
198
|
+
'burn_block_index' : IDL.Nat64,
|
|
199
|
+
}),
|
|
161
200
|
'removed_retrieve_btc_request' : IDL.Record({ 'block_index' : IDL.Nat64 }),
|
|
162
201
|
'confirmed_transaction' : IDL.Record({ 'txid' : IDL.Vec(IDL.Nat8) }),
|
|
163
202
|
'replaced_transaction' : IDL.Record({
|
|
164
203
|
'fee' : IDL.Nat64,
|
|
165
204
|
'change_output' : IDL.Record({ 'value' : IDL.Nat64, 'vout' : IDL.Nat32 }),
|
|
205
|
+
'new_utxos' : IDL.Opt(IDL.Vec(Utxo)),
|
|
166
206
|
'old_txid' : IDL.Vec(IDL.Nat8),
|
|
207
|
+
'withdrawal_fee' : IDL.Opt(WithdrawalFee),
|
|
167
208
|
'new_txid' : IDL.Vec(IDL.Nat8),
|
|
168
209
|
'submitted_at' : IDL.Nat64,
|
|
210
|
+
'reason' : IDL.Opt(ReplacedReason),
|
|
169
211
|
}),
|
|
170
212
|
'checked_utxo_v2' : IDL.Record({ 'utxo' : Utxo, 'account' : Account }),
|
|
171
213
|
'ignored_utxo' : IDL.Record({ 'utxo' : Utxo }),
|
|
@@ -177,6 +219,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
177
219
|
'burn_block_index' : IDL.Nat64,
|
|
178
220
|
'mint_block_index' : IDL.Nat64,
|
|
179
221
|
}),
|
|
222
|
+
'reimbursed_withdrawal' : IDL.Record({
|
|
223
|
+
'burn_block_index' : IDL.Nat64,
|
|
224
|
+
'mint_block_index' : IDL.Nat64,
|
|
225
|
+
}),
|
|
180
226
|
});
|
|
181
227
|
const Event = IDL.Record({
|
|
182
228
|
'timestamp' : IDL.Opt(IDL.Nat64),
|