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 26, 2023
1 parent d0fb287 commit ca1d82b
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions packages/ledger-icp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const data = await metadata();

##### :gear: create

| Method | Type |
| -------- | ---------------------------------------------------------------------- |
| Method | Type |
| ---------- | ---------- |
| `create` | `(options: IcrcLedgerCanisterOptions<_SERVICE>) => IcrcLedgerCanister` |

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger/src/ledger.canister.ts#L28)
Expand All @@ -83,8 +83,8 @@ const data = await metadata();

The token metadata (name, symbol, etc.).

| Method | Type |
| ---------- | ------------------------------------------------------------- |
| Method | Type |
| ---------- | ---------- |
| `metadata` | `(params: QueryParams) => Promise<IcrcTokenMetadataResponse>` |

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger/src/ledger.canister.ts#L42)
Expand All @@ -93,8 +93,8 @@ The token metadata (name, symbol, etc.).

The ledger transaction fees.

| Method | Type |
| ---------------- | ------------------------------------------ |
| Method | Type |
| ---------- | ---------- |
| `transactionFee` | `(params: QueryParams) => Promise<bigint>` |

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger/src/ledger.canister.ts#L50)
Expand All @@ -103,36 +103,38 @@ The ledger transaction fees.

Returns the balance for a given account provided as owner and with optional subaccount.

| Method | Type |
| --------- | -------------------------------------------- |
| Method | Type |
| ---------- | ---------- |
| `balance` | `(params: BalanceParams) => Promise<bigint>` |

Parameters:

- `params`: The parameters to get the balance of an account.
* `params`: The parameters to get the balance of an account.


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

##### :gear: transfer

Transfers tokens from the sender to the given account.

| Method | Type |
| ---------- | --------------------------------------------- |
| Method | Type |
| ---------- | ---------- |
| `transfer` | `(params: TransferParams) => Promise<bigint>` |

Parameters:

- `params`: The parameters to transfer tokens.
* `params`: The parameters to transfer tokens.


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

##### :gear: totalTokensSupply

Returns the total supply of tokens.

| Method | Type |
| ------------------- | ------------------------------------------ |
| Method | Type |
| ---------- | ---------- |
| `totalTokensSupply` | `(params: QueryParams) => Promise<bigint>` |

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/ledger/src/ledger.canister.ts#L88)
Expand All @@ -143,13 +145,14 @@ Transfers a token amount from the `from` account to the `to` account using the a

Reference: https://github.com/dfinity/ICRC-1/blob/main/standards/ICRC-2/README.md#icrc2_transfer_from

| Method | Type |
| -------------- | ------------------------------------------------- |
| Method | Type |
| ---------- | ---------- |
| `transferFrom` | `(params: TransferFromParams) => Promise<bigint>` |

Parameters:

- `params`: The parameters to transfer tokens from to.
* `params`: The parameters to transfer tokens from to.


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

Expand All @@ -159,13 +162,14 @@ This method entitles the `spender` to transfer token `amount` on behalf of the c

Reference: https://github.com/dfinity/ICRC-1/blob/main/standards/ICRC-2/README.md#icrc2_approve

| Method | Type |
| --------- | -------------------------------------------- |
| Method | Type |
| ---------- | ---------- |
| `approve` | `(params: ApproveParams) => Promise<bigint>` |

Parameters:

- `params`: The parameters to approve.
* `params`: The parameters to approve.


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

Expand All @@ -175,16 +179,18 @@ Returns the token allowance that the `spender` account can transfer from the spe

Reference: https://github.com/dfinity/ICRC-1/blob/main/standards/ICRC-2/README.md#icrc2_allowance

| Method | Type |
| ----------- | ------------------------------------------------- |
| Method | Type |
| ---------- | ---------- |
| `allowance` | `(params: AllowanceParams) => Promise<Allowance>` |

Parameters:

- `params`: The parameters to call the allowance.
* `params`: The parameters to call the allowance.


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


<!-- TSDOC_END -->

## Resources
Expand Down

0 comments on commit ca1d82b

Please sign in to comment.