You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`coverId`| The ID of an existing cover to extend or modify, or 0 to create a new cover.|
154
+
|`owner`| The address that will own the cover NFT. |
155
+
|`productId`| The ID of the product to purchase cover for. |
156
+
|`coverAsset`| The asset ID used for coverage. See `Pool.getAssets` (e.g., 0 ~ ETH). |
157
+
|`amount`| The amount of coverage in the cover asset. |
158
+
|`period`| The duration of the cover in seconds. |
159
+
|`maxPremiumInAsset`| The maximum premium the buyer is willing to pay in the payment asset.|
160
+
|`paymentAsset`| The asset ID used for payment (must be coverAsset or NXM_ASSET_ID). |
161
+
|`commissionRatio`| The commission ratio (in basis points, where 10000 = 100%). |
162
+
|`commissionDestination`| The address where the commission should be sent. |
163
+
|`ipfsData`| IPFS hash of additional data related to the cover (e.g., list of wallet addresses). |
163
164
164
165
#### `PoolAllocationRequest` Structure:
165
166
@@ -177,13 +178,13 @@ To retrieve data to construct `PoolAllocationRequest`, call the `/quote` endpoin
177
178
|`poolId`| ID of the staking pool to allocate cover to. |
178
179
|`coverAmountInAsset`| Amount of coverage to allocate to the pool in the cover asset. |
179
180
180
-
**Returns:** The coverId of the purchased or modified cover.
181
+
**Returns:** The coverId of the purchased cover.
181
182
182
183
**Description:** Purchases new cover or edits an existing cover. Validates input parameters (e.g., cover period, commission ratio), allocates cover amounts across specified staking pools, calculates premiums and commissions, and mints a new Cover NFT if it's a new cover.
183
184
184
185
### `expireCover`
185
186
186
-
Expires a cover that has reached its expiration time.
187
+
Explicitly expires a cover that has reached its expiration time removing its allocations.
0 commit comments