Skip to content

Commit ebef624

Browse files
jessiemongeon1Jason
and
Jason
authored
chore: add SEO to docs and fix typos + format (#727)
* Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx * Update README.mdx --------- Co-authored-by: Jason <[email protected]>
1 parent 92347ad commit ebef624

File tree

61 files changed

+619
-362
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+619
-362
lines changed

hosting/godot-html5-template/README.mdx

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
keywords: [html5, html, godot, hosting, host a website, beginner]
3+
---
4+
5+
16
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
27

38
# Godot HTML5 sample
@@ -7,7 +12,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
712
## Overview
813
The example shows how to deploy a Godot HTML5 build on the IC in an asset canister. The Godot HTML5 build is deployed as frontend, no backend is needed in this sample.
914

10-
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.
15+
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.
1116

1217
## Prerequisites
1318

hosting/photo-storage/README.mdx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
---
2+
keywords: [photo storage, store photos, photo app, photos, beginner]
3+
---
4+
15
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
26

37
# Photo storage example
48

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

7-
The example shows how to store photos on the IC in an asset canister with the `@dfinity/assets` package. The photo
11+
The example shows how to store photos on ICP in an asset canister with the `@dfinity/assets` package. The photo
812
storage app is deployed as a frontend in an asset canister which is also used for photo upload.
913

10-
This example project can be cloned, installed and deployed locally, for learning and testing purposes. The instructions
14+
This example project can be cloned, installed, and deployed locally, for learning and testing purposes. The instructions
1115
are based on running the example on either macOS or Linux, but when using WSL2 on Windows, the instructions will be the
1216
same.
1317

hosting/static-website/README.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
keywords: [static website, basic website, html, host a website, beginner]
3+
---
4+
15
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
26

37
# Static website

hosting/unity-webgl-template/README.mdx

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
---
2+
keywords: [unity, unity webgl, beginner]
3+
---
4+
15
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
26

37
# Unity WebGL sample
48

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

7-
The example shows how to deploy a simple Unity WebGL build on the IC in an asset canister. It just shows a Unity WebGL build with the URP template installed.
11+
The example shows how to deploy a simple Unity WebGL build on ICP in an asset canister. It just shows a Unity WebGL build with the URP template installed.
812

913
The Unity WebGL build is deployed as frontend, no backend is needed in this sample.
1014

@@ -37,7 +41,11 @@ When the local replica is up and running, run this command to deploy the caniste
3741
dfx deploy
3842
```
3943

40-
If you get error code 500 after deploying to the IC mainnet, try to use `raw` keyword in the URL like this: `https://\<canister-id\>.raw.ic0.app`.
44+
If you get error code 500 after deploying to the IC mainnet, try to use `raw` keyword in the URL like this:
45+
46+
```
47+
https://\<canister-id\>.raw.ic0.app
48+
```
4149

4250
## License
4351
This project is licensed under the Apache 2.0 license, see `LICENSE.md` for details. See `CONTRIBUTE.md` for details about how to contribute to this project.

motoko/actor_reference/README.mdx

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
keywords: [motoko, beginner, motoko actor, actor reference]
3+
---
4+
15
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
26

37
# Actor reference
@@ -14,11 +18,11 @@ Actor references should be used sparingly, and only when necessary, to provide a
1418
Providing an incorrect interface may cause subsequent communication with the actor to fail with serialization (but not memory) errors.
1519
:::
1620

17-
The example defines one Motoko actor: `main.mo` binds the name IC to the actor obtained by asserting an interface for the textual actor reference "aaaaa-aa". This is the identity, in textual format, of the well-known (that is, system provided) management canister which is typically used to install, top up, and otherwise manage canisters on the IC.
21+
The example defines one Motoko actor: `main.mo` binds the name IC to the actor obtained by asserting an interface for the textual actor reference "aaaaa-aa". This is the identity, in textual format, of the well-known (that is, system-provided) management canister which is typically used to install, top up, and otherwise manage canisters on the IC.
1822

1923
The full interface of the management canister is provided in the Interface Computer interface specification. For this simple example, we only need a subset of the specified operations, and, due to Candid sub-typing, can even import them at less informative types than described in the full specification. To provide access to more operations, one would simply add them to the actor type, at the appropriate Motoko translation of the original Candid signature.
2024

21-
Our actor exposes a single burn method that uses its local IC actor reference to provision, create, query, stop and delete a transient canister, in order to burn half of the actor's cycle balance.
25+
Our actor exposes a single burn method that uses its local IC actor reference to provision, create, query, stop, and delete a transient canister, to burn half of the actor's cycle balance.
2226

2327
This application of IC is meant to be illustrative, not necessarily useful.
2428

@@ -66,4 +70,4 @@ The output will resemble the following:
6670

6771
# Security considerations best practices
6872

69-
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 ICP. This example may not implement all the best practices.
73+
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 ICP. This example may not implement all the best practices.

motoko/auth_client_demo/README.mdx

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1+
---
2+
keywords: [intermediate, motoko, authentication, internet identity, integrate, auth, user auth]
3+
---
4+
15
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
26

37
# Auth-client
48

59
<MarkdownChipRow labels={["Intermediate", "Motoko"]} />
610

7-
This is an example project, intended to demonstrate how an app developer might integrate with an [Internet Identity](https://identity.ic0.app).
11+
This is an example project intended to demonstrate how a developer might integrate with [Internet Identity](https://identity.ic0.app).
812

9-
For a non-typescript implementation, see https://github.com/krpeacock/auth-client-demo/tree/vanilla-js
13+
:::info
14+
This example uses TypeScript. See an alternative [vanilla JS example](https://github.com/krpeacock/auth-client-demo/tree/vanilla-js).
15+
:::
1016

11-
[Live demo](https://vasb2-4yaaa-aaaab-qadoa-cai.ic0.app/)
17+
[View a live demo of this sample](https://vasb2-4yaaa-aaaab-qadoa-cai.ic0.app/).
1218

13-
This is an example showing how to use [@dfinity/auth-client](https://www.npmjs.com/package/@dfinity/auth-client).
19+
This example shows how to use [@dfinity/auth-client](https://www.npmjs.com/package/@dfinity/auth-client).
1420

1521
## Setting up for local development
1622

17-
To get started, start a local dfx development environment in this directory with the following steps:
23+
To get started, start a local `dfx` development environment in this directory with the following steps:
1824

1925
```bash
2026
cd auth-client-demo/
@@ -36,9 +42,9 @@ This demo has multiple versions, each of which demonstrates a different feature
3642
- Vanilla
3743
- Svelte
3844

39-
## Pulling Internet Identity into your own project
45+
## Pulling Internet Identity into your project
4046

41-
To pull Internet Identity into your own project, you'll need to do the following:
47+
To pull Internet Identity into your project, you'll need to do the following:
4248

4349
- #### Step 1: Add Internet Identity to your `dfx.json` file:
4450

motoko/basic_bitcoin/README.mdx

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
---
2+
keywords: [advanced, motoko, bitcoin, bitcoin integration, btc]
3+
---
4+
15
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
26

37
# Basic Bitcoin
48

59
<MarkdownChipRow labels={["Advanced", "Motoko"]} />
610

7-
## Deploying your first Bitcoin dapp
8-
911
## Overview
1012
This tutorial will walk you through how to deploy a sample [canister smart contract](https://wiki.internetcomputer.org/wiki/Canister_smart_contract) **that can send and receive Bitcoin** on the Internet Computer.
1113

@@ -14,7 +16,7 @@ This tutorial will walk you through how to deploy a sample [canister smart contr
1416
This example internally leverages the [ECDSA API](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-ecdsa_public_key)
1517
and [Bitcoin API](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin-api) of the Internet Computer.
1618

17-
For deeper understanding of the ICP < > BTC integration, see the IC wiki article on [Bitcoin integration](https://wiki.internetcomputer.org/wiki/Bitcoin_Integration).
19+
For a deeper understanding of the ICP < > BTC integration, see the [Bitcoin integration documentation](/docs/current/developer-docs/multi-chain/bitcoin/overview).
1820

1921
## Prerequisites
2022

@@ -62,7 +64,7 @@ Candid:
6264
basic_bitcoin: https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=<YOUR-CANISTER-ID>
6365
```
6466

65-
Your canister is live and ready to use! You can interact with it using either the command line, or using the Candid UI, which is the link you see in the output above.
67+
Your canister is live and ready to use! You can interact with it using either the command line or the Candid UI, which is the link you see in the output above.
6668

6769
In the output above, to see the Candid Web UI for your bitcoin canister, you would use the URL `https://a4gq6-oaaaa-aaaab-qaa4q-cai.raw.icp0.io/?id=<YOUR-CANISTER-ID>`. Here are the two methods you will see:
6870

@@ -84,7 +86,7 @@ Or, if you prefer the command line:
8486
dfx canister --network=ic call basic_bitcoin get_p2pkh_address
8587
```
8688

87-
* The Bitcoin address you see will be different from the one above, because the
89+
* The Bitcoin address you see will be different from the one above because the
8890
ECDSA public key your canister retrieves is unique.
8991

9092
* We are generating a Bitcoin testnet address, which can only be
@@ -97,7 +99,7 @@ Now that the canister is deployed and you have a Bitcoin address, it's time to r
9799
some testnet bitcoin. You can use one of the Bitcoin faucets, such as [coinfaucet.eu](https://coinfaucet.eu),
98100
to receive some bitcoin.
99101

100-
Enter your address and click on "Send testnet bitcoins". In the example below we will use Bitcoin address `n31eU1K11m1r58aJMgTyxGonu7wSMoUYe7`, but you would use your own address. The canister will be receiving 0.011 test BTC on the Bitcoin Testnet.
102+
Enter your address and click on "Send testnet bitcoins". In the example below we will use Bitcoin address `n31eU1K11m1r58aJMgTyxGonu7wSMoUYe7`, but you will use your address. The canister will be receiving 0.011 test BTC on the Bitcoin Testnet.
101103

102104

103105
Once the transaction has at least one confirmation, which can take a few minutes,
@@ -124,18 +126,18 @@ You can send bitcoin using the `send` endpoint on your canister.
124126
In the Candid UI, add a destination address and an amount to send. In the example
125127
below, we're sending 4'321 Satoshi (0.00004321 BTC) back to the testnet faucet.
126128

127-
Via command line, the same call would look like this:
129+
Via the command line, the same call would look like this:
128130

129131
```bash
130132
dfx canister --network=ic call basic_bitcoin send '(record { destination_address = "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt"; amount_in_satoshi = 4321; })'
131133
```
132134

133-
The `send` endpoint is able to send bitcoin by:
135+
The `send` endpoint can send bitcoin by:
134136

135137
1. Getting the percentiles of the most recent fees on the Bitcoin network using the [bitcoin_get_current_fee_percentiles API](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin_get_current_fee_percentiles).
136138
2. Fetching your unspent transaction outputs (UTXOs), using the [bitcoin_get_utxos API](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin_get_utxos).
137139
3. Building a transaction, using some of the UTXOs from step 2 as input and the destination address and amount to send as output.
138-
The fee percentiles obtained from step 1 is used to set an appropriate fee.
140+
The fee percentiles obtained from step 1 are used to set an appropriate fee.
139141
4. Signing the inputs of the transaction using the [sign_with_ecdsa API](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-sign_with_ecdsa).
140142
5. Sending the signed transaction to the Bitcoin network using the [bitcoin_send_transaction API](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin_send_transaction).
141143

@@ -149,7 +151,7 @@ reflected in your current balance.
149151
In this tutorial, you were able to:
150152

151153
* Deploy a canister smart contract on the ICP blockchain that can receive & send Bitcoin.
152-
* Use a cycles faucet to deploy the canister to ICP blockchain on mainnet for free.
154+
* Use a cycles faucet to deploy the canister to ICP blockchain on the mainnet for free.
153155
* Connect the canister to the Bitcoin testnet.
154156
* Send the canister some testnet BTC.
155157
* Check the testnet BTC balance of the canister.
@@ -165,5 +167,5 @@ This example is extensively documented in the following tutorials:
165167
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.
166168

167169
For example, the following aspects are particularly relevant for this app:
168-
* [Certify query responses if they are relevant for security](https://internetcomputer.org/docs/current/references/security/general-security-best-practices#certify-query-responses-if-they-are-relevant-for-security), since the app e.g. offers method to read balances.
170+
* [Certify query responses if they are relevant for security](https://internetcomputer.org/docs/current/references/security/general-security-best-practices#certify-query-responses-if-they-are-relevant-for-security), since the app e.g. offers a method to read balances.
169171
* [Use a decentralized governance system like SNS to make a canister have a decentralized controller](https://internetcomputer.org/docs/current/references/security/rust-canister-development-security-best-practices#use-a-decentralized-governance-system-like-sns-to-make-a-canister-have-a-decentralized-controller), since decentralized control may be essential for canisters holding Bitcoin on behalf of users.

motoko/basic_dao/README.mdx

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
keywords: [advanced, motoko, dao, decentralized organization, decentralized org]
3+
---
4+
15
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
26

37
# Basic DAO
@@ -9,11 +13,12 @@ This sample project demonstrates a basic [decentralized autonomous organization]
913

1014
## Overview
1115

12-
A `basic_dao` can be initialized with a set of accounts: mappings from principal IDs to an amount of tokens. Account owners can query their account balance by calling `account_balance` and transfer tokens to other accounts by calling `transfer`. Anyone can call `list_accounts` to view all accounts.
16+
A `basic_dao` can be initialized with a set of accounts: mappings from principal IDs to a number of tokens. Account owners can query their account balance by calling `account_balance` and transfer tokens to other accounts by calling `transfer`. Anyone can call `list_accounts` to view all accounts.
1317

14-
Account owners can submit proposals by calling `submit_proposal`. A proposal specifies a canister, method and arguments for this method. Account owners can cast votes (either `Yes` or `No`) on a proposal by calling `vote`. The amount of votes cast is equal to amount of tokens the account owner has. If enough `Yes` votes are cast, `basic_dao` will execute the proposal by calling the proposal’s given method with the given args against the given canister. If enough `No` votes are cast, the proposal is not executed, and is instead marked as `Rejected`.
18+
Account owners can submit proposals by calling `submit_proposal`. A proposal specifies a canister, method, and arguments for this method. Account owners can cast votes (either `Yes` or `No`) on a proposal by calling `vote`. The amount of votes cast is equal to the amount of tokens the account owner has. If enough `Yes` votes are cast, `basic_dao` will execute the proposal by calling the proposal’s given method with the given args against the given canister. If enough `No` votes are cast, the proposal is not executed, and is instead marked as `Rejected`.
1519

16-
Certain system parameters, like the number of `Yes` votes needed to pass a proposal, can be queried by calling `get_system_params`. These system params can be modified via the proposal process, i.e. a proposal can be made to call `update_system_params` with updated values. The below demo does exactly that.
20+
Certain system parameters, like the number of `Yes` votes needed to pass a proposal, can be queried by calling `get_system_params`. These system parameters can be modified via the proposal process, i.e. a proposal can be made to call `update_system_params` with updated values.
21+
This workflow is demonstrated below.
1722

1823
View the [canister service definition](https://github.com/dfinity/examples/blob/master/rust/basic_dao/src/basic_dao/src/basic_dao.did) for more details.
1924

@@ -67,4 +72,4 @@ If you base your application on this example, we recommend you familiarize yours
6772

6873
For example, the following aspects are particularly relevant for this app:
6974
* [Use a decentralized governance system like SNS to make a canister have a decentralized controller](https://internetcomputer.org/docs/current/references/security/rust-canister-development-security-best-practices#use-a-decentralized-governance-system-like-sns-to-make-a-canister-have-a-decentralized-controller), since this is a DAO's use case.
70-
* [Certify query responses if they are relevant for security](https://internetcomputer.org/docs/current/references/security/general-security-best-practices#certify-query-responses-if-they-are-relevant-for-security), since e.g. account_balance and list_accounts are query calls that a client may want to issue as update call.
75+
* [Certify query responses if they are relevant for security](https://internetcomputer.org/docs/current/references/security/general-security-best-practices#certify-query-responses-if-they-are-relevant-for-security), since e.g. `account_balance` and `list_accounts` are query calls that a client may want to issue as update call.

0 commit comments

Comments
 (0)