Skip to content

Commit da93e55

Browse files
fix size
1 parent 17d0ac3 commit da93e55

File tree

25 files changed

+68
-68
lines changed

25 files changed

+68
-68
lines changed

archive/motoko/dip721-nft-container/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Using this management canister address, we can construct its principal and set t
8888

8989
## NFT sample code tutorial
9090

91-
### Prerequisites
91+
## Prerequisites
9292

9393
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).
9494
- [x] Download and install [git.](https://git-scm.com/downloads)

archive/motoko/hello/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This example demonstrates a dead simple dapp consisting of two canister smart co
4141

4242
This example is based on the default project created by running `dfx new hello`.
4343

44-
### Prerequisites
44+
## Prerequisites
4545
This example requires an installation of:
4646
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).
4747
- [x] Install `node.js` (to build the web frontend).

archive/motoko/persistent-storage/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This example covers:
2424
## Installation
2525
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.
2626

27-
### Prerequisites
27+
## Prerequisites
2828
This example requires an installation of:
2929

3030
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).

motoko/counter/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The application provides an interface that exposes the following methods:
1010
- `inc`: increments the value of the counter.
1111
- `get`: gets the value of the counter.
1212

13-
### Prerequisites
13+
## Prerequisites
1414
This example requires an installation of:
1515

1616
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).

motoko/encrypted-notes-dapp-vetkd/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This example uses an **insecure** implementation of [the proposed vetKD system A
1616

1717
## Manual local deployment
1818

19-
### Prerequisites
19+
## Prerequisites
2020

2121
This example requires an installation of:
2222

motoko/encrypted-notes-dapp/README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This is an **example dapp** that demonstrates the potential of building **canist
2020

2121
- 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.
2222
- 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.
23-
- Integer overflows are possible in the Rust canister, e.g., for `NEXT_NOTE`.
23+
- Integer overflows are possible in the Rust canister, e.g., for `NEXT_NOTE`.
2424
- Users may lose their notes if they accidentally clean the browser data (localStorage) while no other device is synced to the dapp.
2525
- 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).
2626

@@ -29,8 +29,8 @@ This is an **example dapp** that demonstrates the potential of building **canist
2929

3030
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).
3131

32-
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:
33-
1. Client-side **end-to-end encryption**.
32+
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:
33+
1. Client-side **end-to-end encryption**.
3434
2. **Multi-user** and **multi-device** support.
3535

3636
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:
100100

101101
Follow the steps below to deploy this sample project.
102102

103-
### Prerequisites
103+
## Prerequisites
104104
This example requires an installation of:
105105

106106
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).
@@ -126,7 +126,7 @@ export BUILD_ENV=motoko
126126

127127

128128
**Building the Rust canister requires either the Rust toolchain installed on your system or Docker-backed deployment (see below).**
129-
129+
130130
## Step 3: Deploy locally
131131

132132
### Option 1: Docker deployment
@@ -139,7 +139,7 @@ export BUILD_ENV=motoko
139139
export BUILD_ENV=motoko
140140
```
141141

142-
- #### Step 3: Run the following Bash script that builds a Docker image, compiles the canister, and deploys this dapp (all inside the Docker instance).
142+
- #### Step 3: Run the following Bash script that builds a Docker image, compiles the canister, and deploys this dapp (all inside the Docker instance).
143143

144144
Execution can take a few minutes:
145145

@@ -278,11 +278,11 @@ dfx canister --network ic install www --mode=upgrade
278278

279279
## Security considerations and best practices
280280

281-
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.
281+
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.
282282

283-
For example, the following aspects are particularly relevant for this app:
283+
For example, the following aspects are particularly relevant for this app:
284284
* [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.
285-
* [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.
285+
* [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.
286286
* [Use secure cryptographic schemes](https://internetcomputer.org/docs/current/references/security/general-security-best-practices#use-secure-cryptographic-schemes), since notes are being encrypted.
287287

288288
## 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
476476
`dependencies`: an array of whatever canisters are being used to serve your app, to ensure that `dfx` builds and deploys them before your app.
477477
`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
478478
`source`: where the rest of your app resides at the end of npm build
479-
`type`: "assets" for an assets or static canister.
479+
`type`: "assets" for an assets or static canister.
480480

481481
**Binary targets**:
482482
You can also just deploy arbitrary binary targets as long as they're wasm binaries. For that, use the keys:

motoko/hello_cycles/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This example consists of the following functions (see `src/hello_cycles/main.mo`
1616
The wallet's `wallet_receive` return type differs from hello_cycle's `wallet_receive`.
1717
:::
1818

19-
This is a Motoko example that does not currently have a Rust variant.
19+
This is a Motoko example that does not currently have a Rust variant.
2020

21-
### Prerequisites
21+
## Prerequisites
2222
This example requires an installation of:
2323

2424
- [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
124124
dfx canister call hello_cycles transfer "(func \"$(dfx identity get-wallet)\".\"wallet_receive\", 5000000)"
125125
```
126126
127-
Output:
127+
Output:
128128
129129
```bash
130130
(record { refunded = 0 : nat })

motoko/ic-pos/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The frontend interacts with the following IC canisters:
5050
- `ckbtc index` - to fetch transaction history.
5151
- `internet identity` - to authenticate users.
5252

53-
### Prerequisites
53+
## Prerequisites
5454
This example requires an installation of:
5555

5656
- [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_..."
171171

172172
### Step 8: Build and run the frontend
173173

174-
Run npm to install dependencies and start a development version of the frontend.
174+
Run npm to install dependencies and start a development version of the frontend.
175175

176176
```bash
177177
pnpm install
@@ -203,7 +203,7 @@ dfx canister call icrc1_ledger icrc1_transfer '
203203

204204
### Step 11: Create the second store
205205

206-
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.
206+
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.
207207

208208
Now, go back to the first browser/store, navigate to the `Send` page, and transfer some tokens to the second store.
209209

@@ -213,7 +213,7 @@ If everything is working, you should see a notification in the second store.
213213

214214
## Possible improvements
215215

216-
- Show more information about transactions.
216+
- Show more information about transactions.
217217
- A transaction detail page.
218218
- Pagination, currently only the first 5 transactions are shown.
219219
- Show a confirmation dialog after the user clicks on the `Send` button.

motoko/icrc2-swap/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ different from other synchronous blockchains.
1919

2020
## Local deployment
2121

22-
### Prerequisites
22+
## Prerequisites
2323
This example requires an installation of:
2424

2525
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).
@@ -265,7 +265,7 @@ the token balances.
265265
The example comes with a test suite to demonstrate the basic functionality. It
266266
shows how to use this repo from a Javascript client.
267267

268-
### Prerequisites
268+
## Prerequisites
269269
This example requires an installation of:
270270

271271
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).

motoko/internet_identity_integration/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Internet Identity integration
1+
# Internet Identity integration
22

33
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.
44

@@ -11,12 +11,12 @@ This tutorial will explain all the steps required to integrate the default start
1111

1212
This is a Motoko example that does not currently have a Rust variant.
1313

14-
### Prerequisites
14+
## Prerequisites
1515
This example requires an installation of:
1616

1717
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).
1818
- [x] Clone the example dapp project: `git clone https://github.com/dfinity/examples`
19-
- [x] Download and install the `@dfinity/auth-client` package with the command `npm install @dfinity/auth-client`.
19+
- [x] Download and install the `@dfinity/auth-client` package with the command `npm install @dfinity/auth-client`.
2020
- [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))
2121

2222
Begin by opening a terminal window.
@@ -338,7 +338,7 @@ loginButton.onclick = async (e) => {
338338
});
339339

340340
return false;
341-
};%
341+
};%
342342
```
343343

344344
## Step 8: Modify the backend
@@ -378,7 +378,7 @@ URLs:
378378

379379
## Step 10: Test the application
380380

381-
Open the `greet_frontend` URL in a web browser.
381+
Open the `greet_frontend` URL in a web browser.
382382

383383
You should be able to observe the following behavior:
384384

motoko/life/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Directories `versions/v1` and `versions/v2` contain sequential upgrades to src u
1212

1313
To make upgrades apparent, each version uses a different digit to display live cells (0,1,2).
1414

15-
This is a Motoko example that does not currently have a Rust variant.
15+
This is a Motoko example that does not currently have a Rust variant.
1616

17-
### Prerequisites
17+
## Prerequisites
1818
This example requires an installation of:
1919

2020
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).

motoko/minimal-counter-dapp/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This example covers:
1515
- Deploy the canister smart contract locally.
1616
- Test backend with Candid UI and command line using `dfx`, and test frontend in browser.
1717

18-
### Prerequisites
18+
## Prerequisites
1919
This example requires an installation of:
2020

2121
- [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 {
123123
```
124124

125125
### Candid interface
126-
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.
126+
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.
127127

128128
### Frontend
129129
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.

motoko/parallel_calls/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The sample code revolves around two simple canisters, `caller` and `callee`. `Ca
1010

1111
The callee exposes a simple `ping` endpoint that takes no parameters and returns nothing.
1212

13-
### Prerequisites
13+
## Prerequisites
1414
This example requires an installation of:
1515

1616
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).
@@ -54,7 +54,7 @@ This should output:
5454
(100 : nat64)
5555
```
5656

57-
And the other endpoint:
57+
And the other endpoint:
5858

5959
```bash
6060
dfx canister call caller parallel_calls 100
@@ -96,9 +96,9 @@ Lastly, the parallel calls here complete sooner -- because most of them fail!
9696

9797
## Step 5: Multi-subnet setting
9898

99-
Parallel calls are a lot more useful in multi-subnet settings. We can create such a setting locally using Pocket IC.
99+
Parallel calls are a lot more useful in multi-subnet settings. We can create such a setting locally using Pocket IC.
100100

101-
First, follow the [installation instructions](https://github.com/dfinity/pocketic) to install `pocket-ic` in the `parallel_calls` directory.
101+
First, follow the [installation instructions](https://github.com/dfinity/pocketic) to install `pocket-ic` in the `parallel_calls` directory.
102102

103103
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.
104104

motoko/pub-sub/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This sample project demonstrates how functions may be passed as arguments of int
44

55
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.
66

7-
### Prerequisites
7+
## Prerequisites
88
This example requires an installation of:
99

1010
- [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:
5555

5656
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.
5757

58-
For example, the following aspects are particularly relevant for this app, since it makes inter-canister calls:
58+
For example, the following aspects are particularly relevant for this app, since it makes inter-canister calls:
5959
* [Be aware that state may change during inter-canister calls.](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview)
6060
* [Only make inter-canister calls to trustworthy canisters.](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview)
6161
* [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)

motoko/random_maze/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This actor uses Motoko's random library to generate a cryptographically random m
1616

1717
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.
1818

19-
This is a Motoko example that does not currently have a Rust variant.
19+
This is a Motoko example that does not currently have a Rust variant.
2020

21-
### Prerequisites
21+
## Prerequisites
2222
This example requires an installation of:
2323

2424
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).

motoko/superheroes/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
This example demonstrates how to build a CRUD application on ICP using Motoko and React.
44

5-
This is a Motoko example that does not currently have a Rust variant.
5+
This is a Motoko example that does not currently have a Rust variant.
66

7-
### Prerequisites
7+
## Prerequisites
88
This example requires an installation of:
99

1010
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index.mdx).

0 commit comments

Comments
 (0)