Skip to content

Commit

Permalink
chore: adding mermaid plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
amessbee committed Oct 14, 2024
1 parent daa85f9 commit 729b802
Show file tree
Hide file tree
Showing 7 changed files with 979 additions and 15 deletions.
4 changes: 2 additions & 2 deletions main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig } from 'vitepress';
import { nav } from './themeConfig/nav.js';
import { rewrites } from './themeConfig/rewrites.js';
import { withMermaid } from "vitepress-plugin-mermaid";

export default defineConfig({
export default withMermaid({
/* --- FOR DEPLOYMENT TO GITHUB PAGES--- */
base: '/', // The base URL the site will be deployed at.
outDir: '../dist',
Expand Down
Binary file modified main/guides/orchestration/assets/chains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/guides/orchestration/assets/chains2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed main/guides/orchestration/assets/chains4.png
Binary file not shown.
42 changes: 31 additions & 11 deletions main/guides/orchestration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ Agoric’s Orchestration APIs simplify controlling accounts on remote chains, mo
<img src="./assets/chains.png" width="100%" />
<br/>

<br/>
<img src="./assets/chains4.png" width="100%" />
<br/>

<br/>
<img src="./assets/chains5.png" width="100%" />
<br/>

## Orchestration Overview

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.
Expand All @@ -36,6 +28,34 @@ The Orchestration API handles asynchronous tasks and complex workflows, includin

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.

<br/>
<img src="/reference/assets/sequence-diagrams/orchestration-workflow-1.svg" width="100%" />
<br/>
```mermaid
---
title: Orchestration Osmosis Transfer Example
---
sequenceDiagram
participant contract
contract->>OrchLib: provideOrchestration
OrchLib --> contract: orch
create participant orch
contract --> orch: getChain('osmosis')
orch->>AgoricNames: lookup('chain', 'osmosis')
AgoricNames-->>orch: ChainInfo for osmosis
orch --> contract: osmosis chain object
participant osmosis
contract->>osmosis: makeAccount()
osmosis --> contract: osmoAccount123
create participant osmoAccount123
contract->>osmoAccount123: getAddress()
contract->>osmoAccount123: getBalances()
contract->>osmoAccount123: send(amount, receiverAddress)
osmoAccount123-->>contract: Transaction Status
%% note Cross-Chain Operation
contract->>osmoAccount123: transferSteps(amount, transferMsg)
%% note Execute Steps Across Chains
osmoAccount123-->>contract: Transfer Complete
```
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@
"eslint-plugin-prettier": "^5.2.1",
"glob": "7.1.7",
"import-meta-resolve": "^2.2.2",
"mermaid": "^11.3.0",
"prettier": "^3.3.3",
"ses": "^1.8.0",
"stylus": "^0.62.0",
"vitepress": "1.3.4"
"vitepress": "1.3.4",
"vitepress-plugin-mermaid": "^2.0.17"
},
"globals": {
"harden": "readonly"
Expand Down
Loading

0 comments on commit 729b802

Please sign in to comment.