Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/cmc-get-default-subnets' in…
Browse files Browse the repository at this point in the history
…to feat/cmc-get-default-subnets
  • Loading branch information
peterpeterparker committed Oct 14, 2024
2 parents 83fdb92 + 9d1eae6 commit e4f9264
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/cmc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const rate = await getIcpToCyclesConversionRate();
- [getIcpToCyclesConversionRate](#gear-geticptocyclesconversionrate)
- [notifyCreateCanister](#gear-notifycreatecanister)
- [notifyTopUp](#gear-notifytopup)
- [getDefaultSubnets](#gear-getdefaultsubnets)

##### :gear: create

Expand Down Expand Up @@ -104,4 +105,21 @@ It returns the new Cycles of the canister.

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

##### :gear: getDefaultSubnets

This function calls the `get_default_subnets` method of the CMC canister, which returns a list of
default subnets as `Principal` objects. It can be called as query or update.

| Method | Type |
| ------------------- | ------------------------------------------------------- |
| `getDefaultSubnets` | `({ certified }?: QueryParams) => Promise<Principal[]>` |

Parameters:

- `params`: - The query parameters for the call.
- `params.certified`: - Determines whether the response should be certified
(default: non-certified if not specified).

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

<!-- TSDOC_END -->

0 comments on commit e4f9264

Please sign in to comment.