@dfinity/ckbtc 3.1.13 → 3.1.14
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 +40 -0
- package/dist/candid/minter.did +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -119,6 +119,10 @@ Parameters:
|
|
|
119
119
|
- `params.owner`: The owner for which the BTC address should be generated. If not provided, the `caller` will be use instead.
|
|
120
120
|
- `params.subaccount`: An optional subaccount to compute the address.
|
|
121
121
|
|
|
122
|
+
Returns:
|
|
123
|
+
|
|
124
|
+
The BTC address of the given account.
|
|
125
|
+
|
|
122
126
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L64)
|
|
123
127
|
|
|
124
128
|
##### :gear: updateBalance
|
|
@@ -137,6 +141,10 @@ Parameters:
|
|
|
137
141
|
- `params.owner`: The owner of the address. If not provided, the `caller` will be use instead.
|
|
138
142
|
- `params.subaccount`: An optional subaccount of the address.
|
|
139
143
|
|
|
144
|
+
Returns:
|
|
145
|
+
|
|
146
|
+
The result of the balance update.
|
|
147
|
+
|
|
140
148
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L83)
|
|
141
149
|
|
|
142
150
|
##### :gear: getWithdrawalAccount
|
|
@@ -147,6 +155,10 @@ Returns the account to which the caller should deposit ckBTC before withdrawing
|
|
|
147
155
|
| ---------------------- | ------------------------ |
|
|
148
156
|
| `getWithdrawalAccount` | `() => Promise<Account>` |
|
|
149
157
|
|
|
158
|
+
Returns:
|
|
159
|
+
|
|
160
|
+
The account to which ckBTC needs to be transferred. Provide corresponding information to map an Icrc1 account.
|
|
161
|
+
|
|
150
162
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L106)
|
|
151
163
|
|
|
152
164
|
##### :gear: retrieveBtc
|
|
@@ -171,6 +183,10 @@ Parameters:
|
|
|
171
183
|
- `params.address`: The bitcoin address.
|
|
172
184
|
- `params.amount`: The ckBTC amount.
|
|
173
185
|
|
|
186
|
+
Returns:
|
|
187
|
+
|
|
188
|
+
The result or the operation.
|
|
189
|
+
|
|
174
190
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L125)
|
|
175
191
|
|
|
176
192
|
##### :gear: retrieveBtcWithApproval
|
|
@@ -197,6 +213,10 @@ Parameters:
|
|
|
197
213
|
- `params.fromSubaccount`: An optional subaccount from which
|
|
198
214
|
the ckBTC should be transferred.
|
|
199
215
|
|
|
216
|
+
Returns:
|
|
217
|
+
|
|
218
|
+
The result or the operation.
|
|
219
|
+
|
|
200
220
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L155)
|
|
201
221
|
|
|
202
222
|
##### :gear: retrieveBtcStatus
|
|
@@ -213,6 +233,10 @@ Parameters:
|
|
|
213
233
|
- `transactionId`: The ID of the corresponding burn transaction.
|
|
214
234
|
- `certified`: query or update call
|
|
215
235
|
|
|
236
|
+
Returns:
|
|
237
|
+
|
|
238
|
+
The status of the BTC retrieval request.
|
|
239
|
+
|
|
216
240
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L187)
|
|
217
241
|
|
|
218
242
|
##### :gear: retrieveBtcStatusV2ByAccount
|
|
@@ -228,6 +252,10 @@ Parameters:
|
|
|
228
252
|
- `certified`: query or update call
|
|
229
253
|
- `account`: an optional account to retrieve the statuses. If not provided, statuses for the caller are retrieved.
|
|
230
254
|
|
|
255
|
+
Returns:
|
|
256
|
+
|
|
257
|
+
The statuses of the BTC retrieval requests.
|
|
258
|
+
|
|
231
259
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L205)
|
|
232
260
|
|
|
233
261
|
##### :gear: estimateWithdrawalFee
|
|
@@ -275,6 +303,10 @@ Parameters:
|
|
|
275
303
|
- `params.owner`: The owner of the account. Note that if not provided, the `caller` would be used by the minter instead.
|
|
276
304
|
- `params.subaccount`: An optional subaccount.
|
|
277
305
|
|
|
306
|
+
Returns:
|
|
307
|
+
|
|
308
|
+
The known utxos (with no guarantee in the ordering).
|
|
309
|
+
|
|
278
310
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/minter.canister.ts#L266)
|
|
279
311
|
|
|
280
312
|
### :factory: BitcoinCanister
|
|
@@ -314,6 +346,10 @@ Parameters:
|
|
|
314
346
|
- `params.filter`: The optional filter parameter can be used to restrict the set of returned UTXOs, either providing a minimum number of confirmations or a page reference when pagination is used for addresses with many UTXOs.
|
|
315
347
|
- `params.address`: A Bitcoin address.
|
|
316
348
|
|
|
349
|
+
Returns:
|
|
350
|
+
|
|
351
|
+
The UTXOs are returned sorted by block height in descending order.
|
|
352
|
+
|
|
317
353
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/bitcoin.canister.ts#L42)
|
|
318
354
|
|
|
319
355
|
##### :gear: getBalanceQuery
|
|
@@ -332,6 +368,10 @@ Parameters:
|
|
|
332
368
|
- `params.min_confirmations`: The optional filter parameter can be used to limit the set of considered UTXOs for the calculation of the balance to those with at least the provided number of confirmations in the same manner as for the `bitcoin_get_utxos` call.
|
|
333
369
|
- `params.address`: A Bitcoin address.
|
|
334
370
|
|
|
371
|
+
Returns:
|
|
372
|
+
|
|
373
|
+
The balance is returned in `Satoshi` (10^8 Satoshi = 1 Bitcoin).
|
|
374
|
+
|
|
335
375
|
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc/src/bitcoin.canister.ts#L64)
|
|
336
376
|
|
|
337
377
|
<!-- TSDOC_END -->
|
package/dist/candid/minter.did
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from IC repo commit
|
|
1
|
+
// Generated from IC repo commit e915efe (2025-07-02 tags: release-2025-07-03_03-27-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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfinity/ckbtc",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.14",
|
|
4
4
|
"description": "A library for interfacing with ckBTC.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/cjs/index.cjs.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"ts-declaration": "tsc --emitDeclarationOnly --outDir dist/types",
|
|
17
17
|
"build": "npm run rmdir && mkdir -p dist && cp -R candid dist && node esbuild.mjs && npm run ts-declaration",
|
|
18
18
|
"prepack": "npm run build",
|
|
19
|
-
"test": "
|
|
19
|
+
"test": "vitest"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|