Skip to content

Commit 3d5e9f7

Browse files
Merge pull request #1023 from dfinity/fix-docs-links
Fix: docs links
2 parents bf706c7 + 4624009 commit 3d5e9f7

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ When upgrading canister code, however, it is necessary to explicitly handle cani
2828
### 2. Certified data.
2929
Generally, when a function only reads data, instead of modifying the state of the canister, it is
3030
beneficial to use a [query call instead of an update call](https://internetcomputer.org/docs/current/concepts/canisters-code.md#query-and-update-methods).
31-
But, since query calls do not go through consensus, [certified responses](https://internetcomputer.org/docs/current/developer-docs/security/general-security-best-practices)
31+
But, since query calls do not go through consensus, [certified responses](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview )
3232
should be used wherever possible. The HTTP interface of the Rust implementation shows how certified data can be handled.
3333

3434
### 3. Delegating control over assets.
@@ -47,7 +47,7 @@ In case an error occurs during any part of the upgrade (including `post_upgdrade
4747

4848
The Rust CDK (Canister Development Kit) currently only supports one value in stable memory, so it is necessary to create an object that can hold everything you care about.
4949
In addition, not every data type can be stored in stable memory; only ones that implement the [CandidType trait](https://docs.rs/candid/latest/candid/types/trait.CandidType.html)
50-
(usually via the [CandidType derive macro](https://docs.rs/candid/latest/candid/derive.CandidType.html)) can be written to stable memory.
50+
(usually via the [CandidType derive macro](https://docs.rs/candid/latest/candid/derive.CandidType.html)) can be written to stable memory.
5151

5252
Since the state of our canister includes a `RbTree` which does not implement the `CandidType`, it has to be converted into a data structure (in this case a `Vec`) that implements `CandidType`.
5353
Luckily, both `RbTree` and `Vec` implement functions that allow converting to/from iterators, so the conversion can be done quite easily.
@@ -76,7 +76,7 @@ For a much more detailed explanation of how certification works, see [this expla
7676
- **Operator**: sort of a delegated owner. The operator does not own the NFT but can do the same actions an owner can do.
7777
- **Custodian**: creator of the NFT collection/canister. They can do anything (transfer, add/remove operators, burn, and even un-burn) to NFTs, but also mint new ones or change the symbol or description of the collection.
7878

79-
The NFT example canister keeps access control in these three levels very simple:
79+
The NFT example canister keeps access control in these three levels very simple:
8080
- For every level of control, a separate list (or set) of principals is kept.
8181
- Those three levels are then manually checked every single time someone attempts to do something for which they require authorization.
8282
- If a user is not authorized to call a certain function an error is returned.
@@ -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)
@@ -108,7 +108,7 @@ cd examples/motoko/dip721-nft-container
108108
### Step 3: Run a local instance of the Internet Computer:
109109

110110
```bash
111-
dfx start --background
111+
dfx start --background
112112
```
113113

114114
**If this is not a new installation, you may need to run `start` with the `--clean` flag.**
@@ -123,7 +123,7 @@ This command deploys the DIP721 NFT canister with the following initialization a
123123

124124
```bash
125125
dfx deploy --argument "(
126-
principal\"$(dfx identity get-principal)\",
126+
principal\"$(dfx identity get-principal)\",
127127
record {
128128
logo = record {
129129
logo_type = \"image/png\";
@@ -137,15 +137,15 @@ dfx deploy --argument "(
137137
```
138138

139139
#### What this does
140-
- `principal`: the initial custodian of the collection. A custodian is a user who can administrate the collection i.e. an "Admin" user.
140+
- `principal`: the initial custodian of the collection. A custodian is a user who can administrate the collection i.e. an "Admin" user.
141141

142142
:::info
143143
`"$(dfx identity get-principal)"` automatically interpolates the default identity used by dfx on your machine into the argument that gets passed to `deploy`.
144144
:::
145145

146146
- `logo`: The image that represents this NFT collection.
147147
- `name`: The name of the NFT collection.
148-
- `symbol`: A short, unique symbol to identify the token.
148+
- `symbol`: A short, unique symbol to identify the token.
149149
- `maxLimit`: The maximum number of NFTs that are allowed in this collection.
150150

151151
You will receive output that resembles the following:
@@ -164,8 +164,8 @@ Use the following command to mint an NFT:
164164
```bash
165165
dfx canister call dip721_nft_container mintDip721 \
166166
"(
167-
principal\"$(dfx identity get-principal)\",
168-
vec {
167+
principal\"$(dfx identity get-principal)\",
168+
vec {
169169
record {
170170
purpose = variant{Rendered};
171171
data = blob\"hello\";
@@ -208,7 +208,7 @@ You should see a principal returned:
208208
o4f3h-cbpnm-4hnl7-pejut-c4vii-a5u5u-bk2va-e72lb-edvgw-z4wuq-5qe
209209
```
210210
211-
Transfer the NFT from the default user to `ALICE`.
211+
Transfer the NFT from the default user to `ALICE`.
212212
213213
Here the arguments are:
214214
`from`: principal that owns the NFT
@@ -255,7 +255,7 @@ Output:
255255
256256
### `getMetadataDip721`
257257
258-
Provide a token ID.
258+
Provide a token ID.
259259
The token ID was provided to you when you ran `mintDip721`, e.g. `(variant { Ok = record { id = 1 : nat; token_id = 0 : nat64 } })` So, the token ID is 0 in this case.
260260
261261
```bash
@@ -410,7 +410,7 @@ Output:
410410
411411
### `ownerOfDip721`
412412
413-
Provide a token ID.
413+
Provide a token ID.
414414
The token ID was provided to you when you ran `mintDip721`, e.g. `(variant { Ok = record { id = 1 : nat; token_id = 0 : nat64 } })` So, the token ID is 0 in this case.
415415
416416
```bash

motoko/encrypted-notes-dapp/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ We wanted to build an example of a simple (but not too simple) dapp running pure
4141
1. Client-side **end-to-end encryption**.
4242
2. **Multi-user** and **multi-device** support.
4343

44-
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/index). In both cases, canisters are compiled into WebAssembly files that are then deployed onto the IC.
44+
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.
4545

4646
## Architecture
4747

@@ -110,7 +110,7 @@ Follow the steps below to deploy this sample project.
110110

111111
## Prerequisites
112112
- [x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install/index).
113-
- [x] Download and install [Docker](https://docs.docker.com/get-docker/) if using the Docker option.
113+
- [x] Download and install [Docker](https://docs.docker.com/get-docker/) if using the Docker option.
114114
- [x] Download the GitHub repo containing this project's files: `git clone https://github.com/dfinity/examples`
115115

116116
### Step 1. Navigate inside of the project's folder:
@@ -139,7 +139,7 @@ export BUILD_ENV=motoko
139139

140140
- #### Step 1: Install and start Docker by following the instructions.
141141
- #### Step 2: For Motoko build/deployment set environmental variable:
142-
142+
143143
```bash
144144
export BUILD_ENV=motoko
145145
```
@@ -247,7 +247,7 @@ npm run dev
247247

248248

249249
:::caution
250-
If you have opened this page previously, please remove all local store data for this page from your web browser, and hard-reload the page.
250+
If you have opened this page previously, please remove all local store data for this page from your web browser, and hard-reload the page.
251251

252252
For example in Chrome, go to Inspect → Application → Local Storage → http://localhost:3000/ → Clear All, and then reload.
253253
:::
@@ -320,9 +320,9 @@ Fig. 2. Basic single-device scenario for a user.
320320

321321
- #### Step 3: Once logged in for the first time, your notes list should be empty.
322322

323-
At this moment, your _Local Storage_ should be populated with additional variables (see Fig. 2(d)): **ic-identity**, **ic-delegation**.
323+
At this moment, your _Local Storage_ should be populated with additional variables (see Fig. 2(d)): **ic-identity**, **ic-delegation**.
324324

325-
These variables are used for storing/retrieving notes from the backend canister.
325+
These variables are used for storing/retrieving notes from the backend canister.
326326

327327
In addition, another two variables are generated in the _IndexedDB_: **PrivateKey**, **PublicKey**. These two variables are used for encrypting/decrypting the shared secret key.
328328

@@ -341,7 +341,7 @@ Fig. 3. Scenario for a user with multiple registered devices.
341341

342342
- #### Step 1: Perform steps 1-3 of Scenario I on Device A.
343343

344-
- #### Step 2:. Perform steps 1-3 of Scenario I on Device B.
344+
- #### Step 2:. Perform steps 1-3 of Scenario I on Device B.
345345

346346
One subtle difference that you might observe on Device B is that the message "Synchronizing..." (Fig. 3(a)) appears for a short time. As Device A was the first to log in, it was also the first one to generate a shared secret. Device B has to retrieve it. To do that, Device B first uploads its public key (pub B) to the backend canister. Device A retrieves pub B using periodic polling. Device A then re-encrypts the shared secret with pub B and uploads it to the backend. Afterward, Device B can retrieve the encrypted shared secret and decrypt it with its private key.
347347

@@ -380,7 +380,7 @@ Fig. 4. Scenario for a user adding/removing devices.
380380

381381
## Unit testing
382382

383-
The unit tests are implemented in `src/encrypted_notes_motoko/test/test.mo` using the [Motoko Matchers](https://kritzcreek.github.io/motoko-matchers/) library.
383+
The unit tests are implemented in `src/encrypted_notes_motoko/test/test.mo` using the [Motoko Matchers](https://kritzcreek.github.io/motoko-matchers/) library.
384384

385385
The easiest way to run all tests involves the following steps:
386386

@@ -508,7 +508,7 @@ This dapp uses the web browser's `_Local Storage_` and `_IndexedDB_` for storing
508508

509509
:::
510510

511-
A symmetric key for encrypting/decrypting the notes is stored in RAM (this key is shared between multiple devices). For a better understanding of the mechanics of the dapp, please see the `_Local Storage_`/`_IndexedDB_` windows in your web browser.
511+
A symmetric key for encrypting/decrypting the notes is stored in RAM (this key is shared between multiple devices). For a better understanding of the mechanics of the dapp, please see the `_Local Storage_`/`_IndexedDB_` windows in your web browser.
512512

513513
In Chrome, go to: _Developer Tools→Application→Local Storage_/_IndexedDB_.
514514

rust/dip721-nft-container/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ When upgrading canister code, however, it is necessary to explicitly handle cani
2828
### 2. Certified data.
2929
Generally, when a function only reads data, instead of modifying the state of the canister, it is
3030
beneficial to use a [query call instead of an update call](https://internetcomputer.org/docs/current/concepts/canisters-code.md#query-and-update-methods).
31-
But, since query calls do not go through consensus, [certified responses](https://internetcomputer.org/docs/current/developer-docs/security/general-security-best-practices)
31+
But, since query calls do not go through consensus, [certified responses](https://internetcomputer.org/docs/current/developer-docs/security/security-best-practices/overview )
3232
should be used wherever possible. The HTTP interface of the Rust implementation shows how certified data can be handled.
3333

3434
### 3. Delegating control over assets.

rust/encrypted-notes-dapp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ We wanted to build an example of a simple (but not too simple) dapp running pure
4242
1. Client-side **end-to-end encryption**.
4343
2. **Multi-user** and **multi-device** support.
4444

45-
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/index.md). In both cases, canisters are compiled into WebAssembly files that are then deployed onto the IC.
45+
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.
4646

4747
## Architecture
4848

0 commit comments

Comments
 (0)