Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit cbb05bd

Browse files
committed
Issue #1274: Upgrade to Docusaurus v3
* Upgrade MDX to be compliant with v3 * Checked with npx docusaurus-mdx-checker as in migration guide https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3 * Add .nvmrc and README notes to ensure we have a good node version for Docusaurus 3 * Upgrade to React 18.2.0 * Update ChatGPT feature to be #ask * Fix bulleted list in MDX
1 parent 1f2be39 commit cbb05bd

File tree

17 files changed

+1717
-1591
lines changed

17 files changed

+1717
-1591
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.16.0

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ $> npm --version
5151
9.5.1
5252
```
5353

54+
Note: if you already have `node` `v18.16.0` installed, you can switch to use it using `nvm use`; this will automatically
55+
set your `node` version to the one defined in `.nvmrc` in the root of this repo.
56+
5457
### PNPM Installation
5558

5659
To install `pnpm` globally on your local machine, follow these steps:

pnpm-lock.yaml

Lines changed: 1620 additions & 1486 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/docs/glossary.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
An agent is software that acts on behalf of a user to manage identity, public or private data, and interactions with other apps in a decentralized network. Agents hold a user's [DIDs](#decentralized-identifier-did), private keys, and a [DWN](#decentralized-web-node-dwn), and are permissioned to use the private keys of DIDs to act on a user's behalf to sign and store messages within a DWN.
66

7-
[<< More on Agents >>](/docs/web5/learn/agents)
7+
[\<\< More on Agents \>\>](/docs/web5/learn/agents)
88

99
## Centralized Authority
1010

@@ -14,19 +14,19 @@ A single entity or organization that has control over the network and its operat
1414

1515
A Decentralized Identifier (DID) is a globally unique identifier that enables verifiable, decentralized digital identity, without the need for centralized intermediaries. DIDs are typically implemented using decentralized and distributed ledger technologies, such as blockchain, and provide a way to verify and authenticate digital identities, while ensuring privacy and control over personal data.
1616

17-
[<< More on DIDs >>](/docs/web5/learn/decentralized-identifiers/)
17+
[\<\< More on DIDs \>\>](/docs/web5/learn/decentralized-identifiers/)
1818

1919
## Decentralized Web Node (DWN)
2020

2121
A Decentralized Web Node is a personal data store in a decentralized network that stores and shares information, serves as a communication channel, and executes transactions in a distributed manner, without relying on a centralized server, thereby enhancing security, privacy, and resilience of the network.
2222

23-
[<< More on DWNs >>](/docs/web5/learn/decentralized-web-nodes)
23+
[\<\< More on DWNs \>\>](/docs/web5/learn/decentralized-web-nodes)
2424

2525
## DID Document
2626

2727
A JSON document containing details about a DID, including the DID itself, represented by an `id` field, as well as other data related to the verification and authentication methods of the DID.
2828

29-
[<< More on DID Documents >>](/docs/web5/learn/did_document)
29+
[\<\< More on DID Documents \>\>](/docs/web5/learn/did_document)
3030

3131
## DID Method
3232

@@ -67,4 +67,4 @@ SSI refers to a concept where individuals have full control and ownership over t
6767

6868
A Verifiable Presentation is a standard data container that serves as an authenticated wrapper around a set of credentials to be verified. They impose no constraints on who can construct them or what may be presented, allowing you to present multiple VCs issued to different DIDs.
6969

70-
[<< More on Verifiable Presentation >>](/docs/web5/build/verifiable-credentials/presentation-exchange/#verifiable-presentation)
70+
[\<\< More on Verifiable Presentation \>\>](/docs/web5/build/verifiable-credentials/presentation-exchange/#verifiable-presentation)

site/docs/ssi/api_guide.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ title: API Reference
55

66
import {Redirect} from '@docusaurus/router';
77

8-
const Home = () => {
8+
const Home = () => \{
99
return <Redirect to="/docs/apis/ssi-service" />;
1010
};

site/docs/tbdex/issuer/vc-issuance.mdx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,15 @@ If you need to create a Credential Issuance app from scratch, continue on with t
2323

2424
<LanguageSwitchBlock>
2525
<div language="Kotlin">
26-
<p>
27-
- Create a web server using <a href="https://www.jetbrains.com/help/idea/ktor.html#run_ktor_app">Ktor</a> that will serve as an API endpoint.
28-
</p>
26+
* Create a web server using <a href="https://www.jetbrains.com/help/idea/ktor.html#run_ktor_app">Ktor</a> that will serve as an API endpoint.
2927
</div>
30-
3128
<div language="JavaScript">
32-
<p>
33-
- Create a web server using <a href="https://expressjs.com/">Express</a> that will serve as an API endpoint.
34-
</p>
29+
* Create a web server using <a href="https://expressjs.com/">Express</a> that will serve as an API endpoint.
3530
</div>
3631
</LanguageSwitchBlock>
37-
38-
- Design the credential you'd like to offer.
39-
- Implement an issuance path where you'll accept a request for issuance, perform any necessary checks, and issue the credential.
40-
- Return the credential to the requester.
32+
* Design the credential you'd like to offer.
33+
* Implement an issuance path where you'll accept a request for issuance, perform any necessary checks, and issue the credential.
34+
* Return the credential to the requester.
4135

4236
## Environment Setup
4337

@@ -259,13 +253,13 @@ Refer to the [Create A DID](/docs/web5/build/decentralized-identifiers/how-to-cr
259253
<LanguageSwitchBlock>
260254
<div language="Kotlin">
261255
<p>
262-
In order to run this code, create a <code>checkSanctionsLists()</code> function and a <code>sanctionsListResult</code> class in your <code>Application.kt</code> file:
256+
In order to run this code, create a <code>checkSanctionsLists()</code> function and a <code>sanctionsListResult</code> class in your <code>Application.kt</code> file:
263257
</p>
264258
</div>
265259

266260
<div language="JavaScript">
267261
<p>
268-
In order to run this code, create a <code>checkSanctionsLists()</code> function in your <code>api.js</code> file:
262+
In order to run this code, create a <code>checkSanctionsLists()</code> function in your <code>api.js</code> file:
269263
</p>
270264
</div>
271265
</LanguageSwitchBlock>

site/docs/tbdex/pfi/creating-offerings.mdx

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 6
44

55
# Offerings
66

7-
Offerings describe a currency pair that can be exchanged and specify the requirements, conditions, and constraints needed to fulfill the described transaction.
7+
Offerings describe a currency pair that can be exchanged and specify the requirements, conditions, and constraints needed to fulfill the described transaction.
88
In other words, an Offering is a way of describing a financial product you’re offering as a PFI on a tbDEX network. Any Wallet that has your PFI's DID will be able to query your PFI for all available Offerings, as well as fetch specific Offerings. Wallets will then use that data to make an Request for Quote (RFQ) to your PFI to begin a potential transaction process.
99

1010
## Offering Data Schema
@@ -22,52 +22,40 @@ To define these parameters, you’ll create a JSON object per the [Offering sche
2222

2323
<table>
2424
<tr>
25-
<td><strong>Offering Trait</strong>
25+
<td>
26+
<strong>Offering Trait</strong>
2627
</td>
27-
<td><strong>tbDEX Field</strong>
28+
<td>
29+
<strong>tbDEX Field</strong>
2830
</td>
29-
<td><strong>Data Type</strong>
31+
<td>
32+
<strong>Data Type</strong>
3033
</td>
3134
</tr>
3235
<tr>
33-
<td>Currency Pairing for swap
34-
</td>
35-
<td>payinCurrency and payoutCurrency
36-
</td>
37-
<td>CurrencyDetails
38-
</td>
36+
<td>Currency Pairing for swap</td>
37+
<td>payinCurrency and payoutCurrency</td>
38+
<td>CurrencyDetails</td>
3939
</tr>
4040
<tr>
41-
<td>Pay-in Method
42-
</td>
43-
<td>payinMethods
44-
</td>
45-
<td>PaymentMethod[]
46-
</td>
41+
<td>Pay-in Method</td>
42+
<td>payinMethods</td>
43+
<td>PaymentMethod[]</td>
4744
</tr>
4845
<tr>
49-
<td>Pay-out Method
50-
</td>
51-
<td>payoutMethods
52-
</td>
53-
<td>PaymentMethods[]
54-
</td>
46+
<td>Pay-out Method</td>
47+
<td>payoutMethods</td>
48+
<td>PaymentMethods[]</td>
5549
</tr>
5650
<tr>
57-
<td>Pay-out Conversion
58-
</td>
59-
<td>payoutUnitsPerPayinUnit
60-
</td>
61-
<td>string
62-
</td>
51+
<td>Pay-out Conversion</td>
52+
<td>payoutUnitsPerPayinUnit</td>
53+
<td>string</td>
6354
</tr>
6455
<tr>
65-
<td>Required Credentials
66-
</td>
67-
<td>requiredClaims
68-
</td>
69-
<td>PresentationDefinitionV2
70-
</td>
56+
<td>Required Credentials</td>
57+
<td>requiredClaims</td>
58+
<td>PresentationDefinitionV2</td>
7159
</tr>
7260
</table>
7361

@@ -118,13 +106,13 @@ Note that while `type` and `description` fields are more intuitive and standard
118106

119107
### Required Claims
120108

121-
In order to comply with certain financial regulations, you may require information about the customer you are transacting with.
122-
You can obtain this information via [Verifiable Credentials](/docs/web5/learn/verifiable-credentials).
109+
In order to comply with certain financial regulations, you may require information about the customer you are transacting with.
110+
You can obtain this information via [Verifiable Credentials](/docs/web5/learn/verifiable-credentials).
123111

124-
To specify the exact credentials you need, you can do so in the `requiredClaims` section of your Offering by following [creating a Presentation Definition](/docs/web5/build/verifiable-credentials/presentation-definition/).
112+
To specify the exact credentials you need, you can do so in the `requiredClaims` section of your Offering by following [creating a Presentation Definition](/docs/web5/build/verifiable-credentials/presentation-definition/).
125113
You'll specify all required forms and details of proof, optional selection rules, and define flexibility where possible when different types of input may satisfy the requirements.
126114

127-
For a full breakdown of all the available fields and combinations, [see the DIF website](https://identity.foundation/presentation-exchange/#presentation-definition) for details.
115+
For a full breakdown of all the available fields and combinations, [see the DIF website](https://identity.foundation/presentation-exchange/#presentation-definition) for details.
128116
Below is a example of how you could request a Wallet provide a VC of type **SanctionsCredential**:
129117

130118
```json
@@ -250,4 +238,4 @@ When combining all the data above, you can end up with a full Offering object th
250238
}
251239
```
252240

253-
Once the Offering has been generated, you can store it in your database using code as shown in the [Exchange API Provider section](/docs/tbdex/pfi/anatomy-of-a-pfi#exchange-api-provider).
241+
Once the Offering has been generated, you can store it in your database using code as shown in the [Exchange API Provider section](/docs/tbdex/pfi/anatomy-of-a-pfi#exchange-api-provider).

site/docs/web5/build/apps/dinger-tutorial.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ pnpm start:tutorial-dinger-starter
4848

4949
[![Play in CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/TBD54566975/developer.tbd.website/tree/main/examples/tutorials/dinger-starter)
5050

51-
<details><summary>Finished Dinger App</summary>
51+
<details>
52+
<summary>Finished Dinger App</summary>
5253
<p>
5354

5455
If you’d like to skip ahead and see the finished version of this tutorial, you can check out the running app on CodeSandbox.
@@ -151,7 +152,7 @@ And replace it with the following code snippet:
151152
});
152153
```
153154
### 🧩 Breaking it down
154-
- **web5.dwn.protocols.configure():** This function installs the protocol. The protocol needs to be installed because it ensures that both the sender's and recipient's applications (or Decentralized Web Nodes - DWNs) are aligned in terms of communication standards and data formats.
155+
- **web5.dwn.protocols.configure():** This function installs the protocol. The protocol needs to be installed because it ensures that both the sender's and recipient's applications (or Decentralized Web Nodes - DWNs) are aligned in terms of communication standards and data formats.
155156

156157
## Level 5: Query the protocol
157158
### 📝 Task
@@ -189,17 +190,17 @@ const { protocols: localProtocol, status: localProtocolStatus } = await queryFor
189190
console.log({ localProtocol, localProtocolStatus });
190191

191192
if (localProtocolStatus.code !== 200 || localProtocol.length === 0) {
192-
193+
193194
const { protocol, status } = await installProtocolLocally(web5, protocolDefinition);
194195
console.log("Protocol installed locally", protocol, status);
195196
const { status: configureRemoteStatus } = await protocol.send(did);
196197
console.log("Did the protocol install on the remote DWN?", configureRemoteStatus);
197-
198+
198199
} else {
199200
console.log("Protocol already installed");
200201
}
201202
```
202-
- **configureProtocol()**: This function is responsible for configuring the protocol in both the local and remote DWNs. It first checks if the protocol is already installed locally. If not, it installs the protocol locally and then attempts to install it on the remote DWN associated with the user's DID.
203+
- **configureProtocol()**: This function is responsible for configuring the protocol in both the local and remote DWNs. It first checks if the protocol is already installed locally. If not, it installs the protocol locally and then attempts to install it on the remote DWN associated with the user's DID.
203204

204205
### 📘 Learn more
205206
- Learn more about [protocols](https://developer.tbd.website/docs/web5/learn/protocols/).
@@ -391,7 +392,8 @@ Time to test the Dinger app by simulating a conversation between two users by us
391392

392393
After following these steps, you should see a conversation taking place between the two browser sessions!
393394

394-
<details><summary>Not receiving any messages?</summary>
395+
<details>
396+
<summary>Not receiving any messages?</summary>
395397
<a href="https://developer.tbd.website/docs/web5/learn/sync/">Sync</a> intervals occur every two minutes. If you're eager to see immediate updates for testing purposes, you can adjust the sync settings. Update the line:
396398

397399
```javascript title="src/pages/index.js"

site/docs/web5/build/apps/shared-todo-app.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ pnpm start:tutorial-shared-todo-starter
5050

5151
[![Play in CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/TBD54566975/developer.tbd.website/tree/main/examples/tutorials/shared-todo-starter)
5252

53-
<details><summary>Finished Shared Todo App</summary>
53+
<details>
54+
<summary>Finished Shared Todo App</summary>
5455
<p>
5556

5657
If you’d like to skip ahead and see the finished version of this tutorial, you can check out the running app on CodeSandbox.
@@ -571,7 +572,7 @@ async function toggleTodoComplete(todoItem) {
571572
const { record } = await web5.dwn.records.read({
572573
message: {
573574
filter: {
574-
recordId: toggledTodo.id
575+
recordId: toggledTodo.id
575576
}
576577
}
577578
});
@@ -593,4 +594,4 @@ async function toggleTodoComplete(todoItem) {
593594

594595
Congratulations! We've just built a multi-paged, collaborative and decentralized web app that can be used by multiple users. You can check out the finished version of the app running on CodeSandbox.
595596

596-
[![Play in CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/TBD54566975/developer.tbd.website/tree/main/examples/tutorials/shared-todo-completed)
597+
[![Play in CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/TBD54566975/developer.tbd.website/tree/main/examples/tutorials/shared-todo-completed)

site/docs/web5/build/apps/todo-app-tutorial.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ pnpm start:tutorial-todo-starter
3131

3232
In this tutorial, you’ll work through completing the `src/App.vue` file under `/examples/tutorials/todo-starter` to use `web5.js`.
3333

34-
<details><summary>Finished ToDo App</summary>
34+
<details>
35+
<summary>Finished ToDo App</summary>
3536
<p>
3637

3738
If you’d like to skip ahead and see the finished version of this tutorial, you can check out the running app on CodeSandbox.

0 commit comments

Comments
 (0)