-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
poc orch docs, key-concepts- introduction, and dapp pages (#1132)
* poc orch docs, key-concepts- introduction, and dapp pages * removed duplicate intro section from key concepts * arrangement fixes, editorial, and syntax fixes for key concepts. * type fix: added swap example link * fixed ica glossary item typo * added vow to glossary, and move vow tools to contract upgrade * removed image * added api page, cleanup * added orchestration to main navigation * added orchestration use case workflow 1 * added orchestration use case workflow 1 * WIP contract walkthroughs for swap and unbond * WIP contract walkthrough sequence diagrams * added mmd source * typo fix * doc updates for swap walkthrough * removed link to asset kind, not created yet :) * removed lorem * removed uneccesary object access overview sentence --------- Co-authored-by: mitdralla <[email protected]>
- Loading branch information
Showing
24 changed files
with
10,088 additions
and
5,682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Orchestration API | ||
|
||
The Agoric Orchestration API enables developers to seamlessly manage and interact with accounts across multiple blockchain networks, simplifying the complexities of cross-chain operations. | ||
|
||
See [Orchestration API Spec](https://agoric-sdk.pages.dev/modules/_agoric_orchestration) | ||
|
||
## Orchestrator Interface | ||
|
||
The `Orchestrator` interface provides a set of high-level methods to manage and interact with interchain accounts. Below are the primary methods: | ||
|
||
### `getChain` | ||
Retrieves the chain information and provides access to chain-specific methods. | ||
|
||
```javascript | ||
const chain = await orchestrator.getChain('chainName'); | ||
``` | ||
|
||
### makeLocalAccount | ||
Creates a new `LocalchainAccount`. | ||
|
||
```javascript | ||
const localAccount = await orchestrator.makeLocalAccount(); | ||
``` | ||
|
||
### getBrandInfo | ||
Returns information about a `denom`, including the equivalent local Brand, the chain where the denom is held, and the chain that issues the corresponding asset. | ||
|
||
```javascript | ||
const brandInfo = orchestrator.getBrandInfo('denom'); | ||
``` | ||
|
||
### asAmount | ||
Converts a denom amount to an `Amount` with a brand. | ||
|
||
```javascript | ||
const amount = orchestrator.asAmount({ denom: 'uatom', value: 1000n }); | ||
``` | ||
|
||
## OrchestrationAccount Interface | ||
Orchestration accounts provide high-level operations for managing accounts on remote chains. Below are the primary methods available: | ||
|
||
### getAddress | ||
Retrieves the address of the account on the remote chain. | ||
```javascript | ||
const address = await orchestrationAccount.getAddress(); | ||
``` | ||
|
||
### getBalances | ||
Returns an array of amounts for every balance in the account. | ||
|
||
```javascript | ||
const balances = await orchestrationAccount.getBalances(); | ||
``` | ||
|
||
### getBalance | ||
Retrieves the balance of a specific denom for the account. | ||
|
||
```javascript | ||
const balance = await orchestrationAccount.getBalance('uatom'); | ||
``` | ||
|
||
### send | ||
Transfers an amount to another account on the same chain. The promise settles when the transfer is complete. | ||
|
||
```javascript | ||
await orchestrationAccount.send(receiverAddress, amount); | ||
``` | ||
|
||
### transfer | ||
Transfers an amount to another account, typically on another chain. The promise settles when the transfer is complete. | ||
|
||
```javascript | ||
await orchestrationAccount.transfer(amount, destinationAddress); | ||
``` | ||
|
||
### transferSteps | ||
Transfers an amount to another account in multiple steps. The promise settles when the entire path of the transfer is complete. | ||
```javascript | ||
await orchestrationAccount.transferSteps(amount, transferMsg); | ||
``` | ||
|
||
### deposit | ||
Deposits payment from Zoe to the account. For remote accounts, an IBC Transfer will be executed to transfer funds there. | ||
```javascript | ||
await orchestrationAccount.deposit(payment); | ||
``` |
Oops, something went wrong.