-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poc orch docs, key-concepts- introduction, and dapp pages #1132
Merged
Merged
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
29ef035
poc orch docs, key-concepts- introduction, and dapp pages
Jovonni 356d2a0
removed duplicate intro section from key concepts
Jovonni 4d73d8d
arrangement fixes, editorial, and syntax fixes for key concepts.
Jovonni b9c4ded
type fix: added swap example link
Jovonni dfb9d67
fixed ica glossary item typo
Jovonni d614618
added vow to glossary, and move vow tools to contract upgrade
Jovonni 6b2d672
removed image
Jovonni 507975a
added api page, cleanup
Jovonni 19f141d
added orchestration to main navigation
mitdralla cd982f7
added orchestration use case workflow 1
Jovonni bd5b331
added orchestration use case workflow 1
Jovonni e68acb1
WIP contract walkthroughs for swap and unbond
Jovonni c12268f
WIP contract walkthrough sequence diagrams
Jovonni 32776c2
added mmd source
Jovonni 7f4317c
typo fix
Jovonni ba5ddce
doc updates for swap walkthrough
Jovonni 50546a5
removed link to asset kind, not created yet :)
Jovonni 8841590
removed lorem
Jovonni 61a02d2
removed uneccesary object access overview sentence
Jovonni 6b85d68
Merge branch 'main' into dev/orch-overview-contract-concepts
Jovonni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) | ||||||
|
||||||
## API Surface Functions | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
The Orchestration API provides a set of high-level functions to manage and interact with interchain accounts. Below are the primary functions available to developers: | ||||||
|
||||||
### getChain | ||||||
Retrieves the chain information and provides access to chain-specific methods. | ||||||
|
||||||
```javascript | ||||||
const chain = await orchestrator.getChain('chainName'); | ||||||
``` | ||||||
|
||||||
### makeLocalAccount | ||||||
Creates a new local chain account. | ||||||
|
||||||
```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 a local structured Amount. | ||||||
|
||||||
```javascript | ||||||
const amount = orchestrator.asAmount({ denom: 'uatom', value: 1000n }); | ||||||
``` | ||||||
|
||||||
## Orchestration Account Functions | ||||||
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. | ||||||
|
||||||
``` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is missing syntax highlighting for 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's worth working on but I'm a very visual person so I like graphs. In my mind I kinda produced below graph that helped me mentally:
Worth adding something like this graph(albeit a lot more nicely looking) at the top of this page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love this idea! @LuqiPan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a great idea @LuqiPan, having a visual up top is impactful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we've had pretty good luck with mermaid sequence diagrams
e.g. there are several in the Trading with Offer Safety walkthru
Note that both the mermaid source and generated .svg are checked in
There's a nice vs-code extension for generating the .svg with one key