From 01abe34494e6d6390999fa6c207969e34dd39c6e Mon Sep 17 00:00:00 2001 From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:48:25 -0500 Subject: [PATCH] add: disabled Testnet BTC API warning (#3830) * add disabled btc warning * Update docs/developer-docs/multi-chain/bitcoin/using-btc/btc-dev-workflow.mdx * Update docs/developer-docs/multi-chain/bitcoin/using-btc/local-development.mdx * Update docs/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions.mdx --- .../bitcoin/using-btc/btc-dev-workflow.mdx | 8 ++++++++ .../bitcoin/using-btc/local-development.mdx | 15 ++++++++++++--- .../bitcoin/using-btc/submit-transactions.mdx | 8 ++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-dev-workflow.mdx b/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-dev-workflow.mdx index 11d962cfb0..25caf4bbf8 100644 --- a/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-dev-workflow.mdx +++ b/docs/developer-docs/multi-chain/bitcoin/using-btc/btc-dev-workflow.mdx @@ -21,6 +21,14 @@ To interact with the Bitcoin testnet or mainnet networks, a developer needs to u 1. [Generate a Bitcoin address](generate-addresses.mdx): To receive BTC, your canister must generate a Bitcoin address using the `ecdsa_public_key` API endpoint of the [management canister](/docs/current/developer-docs/smart-contracts/advanced-features/management-canister#signing-and-submitting-bitcoin-transactions). +:::danger + +The Bitcoin Testnet API is currently disabled and the ckTestBTC minter canister has been stopped. This is temporary and they will be re-enabled in the future. + +[Learn more](https://forum.dfinity.org/t/direct-integration-with-bitcoin/6147/745). + +::: + 2. [Create a Bitcoin transaction](create-transactions.mdx): If the canister controls BTC, it can create a transaction to spend them. 3. [Sign a transaction](sign-transactions.mdx): Next, the transaction must be signed with tECDSA using the `sign_with_ecdsa` API endpoint of the [management canister](/docs/current/developer-docs/smart-contracts/advanced-features/management-canister#signing-and-submitting-bitcoin-transactions). Transactions cannot be sent to the Bitcoin network until they are signed. diff --git a/docs/developer-docs/multi-chain/bitcoin/using-btc/local-development.mdx b/docs/developer-docs/multi-chain/bitcoin/using-btc/local-development.mdx index f21ebf3d19..18f940a79c 100644 --- a/docs/developer-docs/multi-chain/bitcoin/using-btc/local-development.mdx +++ b/docs/developer-docs/multi-chain/bitcoin/using-btc/local-development.mdx @@ -19,6 +19,14 @@ locally. Testing locally allows you to iterate and improve your dapp more quickl the [Bitcoin API](/docs/current/references/ic-interface-spec#ic-bitcoin-api) so that you can locally test out your dapp before deploying it to the Internet Computer. +:::danger + +The Bitcoin Testnet API is currently disabled and the ckTestBTC minter canister has been stopped. This is temporary and they will be re-enabled in the future. + +[Learn more](https://forum.dfinity.org/t/direct-integration-with-bitcoin/6147/745). + +::: + ## Setting up a local Bitcoin network To develop Bitcoin dapps locally, you'll need to set up a local Bitcoin network on your machine. @@ -26,10 +34,11 @@ Having your own local Bitcoin network allows you to mine blocks quickly and at-w facilitates testing various cases without having to rely on the (slow) Bitcoin testnet or the (even slower) Bitcoin mainnet. -- #### Step 1: Download [Bitcoin core](https://bitcoin.org/en/download). Mac users are recommended to download the `.tar.gz` version. -- #### Step 2: Unpack the `.tar.gz` file. -- #### Step 3: Create a directory named `data` inside the unpacked folder. +- #### Step 1: Download [Bitcoin core v25](https://bitcoin.org/bin/bitcoin-core-25.0/). It is recommended to use the `.tar.gz` version for Mac users. +- #### Step 2: Unpack the `.tar.gz` file: `tar -xfz bitcoin-25.0-x86_64-apple-darwin.tar.gz` +- #### Step 3: Create a directory named `data` inside the unpacked folder: `cd bitcoin-25.0 && mkdir data` - #### Step 4: Create a file called `bitcoin.conf` at the root of the unpacked folder and add the following contents: + ``` # Enable regtest mode. This is required to setup a private bitcoin network. regtest=1 diff --git a/docs/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions.mdx b/docs/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions.mdx index 313b391d92..9d098aa4e3 100644 --- a/docs/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions.mdx +++ b/docs/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions.mdx @@ -20,6 +20,14 @@ To submit transactions to the Bitcoin network, the Bitcoin integration API expos The following snippet shows how to send a signed transaction to the Bitcoin network. +:::danger + +The Bitcoin Testnet API is currently disabled and the ckTestBTC minter canister has been stopped. This is temporary and they will be re-enabled in the future. + +[Learn more](https://forum.dfinity.org/t/direct-integration-with-bitcoin/6147/745). + +::: +