@dfinity/cmc 3.2.2-next-2024-10-13 → 3.2.2-next-2024-10-17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ const rate = await getIcpToCyclesConversionRate();
|
|
|
55
55
|
|
|
56
56
|
### :factory: CMCCanister
|
|
57
57
|
|
|
58
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#
|
|
58
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#L14)
|
|
59
59
|
|
|
60
60
|
#### Methods
|
|
61
61
|
|
|
@@ -63,6 +63,7 @@ const rate = await getIcpToCyclesConversionRate();
|
|
|
63
63
|
- [getIcpToCyclesConversionRate](#gear-geticptocyclesconversionrate)
|
|
64
64
|
- [notifyCreateCanister](#gear-notifycreatecanister)
|
|
65
65
|
- [notifyTopUp](#gear-notifytopup)
|
|
66
|
+
- [getDefaultSubnets](#gear-getdefaultsubnets)
|
|
66
67
|
|
|
67
68
|
##### :gear: create
|
|
68
69
|
|
|
@@ -70,7 +71,7 @@ const rate = await getIcpToCyclesConversionRate();
|
|
|
70
71
|
| -------- | ---------------------------------------------- |
|
|
71
72
|
| `create` | `(options: CMCCanisterOptions) => CMCCanister` |
|
|
72
73
|
|
|
73
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#
|
|
74
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#L15)
|
|
74
75
|
|
|
75
76
|
##### :gear: getIcpToCyclesConversionRate
|
|
76
77
|
|
|
@@ -80,7 +81,7 @@ Returns conversion rate of ICP to Cycles
|
|
|
80
81
|
| ------------------------------ | ----------------------- |
|
|
81
82
|
| `getIcpToCyclesConversionRate` | `() => Promise<bigint>` |
|
|
82
83
|
|
|
83
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#
|
|
84
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#L31)
|
|
84
85
|
|
|
85
86
|
##### :gear: notifyCreateCanister
|
|
86
87
|
|
|
@@ -91,7 +92,7 @@ It returns the new canister principal.
|
|
|
91
92
|
| ---------------------- | ---------------------------------------------------------- |
|
|
92
93
|
| `notifyCreateCanister` | `(request: NotifyCreateCanisterArg) => Promise<Principal>` |
|
|
93
94
|
|
|
94
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#
|
|
95
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#L48)
|
|
95
96
|
|
|
96
97
|
##### :gear: notifyTopUp
|
|
97
98
|
|
|
@@ -102,6 +103,23 @@ It returns the new Cycles of the canister.
|
|
|
102
103
|
| ------------- | ---------------------------------------------- |
|
|
103
104
|
| `notifyTopUp` | `(request: NotifyTopUpArg) => Promise<bigint>` |
|
|
104
105
|
|
|
105
|
-
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#
|
|
106
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#L76)
|
|
107
|
+
|
|
108
|
+
##### :gear: getDefaultSubnets
|
|
109
|
+
|
|
110
|
+
This function calls the `get_default_subnets` method of the CMC canister, which returns a list of
|
|
111
|
+
default subnets as `Principal` objects. It can be called as query or update.
|
|
112
|
+
|
|
113
|
+
| Method | Type |
|
|
114
|
+
| ------------------- | ------------------------------------------------------- |
|
|
115
|
+
| `getDefaultSubnets` | `({ certified }?: QueryParams) => Promise<Principal[]>` |
|
|
116
|
+
|
|
117
|
+
Parameters:
|
|
118
|
+
|
|
119
|
+
- `params`: - The query parameters for the call.
|
|
120
|
+
- `params.certified`: - Determines whether the response should be certified
|
|
121
|
+
(default: non-certified if not specified).
|
|
122
|
+
|
|
123
|
+
[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/cmc/src/cmc.canister.ts#L101)
|
|
106
124
|
|
|
107
125
|
<!-- TSDOC_END -->
|
package/package.json
CHANGED