Skip to content

Commit 026a281

Browse files
committed
chore: adding mermaid plugin
1 parent daa85f9 commit 026a281

File tree

4 files changed

+979
-6
lines changed

4 files changed

+979
-6
lines changed

main/.vitepress/config.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { defineConfig } from 'vitepress';
22
import { nav } from './themeConfig/nav.js';
33
import { rewrites } from './themeConfig/rewrites.js';
4+
import { withMermaid } from "vitepress-plugin-mermaid";
45

5-
export default defineConfig({
6+
export default withMermaid({
67
/* --- FOR DEPLOYMENT TO GITHUB PAGES--- */
78
base: '/', // The base URL the site will be deployed at.
89
outDir: '../dist',

main/guides/orchestration/index.md

+31-3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,34 @@ The Orchestration API handles asynchronous tasks and complex workflows, includin
3636

3737
The following sequence diagram provides a comprehensive overview of the Orchestration process within the Agoric platform. This example illustrates the interaction between various components, highlighting how the Orchestration library (`OrchLib`) facilitates cross-chain operations. This is a good first example to understand the flow of the Orchestration API, showing the steps involved in creating and managing cross-chain transactions.
3838

39-
<br/>
40-
<img src="/reference/assets/sequence-diagrams/orchestration-workflow-1.svg" width="100%" />
41-
<br/>
39+
```mermaid
40+
---
41+
title: Orchestration Osmosis Transfer Example
42+
---
43+
sequenceDiagram
44+
participant contract
45+
46+
contract->>OrchLib: provideOrchestration
47+
OrchLib --> contract: orch
48+
create participant orch
49+
contract --> orch: getChain('osmosis')
50+
orch->>AgoricNames: lookup('chain', 'osmosis')
51+
AgoricNames-->>orch: ChainInfo for osmosis
52+
orch --> contract: osmosis chain object
53+
54+
participant osmosis
55+
contract->>osmosis: makeAccount()
56+
osmosis --> contract: osmoAccount123
57+
58+
create participant osmoAccount123
59+
contract->>osmoAccount123: getAddress()
60+
61+
contract->>osmoAccount123: getBalances()
62+
contract->>osmoAccount123: send(amount, receiverAddress)
63+
osmoAccount123-->>contract: Transaction Status
64+
65+
%% note Cross-Chain Operation
66+
contract->>osmoAccount123: transferSteps(amount, transferMsg)
67+
%% note Execute Steps Across Chains
68+
osmoAccount123-->>contract: Transfer Complete
69+
```

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@
6767
"eslint-plugin-prettier": "^5.2.1",
6868
"glob": "7.1.7",
6969
"import-meta-resolve": "^2.2.2",
70+
"mermaid": "^11.3.0",
7071
"prettier": "^3.3.3",
7172
"ses": "^1.8.0",
7273
"stylus": "^0.62.0",
73-
"vitepress": "1.3.4"
74+
"vitepress": "1.3.4",
75+
"vitepress-plugin-mermaid": "^2.0.17"
7476
},
7577
"globals": {
7678
"harden": "readonly"

0 commit comments

Comments
 (0)