@nexusmutual/sdk 0.7.0-rc2 → 0.7.0

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 CHANGED
@@ -63,11 +63,11 @@ The function returns the IPFS hash of the uploaded content.
63
63
  import { uploadIPFSContent, ContentType, IPFSContentTypes } from '@nexusmutual/sdk';
64
64
 
65
65
  const content: IPFSContentTypes = {
66
- version: '2.0.',
66
+ version: '2.0',
67
67
  walletAddresses: ['0x1234567890'],
68
68
  };
69
69
 
70
- const ipfsHash = await uploadIPFSContent(ContentType.coverWalletAddresses, content);
70
+ const ipfsHash = await uploadIPFSContent([ContentType.coverWalletAddresses, content]);
71
71
 
72
72
  console.log(ipfsHash);
73
73
  ```
@@ -81,7 +81,7 @@ Use the `getQuoteAndBuyCoverInputs` function from `src/cover/getQuoteAndBuyCover
81
81
  1st overload:
82
82
 
83
83
  ```typescript
84
- import { getQuoteAndBuyCoverInputs } from '@nexusmutual/sdk';
84
+ import { CoverAsset, getQuoteAndBuyCoverInputs } from '@nexusmutual/sdk';
85
85
 
86
86
  const productId = 1;
87
87
  const coverAmount = '100';
@@ -106,7 +106,7 @@ console.log(quoteAndBuyCoverInputs);
106
106
  2nd overload:
107
107
 
108
108
  ```typescript
109
- import { getQuoteAndBuyCoverInputs, IPFSContentTypes } from '@nexusmutual/sdk';
109
+ import { CoverAsset, getQuoteAndBuyCoverInputs, IPFSContentTypes } from '@nexusmutual/sdk';
110
110
 
111
111
  const productId = 247;
112
112
  const coverAmount = '100';
@@ -114,8 +114,8 @@ const coverPeriod = 30;
114
114
  const coverAsset = CoverAsset.ETH;
115
115
  const buyerAddress = '0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5';
116
116
  const ipfsContent: IPFSContentTypes = {
117
- version: '2.0.',
118
- walletAddresses: ['0x1234567890'],
117
+ version: '2.0',
118
+ walletAddresses: ['0x1234567890123456789012345678901234567890'],
119
119
  };
120
120
 
121
121
  const quoteAndBuyCoverInputs = await getQuoteAndBuyCoverInputs(
@@ -130,7 +130,7 @@ const quoteAndBuyCoverInputs = await getQuoteAndBuyCoverInputs(
130
130
  console.log(quoteAndBuyCoverInputs);
131
131
  ```
132
132
 
133
- If you pass The `ipfsContent` param, the function will upload the content to IPFS and use the IPFS hash returned for the buy cover inputs `ipfsData` param. If you pass the `ipfsCid` param, the function will use the IPFS hash directly.
133
+ If the productId's type needs an IPFS upload, you can pass the `ipfsContent` param and the function will upload the content to IPFS and use the IPFS hash returned for the buy cover inputs `ipfsData` param. If you pass the `ipfsCid` param, the function will use the IPFS hash directly.
134
134
 
135
135
  The `ipfsCid` param must be a valid IPFS Cid.
136
136
  The `ipfsContent` param must be a valid `IPFSContentTypes` - the allowed types can be found in `src/types/ipfs.ts`.
@@ -3048,7 +3048,7 @@
3048
3048
  "cbBTC"
3049
3049
  ],
3050
3050
  "isPrivate": true,
3051
- "timestamp": 1736430671,
3051
+ "timestamp": 1725537203,
3052
3052
  "minPrice": 100
3053
3053
  },
3054
3054
  {
@@ -3507,7 +3507,7 @@
3507
3507
  "cbBTC"
3508
3508
  ],
3509
3509
  "isPrivate": false,
3510
- "timestamp": 1734557999,
3510
+ "timestamp": 1725264851,
3511
3511
  "minPrice": 100
3512
3512
  },
3513
3513
  {
@@ -4049,7 +4049,7 @@
4049
4049
  "USDC"
4050
4050
  ],
4051
4051
  "isPrivate": false,
4052
- "timestamp": 1723127459,
4052
+ "timestamp": 1722950807,
4053
4053
  "minPrice": 100
4054
4054
  },
4055
4055
  {
@@ -4084,7 +4084,7 @@
4084
4084
  "cbBTC"
4085
4085
  ],
4086
4086
  "isPrivate": false,
4087
- "timestamp": 1734557999,
4087
+ "timestamp": 1731583079,
4088
4088
  "minPrice": 100
4089
4089
  },
4090
4090
  {
@@ -4143,7 +4143,7 @@
4143
4143
  "cbBTC"
4144
4144
  ],
4145
4145
  "isPrivate": false,
4146
- "timestamp": 1726227311,
4146
+ "timestamp": 1734557999,
4147
4147
  "minPrice": 100
4148
4148
  },
4149
4149
  {
@@ -4201,7 +4201,7 @@
4201
4201
  "cbBTC"
4202
4202
  ],
4203
4203
  "isPrivate": true,
4204
- "timestamp": 1725264851,
4204
+ "timestamp": 1726227311,
4205
4205
  "minPrice": 100
4206
4206
  },
4207
4207
  {
@@ -4220,7 +4220,7 @@
4220
4220
  "cbBTC"
4221
4221
  ],
4222
4222
  "isPrivate": false,
4223
- "timestamp": 1726758407,
4223
+ "timestamp": 1736430671,
4224
4224
  "minPrice": 100
4225
4225
  },
4226
4226
  {
@@ -4239,7 +4239,7 @@
4239
4239
  "cbBTC"
4240
4240
  ],
4241
4241
  "isPrivate": false,
4242
- "timestamp": 1731583079,
4242
+ "timestamp": 1734557999,
4243
4243
  "minPrice": 100
4244
4244
  },
4245
4245
  {
@@ -4467,7 +4467,7 @@
4467
4467
  "cbBTC"
4468
4468
  ],
4469
4469
  "isPrivate": false,
4470
- "timestamp": 1734557999,
4470
+ "timestamp": 1731583079,
4471
4471
  "minPrice": 100
4472
4472
  },
4473
4473
  {
@@ -4518,7 +4518,7 @@
4518
4518
  "USDC"
4519
4519
  ],
4520
4520
  "isPrivate": true,
4521
- "timestamp": 1733753135,
4521
+ "timestamp": 1733326763,
4522
4522
  "minPrice": 100
4523
4523
  },
4524
4524
  {
@@ -4552,7 +4552,7 @@
4552
4552
  "USDC"
4553
4553
  ],
4554
4554
  "isPrivate": true,
4555
- "timestamp": 1733753135,
4555
+ "timestamp": 1733326763,
4556
4556
  "minPrice": 100
4557
4557
  },
4558
4558
  {
package/dist/index.d.mts CHANGED
@@ -243,8 +243,8 @@ type IPFSUploadServiceResponse = {
243
243
  ipfsHash: string;
244
244
  };
245
245
 
246
- declare function getQuoteAndBuyCoverInputs(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsCid?: string, coverRouterUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
247
- declare function getQuoteAndBuyCoverInputs<ProductTypes extends keyof IPFSContentForProductType>(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsContent?: IPFSContentForProductType[ProductTypes], coverRouterUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
246
+ declare function getQuoteAndBuyCoverInputs(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsCid?: string, nexusApiUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
247
+ declare function getQuoteAndBuyCoverInputs<ProductTypes extends keyof IPFSContentForProductType>(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsContent?: IPFSContentForProductType[ProductTypes], nexusApiUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
248
248
 
249
249
  type Reserves = {
250
250
  ethReserve: bigint;
@@ -3475,7 +3475,7 @@ var products = [
3475
3475
  "cbBTC"
3476
3476
  ],
3477
3477
  isPrivate: true,
3478
- timestamp: 1736430671,
3478
+ timestamp: 1725537203,
3479
3479
  minPrice: 100
3480
3480
  },
3481
3481
  {
@@ -3939,7 +3939,7 @@ var products = [
3939
3939
  "cbBTC"
3940
3940
  ],
3941
3941
  isPrivate: false,
3942
- timestamp: 1734557999,
3942
+ timestamp: 1725264851,
3943
3943
  minPrice: 100
3944
3944
  },
3945
3945
  {
@@ -4491,7 +4491,7 @@ var products = [
4491
4491
  "USDC"
4492
4492
  ],
4493
4493
  isPrivate: false,
4494
- timestamp: 1723127459,
4494
+ timestamp: 1722950807,
4495
4495
  minPrice: 100
4496
4496
  },
4497
4497
  {
@@ -4526,7 +4526,7 @@ var products = [
4526
4526
  "cbBTC"
4527
4527
  ],
4528
4528
  isPrivate: false,
4529
- timestamp: 1734557999,
4529
+ timestamp: 1731583079,
4530
4530
  minPrice: 100
4531
4531
  },
4532
4532
  {
@@ -4585,7 +4585,7 @@ var products = [
4585
4585
  "cbBTC"
4586
4586
  ],
4587
4587
  isPrivate: false,
4588
- timestamp: 1726227311,
4588
+ timestamp: 1734557999,
4589
4589
  minPrice: 100
4590
4590
  },
4591
4591
  {
@@ -4644,7 +4644,7 @@ var products = [
4644
4644
  "cbBTC"
4645
4645
  ],
4646
4646
  isPrivate: true,
4647
- timestamp: 1725264851,
4647
+ timestamp: 1726227311,
4648
4648
  minPrice: 100
4649
4649
  },
4650
4650
  {
@@ -4663,7 +4663,7 @@ var products = [
4663
4663
  "cbBTC"
4664
4664
  ],
4665
4665
  isPrivate: false,
4666
- timestamp: 1726758407,
4666
+ timestamp: 1736430671,
4667
4667
  minPrice: 100
4668
4668
  },
4669
4669
  {
@@ -4682,7 +4682,7 @@ var products = [
4682
4682
  "cbBTC"
4683
4683
  ],
4684
4684
  isPrivate: false,
4685
- timestamp: 1731583079,
4685
+ timestamp: 1734557999,
4686
4686
  minPrice: 100
4687
4687
  },
4688
4688
  {
@@ -4916,7 +4916,7 @@ var products = [
4916
4916
  "cbBTC"
4917
4917
  ],
4918
4918
  isPrivate: false,
4919
- timestamp: 1734557999,
4919
+ timestamp: 1731583079,
4920
4920
  minPrice: 100
4921
4921
  },
4922
4922
  {
@@ -4969,7 +4969,7 @@ var products = [
4969
4969
  "USDC"
4970
4970
  ],
4971
4971
  isPrivate: true,
4972
- timestamp: 1733753135,
4972
+ timestamp: 1733326763,
4973
4973
  minPrice: 100
4974
4974
  },
4975
4975
  {
@@ -5003,7 +5003,7 @@ var products = [
5003
5003
  "USDC"
5004
5004
  ],
5005
5005
  isPrivate: true,
5006
- timestamp: 1733753135,
5006
+ timestamp: 1733326763,
5007
5007
  minPrice: 100
5008
5008
  },
5009
5009
  {
@@ -5254,6 +5254,34 @@ var productTypes = [
5254
5254
 
5255
5255
  declare const calculatePremiumWithCommissionAndSlippage: (premium: bigint, commission?: number, slippage?: number) => bigint;
5256
5256
 
5257
+ /**
5258
+ * Uploads data to IPFS
5259
+ * @param {IPFSContentAndType} typeAndContent - The type of content and the content to be uploaded
5260
+ * @returns {Promise<string>} hash Returns the IPFS hash of the uploaded data
5261
+ *
5262
+ * @example
5263
+ * ```ts
5264
+ * uploadIPFSData(ContentType.coverValidators, { version: '1.0', validators: ['1', '2', '3'] });
5265
+ *
5266
+ * uploadIPFSData(ContentType.coverQuotaShare, { version: '1.0', quotaShare: 25 });
5267
+ *
5268
+ * uploadIPFSData(ContentType.coverAumCoverAmountPercentage, { version: '1.0', aumCoverAmountPercentage: 15 });
5269
+ *
5270
+ * uploadIPFSData(ContentType.coverWalletAddresses, { version: '1.0', walletAddresses: ['0x1', '0x2', '0x3'] });
5271
+ *
5272
+ * uploadIPFSData(ContentType.coverFreeText, { version: '1.0', freeText: 'This is a free text' });
5273
+ * ```
5274
+ */
5275
+ declare const uploadIPFSContent: (ipfsContentAndType: IPFSContentAndType, nexusApiUrl?: string) => Promise<string>;
5276
+
5277
+ /**
5278
+ * Wrapper method for IPFS CID string validation
5279
+ *
5280
+ * @param ipfsCid - The CID string to validate.
5281
+ * @throws Throw an error if CID is not valid
5282
+ */
5283
+ declare const validateIPFSCid: (ipfsCid: string) => void;
5284
+
5257
5285
  declare const nexusSdk: {
5258
5286
  allPrivateProductsIds: number[];
5259
5287
  CoverAsset: typeof CoverAsset;
@@ -5271,7 +5299,7 @@ declare const nexusSdk: {
5271
5299
  productCategoryMap: {
5272
5300
  [productId: number]: ProductCategoryEnum;
5273
5301
  };
5274
- uploadIPFSContent: (...[type, content]: IPFSContentAndType) => Promise<string>;
5302
+ uploadIPFSContent: (ipfsContentAndType: IPFSContentAndType, nexusApiUrl?: string) => Promise<string>;
5275
5303
  validateIPFSCid: (ipfsCid: string) => void;
5276
5304
  getQuoteAndBuyCoverInputs: typeof getQuoteAndBuyCoverInputs;
5277
5305
  ContentType: typeof ContentType;
@@ -42231,4 +42259,4 @@ declare const productsMap: Record<number, {
42231
42259
  minPrice: number;
42232
42260
  }>;
42233
42261
 
42234
- export { Address, ApiResponse, BuyCoverInput, BuyCoverParams, COMMISSION_DENOMINATOR, Capacity, ContentType, CoverAsset, CoverId, CoverRouterProductCapacityResponse, CoverRouterQuoteResponse, DEFAULT_COMMISSION_RATIO, DEFAULT_SLIPPAGE, ErrorApiResponse, ErrorResponse, FloatString, GetQuoteApiResponse, GetQuoteResponse, IPFSContentAndType, IPFSContentForProductType, IPFSContentTypes, IPFSUploadServiceResponse, IPFS_CONTENT_TYPE_BY_PRODUCT_TYPE, IntString, Integer, LogoFileName, LogoName, MAXIMUM_COVER_PERIOD, MINIMUM_COVER_PERIOD, NEXUS_MUTUAL_DAO_TREASURY_ADDRESS, PoolAllocationRequest, PoolCapacity, ProductCategoryEnum, ProductTypes, Quote, QuoteDisplayInfo, Reserves, SLIPPAGE_DENOMINATOR, TARGET_PRICE_DENOMINATOR, allLogoFileNames, allLogoNames, allPrivateProductsIds, calculateEthForExactNxm, calculateExactEthForNxm, calculateExactNxmForEth, calculateNxmForExactEth, calculatePremiumWithCommissionAndSlippage, calculatePriceImpactA, calculatePriceImpactB, calculateSpotPrice, categoryLabelByEnum, nexusSdk as default, getQuoteAndBuyCoverInputs, productCategoryMap, productTypes, products, productsMap };
42262
+ export { Address, ApiResponse, BuyCoverInput, BuyCoverParams, COMMISSION_DENOMINATOR, Capacity, ContentType, CoverAsset, CoverId, CoverRouterProductCapacityResponse, CoverRouterQuoteResponse, DEFAULT_COMMISSION_RATIO, DEFAULT_SLIPPAGE, ErrorApiResponse, ErrorResponse, FloatString, GetQuoteApiResponse, GetQuoteResponse, IPFSContentAndType, IPFSContentForProductType, IPFSContentTypes, IPFSUploadServiceResponse, IPFS_CONTENT_TYPE_BY_PRODUCT_TYPE, IntString, Integer, LogoFileName, LogoName, MAXIMUM_COVER_PERIOD, MINIMUM_COVER_PERIOD, NEXUS_MUTUAL_DAO_TREASURY_ADDRESS, PoolAllocationRequest, PoolCapacity, ProductCategoryEnum, ProductTypes, Quote, QuoteDisplayInfo, Reserves, SLIPPAGE_DENOMINATOR, TARGET_PRICE_DENOMINATOR, allLogoFileNames, allLogoNames, allPrivateProductsIds, calculateEthForExactNxm, calculateExactEthForNxm, calculateExactNxmForEth, calculateNxmForExactEth, calculatePremiumWithCommissionAndSlippage, calculatePriceImpactA, calculatePriceImpactB, calculateSpotPrice, categoryLabelByEnum, nexusSdk as default, getQuoteAndBuyCoverInputs, productCategoryMap, productTypes, products, productsMap, uploadIPFSContent, validateIPFSCid };
package/dist/index.d.ts CHANGED
@@ -243,8 +243,8 @@ type IPFSUploadServiceResponse = {
243
243
  ipfsHash: string;
244
244
  };
245
245
 
246
- declare function getQuoteAndBuyCoverInputs(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsCid?: string, coverRouterUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
247
- declare function getQuoteAndBuyCoverInputs<ProductTypes extends keyof IPFSContentForProductType>(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsContent?: IPFSContentForProductType[ProductTypes], coverRouterUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
246
+ declare function getQuoteAndBuyCoverInputs(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsCid?: string, nexusApiUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
247
+ declare function getQuoteAndBuyCoverInputs<ProductTypes extends keyof IPFSContentForProductType>(productId: Integer, coverAmount: IntString, coverPeriod: Integer, coverAsset: CoverAsset, coverBuyerAddress: Address, slippage?: number, ipfsContent?: IPFSContentForProductType[ProductTypes], nexusApiUrl?: string): Promise<GetQuoteApiResponse | ErrorApiResponse>;
248
248
 
249
249
  type Reserves = {
250
250
  ethReserve: bigint;
@@ -3475,7 +3475,7 @@ var products = [
3475
3475
  "cbBTC"
3476
3476
  ],
3477
3477
  isPrivate: true,
3478
- timestamp: 1736430671,
3478
+ timestamp: 1725537203,
3479
3479
  minPrice: 100
3480
3480
  },
3481
3481
  {
@@ -3939,7 +3939,7 @@ var products = [
3939
3939
  "cbBTC"
3940
3940
  ],
3941
3941
  isPrivate: false,
3942
- timestamp: 1734557999,
3942
+ timestamp: 1725264851,
3943
3943
  minPrice: 100
3944
3944
  },
3945
3945
  {
@@ -4491,7 +4491,7 @@ var products = [
4491
4491
  "USDC"
4492
4492
  ],
4493
4493
  isPrivate: false,
4494
- timestamp: 1723127459,
4494
+ timestamp: 1722950807,
4495
4495
  minPrice: 100
4496
4496
  },
4497
4497
  {
@@ -4526,7 +4526,7 @@ var products = [
4526
4526
  "cbBTC"
4527
4527
  ],
4528
4528
  isPrivate: false,
4529
- timestamp: 1734557999,
4529
+ timestamp: 1731583079,
4530
4530
  minPrice: 100
4531
4531
  },
4532
4532
  {
@@ -4585,7 +4585,7 @@ var products = [
4585
4585
  "cbBTC"
4586
4586
  ],
4587
4587
  isPrivate: false,
4588
- timestamp: 1726227311,
4588
+ timestamp: 1734557999,
4589
4589
  minPrice: 100
4590
4590
  },
4591
4591
  {
@@ -4644,7 +4644,7 @@ var products = [
4644
4644
  "cbBTC"
4645
4645
  ],
4646
4646
  isPrivate: true,
4647
- timestamp: 1725264851,
4647
+ timestamp: 1726227311,
4648
4648
  minPrice: 100
4649
4649
  },
4650
4650
  {
@@ -4663,7 +4663,7 @@ var products = [
4663
4663
  "cbBTC"
4664
4664
  ],
4665
4665
  isPrivate: false,
4666
- timestamp: 1726758407,
4666
+ timestamp: 1736430671,
4667
4667
  minPrice: 100
4668
4668
  },
4669
4669
  {
@@ -4682,7 +4682,7 @@ var products = [
4682
4682
  "cbBTC"
4683
4683
  ],
4684
4684
  isPrivate: false,
4685
- timestamp: 1731583079,
4685
+ timestamp: 1734557999,
4686
4686
  minPrice: 100
4687
4687
  },
4688
4688
  {
@@ -4916,7 +4916,7 @@ var products = [
4916
4916
  "cbBTC"
4917
4917
  ],
4918
4918
  isPrivate: false,
4919
- timestamp: 1734557999,
4919
+ timestamp: 1731583079,
4920
4920
  minPrice: 100
4921
4921
  },
4922
4922
  {
@@ -4969,7 +4969,7 @@ var products = [
4969
4969
  "USDC"
4970
4970
  ],
4971
4971
  isPrivate: true,
4972
- timestamp: 1733753135,
4972
+ timestamp: 1733326763,
4973
4973
  minPrice: 100
4974
4974
  },
4975
4975
  {
@@ -5003,7 +5003,7 @@ var products = [
5003
5003
  "USDC"
5004
5004
  ],
5005
5005
  isPrivate: true,
5006
- timestamp: 1733753135,
5006
+ timestamp: 1733326763,
5007
5007
  minPrice: 100
5008
5008
  },
5009
5009
  {
@@ -5254,6 +5254,34 @@ var productTypes = [
5254
5254
 
5255
5255
  declare const calculatePremiumWithCommissionAndSlippage: (premium: bigint, commission?: number, slippage?: number) => bigint;
5256
5256
 
5257
+ /**
5258
+ * Uploads data to IPFS
5259
+ * @param {IPFSContentAndType} typeAndContent - The type of content and the content to be uploaded
5260
+ * @returns {Promise<string>} hash Returns the IPFS hash of the uploaded data
5261
+ *
5262
+ * @example
5263
+ * ```ts
5264
+ * uploadIPFSData(ContentType.coverValidators, { version: '1.0', validators: ['1', '2', '3'] });
5265
+ *
5266
+ * uploadIPFSData(ContentType.coverQuotaShare, { version: '1.0', quotaShare: 25 });
5267
+ *
5268
+ * uploadIPFSData(ContentType.coverAumCoverAmountPercentage, { version: '1.0', aumCoverAmountPercentage: 15 });
5269
+ *
5270
+ * uploadIPFSData(ContentType.coverWalletAddresses, { version: '1.0', walletAddresses: ['0x1', '0x2', '0x3'] });
5271
+ *
5272
+ * uploadIPFSData(ContentType.coverFreeText, { version: '1.0', freeText: 'This is a free text' });
5273
+ * ```
5274
+ */
5275
+ declare const uploadIPFSContent: (ipfsContentAndType: IPFSContentAndType, nexusApiUrl?: string) => Promise<string>;
5276
+
5277
+ /**
5278
+ * Wrapper method for IPFS CID string validation
5279
+ *
5280
+ * @param ipfsCid - The CID string to validate.
5281
+ * @throws Throw an error if CID is not valid
5282
+ */
5283
+ declare const validateIPFSCid: (ipfsCid: string) => void;
5284
+
5257
5285
  declare const nexusSdk: {
5258
5286
  allPrivateProductsIds: number[];
5259
5287
  CoverAsset: typeof CoverAsset;
@@ -5271,7 +5299,7 @@ declare const nexusSdk: {
5271
5299
  productCategoryMap: {
5272
5300
  [productId: number]: ProductCategoryEnum;
5273
5301
  };
5274
- uploadIPFSContent: (...[type, content]: IPFSContentAndType) => Promise<string>;
5302
+ uploadIPFSContent: (ipfsContentAndType: IPFSContentAndType, nexusApiUrl?: string) => Promise<string>;
5275
5303
  validateIPFSCid: (ipfsCid: string) => void;
5276
5304
  getQuoteAndBuyCoverInputs: typeof getQuoteAndBuyCoverInputs;
5277
5305
  ContentType: typeof ContentType;
@@ -42231,4 +42259,4 @@ declare const productsMap: Record<number, {
42231
42259
  minPrice: number;
42232
42260
  }>;
42233
42261
 
42234
- export { Address, ApiResponse, BuyCoverInput, BuyCoverParams, COMMISSION_DENOMINATOR, Capacity, ContentType, CoverAsset, CoverId, CoverRouterProductCapacityResponse, CoverRouterQuoteResponse, DEFAULT_COMMISSION_RATIO, DEFAULT_SLIPPAGE, ErrorApiResponse, ErrorResponse, FloatString, GetQuoteApiResponse, GetQuoteResponse, IPFSContentAndType, IPFSContentForProductType, IPFSContentTypes, IPFSUploadServiceResponse, IPFS_CONTENT_TYPE_BY_PRODUCT_TYPE, IntString, Integer, LogoFileName, LogoName, MAXIMUM_COVER_PERIOD, MINIMUM_COVER_PERIOD, NEXUS_MUTUAL_DAO_TREASURY_ADDRESS, PoolAllocationRequest, PoolCapacity, ProductCategoryEnum, ProductTypes, Quote, QuoteDisplayInfo, Reserves, SLIPPAGE_DENOMINATOR, TARGET_PRICE_DENOMINATOR, allLogoFileNames, allLogoNames, allPrivateProductsIds, calculateEthForExactNxm, calculateExactEthForNxm, calculateExactNxmForEth, calculateNxmForExactEth, calculatePremiumWithCommissionAndSlippage, calculatePriceImpactA, calculatePriceImpactB, calculateSpotPrice, categoryLabelByEnum, nexusSdk as default, getQuoteAndBuyCoverInputs, productCategoryMap, productTypes, products, productsMap };
42262
+ export { Address, ApiResponse, BuyCoverInput, BuyCoverParams, COMMISSION_DENOMINATOR, Capacity, ContentType, CoverAsset, CoverId, CoverRouterProductCapacityResponse, CoverRouterQuoteResponse, DEFAULT_COMMISSION_RATIO, DEFAULT_SLIPPAGE, ErrorApiResponse, ErrorResponse, FloatString, GetQuoteApiResponse, GetQuoteResponse, IPFSContentAndType, IPFSContentForProductType, IPFSContentTypes, IPFSUploadServiceResponse, IPFS_CONTENT_TYPE_BY_PRODUCT_TYPE, IntString, Integer, LogoFileName, LogoName, MAXIMUM_COVER_PERIOD, MINIMUM_COVER_PERIOD, NEXUS_MUTUAL_DAO_TREASURY_ADDRESS, PoolAllocationRequest, PoolCapacity, ProductCategoryEnum, ProductTypes, Quote, QuoteDisplayInfo, Reserves, SLIPPAGE_DENOMINATOR, TARGET_PRICE_DENOMINATOR, allLogoFileNames, allLogoNames, allPrivateProductsIds, calculateEthForExactNxm, calculateExactEthForNxm, calculateExactNxmForEth, calculateNxmForExactEth, calculatePremiumWithCommissionAndSlippage, calculatePriceImpactA, calculatePriceImpactB, calculateSpotPrice, categoryLabelByEnum, nexusSdk as default, getQuoteAndBuyCoverInputs, productCategoryMap, productTypes, products, productsMap, uploadIPFSContent, validateIPFSCid };