@junobuild/functions 0.8.3 → 0.8.4-next-2026-04-17
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/canisters/ckbtc/index.js +1 -1
- package/canisters/cketh/index.js +1 -1
- package/canisters/cmc/index.js +1 -1
- package/canisters/declarations/_idl.d.ts +2 -1
- package/canisters/declarations/_types.d.ts +2 -1
- package/canisters/declarations/ckbtc/bitcoin.did.d.ts +8 -0
- package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +2 -0
- package/canisters/declarations/ckbtc/minter.did.d.ts +190 -0
- package/canisters/declarations/ckbtc/minter.did.idl.d.ts +9 -0
- package/canisters/declarations/cketh/minter.did.d.ts +140 -0
- package/canisters/declarations/cketh/minter.did.idl.d.ts +8 -0
- package/canisters/declarations/cycles-ledger/cycles-ledger.did.d.ts +413 -0
- package/canisters/declarations/cycles-ledger/cycles-ledger.did.idl.d.ts +82 -0
- package/canisters/declarations/ic-management/ic-management.did.d.ts +18 -4
- package/canisters/declarations/ledger-icp/index.did.d.ts +20 -1
- package/canisters/declarations/ledger-icp/index.did.idl.d.ts +5 -1
- package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -0
- package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -0
- package/canisters/declarations/nns/governance.did.d.ts +100 -0
- package/canisters/declarations/nns/governance.did.idl.d.ts +11 -0
- package/canisters/declarations/nns/governance_test.did.d.ts +100 -0
- package/canisters/declarations/nns/governance_test.did.idl.d.ts +11 -0
- package/canisters/declarations/nns/sns_wasm.did.d.ts +4 -0
- package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +1 -0
- package/canisters/declarations/sns/governance.did.d.ts +4 -0
- package/canisters/declarations/sns/governance.did.idl.d.ts +1 -0
- package/canisters/declarations/sns/governance_test.did.d.ts +4 -0
- package/canisters/declarations/sns/governance_test.did.idl.d.ts +1 -0
- package/canisters/ic-management/index.js +1 -1
- package/canisters/ledger/cycles/index.d.ts +1 -0
- package/canisters/ledger/cycles/index.js +2 -0
- package/canisters/ledger/cycles/index.js.map +7 -0
- package/canisters/ledger/icp/index.d.ts +1 -0
- package/canisters/ledger/icp/index.js +1 -1
- package/canisters/ledger/icp/index.js.map +4 -4
- package/canisters/ledger/icp/ledger.canister.d.ts +5 -5
- package/canisters/ledger/icp/schema.d.ts +152 -0
- package/canisters/ledger/icrc/index.d.ts +1 -1
- package/canisters/ledger/icrc/index.js +1 -1
- package/canisters/ledger/icrc/index.js.map +4 -4
- package/canisters/ledger/icrc/ledger.canister.d.ts +13 -14
- package/canisters/ledger/icrc/schema.d.ts +351 -0
- package/canisters/nns/index.js +1 -1
- package/canisters/sns/index.js +1 -1
- package/chunk-I3WMKZTG.js +2 -0
- package/chunk-I3WMKZTG.js.map +7 -0
- package/package.json +10 -6
- package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +8 -0
- package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +16 -0
- package/src/canisters/declarations/ckbtc/minter.did.d.ts +190 -0
- package/src/canisters/declarations/ckbtc/minter.did.idl.js +118 -0
- package/src/canisters/declarations/cketh/minter.did.d.ts +140 -0
- package/src/canisters/declarations/cketh/minter.did.idl.js +78 -0
- package/src/canisters/declarations/cycles-ledger/cycles-ledger.did.d.ts +413 -0
- package/src/canisters/declarations/cycles-ledger/cycles-ledger.did.idl.js +806 -0
- package/src/canisters/declarations/ic-management/ic-management.did.d.ts +18 -4
- package/src/canisters/declarations/ic-management/ic-management.did.idl.js +32 -8
- package/src/canisters/declarations/ledger-icp/index.did.d.ts +20 -1
- package/src/canisters/declarations/ledger-icp/index.did.idl.js +32 -5
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -0
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +2 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +2 -0
- package/src/canisters/declarations/nns/governance.did.d.ts +100 -0
- package/src/canisters/declarations/nns/governance.did.idl.js +132 -0
- package/src/canisters/declarations/nns/governance_test.did.d.ts +100 -0
- package/src/canisters/declarations/nns/governance_test.did.idl.js +132 -0
- package/src/canisters/declarations/nns/sns_wasm.did.d.ts +4 -0
- package/src/canisters/declarations/nns/sns_wasm.did.idl.js +8 -0
- package/src/canisters/declarations/sns/governance.did.d.ts +4 -0
- package/src/canisters/declarations/sns/governance.did.idl.js +12 -0
- package/src/canisters/declarations/sns/governance_test.did.d.ts +4 -0
- package/src/canisters/declarations/sns/governance_test.did.idl.js +12 -0
- package/canisters/ledger/icrc/schemas.d.ts +0 -11
- package/chunk-I4MVAQHI.js +0 -2
- package/chunk-I4MVAQHI.js.map +0 -7
package/canisters/ckbtc/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i,b as C}from"../../chunk-
|
|
1
|
+
import{a as i,b as C}from"../../chunk-I3WMKZTG.js";import"../../chunk-4C666HHU.js";export{i as CkBTCBitcoinIdl,C as CkBTCMinterIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/canisters/cketh/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as r,d as t}from"../../chunk-
|
|
1
|
+
import{c as r,d as t}from"../../chunk-I3WMKZTG.js";import"../../chunk-4C666HHU.js";export{r as CkETHMinterIdl,t as CkETHOrchestratorIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/canisters/cmc/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"../../chunk-BXZ5PSUW.js";import{a as e}from"../../chunk-ZBCLFWQJ.js";import{g as i}from"../../chunk-YHNBR22R.js";import"../../chunk-JU5CZHLY.js";import{a as p}from"../../chunk-X3EF7OU6.js";import{e as o}from"../../chunk-
|
|
1
|
+
import{a as s}from"../../chunk-BXZ5PSUW.js";import{a as e}from"../../chunk-ZBCLFWQJ.js";import{g as i}from"../../chunk-YHNBR22R.js";import"../../chunk-JU5CZHLY.js";import{a as p}from"../../chunk-X3EF7OU6.js";import{e as o}from"../../chunk-I3WMKZTG.js";import"../../chunk-4C666HHU.js";var r=class extends e{constructor(t={}){p.parse(t),super({canisterId:t?.canisterId??s})}notifyTopUp=async({args:t})=>await i({canisterId:this.canisterId,method:"notify_top_up",args:[[o.NotifyTopUpArg,t]],result:o.NotifyTopUpResult})};export{r as CMCCanister,o as CmcIdl};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,6 +3,7 @@ import * as CkBTCMinterIdl from './ckbtc/minter.did.idl';
|
|
|
3
3
|
import * as CkETHMinterIdl from './cketh/minter.did.idl';
|
|
4
4
|
import * as CkETHOrchestratorIdl from './cketh/orchestrator.did.idl';
|
|
5
5
|
import * as CmcIdl from './cmc/cmc.did.idl';
|
|
6
|
+
import * as CyclesLedgerIdl from './cycles-ledger/cycles-ledger.did.idl';
|
|
6
7
|
import * as IcManagementIdl from './ic-management/ic-management.did.idl';
|
|
7
8
|
import * as IcpIndexIdl from './ledger-icp/index.did.idl';
|
|
8
9
|
import * as IcpLedgerIdl from './ledger-icp/ledger.did.idl';
|
|
@@ -13,4 +14,4 @@ import * as NnsSnsWasmIdl from './nns/sns_wasm.did.idl';
|
|
|
13
14
|
import * as SnsGovernanceIdl from './sns/governance.did.idl';
|
|
14
15
|
import * as SnsRootIdl from './sns/root.did.idl';
|
|
15
16
|
import * as SnsSwapIdl from './sns/swap.did.idl';
|
|
16
|
-
export { CkBTCBitcoinIdl, CkBTCMinterIdl, CkETHMinterIdl, CkETHOrchestratorIdl, CmcIdl, IcManagementIdl, IcpIndexIdl, IcpLedgerIdl, IcrcIndexIdl, IcrcLedgerIdl, NnsGovernanceIdl, NnsSnsWasmIdl, SnsGovernanceIdl, SnsRootIdl, SnsSwapIdl };
|
|
17
|
+
export { CkBTCBitcoinIdl, CkBTCMinterIdl, CkETHMinterIdl, CkETHOrchestratorIdl, CmcIdl, CyclesLedgerIdl, IcManagementIdl, IcpIndexIdl, IcpLedgerIdl, IcrcIndexIdl, IcrcLedgerIdl, NnsGovernanceIdl, NnsSnsWasmIdl, SnsGovernanceIdl, SnsRootIdl, SnsSwapIdl };
|
|
@@ -3,6 +3,7 @@ import type * as CkBTCMinterDid from './ckbtc/minter.did';
|
|
|
3
3
|
import type * as CkETHMinterDid from './cketh/minter.did';
|
|
4
4
|
import type * as CkETHOrchestratorDid from './cketh/orchestrator.did';
|
|
5
5
|
import type * as CmcDid from './cmc/cmc.did';
|
|
6
|
+
import type * as CyclesLedgerDid from './cycles-ledger/cycles-ledger.did';
|
|
6
7
|
import type * as IcManagementDid from './ic-management/ic-management.did';
|
|
7
8
|
import type * as IcpIndexDid from './ledger-icp/index.did';
|
|
8
9
|
import type * as IcpLedgerDid from './ledger-icp/ledger.did';
|
|
@@ -13,4 +14,4 @@ import type * as NnsSnsWasmDid from './nns/sns_wasm.did';
|
|
|
13
14
|
import type * as SnsGovernanceDid from './sns/governance.did';
|
|
14
15
|
import type * as SnsRootDid from './sns/root.did';
|
|
15
16
|
import type * as SnsSwapDid from './sns/swap.did';
|
|
16
|
-
export type { CkBTCBitcoinDid, CkBTCMinterDid, CkETHMinterDid, CkETHOrchestratorDid, CmcDid, IcManagementDid, IcpIndexDid, IcpLedgerDid, IcrcIndexDid, IcrcLedgerDid, NnsGovernanceDid, NnsSnsWasmDid, SnsGovernanceDid, SnsRootDid, SnsSwapDid };
|
|
17
|
+
export type { CkBTCBitcoinDid, CkBTCMinterDid, CkETHMinterDid, CkETHOrchestratorDid, CmcDid, CyclesLedgerDid, IcManagementDid, IcpIndexDid, IcpLedgerDid, IcrcIndexDid, IcrcLedgerDid, NnsGovernanceDid, NnsSnsWasmDid, SnsGovernanceDid, SnsRootDid, SnsSwapDid };
|
|
@@ -14,6 +14,13 @@ export type address = string;
|
|
|
14
14
|
export type block_hash = Uint8Array;
|
|
15
15
|
export type block_header = Uint8Array;
|
|
16
16
|
export type block_height = number;
|
|
17
|
+
export interface blockchain_info {
|
|
18
|
+
'height' : block_height,
|
|
19
|
+
'block_hash' : block_hash,
|
|
20
|
+
'difficulty' : bigint,
|
|
21
|
+
'timestamp' : number,
|
|
22
|
+
'utxos_length' : bigint,
|
|
23
|
+
}
|
|
17
24
|
export type canister_arg = { 'init' : init_config } |
|
|
18
25
|
{ 'upgrade' : [] | [set_config_request] };
|
|
19
26
|
export interface config {
|
|
@@ -127,6 +134,7 @@ export interface _SERVICE {
|
|
|
127
134
|
[send_transaction_request],
|
|
128
135
|
undefined
|
|
129
136
|
>,
|
|
137
|
+
'get_blockchain_info' : ActorMethod<[], blockchain_info>,
|
|
130
138
|
'get_config' : ActorMethod<[], config>,
|
|
131
139
|
'set_config' : ActorMethod<[set_config_request], undefined>,
|
|
132
140
|
}
|
|
@@ -19,6 +19,7 @@ export const outpoint: IDL.RecordClass;
|
|
|
19
19
|
export const utxo: IDL.RecordClass;
|
|
20
20
|
export const get_utxos_response: IDL.RecordClass;
|
|
21
21
|
export const send_transaction_request: IDL.RecordClass;
|
|
22
|
+
export const blockchain_info: IDL.RecordClass;
|
|
22
23
|
export const config: IDL.RecordClass;
|
|
23
24
|
export const idlService: IDL.ServiceClass<string, {
|
|
24
25
|
bitcoin_get_balance: IDL.FuncClass<[IDL.RecordClass], [IDL.FixedNatClass]>;
|
|
@@ -28,6 +29,7 @@ export const idlService: IDL.ServiceClass<string, {
|
|
|
28
29
|
bitcoin_get_utxos: IDL.FuncClass<[IDL.RecordClass], [IDL.RecordClass]>;
|
|
29
30
|
bitcoin_get_utxos_query: IDL.FuncClass<[IDL.RecordClass], [IDL.RecordClass]>;
|
|
30
31
|
bitcoin_send_transaction: IDL.FuncClass<[IDL.RecordClass], []>;
|
|
32
|
+
get_blockchain_info: IDL.FuncClass<[], [IDL.RecordClass]>;
|
|
31
33
|
get_config: IDL.FuncClass<[], [IDL.RecordClass]>;
|
|
32
34
|
set_config: IDL.FuncClass<[IDL.RecordClass], []>;
|
|
33
35
|
}>;
|
|
@@ -40,6 +40,40 @@ export type BtcNetwork = {
|
|
|
40
40
|
*/
|
|
41
41
|
'Testnet' : null
|
|
42
42
|
};
|
|
43
|
+
export type BurnMemo = {
|
|
44
|
+
/**
|
|
45
|
+
* The minter consolidated UTXOs.
|
|
46
|
+
*/
|
|
47
|
+
'Consolidate' : {
|
|
48
|
+
/**
|
|
49
|
+
* The total value of the consolidated UTXOs.
|
|
50
|
+
*/
|
|
51
|
+
'value' : bigint,
|
|
52
|
+
/**
|
|
53
|
+
* The number of input UTXOs that were consolidated.
|
|
54
|
+
*/
|
|
55
|
+
'inputs' : bigint,
|
|
56
|
+
}
|
|
57
|
+
} |
|
|
58
|
+
{
|
|
59
|
+
/**
|
|
60
|
+
* The minter processed a retrieve_btc request.
|
|
61
|
+
*/
|
|
62
|
+
'Convert' : {
|
|
63
|
+
/**
|
|
64
|
+
* The status of the Bitcoin check.
|
|
65
|
+
*/
|
|
66
|
+
'status' : [] | [Status],
|
|
67
|
+
/**
|
|
68
|
+
* The destination of the retrieve BTC request.
|
|
69
|
+
*/
|
|
70
|
+
'address' : [] | [string],
|
|
71
|
+
/**
|
|
72
|
+
* The check fee for the burn.
|
|
73
|
+
*/
|
|
74
|
+
'kyt_fee' : [] | [bigint],
|
|
75
|
+
}
|
|
76
|
+
};
|
|
43
77
|
export interface CanisterStatusResponse {
|
|
44
78
|
'memory_metrics' : MemoryMetrics,
|
|
45
79
|
'status' : CanisterStatusType,
|
|
@@ -56,6 +90,48 @@ export interface CanisterStatusResponse {
|
|
|
56
90
|
export type CanisterStatusType = { 'stopped' : null } |
|
|
57
91
|
{ 'stopping' : null } |
|
|
58
92
|
{ 'running' : null };
|
|
93
|
+
export interface DecodeLedgerMemoArgs {
|
|
94
|
+
/**
|
|
95
|
+
* The encoded memo type
|
|
96
|
+
*/
|
|
97
|
+
'memo_type' : MemoType,
|
|
98
|
+
/**
|
|
99
|
+
* The encoded memo from a minter transaction on the ledger
|
|
100
|
+
*/
|
|
101
|
+
'encoded_memo' : Uint8Array,
|
|
102
|
+
}
|
|
103
|
+
export type DecodeLedgerMemoError = {
|
|
104
|
+
/**
|
|
105
|
+
* The provided memo could not be decoded.
|
|
106
|
+
*/
|
|
107
|
+
'InvalidMemo' : string
|
|
108
|
+
};
|
|
109
|
+
export type DecodeLedgerMemoResult = {
|
|
110
|
+
/**
|
|
111
|
+
* The decoded memo, if the minter was able to decode it. This field is `opt`, so that other memo types can be
|
|
112
|
+
* added in the future.
|
|
113
|
+
*/
|
|
114
|
+
'Ok' : [] | [DecodedMemo]
|
|
115
|
+
} |
|
|
116
|
+
{
|
|
117
|
+
/**
|
|
118
|
+
* An error in case the minter was not able to decode the provided memo. This field is `opt`, so that other error
|
|
119
|
+
* types can be added in the future.
|
|
120
|
+
*/
|
|
121
|
+
'Err' : [] | [DecodeLedgerMemoError]
|
|
122
|
+
};
|
|
123
|
+
export type DecodedMemo = {
|
|
124
|
+
/**
|
|
125
|
+
* The decoded BurnMemo - `opt` since other variants of `BurnMemo` could be added in the future.
|
|
126
|
+
*/
|
|
127
|
+
'Burn' : [] | [BurnMemo]
|
|
128
|
+
} |
|
|
129
|
+
{
|
|
130
|
+
/**
|
|
131
|
+
* The decoded MintMemo - `opt` since other variants of `MintMemo` could be added in the future.
|
|
132
|
+
*/
|
|
133
|
+
'Mint' : [] | [MintMemo]
|
|
134
|
+
};
|
|
59
135
|
export interface DefiniteCanisterSettings {
|
|
60
136
|
'freezing_threshold' : bigint,
|
|
61
137
|
'wasm_memory_threshold' : bigint,
|
|
@@ -88,6 +164,7 @@ export type EventType = {
|
|
|
88
164
|
'fee' : [] | [bigint],
|
|
89
165
|
'change_output' : [] | [{ 'value' : bigint, 'vout' : number }],
|
|
90
166
|
'txid' : Uint8Array,
|
|
167
|
+
'signed_tx' : [] | [Uint8Array],
|
|
91
168
|
'withdrawal_fee' : [] | [WithdrawalFee],
|
|
92
169
|
'utxos' : Array<Utxo>,
|
|
93
170
|
'requests' : BigUint64Array,
|
|
@@ -164,6 +241,14 @@ export type EventType = {
|
|
|
164
241
|
{ 'checked_utxo_v2' : { 'utxo' : Utxo, 'account' : Account } } |
|
|
165
242
|
{ 'ignored_utxo' : { 'utxo' : Utxo } } |
|
|
166
243
|
{ 'checked_utxo_mint_unknown' : { 'utxo' : Utxo, 'account' : Account } } |
|
|
244
|
+
{
|
|
245
|
+
'created_consolidate_utxos_request' : {
|
|
246
|
+
'received_at' : bigint,
|
|
247
|
+
'block_index' : bigint,
|
|
248
|
+
'address' : BitcoinAddress,
|
|
249
|
+
'amount' : bigint,
|
|
250
|
+
}
|
|
251
|
+
} |
|
|
167
252
|
{
|
|
168
253
|
'reimbursed_failed_deposit' : {
|
|
169
254
|
'burn_block_index' : bigint,
|
|
@@ -201,6 +286,11 @@ export interface InitArgs {
|
|
|
201
286
|
* The minimal amount of ckBTC that can be converted to BTC.
|
|
202
287
|
*/
|
|
203
288
|
'retrieve_btc_min_amount' : bigint,
|
|
289
|
+
/**
|
|
290
|
+
* The minimal amount of BTC that can be converted to ckBTC.
|
|
291
|
+
* UTXOs with lower values will be ignored.
|
|
292
|
+
*/
|
|
293
|
+
'deposit_btc_min_amount' : [] | [bigint],
|
|
204
294
|
/**
|
|
205
295
|
* The principal of the ledger that handles ckBTC transfers.
|
|
206
296
|
* The default account of the ckBTC minter must be configured as
|
|
@@ -220,6 +310,14 @@ export interface InitArgs {
|
|
|
220
310
|
* / The fee paid per Bitcoin check.
|
|
221
311
|
*/
|
|
222
312
|
'check_fee' : [] | [bigint],
|
|
313
|
+
/**
|
|
314
|
+
* / The maximum number of input UTXOs allowed in a transaction.
|
|
315
|
+
*/
|
|
316
|
+
'max_num_inputs_in_transaction' : [] | [bigint],
|
|
317
|
+
/**
|
|
318
|
+
* / The minimum number of available UTXOs to trigger a consolidation.
|
|
319
|
+
*/
|
|
320
|
+
'utxo_consolidation_threshold' : [] | [bigint],
|
|
223
321
|
/**
|
|
224
322
|
* / The canister id of the Bitcoin checker canister.
|
|
225
323
|
*/
|
|
@@ -240,6 +338,8 @@ export type InvalidTransactionError = {
|
|
|
240
338
|
export type LogVisibility = { 'controllers' : null } |
|
|
241
339
|
{ 'public' : null } |
|
|
242
340
|
{ 'allowed_viewers' : Array<Principal> };
|
|
341
|
+
export type MemoType = { 'Burn' : null } |
|
|
342
|
+
{ 'Mint' : null };
|
|
243
343
|
export interface MemoryMetrics {
|
|
244
344
|
'wasm_binary_size' : bigint,
|
|
245
345
|
'wasm_chunk_store_size' : bigint,
|
|
@@ -250,6 +350,57 @@ export interface MemoryMetrics {
|
|
|
250
350
|
'global_memory_size' : bigint,
|
|
251
351
|
'custom_sections_size' : bigint,
|
|
252
352
|
}
|
|
353
|
+
export type MintMemo = {
|
|
354
|
+
/**
|
|
355
|
+
* [deprecated] The minter minted accumulated check fees to the KYT provider.
|
|
356
|
+
*/
|
|
357
|
+
'Kyt' : null
|
|
358
|
+
} |
|
|
359
|
+
{
|
|
360
|
+
'ReimburseWithdrawal' : {
|
|
361
|
+
/**
|
|
362
|
+
* The id corresponding to the withdrawal request,
|
|
363
|
+
* which corresponds to the ledger burn index.
|
|
364
|
+
*/
|
|
365
|
+
'withdrawal_id' : bigint,
|
|
366
|
+
}
|
|
367
|
+
} |
|
|
368
|
+
{
|
|
369
|
+
/**
|
|
370
|
+
* [deprecated] The minter failed to check retrieve btc destination address
|
|
371
|
+
* or the destination address is tainted.
|
|
372
|
+
*/
|
|
373
|
+
'KytFail' : {
|
|
374
|
+
/**
|
|
375
|
+
* The status of the Bitcoin check.
|
|
376
|
+
*/
|
|
377
|
+
'status' : [] | [Status],
|
|
378
|
+
'associated_burn_index' : [] | [bigint],
|
|
379
|
+
/**
|
|
380
|
+
* The Bitcoin check fee.
|
|
381
|
+
*/
|
|
382
|
+
'kyt_fee' : [] | [bigint],
|
|
383
|
+
}
|
|
384
|
+
} |
|
|
385
|
+
{
|
|
386
|
+
/**
|
|
387
|
+
* The minter converted a single UTXO to ckBTC.
|
|
388
|
+
*/
|
|
389
|
+
'Convert' : {
|
|
390
|
+
/**
|
|
391
|
+
* The transaction ID of the accepted UTXO.
|
|
392
|
+
*/
|
|
393
|
+
'txid' : [] | [Uint8Array],
|
|
394
|
+
/**
|
|
395
|
+
* UTXO's output index within the BTC transaction.
|
|
396
|
+
*/
|
|
397
|
+
'vout' : [] | [number],
|
|
398
|
+
/**
|
|
399
|
+
* The Bitcoin check fee.
|
|
400
|
+
*/
|
|
401
|
+
'kyt_fee' : [] | [bigint],
|
|
402
|
+
}
|
|
403
|
+
};
|
|
253
404
|
export type MinterArg = { 'Upgrade' : [] | [UpgradeArgs] } |
|
|
254
405
|
{ 'Init' : InitArgs };
|
|
255
406
|
export interface MinterInfo {
|
|
@@ -258,6 +409,11 @@ export interface MinterInfo {
|
|
|
258
409
|
* initialization or upgrades, but may vary according to current network fees.
|
|
259
410
|
*/
|
|
260
411
|
'retrieve_btc_min_amount' : bigint,
|
|
412
|
+
/**
|
|
413
|
+
* Minimal amount of BTC that can be deposited to be converted into ckBTC.
|
|
414
|
+
* UTXOs with lower values will be ignored.
|
|
415
|
+
*/
|
|
416
|
+
'deposit_btc_min_amount' : [] | [bigint],
|
|
261
417
|
'min_confirmations' : number,
|
|
262
418
|
/**
|
|
263
419
|
* The same as `check_fee`, but the old name is kept here to be backward compatible.
|
|
@@ -546,6 +702,19 @@ export type RetrieveBtcWithApprovalError = {
|
|
|
546
702
|
*/
|
|
547
703
|
'InsufficientFunds' : { 'balance' : bigint }
|
|
548
704
|
};
|
|
705
|
+
export type Status = { 'CallFailed' : null } |
|
|
706
|
+
{
|
|
707
|
+
/**
|
|
708
|
+
* The minter rejected a retrieve_btc due to a failed Bitcoin check.
|
|
709
|
+
*/
|
|
710
|
+
'Rejected' : null
|
|
711
|
+
} |
|
|
712
|
+
{
|
|
713
|
+
/**
|
|
714
|
+
* The minter accepted a retrieve_btc request.
|
|
715
|
+
*/
|
|
716
|
+
'Accepted' : null
|
|
717
|
+
};
|
|
549
718
|
export type SuspendedReason = {
|
|
550
719
|
/**
|
|
551
720
|
* The minter ignored this UTXO because UTXO's value is too small to pay
|
|
@@ -618,6 +787,11 @@ export interface UpgradeArgs {
|
|
|
618
787
|
* The minimal amount of ckBTC that the minter converts to BTC.
|
|
619
788
|
*/
|
|
620
789
|
'retrieve_btc_min_amount' : [] | [bigint],
|
|
790
|
+
/**
|
|
791
|
+
* The minimal amount of BTC that can be converted to ckBTC.
|
|
792
|
+
* UTXOs with lower values will be ignored.
|
|
793
|
+
*/
|
|
794
|
+
'deposit_btc_min_amount' : [] | [bigint],
|
|
621
795
|
/**
|
|
622
796
|
* / Maximum time in nanoseconds that a transaction should spend in the queue
|
|
623
797
|
* / before being sent.
|
|
@@ -627,6 +801,14 @@ export interface UpgradeArgs {
|
|
|
627
801
|
* / The fee per Bitcoin check.
|
|
628
802
|
*/
|
|
629
803
|
'check_fee' : [] | [bigint],
|
|
804
|
+
/**
|
|
805
|
+
* / The maximum number of input UTXOs allowed in a transaction.
|
|
806
|
+
*/
|
|
807
|
+
'max_num_inputs_in_transaction' : [] | [bigint],
|
|
808
|
+
/**
|
|
809
|
+
* / The minimum number of available UTXOs to trigger a consolidation.
|
|
810
|
+
*/
|
|
811
|
+
'utxo_consolidation_threshold' : [] | [bigint],
|
|
630
812
|
/**
|
|
631
813
|
* / The principal of the Bitcoin checker canister.
|
|
632
814
|
*/
|
|
@@ -686,6 +868,14 @@ export type WithdrawalReimbursementReason = {
|
|
|
686
868
|
};
|
|
687
869
|
export interface environment_variable { 'value' : string, 'name' : string }
|
|
688
870
|
export interface _SERVICE {
|
|
871
|
+
/**
|
|
872
|
+
* Section "Transaction Information" {{{
|
|
873
|
+
* Returns information related to minter transactions.
|
|
874
|
+
*/
|
|
875
|
+
'decode_ledger_memo' : ActorMethod<
|
|
876
|
+
[DecodeLedgerMemoArgs],
|
|
877
|
+
DecodeLedgerMemoResult
|
|
878
|
+
>,
|
|
689
879
|
/**
|
|
690
880
|
* / Returns an estimate of the user's fee (in Satoshi) for a
|
|
691
881
|
* / retrieve_btc request based on the current status of the Bitcoin network.
|
|
@@ -3,6 +3,14 @@ export const UpgradeArgs: IDL.RecordClass;
|
|
|
3
3
|
export const BtcNetwork: IDL.VariantClass;
|
|
4
4
|
export const InitArgs: IDL.RecordClass;
|
|
5
5
|
export const MinterArg: IDL.VariantClass;
|
|
6
|
+
export const MemoType: IDL.VariantClass;
|
|
7
|
+
export const DecodeLedgerMemoArgs: IDL.RecordClass;
|
|
8
|
+
export const Status: IDL.VariantClass;
|
|
9
|
+
export const BurnMemo: IDL.VariantClass;
|
|
10
|
+
export const MintMemo: IDL.VariantClass;
|
|
11
|
+
export const DecodedMemo: IDL.VariantClass;
|
|
12
|
+
export const DecodeLedgerMemoError: IDL.VariantClass;
|
|
13
|
+
export const DecodeLedgerMemoResult: IDL.VariantClass;
|
|
6
14
|
export const MemoryMetrics: IDL.RecordClass;
|
|
7
15
|
export const CanisterStatusType: IDL.VariantClass;
|
|
8
16
|
export const environment_variable: IDL.RecordClass;
|
|
@@ -37,6 +45,7 @@ export const SuspendedUtxo: IDL.RecordClass;
|
|
|
37
45
|
export const PendingUtxo: IDL.RecordClass;
|
|
38
46
|
export const UpdateBalanceError: IDL.VariantClass;
|
|
39
47
|
export const idlService: IDL.ServiceClass<string, {
|
|
48
|
+
decode_ledger_memo: IDL.FuncClass<[IDL.RecordClass], [IDL.VariantClass]>;
|
|
40
49
|
estimate_withdrawal_fee: IDL.FuncClass<[IDL.RecordClass], [IDL.RecordClass]>;
|
|
41
50
|
get_btc_address: IDL.FuncClass<[IDL.RecordClass], [IDL.TextClass]>;
|
|
42
51
|
get_canister_status: IDL.FuncClass<[], [IDL.RecordClass]>;
|
|
@@ -53,6 +53,52 @@ export type BlockTag = {
|
|
|
53
53
|
*/
|
|
54
54
|
'Latest' : null
|
|
55
55
|
};
|
|
56
|
+
export type BurnMemo = {
|
|
57
|
+
/**
|
|
58
|
+
* The minter processed a ckERC20 withdrawal request.
|
|
59
|
+
*/
|
|
60
|
+
'Erc20Convert' : {
|
|
61
|
+
/**
|
|
62
|
+
* ckETH ledger burn index identifying the burn to pay for the transaction fee.
|
|
63
|
+
*/
|
|
64
|
+
'ckerc20_withdrawal_id' : bigint,
|
|
65
|
+
/**
|
|
66
|
+
* The destination of the withdrawal request.
|
|
67
|
+
*/
|
|
68
|
+
'to_address' : string,
|
|
69
|
+
}
|
|
70
|
+
} |
|
|
71
|
+
{
|
|
72
|
+
/**
|
|
73
|
+
* The minter processed a ckERC20 withdrawal request
|
|
74
|
+
* and that burn pays the transaction fee.
|
|
75
|
+
*/
|
|
76
|
+
'Erc20GasFee' : {
|
|
77
|
+
/**
|
|
78
|
+
* The destination of the withdrawal request.
|
|
79
|
+
*/
|
|
80
|
+
'to_address' : string,
|
|
81
|
+
/**
|
|
82
|
+
* The amount of the ckERC20 withdrawal request.
|
|
83
|
+
*/
|
|
84
|
+
'ckerc20_withdrawal_amount' : bigint,
|
|
85
|
+
/**
|
|
86
|
+
* ckERC20 token symbol of the withdrawal request.
|
|
87
|
+
*/
|
|
88
|
+
'ckerc20_token_symbol' : string,
|
|
89
|
+
}
|
|
90
|
+
} |
|
|
91
|
+
{
|
|
92
|
+
/**
|
|
93
|
+
* The minter processed a withdrawal request.
|
|
94
|
+
*/
|
|
95
|
+
'Convert' : {
|
|
96
|
+
/**
|
|
97
|
+
* The destination of the withdrawal request.
|
|
98
|
+
*/
|
|
99
|
+
'to_address' : string,
|
|
100
|
+
}
|
|
101
|
+
};
|
|
56
102
|
export interface CanisterStatusResponse {
|
|
57
103
|
'status' : CanisterStatusType,
|
|
58
104
|
'memory_size' : bigint,
|
|
@@ -71,6 +117,48 @@ export interface CkErc20Token {
|
|
|
71
117
|
'ledger_canister_id' : Principal,
|
|
72
118
|
'ckerc20_token_symbol' : string,
|
|
73
119
|
}
|
|
120
|
+
export interface DecodeLedgerMemoArgs {
|
|
121
|
+
/**
|
|
122
|
+
* The encoded memo type
|
|
123
|
+
*/
|
|
124
|
+
'memo_type' : MemoType,
|
|
125
|
+
/**
|
|
126
|
+
* The encoded memo from a minter transaction on the ledger
|
|
127
|
+
*/
|
|
128
|
+
'encoded_memo' : Uint8Array,
|
|
129
|
+
}
|
|
130
|
+
export type DecodeLedgerMemoError = {
|
|
131
|
+
/**
|
|
132
|
+
* The provided memo could not be decoded.
|
|
133
|
+
*/
|
|
134
|
+
'InvalidMemo' : string
|
|
135
|
+
};
|
|
136
|
+
export type DecodeLedgerMemoResult = {
|
|
137
|
+
/**
|
|
138
|
+
* The decoded memo, if the minter was able to decode it. This field is `opt`, so that other memo types can be
|
|
139
|
+
* added in the future.
|
|
140
|
+
*/
|
|
141
|
+
'Ok' : [] | [DecodedMemo]
|
|
142
|
+
} |
|
|
143
|
+
{
|
|
144
|
+
/**
|
|
145
|
+
* An error in case the minter was not able to decode the provided memo. This field is `opt`, so that other error
|
|
146
|
+
* types can be added in the future.
|
|
147
|
+
*/
|
|
148
|
+
'Err' : [] | [DecodeLedgerMemoError]
|
|
149
|
+
};
|
|
150
|
+
export type DecodedMemo = {
|
|
151
|
+
/**
|
|
152
|
+
* The decoded BurnMemo - `opt` since other variants of `BurnMemo` could be added in the future.
|
|
153
|
+
*/
|
|
154
|
+
'Burn' : [] | [BurnMemo]
|
|
155
|
+
} |
|
|
156
|
+
{
|
|
157
|
+
/**
|
|
158
|
+
* The decoded MintMemo - `opt` since other variants of `MintMemo` could be added in the future.
|
|
159
|
+
*/
|
|
160
|
+
'Mint' : [] | [MintMemo]
|
|
161
|
+
};
|
|
74
162
|
export interface DefiniteCanisterSettings {
|
|
75
163
|
'freezing_threshold' : bigint,
|
|
76
164
|
'controllers' : Array<Principal>,
|
|
@@ -382,6 +470,51 @@ export type LedgerError = {
|
|
|
382
470
|
export type LogVisibility = { 'controllers' : null } |
|
|
383
471
|
{ 'public' : null } |
|
|
384
472
|
{ 'allowed_viewers' : Array<Principal> };
|
|
473
|
+
export type MemoType = { 'Burn' : null } |
|
|
474
|
+
{ 'Mint' : null };
|
|
475
|
+
export type MintMemo = {
|
|
476
|
+
/**
|
|
477
|
+
* The minter failed to process a withdrawal request,
|
|
478
|
+
* so no transaction was issued, but some reimbursement was made.
|
|
479
|
+
*/
|
|
480
|
+
'ReimburseWithdrawal' : {
|
|
481
|
+
/**
|
|
482
|
+
* The id corresponding to the withdrawal request.
|
|
483
|
+
*/
|
|
484
|
+
'withdrawal_id' : bigint,
|
|
485
|
+
}
|
|
486
|
+
} |
|
|
487
|
+
{
|
|
488
|
+
'ReimburseTransaction' : {
|
|
489
|
+
/**
|
|
490
|
+
* The id corresponding to the withdrawal request.
|
|
491
|
+
*/
|
|
492
|
+
'withdrawal_id' : bigint,
|
|
493
|
+
/**
|
|
494
|
+
* Hash of the failed transaction.
|
|
495
|
+
*/
|
|
496
|
+
'tx_hash' : string,
|
|
497
|
+
}
|
|
498
|
+
} |
|
|
499
|
+
{
|
|
500
|
+
/**
|
|
501
|
+
* The minter received some ETH or ERC20 token.
|
|
502
|
+
*/
|
|
503
|
+
'Convert' : {
|
|
504
|
+
/**
|
|
505
|
+
* Integer of the log index position in the block.
|
|
506
|
+
*/
|
|
507
|
+
'log_index' : bigint,
|
|
508
|
+
/**
|
|
509
|
+
* The sender of the ETH or ERC20 token.
|
|
510
|
+
*/
|
|
511
|
+
'from_address' : string,
|
|
512
|
+
/**
|
|
513
|
+
* Hash of the transaction.
|
|
514
|
+
*/
|
|
515
|
+
'tx_hash' : string,
|
|
516
|
+
}
|
|
517
|
+
};
|
|
385
518
|
export type MinterArg = { 'UpgradeArg' : UpgradeArg } |
|
|
386
519
|
{ 'InitArg' : InitArg };
|
|
387
520
|
export interface MinterInfo {
|
|
@@ -813,6 +946,13 @@ export interface _SERVICE {
|
|
|
813
946
|
* This call is restricted to the orchestrator ID.
|
|
814
947
|
*/
|
|
815
948
|
'add_ckerc20_token' : ActorMethod<[AddCkErc20Token], undefined>,
|
|
949
|
+
/**
|
|
950
|
+
* Decode ledger memos produced by the minter when minting (deposits) or burning (withdrawals).
|
|
951
|
+
*/
|
|
952
|
+
'decode_ledger_memo' : ActorMethod<
|
|
953
|
+
[DecodeLedgerMemoArgs],
|
|
954
|
+
DecodeLedgerMemoResult
|
|
955
|
+
>,
|
|
816
956
|
/**
|
|
817
957
|
* Estimate the price of a transaction issued by the minter when converting ckETH to ETH.
|
|
818
958
|
*/
|
|
@@ -4,6 +4,13 @@ export const EthereumNetwork: IDL.VariantClass;
|
|
|
4
4
|
export const InitArg: IDL.RecordClass;
|
|
5
5
|
export const MinterArg: IDL.VariantClass;
|
|
6
6
|
export const AddCkErc20Token: IDL.RecordClass;
|
|
7
|
+
export const MemoType: IDL.VariantClass;
|
|
8
|
+
export const DecodeLedgerMemoArgs: IDL.RecordClass;
|
|
9
|
+
export const BurnMemo: IDL.VariantClass;
|
|
10
|
+
export const MintMemo: IDL.VariantClass;
|
|
11
|
+
export const DecodedMemo: IDL.VariantClass;
|
|
12
|
+
export const DecodeLedgerMemoError: IDL.VariantClass;
|
|
13
|
+
export const DecodeLedgerMemoResult: IDL.VariantClass;
|
|
7
14
|
export const Eip1559TransactionPriceArg: IDL.RecordClass;
|
|
8
15
|
export const Eip1559TransactionPrice: IDL.RecordClass;
|
|
9
16
|
export const CanisterStatusType: IDL.VariantClass;
|
|
@@ -36,6 +43,7 @@ export const WithdrawalStatus: IDL.VariantClass;
|
|
|
36
43
|
export const WithdrawalDetail: IDL.RecordClass;
|
|
37
44
|
export const idlService: IDL.ServiceClass<string, {
|
|
38
45
|
add_ckerc20_token: IDL.FuncClass<[IDL.RecordClass], []>;
|
|
46
|
+
decode_ledger_memo: IDL.FuncClass<[IDL.RecordClass], [IDL.VariantClass]>;
|
|
39
47
|
eip_1559_transaction_price: IDL.FuncClass<[IDL.OptClass<Record<string, any>>], [IDL.RecordClass]>;
|
|
40
48
|
get_canister_status: IDL.FuncClass<[], [IDL.RecordClass]>;
|
|
41
49
|
get_events: IDL.FuncClass<[IDL.RecordClass], [IDL.RecordClass]>;
|