diff --git a/_redirects b/_redirects index db5cca4f3..1d99c0875 100644 --- a/_redirects +++ b/_redirects @@ -44,8 +44,18 @@ /guides/js-programming/ses/ses-guide.html https://github.com/endojs/endo/blob/HEAD/packages/ses/docs/guide.md /guides/js-programming/ses/ses-reference https://github.com/endojs/endo/blob/HEAD/packages/ses/docs/reference.md /guides/js-programming/ses/ses-reference.html https://github.com/endojs/endo/blob/HEAD/packages/ses/docs/reference.md +/guides/orchestration/getting-started/contract-walkthroughs /guides/orchestration/contract-walkthroughs +/guides/orchestration/getting-started/contract-walkthroughs.html /guides/orchestration/contract-walkthroughs +/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond /guides/orchestration/contract-walkthroughs/cross-chain-unbond +/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond.html /guides/orchestration/contract-walkthroughs/cross-chain-unbond +/guides/orchestration/getting-started/contract-walkthrough/orchestration-basics /guides/orchestration/orchestration-basics +/guides/orchestration/getting-started/contract-walkthrough/orchestration-basics.html /guides/orchestration/orchestration-basics +/guides/orchestration/getting-started/contract-walkthrough/send-anywhere /guides/orchestration/contract-walkthroughs/send-anywhere +/guides/orchestration/getting-started/contract-walkthrough/send-anywhere.html /guides/orchestration/contract-walkthroughs/send-anywhere +/guides/orchestration/getting-started/key-concepts /guides/orchestration/key-concepts +/guides/orchestration/getting-started/key-concepts.html /guides/orchestration/key-concepts /guides/wallet/api /reference/wallet-api/ -/guides/wallet/api.html /reference/wallet-api.html +/guides/wallet/api.html /reference/wallet-api.html /guides/wallet/api/* /reference/wallet-api/:splat /platform /guides/platform/ /platform /guides/platform/ diff --git a/main/.vitepress/config.mjs b/main/.vitepress/config.mjs index 3e51f0121..3f932c2a0 100644 --- a/main/.vitepress/config.mjs +++ b/main/.vitepress/config.mjs @@ -131,15 +131,15 @@ export default defineConfig({ }, { text: 'Contract Walkthroughs', - link: '/guides/orchestration/contract-walkthrough', + link: '/guides/orchestration/contract-walkthroughs', items: [ { text: 'Send Anywhere Example', - link: '/guides/orchestration/contract-walkthrough/send-anywhere', + link: '/guides/orchestration/contract-walkthroughs/send-anywhere', }, { text: 'Cross-Chain Unbond Example', - link: '/guides/orchestration/contract-walkthrough/cross-chain-unbond', + link: '/guides/orchestration/contract-walkthroughs/cross-chain-unbond', } ] }, diff --git a/main/.vitepress/themeConfig/nav.js b/main/.vitepress/themeConfig/nav.js index ff95de2cd..156cec831 100644 --- a/main/.vitepress/themeConfig/nav.js +++ b/main/.vitepress/themeConfig/nav.js @@ -22,11 +22,11 @@ export const nav = [ items: [ { text: 'Send Anywhere Example', - link: '/guides/orchestration/contract-walkthrough/send-anywhere', + link: '/guides/orchestration/contract-walkthroughs/send-anywhere', }, { text: 'Cross-Chain Unbond Example', - link: '/guides/orchestration/contract-walkthrough/cross-chain-unbond', + link: '/guides/orchestration/contract-walkthroughs/cross-chain-unbond', } ] }, diff --git a/main/guides/orchestration/contract-walkthrough/cross-chain-unbond.md b/main/guides/orchestration/contract-walkthroughs/cross-chain-unbond.md similarity index 100% rename from main/guides/orchestration/contract-walkthrough/cross-chain-unbond.md rename to main/guides/orchestration/contract-walkthroughs/cross-chain-unbond.md diff --git a/main/guides/orchestration/contract-walkthrough/index.md b/main/guides/orchestration/contract-walkthroughs/index.md similarity index 97% rename from main/guides/orchestration/contract-walkthrough/index.md rename to main/guides/orchestration/contract-walkthroughs/index.md index 203384dcb..9d2d1e3ff 100644 --- a/main/guides/orchestration/contract-walkthrough/index.md +++ b/main/guides/orchestration/contract-walkthroughs/index.md @@ -18,7 +18,7 @@ The "Send Anywhere" contract is a robust and secure solution for transferring as - The contract is resilient to failure, with built-in rollback mechanisms. - By using Agoric’s Orchestration tools, this contract provides a secure way to facilitate cross-chain asset transfers. -[See Contract Overview](/guides/orchestration/contract-walkthrough/send-anywhere) +[See Contract Overview](/guides/orchestration/contract-walkthroughs/send-anywhere) ## Unbond Contract @@ -28,4 +28,4 @@ The Unbond Contract focuses on the process of unbonding staked assets and perfor - Implementing delegation and undelegation logic. - Managing asynchronous operations and ensuring the completion of long-running processes. -[See Contract Overview](/guides/orchestration/contract-walkthrough/cross-chain-unbond) +[See Contract Overview](/guides/orchestration/contract-walkthroughs/cross-chain-unbond) diff --git a/main/guides/orchestration/contract-walkthrough/send-anywhere.md b/main/guides/orchestration/contract-walkthroughs/send-anywhere.md similarity index 100% rename from main/guides/orchestration/contract-walkthrough/send-anywhere.md rename to main/guides/orchestration/contract-walkthroughs/send-anywhere.md diff --git a/main/guides/orchestration/orchestration-basics/contract.md b/main/guides/orchestration/orchestration-basics/contract.md index 4f1068f96..5940717a0 100644 --- a/main/guides/orchestration/orchestration-basics/contract.md +++ b/main/guides/orchestration/orchestration-basics/contract.md @@ -8,7 +8,7 @@ files: 1. [`orca.contract.js`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/contract/src/orca.contract.js) 2. [`orca.flows.js`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/contract/src/orca.flows.js) -## Walkthrough: `orca.contract.js` +## `orca.contract.js` The `orca.contract.js` file brings in necessary dependencies and types from various Agoric packages. The `flows` import contains specific logic for the Orca contract offer handling operations. @@ -78,7 +78,7 @@ for (const [name, info] of entries(chainDetails)) { - **Creating Account and Funding Functions**: These functions are created using the `orchestrateAll` helper, which sets up the necessary flow logic for account creation and funding but the logic is implemented in `orca.flows.js` file - ([discussed below](#walkthrough-orcaflowsjs)). + ([discussed below](#orca-flows-js)). ```js const { makeAccount, makeCreateAndFund } = orchestrateAll(flows, { @@ -122,7 +122,7 @@ export const start = withOrchestration(contract); harden(start); ``` -## Walkthrough `orca.flows.js` +## `orca.flows.js` This section provides a walkthrough of the `orca.flows.js` file, which contains flow functions for the Orca contract. The `orca.flows.js` file defines two main functions: diff --git a/main/guides/orchestration/orchestration-basics/ui.md b/main/guides/orchestration/orchestration-basics/ui.md index db1331b97..dfe5a3c9d 100644 --- a/main/guides/orchestration/orchestration-basics/ui.md +++ b/main/guides/orchestration/orchestration-basics/ui.md @@ -2,46 +2,40 @@ Here, we will walkthrough the components making up the user interface for the Orchestration dApp. -## Orchestration.tsx +## `Orchestration` -The `Orchestration.tsx` component serves as the main controller for the Orchestration dApp's user interface. It manages +The [`Orchestration`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/ui/src/components/Orchestration/Orchestration.tsx) component serves as the main controller for the Orchestration dApp's user interface. It manages the state and interactions required for users to create accounts, manage their balances, and perform various blockchain transactions such as deposits, withdrawals, staking, and unstaking. -## AccountList.tsx +## `AccountList` -The `AccountList.tsx` component is responsible for displaying the list of user accounts and their associated balances in +The [`AccountList`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/ui/src/components/Orchestration/AccountList.tsx) component is responsible for displaying the list of user accounts and their associated balances in various native denoms. It presents account information in a structured and user-friendly format, allowing users to view and interact with their Orchestration Accounts directly. -## FetchBalances.tsx +## `FetchBalances` -The `FetchBalances.tsx` component is responsible for retrieving the balances of user accounts from different +The [`FetchBalances`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/ui/src/components/Orchestration/FetchBalances.tsx) component is responsible for retrieving the balances of user accounts from different blockchains. It interacts with the local RPC endpoints to fetch balance data for addresses on supported chains (for Osmosis and Agoric). -## RpcEndpoints.tsx +## `ChainSelector` -The `RpcEndpoints.tsx` component provides a convenient place to manage RPC endpoints for different chains, including -your local agoric instance, to be used by different components. This component is used by other components, like -`FetchBalances.tsx`, to interact with the correct blockchain network. +The [`ChainSelector`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/ui/src/components/Orchestration/ChainSelector.tsx) component provides a basic UI element for users to select the Cosmos chain they want to interact +with. The selected chain is passed back to the parent component, `Orchestration`, and used in further interactions. -## ChainSelector.tsx +## `MakeAccount` -The `ChainSelector.tsx` component provides a basic UI element for users to select the Cosmos chain they want to interact -with. The selected chain is passed back to the parent component, `Orchestration.tsx`, and used in further interactions. - -## `MakeAccount.tsx` - -The `MakeAccount.tsx` component provides a user interface for managing interchain accounts on the Agoric blockchain. It +The [`MakeAccount`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/ui/src/components/Orchestration/MakeAccount.tsx) component provides a user interface for managing interchain accounts on the Agoric blockchain. It allows users to create new accounts on selected chains (like Osmosis or Agoric), fetch and display balances of these accounts, and perform actions such as deposit. The component interacts with the Agoric wallet to make offers and uses RPC endpoints to retrieve account balances, incorporating loading states and notifications to enhance the user experience. -## `MakeOffer.tsx` +## `MakeOffer` -The `MakeOffer.tsx` component defines an asynchronous function `makeOffer` that facilitates making an offer through the +The [`MakeOffer`](https://github.com/Agoric/dapp-orchestration-basics/blob/main/ui/src/components/Orchestration/MakeOffer.tsx) component defines an asynchronous function `makeOffer` that facilitates making an offer through the Agoric wallet. It first checks if a `selectedChain` is provided and retrieves the necessary contract instance (specifically 'orca') and the `BLD` brand from the contract store. The function then constructs an offer where it gives a deposit of `1000` units of `BLD`. It initiates the offer using the wallet's `makeOffer` method, providing callbacks to