Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit c73ae75

Browse files
THLOmraszyk
andauthored
Deprecating the Bitcoin API of the management canister (#354)
* Deprecating the Bitcoin API of the management canister. * changelog --------- Co-authored-by: Martin Raszyk <[email protected]>
1 parent 9a5077e commit c73ae75

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

spec/_attachments/interface-spec-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### ∞ (unreleased)
44
* Allow anonymous query and read state requests with invalid `ingress_expiry`.
55
* Add allowed viewers variant to canister log visibility.
6+
* Deprecate the Bitcoin API of the management canister.
67

78
### 0.28.0 (2024-10-11) {#0_28_0}
89
* Add new management canister methods for canister snapshot support.

spec/index.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,10 +2639,18 @@ Replica-signed queries may improve security because the recipient can verify the
26392639

26402640
## The IC Bitcoin API {#ic-bitcoin-api}
26412641

2642-
The Bitcoin functionality is exposed via the management canister. Information about Bitcoin can be found in the [Bitcoin developer guides](https://developer.bitcoin.org/devguide/). Invoking the functions of the Bitcoin API will cost cycles. We refer the reader to the [Bitcoin documentation](https://internetcomputer.org/docs/current/developer-docs/integrations/bitcoin/bitcoin-how-it-works) for further relevant information and the [IC pricing page](https://internetcomputer.org/docs/current/developer-docs/gas-cost) for information on pricing for the Bitcoin mainnet and testnet.
2642+
The Bitcoin API exposed by the management canister is DEPRECATED.
2643+
Developers should interact with the Bitcoin canisters (`ghsi2-tqaaa-aaaan-aaaca-cai` for Bitcoin mainnet and `g4xu7-jiaaa-aaaan-aaaaq-cai` for Bitcoin testnet) directly.
2644+
Information about Bitcoin and the IC Bitcoin integration can be found in the [Bitcoin developer guides](https://developer.bitcoin.org/devguide/) and the [Bitcoin integration documentation](https://internetcomputer.org/docs/current/developer-docs/integrations/bitcoin/bitcoin-how-it-works).
26432645

26442646
### IC method `bitcoin_get_utxos` {#ic-bitcoin_get_utxos}
26452647

2648+
:::note
2649+
2650+
This method is DEPRECATED. Canister developers are advised to call the method of the same name on the Bitcoin (mainnet or testnet) canister.
2651+
2652+
:::
2653+
26462654
This method can only be called by canisters, i.e., it cannot be called by external users via ingress messages.
26472655

26482656
Given a `get_utxos_request`, which must specify a Bitcoin address and a Bitcoin network (`mainnet` or `testnet`), the function returns all unspent transaction outputs (UTXOs) associated with the provided address in the specified Bitcoin network based on the current view of the Bitcoin blockchain available to the Bitcoin component. The UTXOs are returned sorted by block height in descending order.
@@ -2677,6 +2685,12 @@ The recommended workflow is to issue a request with the desired number of confir
26772685

26782686
### IC method `bitcoin_get_balance` {#ic-bitcoin_get_balance}
26792687

2688+
:::note
2689+
2690+
This method is DEPRECATED. Canister developers are advised to call the method of the same name on the Bitcoin (mainnet or testnet) canister.
2691+
2692+
:::
2693+
26802694
This method can only be called by canisters, i.e., it cannot be called by external users via ingress messages.
26812695

26822696
Given a `get_balance_request`, which must specify a Bitcoin address and a Bitcoin network (`mainnet` or `testnet`), the function returns the current balance of this address in `Satoshi` (10^8 Satoshi = 1 Bitcoin) in the specified Bitcoin network. The same address formats as for [`bitcoin_get_utxos`](#ic-bitcoin_get_utxos) are supported.
@@ -2689,6 +2703,12 @@ Given an address and the optional `min_confirmations` parameter, `bitcoin_get_ba
26892703

26902704
### IC method `bitcoin_send_transaction` {#ic-bitcoin_send_transaction}
26912705

2706+
:::note
2707+
2708+
This method is DEPRECATED. Canister developers are advised to call the method of the same name on the Bitcoin (mainnet or testnet) canister.
2709+
2710+
:::
2711+
26922712
This method can only be called by canisters, i.e., it cannot be called by external users via ingress messages.
26932713

26942714
Given a `send_transaction_request`, which must specify a `blob` of a Bitcoin transaction and a Bitcoin network (`mainnet` or `testnet`), several checks are performed:
@@ -2705,6 +2725,12 @@ If the transaction passes these tests, the transaction is forwarded to the speci
27052725

27062726
### IC method `bitcoin_get_current_fee_percentiles` {#ic-bitcoin_get_current_fee_percentiles}
27072727

2728+
:::note
2729+
2730+
This method is DEPRECATED. Canister developers are advised to call the method of the same name on the Bitcoin (mainnet or testnet) canister.
2731+
2732+
:::
2733+
27082734
This method can only be called by canisters, i.e., it cannot be called by external users via ingress messages.
27092735

27102736
The transaction fees in the Bitcoin network change dynamically based on the number of pending transactions. It must be possible for a canister to determine an adequate fee when creating a Bitcoin transaction.
@@ -2717,7 +2743,7 @@ The [standard nearest-rank estimation method](https://en.wikipedia.org/wiki/Perc
27172743

27182744
:::note
27192745

2720-
The `bitcoin_get_block_headers` endpoint is considered EXPERIMENTAL. Canister developers must be aware that this endpoint may evolve in a non-backward-compatible way.
2746+
This method is DEPRECATED. Canister developers are advised to call the method of the same name on the Bitcoin (mainnet or testnet) canister.
27212747

27222748
:::
27232749

0 commit comments

Comments
 (0)