Skip to content

Commit

Permalink
🤖 Documentation auto-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 3, 2024
1 parent 9a576fb commit af5861a
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions packages/ledger-icp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const data = await metadata();

### :factory: LedgerCanister

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L31)
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L36)

#### Methods

Expand All @@ -173,14 +173,15 @@ const data = await metadata();
- [transfer](#gear-transfer)
- [icrc1Transfer](#gear-icrc1transfer)
- [icrc2Approve](#gear-icrc2approve)
- [icrc21ConsentMessage](#gear-icrc21consentmessage)

##### :gear: create

| Method | Type |
| -------- | ----------------------------------------------------- |
| `create` | `(options?: LedgerCanisterOptions) => 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#L37)

##### :gear: accountBalance

Expand All @@ -199,7 +200,7 @@ Parameters:
- `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#L60)
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L65)

##### :gear: metadata

Expand All @@ -213,7 +214,7 @@ Parameters:

- `params`: - The parameters used to fetch the metadata, notably query or certified call.

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L79)
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L84)

##### :gear: transactionFee

Expand All @@ -227,7 +228,7 @@ Parameters:

- `params`: - Optional query parameters for the request, defaulting to `{ certified: false }` for backwards compatibility reason.

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L90)
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L95)

##### :gear: transfer

Expand All @@ -238,7 +239,7 @@ Returns the index of the block containing the tx if it was successful.
| ---------- | ----------------------------------------------- |
| `transfer` | `(request: TransferRequest) => Promise<bigint>` |

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L108)
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L113)

##### :gear: icrc1Transfer

Expand All @@ -249,7 +250,7 @@ Returns the index of the block containing the tx if it was successful.
| --------------- | ---------------------------------------------------- |
| `icrc1Transfer` | `(request: Icrc1TransferRequest) => Promise<bigint>` |

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L128)
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L133)

##### :gear: icrc2Approve

Expand All @@ -265,7 +266,23 @@ Parameters:

- `params`: - The parameters to approve.

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L148)
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L153)

##### :gear: icrc21ConsentMessage

Fetches the consent message for a specified canister call, intended to provide a human-readable message that helps users make informed decisions.

Reference: https://github.com/dfinity/wg-identity-authentication/blob/main/topics/ICRC-21/icrc_21_consent_msg.md

| Method | Type |
| ---------------------- | ----------------------------------------------------------------------- |
| `icrc21ConsentMessage` | `(params: Icrc21ConsentMessageRequest) => Promise<icrc21_consent_info>` |

Parameters:

- `params`: - The request parameters containing the method name, arguments, and consent preferences (e.g., language).

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp/src/ledger.canister.ts#L175)

### :factory: IndexCanister

Expand Down

0 comments on commit af5861a

Please sign in to comment.