Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into promote-dfx-0.24.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity committed Dec 3, 2024
2 parents aa09d44 + 588e362 commit 80ced0a
Show file tree
Hide file tree
Showing 50 changed files with 713 additions and 4,183 deletions.
56 changes: 51 additions & 5 deletions docs/developer-docs/defi/wallets/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,19 @@ Third-party custody allows a third-party entity to act on your behalf, managing
Before choosing a third-party option, you should do your own research and be sure that you understand the ramifications of your choices thoroughly before proceeding.
:::

### Web wallets
### Onchain wallets

Web wallets on ICP use Internet Identity for authentication, and are great for new users, less technical users, daily use, or small token transfers. Some examples include:
Onchain wallets on ICP use Internet Identity for authentication, and are great for new users, less technical users, daily use, or small token transfers. Some examples include:

- [NFID](https://nfid.one/): Each new account creates a hardware wallet that is untraceable. NFID supports sign-in with Google in addition to Internet Identity.

- [Oisy](https://oisy.com/): A multi-chain wallet powered by Chain Fusion.

- [Stoic](https://www.stoicwallet.com/): The native wallet for ICP's largest NFT marketplace, Entrepot.

- [AstroX ME](https://astrox.me/): A multi-chain wallet that supports ICP, Ethereum, Polygon, and more.
- [AstroX ME](https://astrox.me/): A multi-chain wallet that supports ICP, Ethereum, Polygon, and more.

- [Orbit](https://orbitwallet.io/): Private alpha.

### Browser extension wallets

Expand All @@ -71,7 +73,13 @@ Browser extension wallets can be used easily on any webpage, making them a good

- [Bitfinity](https://wallet.bitfinity.network/): Supports ICP, BTC, and SNS tokens. Available for Google Chrome.

- [Klever](https://klever.io/en-us): A multi-chain mobile wallet available for Google Chrome
- [Klever](https://klever.io/en-us): A multi-chain mobile wallet available for Google Chrome.

- [Trust Wallet](https://trustwallet.com/blog/beginners-guide-to-icp).

- [Metamask](https://snaps.metamask.io/snap/npm/fort-major/msq/).

- [Primevault](https://www.primevault.com/).

### Mobile app wallets

Expand All @@ -83,6 +91,32 @@ Mobile app wallets can be used for making transfers or payments while on the go,

- [Klever](https://klever.io/en-us): A multi-chain mobile wallet available for Apple and Android devices.

- [AirGap](https://airgap.it/): Available for Apple and Android devices.

- [Trust Wallet](https://trustwallet.com/): Available for Apple and Android devices, or as an APK file.

## Institutional custody

Institutional custody wallets are recommended for holding large amounts of crypto, as they provide additional benefits like customer support.

- [Coinbase](https://www.coinbase.com/custody).

- [Sygnum](https://www.sygnum.com/digital-asset-banking/internet-computer-icp/).

- [Copper](https://copper.co/en/insights/company-news/copper-adds-support-for-new-token-standards-on-the-internet-computer-blockchain-as-institutional-interest-grows).

- [Crypto Finance](https://www.crypto-finance.com/).

- [Dfns (wallet as a service)](https://www.dfns.co/article/icp-support).

- [Primevault](https://www.primevault.com/).

- [Taurus](https://www.taurushq.com/blog/taurus-integrates-the-full-icp-value-chain-including-staking-in-its-custody-solution-taurus-protect/).

- [NFID](https://nfid.one/).

- [Orbit](https://orbitwallet.io/): Private alpha.

## Self-custody wallets

Self-custody is a token distribution option that enables you to have sole responsibility over your digital assets and the management of your private keys, without the need of a third party to act on your behalf. Because there is no third-party, self-custody solutions often look different than third-party custody solutions, such that they use wallet formats such as air-gapped machines or cold wallets.
Expand All @@ -105,7 +139,19 @@ A **hardware wallet** is a physical device that holds your digital assets. Priva

In most cases, you can recover from the loss of a hardware wallet because the assets stored on hardware wallets are secured using a secret seed phrase. If you copy and secure the seed phrase—for example, by storing it in the form of a [paper wallet](#paper-wallets)—you can initialize a new device with the seed phrase and regain access to your digital assets.

One common hardware wallet device is the Ledger Nano. [Read more about how to set up a Ledger Nano device](./self-custody/hardware-wallet-cli.mdx).
Common hardware wallets include:

- [Ledger Nano](./self-custody/hardware-wallet-cli.mdx).

- [AirGap](https://airgap.it/).

- [Tangem](https://tangem.com/en/).

- [Taurus](https://www.taurushq.com/blog/taurus-integrates-the-full-icp-value-chain-including-staking-in-its-custody-solution-taurus-protect/).

- [Quill](/docs/current/developer-docs/developer-tools/cli-tools/quill-cli-reference/).

- ICP custody with seed phrase and air-gapped machine.

### Air-gapped computers

Expand Down
2 changes: 2 additions & 0 deletions docs/developer-docs/getting-started/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ It also has dependencies of a few additional, important packages:

- [**Candid**](/docs/current/developer-docs/smart-contracts/candid/candid-concepts): An interface description language (IDL) used to interact with a canister's methods. A **method** is a function exposed by the canister that can be called by a user, another canister, or the application's frontend.

For troubleshooting common `dfx` errors, see [IC SDK troubleshooting](troubleshooting.mdx).

## Next step

Next, you must create a developer identity. This identity will be used to control and manage your project's canisters.
Expand Down
113 changes: 113 additions & 0 deletions docs/developer-docs/getting-started/troubleshooting.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
keywords: [intermediate, test, tutorial, troubleshooting, dfx troubleshooting, ic sdk, dfx, ic sdk troubleshooting]
---

import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

# IC SDK troubleshooting

<MarkdownChipRow labels={["Beginner"]} />

## Overview

This section provides information to help you troubleshoot and resolve or work around common issues that are related to the following tasks:

- Downloading and installing the IC SDK.

- Creating, building, or deploying canisters.

- Using the [IC SDK](/docs/current/developer-docs/getting-started/install).

- Running the local replica.

## Migrating an existing project

Currently, there is no automatic migration or backward compatibility for any projects that you might have created using previous versions of the IC SDK. After upgrading to the latest version, you might see error or failure messages if you attempt to build or install a project created with a previous version of the IC SDK.

In many cases, however, you can continue to work with projects from a previous release by manually changing the `dfx` setting in the `dfx.json` configuration file, then rebuilding the project to be compatible with the version of the IC SDK you have currently installed.

For example, if you have a project that was created with IC SDK version `0.8.0`, open the `dfx.json` file in a text editor and change the `dfx` setting to the latest version or remove the section entirely.

## Restarting the local replica

In some cases, starting the local replica fails due to stale state. If you encounter issues when running `dfx start` to start the local replica:

- #### Step 1: Interrupt the local replica process through Ctrl+C if necessary, then stop the local replica:

```bash
dfx stop
```

- #### Step 2: If not all `dfx` processes can be stopped, forcibly end them:

```
dfx killall
```

- #### Step 3: Restart the local replica in a clean state by running the following command:

```bash
dfx start --clean --background
```

The `--clean` option removes checkpoints and stale state information from your project’s cache so that you can restart the local replica and web server processes in a clean state.

:::danger
Resetting the state information by running `dfx start --clean` removes your existing canisters and new canister IDs may differ from old ones.
:::

- #### Step 4: Recreate your canisters:

```bash
dfx canister create --all
dfx build
dfx canister install --all
```

## Removing the canisters directory

If you run into problems building or deploying canisters after successfully connecting to ICP and registering canister identifiers, you should remove the `canisters` directory before attempting to rebuild or redeploy the canisters.

You can remove the `canisters` directory for a project by running the following command in the project’s root directory:

```bash
rm -rf ./.dfx/* canisters/*
```

## Reinstalling `dfx`

Some bugs can be addressed by uninstalling and reinstalling the IC SDK:

```bash
~/.cache/dfinity/uninstall.sh && sh -ci "$(curl -sSL https://internetcomputer.org/install.sh)"
```

If you have modified the location of the IC SDK binary (the binary is titled `dfx`), you might want run the following command to uninstall the version of the IC SDK that is in your PATH, then reinstall the latest version of the IC SDK:

```bash
rm -rf ~/.cache/dfinity && rm $(which dfx) && sh -ci "$(curl -sSL https://internetcomputer.org/install.sh)"
```

## Xcode prerequisite

For macOS environments, you should have **Developer Command Line Tools** installed if you want to create a Git repository for your project.

You can check whether you have the developer tools installed by running `xcode-select -p`. You can install the developer tools by running `xcode-select --install`.

## Memory leak

Fixing memory leaks is an ongoing process. If you encounter any error messages related to memory leaks, you should do the following:

- #### Step 1: Run `dfx stop` to stop currently running processes.

- #### Step 2: Uninstall the IC SDK to prevent further degradation.

- #### Step 3: Re-install the IC SDK

- #### Step 4: Run `dfx start` to restart replica processes.

Alternatively, you can remove the `.cache/dfinity` directory and re-install the latest IC SDK `dfx` binary:

```bash
rm -rf ~/.cache/dfinity && sh -ci "$(curl -sSL https://internetcomputer.org/install.sh)"
```
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
keywords: [advanced, concept, async code, inter-canister calls, async inter-canister, async]
---

import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";

# Composite queries

<MarkdownChipRow labels={["Advanced", "Concept"]} />

# Async code and inter-canister calls

## Overview
Expand Down
Loading

0 comments on commit 80ced0a

Please sign in to comment.