diff --git a/archive/motoko/dip721-nft-container/README.md b/archive/motoko/dip721-nft-container/README.md index 8c64029fd..9f822cb3f 100644 --- a/archive/motoko/dip721-nft-container/README.md +++ b/archive/motoko/dip721-nft-container/README.md @@ -88,7 +88,7 @@ Using this management canister address, we can construct its principal and set t ## NFT sample code tutorial -### Prerequisites +## Prerequisites - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). - [x] Download and install [git.](https://git-scm.com/downloads) diff --git a/archive/motoko/hello/README.md b/archive/motoko/hello/README.md index 60eede1fa..ad70e6fcd 100644 --- a/archive/motoko/hello/README.md +++ b/archive/motoko/hello/README.md @@ -41,7 +41,7 @@ This example demonstrates a dead simple dapp consisting of two canister smart co This example is based on the default project created by running `dfx new hello`. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). - [x] Install `node.js` (to build the web frontend). diff --git a/archive/motoko/persistent-storage/README.md b/archive/motoko/persistent-storage/README.md index 5ba84e19f..bac658057 100644 --- a/archive/motoko/persistent-storage/README.md +++ b/archive/motoko/persistent-storage/README.md @@ -24,7 +24,7 @@ This example covers: ## Installation This example project can be cloned, installed, and deployed locally, for learning and testing purposes. The instructions are based on running the example on either macOS or Linux, but when using WSL2 on Windows, the instructions will be the same. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/counter/README.md b/motoko/counter/README.md index 3982192df..81cbbb3b6 100644 --- a/motoko/counter/README.md +++ b/motoko/counter/README.md @@ -10,7 +10,7 @@ The application provides an interface that exposes the following methods: - `inc`: increments the value of the counter. - `get`: gets the value of the counter. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/encrypted-notes-dapp-vetkd/README.md b/motoko/encrypted-notes-dapp-vetkd/README.md index fa94ca70e..c12c50ceb 100644 --- a/motoko/encrypted-notes-dapp-vetkd/README.md +++ b/motoko/encrypted-notes-dapp-vetkd/README.md @@ -16,7 +16,7 @@ This example uses an **insecure** implementation of [the proposed vetKD system A ## Manual local deployment -### Prerequisites +## Prerequisites This example requires an installation of: diff --git a/motoko/encrypted-notes-dapp/README.md b/motoko/encrypted-notes-dapp/README.md index 39340faea..0a9e5bbf8 100644 --- a/motoko/encrypted-notes-dapp/README.md +++ b/motoko/encrypted-notes-dapp/README.md @@ -20,7 +20,7 @@ This is an **example dapp** that demonstrates the potential of building **canist - The frontend re-uses the generated public and private key pair for every identity in the same browser. In a better implementation, this key pair should be unique per principal. - The public/private key pair should not be managed by the web browser at all. [WebAuthn](https://en.wikipedia.org/wiki/WebAuthn) should be used to push the key management to the operating system. -- Integer overflows are possible in the Rust canister, e.g., for `NEXT_NOTE`. +- Integer overflows are possible in the Rust canister, e.g., for `NEXT_NOTE`. - Users may lose their notes if they accidentally clean the browser data (localStorage) while no other device is synced to the dapp. - Lack of key update: Given that the key used to encrypt the notes is never refreshed, the privacy of the data is no longer guaranteed if an attacker learns this key (for instance, by corrupting the local storage in one of the connected devices). @@ -29,8 +29,8 @@ This is an **example dapp** that demonstrates the potential of building **canist You can play around with the [dapp deployed on ICP](https://cvhrw-2yaaa-aaaaj-aaiqa-cai.icp0.io/) and see a quick introduction on [YouTube](https://youtu.be/DZQmtPSxvbs). -We wanted to build an example of a simple (but not too simple) dapp running purely on the IC. This example relies upon the **web-serving** and **storage capabilities** of the IC. We focused on the following two key features for our example dapp: -1. Client-side **end-to-end encryption**. +We wanted to build an example of a simple (but not too simple) dapp running purely on the IC. This example relies upon the **web-serving** and **storage capabilities** of the IC. We focused on the following two key features for our example dapp: +1. Client-side **end-to-end encryption**. 2. **Multi-user** and **multi-device** support. To demonstrate the potential of the IC as a platform for developing such dapps, we implemented this example using two distinct canister development kits (CDKs). The Motoko CDK allows developers to implement actor-based dapps using the [Motoko](https://internetcomputer.org/docs/current/motoko/getting-started/motoko-introduction) language. The Rust CDK allows implementing dapps in [Rust](https://internetcomputer.org/docs/current/developer-docs/backend/rust/). In both cases, canisters are compiled into WebAssembly files that are then deployed onto the IC. @@ -100,7 +100,7 @@ Once authenticated with II: Follow the steps below to deploy this sample project. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -126,7 +126,7 @@ export BUILD_ENV=motoko **Building the Rust canister requires either the Rust toolchain installed on your system or Docker-backed deployment (see below).** - + ## Step 3: Deploy locally ### Option 1: Docker deployment @@ -139,7 +139,7 @@ export BUILD_ENV=motoko export BUILD_ENV=motoko ``` -- #### Step 3: Run the following Bash script that builds a Docker image, compiles the canister, and deploys this dapp (all inside the Docker instance). +- #### Step 3: Run the following Bash script that builds a Docker image, compiles the canister, and deploys this dapp (all inside the Docker instance). Execution can take a few minutes: @@ -278,11 +278,11 @@ dfx canister --network ic install www --mode=upgrade ## Security considerations and best practices -If you base your application on this example, we recommend you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/current/references/security/) for developing on the Internet Computer. This example may not implement all the best practices, see also the [disclaimer](#disclaimer-please-read-carefully) above. +If you base your application on this example, we recommend you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/current/references/security/) for developing on the Internet Computer. This example may not implement all the best practices, see also the [disclaimer](#disclaimer-please-read-carefully) above. -For example, the following aspects are particularly relevant for this app: +For example, the following aspects are particularly relevant for this app: * [Make sure any action that only a specific user should be able to do requires authentication](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview), since a user should only be able to manage their own notes. -* [Protect key material against XSS using Web Crypto API](https://internetcomputer.org/docs/current/references/security/web-app-development-security-best-practices#crypto-protect-key-material-against-xss-using-web-crypto-api), since this app stores private keys in the browser. +* [Protect key material against XSS using Web Crypto API](https://internetcomputer.org/docs/current/references/security/web-app-development-security-best-practices#crypto-protect-key-material-against-xss-using-web-crypto-api), since this app stores private keys in the browser. * [Use secure cryptographic schemes](https://internetcomputer.org/docs/current/references/security/general-security-best-practices#use-secure-cryptographic-schemes), since notes are being encrypted. ## User interaction with "Encrypted Notes" dapp @@ -476,7 +476,7 @@ frontend www canister (an "asset" canister) is the way we describe a set of file `dependencies`: an array of whatever canisters are being used to serve your app, to ensure that `dfx` builds and deploys them before your app. `frontend: { entrypoint: ""}`: This set of keys tells `dfx` to build it as a frontend canister, and entrypoint is wherever your app entrypoint winds up residing at the end of an npm build `source`: where the rest of your app resides at the end of npm build -`type`: "assets" for an assets or static canister. +`type`: "assets" for an assets or static canister. **Binary targets**: You can also just deploy arbitrary binary targets as long as they're wasm binaries. For that, use the keys: diff --git a/motoko/hello_cycles/README.md b/motoko/hello_cycles/README.md index 430e2fadc..36c997f42 100644 --- a/motoko/hello_cycles/README.md +++ b/motoko/hello_cycles/README.md @@ -16,9 +16,9 @@ This example consists of the following functions (see `src/hello_cycles/main.mo` The wallet's `wallet_receive` return type differs from hello_cycle's `wallet_receive`. ::: -This is a Motoko example that does not currently have a Rust variant. +This is a Motoko example that does not currently have a Rust variant. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -124,7 +124,7 @@ The amount is only increased by 10_000_000 because the implementation of `wallet dfx canister call hello_cycles transfer "(func \"$(dfx identity get-wallet)\".\"wallet_receive\", 5000000)" ``` -Output: +Output: ```bash (record { refunded = 0 : nat }) diff --git a/motoko/ic-pos/README.md b/motoko/ic-pos/README.md index aba1d5dc7..18d707232 100644 --- a/motoko/ic-pos/README.md +++ b/motoko/ic-pos/README.md @@ -50,7 +50,7 @@ The frontend interacts with the following IC canisters: - `ckbtc index` - to fetch transaction history. - `internet identity` - to authenticate users. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -171,7 +171,7 @@ dfx canister call icpos setCourierApiKey "pk_prod_..." ### Step 8: Build and run the frontend -Run npm to install dependencies and start a development version of the frontend. +Run npm to install dependencies and start a development version of the frontend. ```bash pnpm install @@ -203,7 +203,7 @@ dfx canister call icrc1_ledger icrc1_transfer ' ### Step 11: Create the second store -Log in to the frontend using **a new Internet Identity using another web browser**. Give this store a name as well and copy the store principal like in the previous step. +Log in to the frontend using **a new Internet Identity using another web browser**. Give this store a name as well and copy the store principal like in the previous step. Now, go back to the first browser/store, navigate to the `Send` page, and transfer some tokens to the second store. @@ -213,7 +213,7 @@ If everything is working, you should see a notification in the second store. ## Possible improvements -- Show more information about transactions. +- Show more information about transactions. - A transaction detail page. - Pagination, currently only the first 5 transactions are shown. - Show a confirmation dialog after the user clicks on the `Send` button. diff --git a/motoko/icrc2-swap/README.md b/motoko/icrc2-swap/README.md index 6c4fd1efd..cc667ac81 100644 --- a/motoko/icrc2-swap/README.md +++ b/motoko/icrc2-swap/README.md @@ -19,7 +19,7 @@ different from other synchronous blockchains. ## Local deployment -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -265,7 +265,7 @@ the token balances. The example comes with a test suite to demonstrate the basic functionality. It shows how to use this repo from a Javascript client. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/internet_identity_integration/README.md b/motoko/internet_identity_integration/README.md index 8626b1754..7e1f51456 100644 --- a/motoko/internet_identity_integration/README.md +++ b/motoko/internet_identity_integration/README.md @@ -1,4 +1,4 @@ -# Internet Identity integration +# Internet Identity integration This tutorial shows how to integrate Internet Identity into a dapp front-end and make use of the user identity in the backend. It builds on the "greet" dapp that is generated by running `dfx new`. If you are unfamiliar with `dfx new` and the generated application, please have a look at [this](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx) guide first. @@ -11,12 +11,12 @@ This tutorial will explain all the steps required to integrate the default start This is a Motoko example that does not currently have a Rust variant. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). - [x] Clone the example dapp project: `git clone https://github.com/dfinity/examples` -- [x] Download and install the `@dfinity/auth-client` package with the command `npm install @dfinity/auth-client`. +- [x] Download and install the `@dfinity/auth-client` package with the command `npm install @dfinity/auth-client`. - [x] Chrome or Firefox browser (other browsers also work, but may need a slightly different webpack configuration, see the note on [step 4 below](#step-4-make-the-internet-identity-url-available-in-the-build-process)) Begin by opening a terminal window. @@ -338,7 +338,7 @@ loginButton.onclick = async (e) => { }); return false; -};% +};% ``` ## Step 8: Modify the backend @@ -378,7 +378,7 @@ URLs: ## Step 10: Test the application -Open the `greet_frontend` URL in a web browser. +Open the `greet_frontend` URL in a web browser. You should be able to observe the following behavior: diff --git a/motoko/life/README.md b/motoko/life/README.md index 00e9aa435..98836077e 100644 --- a/motoko/life/README.md +++ b/motoko/life/README.md @@ -12,9 +12,9 @@ Directories `versions/v1` and `versions/v2` contain sequential upgrades to src u To make upgrades apparent, each version uses a different digit to display live cells (0,1,2). -This is a Motoko example that does not currently have a Rust variant. +This is a Motoko example that does not currently have a Rust variant. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/minimal-counter-dapp/README.md b/motoko/minimal-counter-dapp/README.md index 43239413b..7d2394cca 100644 --- a/motoko/minimal-counter-dapp/README.md +++ b/motoko/minimal-counter-dapp/README.md @@ -15,7 +15,7 @@ This example covers: - Deploy the canister smart contract locally. - Test backend with Candid UI and command line using `dfx`, and test frontend in browser. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -123,7 +123,7 @@ public func reset() : async Nat { ``` ### Candid interface -The Candid interface is automatically created, and it has a convenient UI, which provides an easy, user-friendly way to test the backend. Learn how to access the Candid UI in the **Testing** section below. +The Candid interface is automatically created, and it has a convenient UI, which provides an easy, user-friendly way to test the backend. Learn how to access the Candid UI in the **Testing** section below. ### Frontend The default project installed with `dfx new project_name` implements the logic that serves the frontend in the `src/minimal_dapp_frontend/src/App.js` file, and most of the HTML is carried over from the default project. diff --git a/motoko/parallel_calls/README.md b/motoko/parallel_calls/README.md index 51e2a5858..3232ffdca 100644 --- a/motoko/parallel_calls/README.md +++ b/motoko/parallel_calls/README.md @@ -10,7 +10,7 @@ The sample code revolves around two simple canisters, `caller` and `callee`. `Ca The callee exposes a simple `ping` endpoint that takes no parameters and returns nothing. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -54,7 +54,7 @@ This should output: (100 : nat64) ``` -And the other endpoint: +And the other endpoint: ```bash dfx canister call caller parallel_calls 100 @@ -96,9 +96,9 @@ Lastly, the parallel calls here complete sooner -- because most of them fail! ## Step 5: Multi-subnet setting -Parallel calls are a lot more useful in multi-subnet settings. We can create such a setting locally using Pocket IC. +Parallel calls are a lot more useful in multi-subnet settings. We can create such a setting locally using Pocket IC. -First, follow the [installation instructions](https://github.com/dfinity/pocketic) to install `pocket-ic` in the `parallel_calls` directory. +First, follow the [installation instructions](https://github.com/dfinity/pocketic) to install `pocket-ic` in the `parallel_calls` directory. Then, run the pre-made test, which now installs the `caller` and `callee` canisters on different subnets, and then runs 90 calls sequentially/in parallel. diff --git a/motoko/pub-sub/README.md b/motoko/pub-sub/README.md index 683e88581..68254f660 100644 --- a/motoko/pub-sub/README.md +++ b/motoko/pub-sub/README.md @@ -4,7 +4,7 @@ This sample project demonstrates how functions may be passed as arguments of int A common problem in both distributed and decentralized systems is keeping separate services (or canisters) synchronized with one another. While there are many potential solutions to this problem, a popular one is the publisher/subscriber pattern or "PubSub". PubSub is an especially valuable pattern on the Internet Computer as its primary drawback, message delivery failures, does not apply. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -55,7 +55,7 @@ The output should resemble the following: If you base your application on this example, we recommend you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/current/references/security/) for developing on the Internet Computer. This example may not implement all the best practices. -For example, the following aspects are particularly relevant for this app, since it makes inter-canister calls: +For example, the following aspects are particularly relevant for this app, since it makes inter-canister calls: * [Be aware that state may change during inter-canister calls.](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview) * [Only make inter-canister calls to trustworthy canisters.](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview) * [Don’t panic after await and don’t lock shared resources across await boundaries.](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview) diff --git a/motoko/random_maze/README.md b/motoko/random_maze/README.md index 65714318b..2ca9878d6 100644 --- a/motoko/random_maze/README.md +++ b/motoko/random_maze/README.md @@ -16,9 +16,9 @@ This actor uses Motoko's random library to generate a cryptographically random m The function `generate` calls library function `Random.blob()` asynchronously to obtain 256 bits of raw entropy (256 random bits as 32 bytes) from the Internet Computer. It makes these calls on demand as it is constructing a maze. The bits of these blobs are consumed to generate samples from a variety of discrete distributions using some of the other classes and functions of library Random.mo. -This is a Motoko example that does not currently have a Rust variant. +This is a Motoko example that does not currently have a Rust variant. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/superheroes/README.md b/motoko/superheroes/README.md index 3ea4b6122..2440a8f9f 100644 --- a/motoko/superheroes/README.md +++ b/motoko/superheroes/README.md @@ -2,9 +2,9 @@ This example demonstrates how to build a CRUD application on ICP using Motoko and React. -This is a Motoko example that does not currently have a Rust variant. +This is a Motoko example that does not currently have a Rust variant. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/threshold-ecdsa/README.md b/motoko/threshold-ecdsa/README.md index f72dd7aae..f83737802 100644 --- a/motoko/threshold-ecdsa/README.md +++ b/motoko/threshold-ecdsa/README.md @@ -1,13 +1,13 @@ # Threshold ECDSA sample -We present a minimal example canister smart contract for showcasing the [threshold ECDSA](https://internetcomputer.org/docs/current/developer-docs/integrations/t-ecdsa) API. +We present a minimal example canister smart contract for showcasing the [threshold ECDSA](https://internetcomputer.org/docs/current/developer-docs/integrations/t-ecdsa) API. -The example canister is a signing oracle that creates ECDSA signatures with keys derived from an input string. +The example canister is a signing oracle that creates ECDSA signatures with keys derived from an input string. More specifically: - The sample canister receives a request that provides a message. -- The sample canister hashes the message and uses the key derivation string for the derivation path. +- The sample canister hashes the message and uses the key derivation string for the derivation path. - The sample canister uses the above to request a signature from the threshold ECDSA [subnet](https://wiki.internetcomputer.org/wiki/Subnet_blockchain) (the threshold ECDSA is a subnet specializing in generating threshold ECDSA signatures). This tutorial gives a complete overview of the development, starting with downloading the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/index.md), up to the deployment and trying out the code on the IC mainnet. @@ -19,7 +19,7 @@ This tutorial gives a complete overview of the development, starting with downlo Sample code for `threshold-ecdsa` is provided in the [examples repository](https://github.com/dfinity/examples), under either [`/motoko`](https://github.com/dfinity/examples/tree/master/motoko/threshold-ecdsa) or [`/rust`](https://github.com/dfinity/examples/tree/master/rust/threshold-ecdsa) sub-directories. It requires at least [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/index.md) version 0.11.0 for local development. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -131,21 +131,21 @@ In the example below, the method returns `03c22bef676644dba524d4a24132ea8463221a "Ok": { "public_key_hex": "03c22bef676644dba524d4a24132ea8463221a55540a27fc86d690fda8e688e31a" - } + } } ``` ### Code walkthrough -Open the file `main.mo`, which will show the following Motoko code that demonstrates how to obtain an ECDSA public key. +Open the file `main.mo`, which will show the following Motoko code that demonstrates how to obtain an ECDSA public key. ```motoko - //declare "ic" to be the management canister, which is evoked by `actor("aaaaa-aa")`. This is how we will obtain an ECDSA public key + //declare "ic" to be the management canister, which is evoked by `actor("aaaaa-aa")`. This is how we will obtain an ECDSA public key let ic : IC = actor("aaaaa-aa"); public shared (msg) func public_key() : async { #Ok : { public_key: Blob }; #Err : Text } { let caller = Principal.toBlob(msg.caller); - + try { //request the management canister to compute an ECDSA public key @@ -157,19 +157,19 @@ Open the file `main.mo`, which will show the following Motoko code that demonstr //this code uses the mainnet test key key_id = { curve = #secp256k1; name = "test_key_1" }; }); - + #Ok({ public_key }) - + } catch (err) { - + #Err(Error.message(err)) - + } }; ``` -In the code above, the canister calls the `ecdsa_public_key` method of the [IC management canister](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-management-canister) (`aaaaa-aa`). +In the code above, the canister calls the `ecdsa_public_key` method of the [IC management canister](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-management-canister) (`aaaaa-aa`). **The [IC management canister](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-management-canister) is just a facade; it does not exist as a canister (with isolated state, Wasm code, etc.). It is an ergonomic way for canisters to call the system API of the IC (as if it were a single canister). In the code below, we use the management canister to create an ECDSA public key. `let ic : IC = actor("aaaaa-aa")` declares the IC management canister in the code above.** diff --git a/motoko/threshold-schnorr/README.md b/motoko/threshold-schnorr/README.md index 6d3d3521e..341c50734 100644 --- a/motoko/threshold-schnorr/README.md +++ b/motoko/threshold-schnorr/README.md @@ -29,7 +29,7 @@ version available in the same repo and follows the same commands for deploying. Sample code for `threshold-schnorr-example` is provided in the [examples repository](https://github.com/dfinity/examples), under either [`/motoko`](https://github.com/dfinity/examples/tree/master/motoko/threshold-schnorr) or [`/rust`](https://github.com/dfinity/examples/tree/master/rust/threshold-schnorr) sub-directories. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -156,7 +156,7 @@ Ed25519 public key. ### Code walkthrough Open the file `lib.rs`, which will show the following Motoko code that -demonstrates how to obtain a Schnorr public key. +demonstrates how to obtain a Schnorr public key. ```motoko public shared ({ caller }) func public_key(algorithm_arg : SchnorrAlgotirhm) : async { @@ -176,7 +176,7 @@ demonstrates how to obtain a Schnorr public key. }; ``` -In the code above, the canister calls the `schnorr_public_key` method of the [IC management canister](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-management-canister) (`aaaaa-aa`). +In the code above, the canister calls the `schnorr_public_key` method of the [IC management canister](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-management-canister) (`aaaaa-aa`). **The [IC management diff --git a/motoko/token_transfer/README.md b/motoko/token_transfer/README.md index e22559f42..87076dadc 100644 --- a/motoko/token_transfer/README.md +++ b/motoko/token_transfer/README.md @@ -8,7 +8,7 @@ The sample code revolves around one core transfer function which takes as input This sample will use the Motoko variant. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/token_transfer_from/README.md b/motoko/token_transfer_from/README.md index ee7e34874..1f455b918 100644 --- a/motoko/token_transfer_from/README.md +++ b/motoko/token_transfer_from/README.md @@ -8,7 +8,7 @@ The sample code revolves around one core transfer function which takes as input This sample will use the Rust variant. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). @@ -240,7 +240,7 @@ dfx deploy token_transfer_from_backend ## Step 10: Approve the canister to transfer funds on behalf of the user -:::info +:::info Make sure that you are using the default `dfx` account that we minted tokens to in step 5 for the following steps. diff --git a/motoko/vetkd/README.md b/motoko/vetkd/README.md index 764e30862..983ecc6d1 100644 --- a/motoko/vetkd/README.md +++ b/motoko/vetkd/README.md @@ -8,7 +8,7 @@ Additionally, the repository provides: * An example frontend (`src/app_frontend_js`) that uses the backend from Javascript in the browser. The frontend uses the [ic-vetkd-utils](https://github.com/dfinity/ic/tree/master/packages/ic-vetkd-utils) to create a transport key pair that is used to obtain a verifiably encrypted key from the system API, to decrypt this key, and to derive a symmetric key to be used for AES encryption/decryption. - + Because the `ic-vetkd-utils` are not yet published as NPM package at [npmjs.com](https://npmjs.com), a respective package file (`ic-vetkd-utils-0.1.0.tgz`) is included in this repository. --- @@ -19,7 +19,7 @@ The implementation of [the proposed vetKD system API](https://github.com/dfinity --- -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/motoko/whoami/README.md b/motoko/whoami/README.md index 1824097ff..268067e7f 100644 --- a/motoko/whoami/README.md +++ b/motoko/whoami/README.md @@ -2,7 +2,7 @@ This example demonstrates how a canister can identify its caller and itself. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). diff --git a/rust/dip721-nft-container/README.md b/rust/dip721-nft-container/README.md index ed4157991..17fd4f628 100644 --- a/rust/dip721-nft-container/README.md +++ b/rust/dip721-nft-container/README.md @@ -92,7 +92,7 @@ A running instance of the Rust canister for demonstration purposes is available The interface is meant to be programmatic, but the Rust version additionally contains HTTP functionality so you can view a metadata file at `//`. It contains six NFTs, so you can look at items from `/0/0` to `/5/0`. -### Prerequisites +## Prerequisites - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). - [x] Download and install [git.](https://git-scm.com/downloads) diff --git a/rust/hello/README.md b/rust/hello/README.md index 5be675357..6a7219962 100644 --- a/rust/hello/README.md +++ b/rust/hello/README.md @@ -43,7 +43,7 @@ This example is based on the default project created by running `dfx new hello`. This example is based on the default project created by running `dfx new --type=rust hello`. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). - [x] Install `node.js` (to build the web frontend). diff --git a/rust/query_stats/README.md b/rust/query_stats/README.md index cdec34a6d..d50b97587 100644 --- a/rust/query_stats/README.md +++ b/rust/query_stats/README.md @@ -27,7 +27,7 @@ The `load` function just returns a timestamp. It just exists such that there is a query endpoint to call. The `get_query_stats` is the function that queries the status endpoint and returns the collected query statistics. -### Prerequisites +## Prerequisites This example requires an installation of: - [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx). - [x] Install `node.js` (to build the web frontend).