@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,36 +0,0 @@
|
|
|
1
|
-
import type { QueryParams } from "@dfinity/utils";
|
|
2
|
-
import type { Principal } from "@icp-sdk/core/principal";
|
|
3
|
-
import type { RetrieveBtcArgs } from "../candid/minter";
|
|
4
|
-
export interface MinterAccount {
|
|
5
|
-
owner: Principal;
|
|
6
|
-
subaccount?: Uint8Array;
|
|
7
|
-
}
|
|
8
|
-
export type MinterParams = Omit<QueryParams, "certified"> & Partial<MinterAccount>;
|
|
9
|
-
/**
|
|
10
|
-
* Params to get a BTC address.
|
|
11
|
-
*/
|
|
12
|
-
export type GetBTCAddressParams = MinterParams;
|
|
13
|
-
/**
|
|
14
|
-
* Params to update ckBTC balance after a bitcoin transfer.
|
|
15
|
-
*/
|
|
16
|
-
export type UpdateBalanceParams = MinterParams;
|
|
17
|
-
/**
|
|
18
|
-
* Params to convert ckBTC to Bitcoin.
|
|
19
|
-
*/
|
|
20
|
-
export type RetrieveBtcParams = RetrieveBtcArgs & Omit<QueryParams, "certified">;
|
|
21
|
-
/**
|
|
22
|
-
* Params to estimate the fee of the Bitcoin network.
|
|
23
|
-
*/
|
|
24
|
-
export type EstimateWithdrawalFeeParams = QueryParams & {
|
|
25
|
-
amount: bigint | undefined;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Params to retrieve the status of all BTC withdrawals for an account.
|
|
29
|
-
*/
|
|
30
|
-
export type RetrieveBtcStatusV2ByAccountParams = QueryParams & {
|
|
31
|
-
account?: MinterAccount;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Params to get the known utxos.
|
|
35
|
-
*/
|
|
36
|
-
export type GetKnownUtxosParams = QueryParams & MinterParams;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { RetrieveBtcError, RetrieveBtcOk, RetrieveBtcStatusV2, RetrieveBtcWithApprovalError, UpdateBalanceError, UtxoStatus } from "../candid/minter";
|
|
2
|
-
export type UpdateBalanceOk = UtxoStatus[];
|
|
3
|
-
export type UpdateBalanceResponse = {
|
|
4
|
-
Ok: UpdateBalanceOk;
|
|
5
|
-
} | {
|
|
6
|
-
Err: UpdateBalanceError;
|
|
7
|
-
};
|
|
8
|
-
export type RetrieveBtcResponse = {
|
|
9
|
-
Ok: RetrieveBtcOk;
|
|
10
|
-
} | {
|
|
11
|
-
Err: RetrieveBtcError;
|
|
12
|
-
};
|
|
13
|
-
export type RetrieveBtcWithApprovalResponse = {
|
|
14
|
-
Ok: RetrieveBtcOk;
|
|
15
|
-
} | {
|
|
16
|
-
Err: RetrieveBtcWithApprovalError;
|
|
17
|
-
};
|
|
18
|
-
export interface EstimateWithdrawalFee {
|
|
19
|
-
minter_fee: bigint;
|
|
20
|
-
bitcoin_fee: bigint;
|
|
21
|
-
}
|
|
22
|
-
export interface RetrieveBtcStatusV2WithId {
|
|
23
|
-
id: bigint;
|
|
24
|
-
status: RetrieveBtcStatusV2 | undefined;
|
|
25
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { BtcAddress, BtcAddressInfo } from "../types/btc";
|
|
2
|
-
/**
|
|
3
|
-
* Parse a Bitcoin address.
|
|
4
|
-
*
|
|
5
|
-
* Parse implementation follows strategy implemented in [Minter canister](https://github.com/dfinity/ic/blob/a8da3aa23dc6f8f4708cb0cb8edce84c5bd8f225/rs/bitcoin/ckbtc/minter/src/address.rs#L54).
|
|
6
|
-
*
|
|
7
|
-
* Credits: Parts of JavaScript code and test values from [bitcoin-address-validation](https://github.com/ruigomeseu/bitcoin-address-validation).
|
|
8
|
-
*
|
|
9
|
-
* @param {BtcAddress} params The Bitcoin address and network to parse
|
|
10
|
-
* @param {string} params.address
|
|
11
|
-
* @param {BtcNetwork} params.network Optional. Default BtcNetwork is Mainnet
|
|
12
|
-
*/
|
|
13
|
-
export declare const parseBtcAddress: ({ address, network, }: BtcAddress) => BtcAddressInfo;
|