From f0e9c8b031067eb313e99194fb5c6a173d01b64e Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Mon, 2 Dec 2024 10:02:45 -0800 Subject: [PATCH 1/4] add disabled btc warning --- .../bitcoin/using-btc/btc-dev-workflow.mdx | 6 ++++++ .../bitcoin/using-btc/local-development.mdx | 13 ++++++++++--- .../bitcoin/using-btc/submit-transactions.mdx | 6 ++++++ 3 files changed, 22 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..cbcd9956e8 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,12 @@ 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. + +::: + 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..145be28702 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,12 @@ 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. + +::: + ## 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 +32,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..3f20e47c94 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,12 @@ 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. + +::: + From 89696205856a6840fdd94777c22e9d13caa76a7e Mon Sep 17 00:00:00 2001 From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:38:25 -0800 Subject: [PATCH 2/4] Update docs/developer-docs/multi-chain/bitcoin/using-btc/btc-dev-workflow.mdx --- .../multi-chain/bitcoin/using-btc/btc-dev-workflow.mdx | 2 ++ 1 file changed, 2 insertions(+) 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 cbcd9956e8..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 @@ -25,6 +25,8 @@ To interact with the Bitcoin testnet or mainnet networks, a developer needs to u 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. From ed1c87da0d8e330a3bd4f4167b9dfd7c1cd89220 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:38:30 -0800 Subject: [PATCH 3/4] Update docs/developer-docs/multi-chain/bitcoin/using-btc/local-development.mdx --- .../multi-chain/bitcoin/using-btc/local-development.mdx | 2 ++ 1 file changed, 2 insertions(+) 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 145be28702..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 @@ -23,6 +23,8 @@ so that you can locally test out your dapp before deploying it to the Internet C 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 From 591974922de720492e624bbc806cb29110e0abec Mon Sep 17 00:00:00 2001 From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:38:35 -0800 Subject: [PATCH 4/4] Update docs/developer-docs/multi-chain/bitcoin/using-btc/submit-transactions.mdx --- .../multi-chain/bitcoin/using-btc/submit-transactions.mdx | 2 ++ 1 file changed, 2 insertions(+) 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 3f20e47c94..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 @@ -24,6 +24,8 @@ The following snippet shows how to send a signed transaction to the Bitcoin netw 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). + :::