From 1c6ffe4bcce5dfb0543a7466f0f886e028678127 Mon Sep 17 00:00:00 2001 From: rabi-siddique Date: Wed, 10 Jul 2024 14:51:26 +0500 Subject: [PATCH] lint: format api docs with prettier --- main/guides/orchestration/getting-started/api.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/main/guides/orchestration/getting-started/api.md b/main/guides/orchestration/getting-started/api.md index 38f15c1da..17c336cb0 100644 --- a/main/guides/orchestration/getting-started/api.md +++ b/main/guides/orchestration/getting-started/api.md @@ -9,7 +9,8 @@ See [Orchestration API Spec](https://agoric-sdk.pages.dev/modules/_agoric_orches 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: ### getChain -Retrieves the chain information and provides access to chain-specific methods. See [getChain](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#getChain) + +Retrieves the chain information and provides access to chain-specific methods. See [getChain](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#getChain). ```javascript const chain = await orchestrator.getChain('chainName'); @@ -23,6 +24,7 @@ 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. See [getBrandInfo](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#getBrandInfo). ```javascript @@ -30,6 +32,7 @@ const brandInfo = orchestrator.getBrandInfo('denom'); ``` ### asAmount + Converts a denom amount to an `Amount` with a brand. See [asAmount](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.Orchestrator#asAmount). ```javascript @@ -37,15 +40,19 @@ const amount = orchestrator.asAmount({ denom: 'uatom', value: 1000n }); ``` ## OrchestrationAccount + 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: ### getAddress + Retrieves the address of the account on the remote chain. See [getAddress](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#getAddress). + ```javascript const address = await orchestrationAccount.getAddress(); ``` ### getBalances + Returns an array of amounts for every balance in the account. See [getBalances](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#getBalances). ```javascript @@ -53,6 +60,7 @@ const balances = await orchestrationAccount.getBalances(); ``` ### getBalance + Retrieves the balance of a specific denom for the account. See [getBalance](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#getBalance). ```javascript @@ -60,6 +68,7 @@ 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. See [send](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#send). ```javascript @@ -67,6 +76,7 @@ await orchestrationAccount.send(receiverAddress, amount); ``` ### transfer + 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). ```javascript @@ -74,13 +84,17 @@ 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. See [transferSteps](https://agoric-sdk.pages.dev/interfaces/_agoric_orchestration.OrchestrationAccountI#transferSteps). + ```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); ```