From 9d1eae679e62cd2c68d6fd44b9054456335d9acd Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:56:49 +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/cmc/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/cmc/README.md b/packages/cmc/README.md index e06541f7..d1bc2d57 100644 --- a/packages/cmc/README.md +++ b/packages/cmc/README.md @@ -63,6 +63,7 @@ const rate = await getIcpToCyclesConversionRate(); - [getIcpToCyclesConversionRate](#gear-geticptocyclesconversionrate) - [notifyCreateCanister](#gear-notifycreatecanister) - [notifyTopUp](#gear-notifytopup) +- [getDefaultSubnets](#gear-getdefaultsubnets) ##### :gear: create @@ -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` | + +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) +