From 105b7455dbf9b5ff105145b829da4d21f807b08f Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 07:37:41 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Documentation=20auto-update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ledger-icp/README.md | 45 ++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/packages/ledger-icp/README.md b/packages/ledger-icp/README.md index d9ececcd3..039c3db7e 100644 --- a/packages/ledger-icp/README.md +++ b/packages/ledger-icp/README.md @@ -170,7 +170,7 @@ const data = await metadata(); ### :factory: LedgerCanister -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L32) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L34) #### Methods @@ -186,7 +186,7 @@ const data = await metadata(); | -------- | ----------------------------------------------------- | | `create` | `(options?: LedgerCanisterOptions) => LedgerCanister` | -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L43) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L45) ##### :gear: accountBalance @@ -195,11 +195,17 @@ Returns the balance of the specified account identifier. If `certified` is true, the request is fetched as an update call, otherwise it is fetched using a query call. -| Method | Type | -| ---------------- | ------------------------------------------------------------------------------------------------------------------------ | -| `accountBalance` | `({ accountIdentifier, certified, }: { accountIdentifier: AccountIdentifier; certified?: boolean; }) => Promise` | +| Method | Type | +| ---------------- | ------------------------------------------------------------------------------------------------------ | +| `accountBalance` | `({ accountIdentifier: accountIdentifierParam, certified, }: AccountBalanceParams) => Promise` | -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L75) +Parameters: + +- `params`: The parameters to get the balance of an account. +- `params.accountIdentifier`: The account identifier provided either as hex string or as an AccountIdentifier. +- `params.certified`: query or update call. + +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L81) ##### :gear: transactionFee @@ -209,7 +215,7 @@ Returns the transaction fee of the ledger canister | ---------------- | ----------------------- | | `transactionFee` | `() => Promise` | -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L99) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L104) ##### :gear: transfer @@ -220,7 +226,7 @@ Returns the index of the block containing the tx if it was successful. | ---------- | ----------------------------------------------- | | `transfer` | `(request: TransferRequest) => Promise` | -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L112) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L117) ##### :gear: icrc1Transfer @@ -231,15 +237,16 @@ Returns the index of the block containing the tx if it was successful. | --------------- | ---------------------------------------------------- | | `icrc1Transfer` | `(request: Icrc1TransferRequest) => Promise` | -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L142) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L147) ### :factory: IndexCanister -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/index.canister.ts#L7) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/index.canister.ts#L9) #### Methods - [create](#gear-create) +- [accountBalance](#gear-accountbalance) ##### :gear: create @@ -247,7 +254,23 @@ Returns the index of the block containing the tx if it was successful. | -------- | --------------------------------------------------------------------------------------------- | | `create` | `({ canisterId: optionsCanisterId, ...options }: CanisterOptions<_SERVICE>) => IndexCanister` | -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/index.canister.ts#L8) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/index.canister.ts#L10) + +##### :gear: accountBalance + +Returns the balance of the specified account identifier. + +| Method | Type | +| ---------------- | ------------------------------------------------------------------------------ | +| `accountBalance` | `({ certified, accountIdentifier, }: AccountBalanceParams) => Promise` | + +Parameters: + +- `params`: The parameters to get the balance of an account. +- `params.accountIdentifier`: The account identifier provided either as hex string or as an AccountIdentifier. +- `params.certified`: query or update call. + +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/index.canister.ts#L35)