@dfinity/ckbtc 4.0.6 → 5.0.0-next-2025-10-20.1
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 +1 -1
- package/dist/{types/bitcoin.canister.d.ts → bitcoin.canister.d.ts} +1 -1
- package/dist/candid/bitcoin.certified.idl.d.ts +1 -1
- package/dist/candid/bitcoin.certified.idl.js +130 -128
- package/dist/candid/bitcoin.d.ts +11 -3
- package/dist/candid/bitcoin.idl.d.ts +1 -1
- package/dist/candid/bitcoin.idl.js +134 -128
- package/dist/candid/minter.certified.idl.d.ts +1 -1
- package/dist/candid/minter.certified.idl.js +363 -355
- package/dist/candid/minter.d.ts +11 -3
- package/dist/candid/minter.idl.d.ts +1 -1
- package/dist/candid/minter.idl.js +363 -355
- package/dist/{types/errors → errors}/minter.errors.d.ts +1 -1
- package/dist/{types/index.d.ts → index.d.ts} +2 -2
- package/dist/index.js +7 -1
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +7 -0
- package/dist/{types/minter.canister.d.ts → minter.canister.d.ts} +1 -1
- package/dist/types/{types/bitcoin.params.d.ts → bitcoin.params.d.ts} +1 -1
- package/dist/types/{types/canister.options.d.ts → canister.options.d.ts} +1 -1
- package/dist/types/{types/minter.params.d.ts → minter.params.d.ts} +2 -2
- package/dist/types/{types/minter.responses.d.ts → minter.responses.d.ts} +1 -1
- package/package.json +22 -11
- package/dist/cjs/index.cjs.js +0 -7
- package/dist/cjs/index.cjs.js.map +0 -7
- package/dist/esm/bitcoin.canister.js +0 -2
- package/dist/esm/bitcoin.canister.js.map +0 -7
- package/dist/esm/chunk-7W3XZWUY.js +0 -2
- package/dist/esm/chunk-7W3XZWUY.js.map +0 -7
- package/dist/esm/chunk-ABDCS67G.js +0 -2
- package/dist/esm/chunk-ABDCS67G.js.map +0 -7
- package/dist/esm/chunk-FW4363Y4.js +0 -2
- package/dist/esm/chunk-FW4363Y4.js.map +0 -7
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/minter.canister.js +0 -2
- package/dist/esm/minter.canister.js.map +0 -7
- package/dist/index.cjs.js +0 -1
- /package/dist/{types/enums → enums}/btc.enums.d.ts +0 -0
- /package/dist/{types/errors → errors}/btc.errors.d.ts +0 -0
- /package/dist/types/{types/btc.d.ts → btc.d.ts} +0 -0
- /package/dist/{types/utils → utils}/btc.utils.d.ts +0 -0
|
@@ -1,175 +1,181 @@
|
|
|
1
|
-
/*
|
|
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
|
-
const flag = IDL.Variant({
|
|
10
|
+
const flag = IDL.Variant({ disabled: IDL.Null, enabled: IDL.Null });
|
|
4
11
|
const fees = IDL.Record({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
get_current_fee_percentiles: IDL.Nat,
|
|
13
|
+
get_utxos_maximum: IDL.Nat,
|
|
14
|
+
get_block_headers_cycles_per_ten_instructions: IDL.Nat,
|
|
15
|
+
get_current_fee_percentiles_maximum: IDL.Nat,
|
|
16
|
+
send_transaction_per_byte: IDL.Nat,
|
|
17
|
+
get_balance: IDL.Nat,
|
|
18
|
+
get_utxos_cycles_per_ten_instructions: IDL.Nat,
|
|
19
|
+
get_block_headers_base: IDL.Nat,
|
|
20
|
+
get_utxos_base: IDL.Nat,
|
|
21
|
+
get_balance_maximum: IDL.Nat,
|
|
22
|
+
send_transaction_base: IDL.Nat,
|
|
23
|
+
get_block_headers_maximum: IDL.Nat,
|
|
17
24
|
});
|
|
18
25
|
const network = IDL.Variant({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
mainnet: IDL.Null,
|
|
27
|
+
regtest: IDL.Null,
|
|
28
|
+
testnet: IDL.Null,
|
|
22
29
|
});
|
|
23
30
|
const init_config = IDL.Record({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
api_access: IDL.Opt(flag),
|
|
32
|
+
lazily_evaluate_fee_percentiles: IDL.Opt(flag),
|
|
33
|
+
blocks_source: IDL.Opt(IDL.Principal),
|
|
34
|
+
fees: IDL.Opt(fees),
|
|
35
|
+
watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
|
|
36
|
+
network: IDL.Opt(network),
|
|
37
|
+
stability_threshold: IDL.Opt(IDL.Nat),
|
|
38
|
+
syncing: IDL.Opt(flag),
|
|
39
|
+
burn_cycles: IDL.Opt(flag),
|
|
40
|
+
disable_api_if_not_fully_synced: IDL.Opt(flag),
|
|
34
41
|
});
|
|
35
42
|
const address = IDL.Text;
|
|
36
43
|
const get_balance_request = IDL.Record({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
network: network,
|
|
45
|
+
address: address,
|
|
46
|
+
min_confirmations: IDL.Opt(IDL.Nat32),
|
|
40
47
|
});
|
|
41
48
|
const satoshi = IDL.Nat64;
|
|
42
49
|
const block_height = IDL.Nat32;
|
|
43
50
|
const get_block_headers_request = IDL.Record({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
start_height: block_height,
|
|
52
|
+
end_height: IDL.Opt(block_height),
|
|
53
|
+
network: network,
|
|
47
54
|
});
|
|
48
55
|
const block_header = IDL.Vec(IDL.Nat8);
|
|
49
56
|
const get_block_headers_response = IDL.Record({
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
tip_height: block_height,
|
|
58
|
+
block_headers: IDL.Vec(block_header),
|
|
52
59
|
});
|
|
53
60
|
const get_current_fee_percentiles_request = IDL.Record({
|
|
54
|
-
|
|
61
|
+
network: network,
|
|
55
62
|
});
|
|
56
63
|
const millisatoshi_per_byte = IDL.Nat64;
|
|
57
64
|
const get_utxos_request = IDL.Record({
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
network: network,
|
|
66
|
+
filter: IDL.Opt(
|
|
60
67
|
IDL.Variant({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})
|
|
68
|
+
page: IDL.Vec(IDL.Nat8),
|
|
69
|
+
min_confirmations: IDL.Nat32,
|
|
70
|
+
}),
|
|
64
71
|
),
|
|
65
|
-
|
|
72
|
+
address: address,
|
|
66
73
|
});
|
|
67
74
|
const block_hash = IDL.Vec(IDL.Nat8);
|
|
68
75
|
const outpoint = IDL.Record({
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
txid: IDL.Vec(IDL.Nat8),
|
|
77
|
+
vout: IDL.Nat32,
|
|
71
78
|
});
|
|
72
79
|
const utxo = IDL.Record({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
height: block_height,
|
|
81
|
+
value: satoshi,
|
|
82
|
+
outpoint: outpoint,
|
|
76
83
|
});
|
|
77
84
|
const get_utxos_response = IDL.Record({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
86
|
+
tip_height: block_height,
|
|
87
|
+
tip_block_hash: block_hash,
|
|
88
|
+
utxos: IDL.Vec(utxo),
|
|
82
89
|
});
|
|
83
90
|
const send_transaction_request = IDL.Record({
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
transaction: IDL.Vec(IDL.Nat8),
|
|
92
|
+
network: network,
|
|
86
93
|
});
|
|
87
94
|
const config = IDL.Record({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
api_access: flag,
|
|
96
|
+
lazily_evaluate_fee_percentiles: flag,
|
|
97
|
+
blocks_source: IDL.Principal,
|
|
98
|
+
fees: fees,
|
|
99
|
+
watchdog_canister: IDL.Opt(IDL.Principal),
|
|
100
|
+
network: network,
|
|
101
|
+
stability_threshold: IDL.Nat,
|
|
102
|
+
syncing: flag,
|
|
103
|
+
burn_cycles: flag,
|
|
104
|
+
disable_api_if_not_fully_synced: flag,
|
|
98
105
|
});
|
|
99
106
|
const set_config_request = IDL.Record({
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
});
|
|
107
|
+
api_access: IDL.Opt(flag),
|
|
108
|
+
lazily_evaluate_fee_percentiles: IDL.Opt(flag),
|
|
109
|
+
fees: IDL.Opt(fees),
|
|
110
|
+
watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
|
|
111
|
+
stability_threshold: IDL.Opt(IDL.Nat),
|
|
112
|
+
syncing: IDL.Opt(flag),
|
|
113
|
+
burn_cycles: IDL.Opt(flag),
|
|
114
|
+
disable_api_if_not_fully_synced: IDL.Opt(flag),
|
|
115
|
+
});
|
|
116
|
+
|
|
109
117
|
return IDL.Service({
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
),
|
|
136
|
-
'bitcoin_send_transaction' : IDL.Func([send_transaction_request], [], []),
|
|
137
|
-
'get_config' : IDL.Func([], [config], ['query']),
|
|
138
|
-
'set_config' : IDL.Func([set_config_request], [], []),
|
|
118
|
+
bitcoin_get_balance: IDL.Func([get_balance_request], [satoshi], []),
|
|
119
|
+
bitcoin_get_balance_query: IDL.Func(
|
|
120
|
+
[get_balance_request],
|
|
121
|
+
[satoshi],
|
|
122
|
+
["query"],
|
|
123
|
+
),
|
|
124
|
+
bitcoin_get_block_headers: IDL.Func(
|
|
125
|
+
[get_block_headers_request],
|
|
126
|
+
[get_block_headers_response],
|
|
127
|
+
[],
|
|
128
|
+
),
|
|
129
|
+
bitcoin_get_current_fee_percentiles: IDL.Func(
|
|
130
|
+
[get_current_fee_percentiles_request],
|
|
131
|
+
[IDL.Vec(millisatoshi_per_byte)],
|
|
132
|
+
[],
|
|
133
|
+
),
|
|
134
|
+
bitcoin_get_utxos: IDL.Func([get_utxos_request], [get_utxos_response], []),
|
|
135
|
+
bitcoin_get_utxos_query: IDL.Func(
|
|
136
|
+
[get_utxos_request],
|
|
137
|
+
[get_utxos_response],
|
|
138
|
+
["query"],
|
|
139
|
+
),
|
|
140
|
+
bitcoin_send_transaction: IDL.Func([send_transaction_request], [], []),
|
|
141
|
+
get_config: IDL.Func([], [config], ["query"]),
|
|
142
|
+
set_config: IDL.Func([set_config_request], [], []),
|
|
139
143
|
});
|
|
140
144
|
};
|
|
145
|
+
|
|
141
146
|
export const init = ({ IDL }) => {
|
|
142
|
-
const flag = IDL.Variant({
|
|
147
|
+
const flag = IDL.Variant({ disabled: IDL.Null, enabled: IDL.Null });
|
|
143
148
|
const fees = IDL.Record({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
149
|
+
get_current_fee_percentiles: IDL.Nat,
|
|
150
|
+
get_utxos_maximum: IDL.Nat,
|
|
151
|
+
get_block_headers_cycles_per_ten_instructions: IDL.Nat,
|
|
152
|
+
get_current_fee_percentiles_maximum: IDL.Nat,
|
|
153
|
+
send_transaction_per_byte: IDL.Nat,
|
|
154
|
+
get_balance: IDL.Nat,
|
|
155
|
+
get_utxos_cycles_per_ten_instructions: IDL.Nat,
|
|
156
|
+
get_block_headers_base: IDL.Nat,
|
|
157
|
+
get_utxos_base: IDL.Nat,
|
|
158
|
+
get_balance_maximum: IDL.Nat,
|
|
159
|
+
send_transaction_base: IDL.Nat,
|
|
160
|
+
get_block_headers_maximum: IDL.Nat,
|
|
156
161
|
});
|
|
157
162
|
const network = IDL.Variant({
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
mainnet: IDL.Null,
|
|
164
|
+
regtest: IDL.Null,
|
|
165
|
+
testnet: IDL.Null,
|
|
161
166
|
});
|
|
162
167
|
const init_config = IDL.Record({
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
});
|
|
168
|
+
api_access: IDL.Opt(flag),
|
|
169
|
+
lazily_evaluate_fee_percentiles: IDL.Opt(flag),
|
|
170
|
+
blocks_source: IDL.Opt(IDL.Principal),
|
|
171
|
+
fees: IDL.Opt(fees),
|
|
172
|
+
watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
|
|
173
|
+
network: IDL.Opt(network),
|
|
174
|
+
stability_threshold: IDL.Opt(IDL.Nat),
|
|
175
|
+
syncing: IDL.Opt(flag),
|
|
176
|
+
burn_cycles: IDL.Opt(flag),
|
|
177
|
+
disable_api_if_not_fully_synced: IDL.Opt(flag),
|
|
178
|
+
});
|
|
179
|
+
|
|
174
180
|
return [init_config];
|
|
175
181
|
};
|
|
@@ -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;
|