Skip to content

Commit

Permalink
add: disabled Testnet BTC API warning (#3830)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jessiemongeon1 authored Dec 3, 2024
1 parent 7e28a0d commit 01abe34
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,26 @@ 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.
Having your own local Bitcoin network allows you to mine blocks quickly and at-will, which
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).

:::

<AdornedTabs groupId="languages">
<TabItem value="motoko" label="Motoko" default>

Expand Down

0 comments on commit 01abe34

Please sign in to comment.