Skip to content

Commit 4fae29d

Browse files
committed
chore: adding mermaid plugin
1 parent daa85f9 commit 4fae29d

File tree

4 files changed

+979
-14
lines changed

4 files changed

+979
-14
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-11
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,10 @@ The Agoric Orchestration API sits on top of Agoric’s novel VM that provides th
1010

1111
Agoric’s Orchestration APIs simplify controlling accounts on remote chains, moving assets, and using capabilities on any chain the API reaches.
1212

13-
<br/>
14-
<img src="./assets/chains.png" width="100%" />
15-
<br/>
16-
1713
<br/>
1814
<img src="./assets/chains4.png" width="100%" />
1915
<br/>
2016

21-
<br/>
22-
<img src="./assets/chains5.png" width="100%" />
23-
<br/>
24-
2517
## Orchestration Overview
2618

2719
Agoric's Orchestration API is a tool to help developers build seamless applications out of disparate interoperable chains and services. This composability allows for the development of user-centric applications that leverage the unique strengths of different blockchain ecosystems.
@@ -36,6 +28,34 @@ The Orchestration API handles asynchronous tasks and complex workflows, includin
3628

3729
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.
3830

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

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)