Skip to content

Commit 22f0f9b

Browse files
Merge pull request #1153 from Agoric/rs-orch-api
Improvements in Orch API docs
2 parents d40b03e + 1c6ffe4 commit 22f0f9b

File tree

1 file changed

+29
-15
lines changed
  • main/guides/orchestration/getting-started

1 file changed

+29
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,100 @@
11
# Orchestration API
22

3-
The Agoric Orchestration API enables developers to seamlessly manage and interact with accounts across multiple blockchain networks, simplifying the complexities of cross-chain operations.
3+
The Agoric [Orchestration](/glossary/#orchestration) API enables developers to seamlessly manage and interact with accounts across multiple blockchain networks, simplifying the complexities of cross-chain operations.
44

55
See [Orchestration API Spec](https://agoric-sdk.pages.dev/modules/_agoric_orchestration)
66

77
## Orchestrator Interface
88

9-
The `Orchestrator` interface provides a set of high-level methods to manage and interact with interchain accounts. Below are the primary methods:
9+
The [`Orchestrator`](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator) interface provides a set of high-level methods to manage and interact with interchain accounts. Below are the primary methods:
1010

11-
### `getChain`
12-
Retrieves the chain information and provides access to chain-specific methods.
11+
### getChain
12+
13+
Retrieves the chain information and provides access to chain-specific methods. See [getChain](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#getChain).
1314

1415
```javascript
1516
const chain = await orchestrator.getChain('chainName');
1617
```
1718

1819
### makeLocalAccount
19-
Creates a new LocalChainAccount.
20+
Creates a new `LocalChainAccount`. See [makeLocalAccount](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#makeLocalAccount).
2021

2122
```javascript
2223
const localAccount = await orchestrator.makeLocalAccount();
2324
```
2425

2526
### getBrandInfo
26-
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.
27+
28+
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. See [getBrandInfo](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#getBrandInfo).
2729

2830
```javascript
2931
const brandInfo = orchestrator.getBrandInfo('denom');
3032
```
3133

3234
### asAmount
33-
Converts a denom amount to an `Amount` with a brand.
35+
36+
Converts a denom amount to an `Amount` with a brand. See [asAmount](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#asAmount).
3437

3538
```javascript
3639
const amount = orchestrator.asAmount({ denom: 'uatom', value: 1000n });
3740
```
3841

39-
## OrchestrationAccount Interface
40-
Orchestration accounts provide high-level operations for managing accounts on remote chains. Below are the primary methods available:
42+
## OrchestrationAccount
43+
44+
An [`OrchestrationAccount`](https://agoric-sdk.pages.dev/types/_agoric_orchestration.OrchestrationAccount) is a type alias that combines the [`OrchestrationAccountI`](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI) interface with additional methods. Below are the primary methods available:
4145

4246
### getAddress
43-
Retrieves the address of the account on the remote chain.
47+
48+
Retrieves the address of the account on the remote chain. See [getAddress](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#getAddress).
49+
4450
```javascript
4551
const address = await orchestrationAccount.getAddress();
4652
```
4753

4854
### getBalances
49-
Returns an array of amounts for every balance in the account.
55+
56+
Returns an array of amounts for every balance in the account. See [getBalances](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#getBalances).
5057

5158
```javascript
5259
const balances = await orchestrationAccount.getBalances();
5360
```
5461

5562
### getBalance
56-
Retrieves the balance of a specific denom for the account.
63+
64+
Retrieves the balance of a specific denom for the account. See [getBalance](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#getBalance).
5765

5866
```javascript
5967
const balance = await orchestrationAccount.getBalance('uatom');
6068
```
6169

6270
### send
63-
Transfers an amount to another account on the same chain. The promise settles when the transfer is complete.
71+
72+
Transfers an amount to another account on the same chain. The promise settles when the transfer is complete. See [send](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#send).
6473

6574
```javascript
6675
await orchestrationAccount.send(receiverAddress, amount);
6776
```
6877

6978
### transfer
70-
Transfers an amount to another account, typically on another chain. The promise settles when the transfer is complete.
79+
80+
Transfers an amount to another account, typically on another chain. The promise settles when the transfer is complete. See [transfer](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#transfer).
7181

7282
```javascript
7383
await orchestrationAccount.transfer(amount, destinationAddress);
7484
```
7585

7686
### transferSteps
77-
Transfers an amount to another account in multiple steps. The promise settles when the entire path of the transfer is complete.
87+
88+
Transfers an amount to another account in multiple steps. The promise settles when the entire path of the transfer is complete. See [transferSteps](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#transferSteps).
89+
7890
```javascript
7991
await orchestrationAccount.transferSteps(amount, transferMsg);
8092
```
8193

8294
### deposit
95+
8396
Deposits payment from Zoe to the account. For remote accounts, an IBC Transfer will be executed to transfer funds there.
97+
8498
```javascript
8599
await orchestrationAccount.deposit(payment);
86100
```

0 commit comments

Comments
 (0)