@nexusmutual/sdk 2.1.1 → 3.0.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 +123 -112
- package/dist/data/version.json +1 -1
- package/dist/index.d.mts +247 -227
- package/dist/index.d.ts +247 -227
- package/dist/index.js +260 -187
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +257 -187
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -138,144 +138,101 @@ type GetQuoteResponse = {
|
|
|
138
138
|
};
|
|
139
139
|
type GetQuoteApiResponse = ApiResponse<GetQuoteResponse, undefined>;
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
amount: string;
|
|
237
|
-
currency: string;
|
|
238
|
-
}[];
|
|
239
|
-
}>;
|
|
240
|
-
declare const defiPassContentSchema: z.ZodUnion<[z.ZodObject<{
|
|
241
|
-
version: z.ZodLiteral<"1.0">;
|
|
242
|
-
walletAddress: z.ZodString;
|
|
243
|
-
}, "strip", z.ZodTypeAny, {
|
|
244
|
-
version: "1.0";
|
|
245
|
-
walletAddress: string;
|
|
246
|
-
}, {
|
|
247
|
-
version: "1.0";
|
|
248
|
-
walletAddress: string;
|
|
249
|
-
}>, z.ZodObject<{
|
|
250
|
-
version: z.ZodLiteral<"1.0">;
|
|
251
|
-
wallets: z.ZodArray<z.ZodObject<{
|
|
252
|
-
wallet: z.ZodString;
|
|
253
|
-
amount: z.ZodString;
|
|
254
|
-
currency: z.ZodString;
|
|
255
|
-
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
wallet: string;
|
|
257
|
-
amount: string;
|
|
258
|
-
currency: string;
|
|
259
|
-
}, {
|
|
260
|
-
wallet: string;
|
|
261
|
-
amount: string;
|
|
262
|
-
currency: string;
|
|
263
|
-
}>, "many">;
|
|
264
|
-
}, "strip", z.ZodTypeAny, {
|
|
265
|
-
version: "1.0";
|
|
266
|
-
wallets: {
|
|
267
|
-
wallet: string;
|
|
268
|
-
amount: string;
|
|
269
|
-
currency: string;
|
|
270
|
-
}[];
|
|
271
|
-
}, {
|
|
272
|
-
version: "1.0";
|
|
273
|
-
wallets: {
|
|
274
|
-
wallet: string;
|
|
275
|
-
amount: string;
|
|
276
|
-
currency: string;
|
|
277
|
-
}[];
|
|
278
|
-
}>]>;
|
|
141
|
+
interface AddressValue {
|
|
142
|
+
address: string;
|
|
143
|
+
label?: string;
|
|
144
|
+
}
|
|
145
|
+
interface FreeTextValue {
|
|
146
|
+
value: string;
|
|
147
|
+
label?: string;
|
|
148
|
+
}
|
|
149
|
+
interface ApiKeyValue {
|
|
150
|
+
credential: string;
|
|
151
|
+
label: string;
|
|
152
|
+
role: string;
|
|
153
|
+
}
|
|
154
|
+
interface ValidatorValue {
|
|
155
|
+
value: string;
|
|
156
|
+
label?: string;
|
|
157
|
+
role?: string;
|
|
158
|
+
}
|
|
159
|
+
interface CsvValue {
|
|
160
|
+
address: string;
|
|
161
|
+
amount: string;
|
|
162
|
+
currency: string;
|
|
163
|
+
}
|
|
164
|
+
type ProofOfLossEntry = {
|
|
165
|
+
type: 'address';
|
|
166
|
+
content: AddressValue[];
|
|
167
|
+
} | {
|
|
168
|
+
type: 'api_key';
|
|
169
|
+
content: ApiKeyValue[];
|
|
170
|
+
} | {
|
|
171
|
+
type: 'validator';
|
|
172
|
+
content: ValidatorValue[];
|
|
173
|
+
} | {
|
|
174
|
+
type: 'csv';
|
|
175
|
+
content: CsvValue[];
|
|
176
|
+
} | {
|
|
177
|
+
type: 'free_text';
|
|
178
|
+
content: FreeTextValue[];
|
|
179
|
+
};
|
|
180
|
+
interface CoverPublicData {
|
|
181
|
+
quotaShare?: number;
|
|
182
|
+
aumCoverAmountPercentage?: number;
|
|
183
|
+
}
|
|
184
|
+
interface CoverMetadataInput {
|
|
185
|
+
proofOfLoss?: ProofOfLossEntry[];
|
|
186
|
+
publicData?: CoverPublicData;
|
|
187
|
+
}
|
|
188
|
+
interface CoverMetadataResponse {
|
|
189
|
+
cid: string;
|
|
190
|
+
}
|
|
191
|
+
interface GetCoverResponse {
|
|
192
|
+
coverId: number;
|
|
193
|
+
productId: number;
|
|
194
|
+
coverAsset: number;
|
|
195
|
+
amount: string;
|
|
196
|
+
start: string;
|
|
197
|
+
period: string;
|
|
198
|
+
gracePeriod: string;
|
|
199
|
+
coverMetadataId?: string;
|
|
200
|
+
}
|
|
201
|
+
type GetCoverApiResponse = ApiResponse<GetCoverResponse, undefined>;
|
|
202
|
+
interface AuthPayload {
|
|
203
|
+
timestamp: bigint;
|
|
204
|
+
message: string;
|
|
205
|
+
}
|
|
206
|
+
interface AuthSignature {
|
|
207
|
+
signature: string;
|
|
208
|
+
payload: AuthPayload;
|
|
209
|
+
}
|
|
210
|
+
interface ViewCoverMetadataParams {
|
|
211
|
+
coverMetadataId: string;
|
|
212
|
+
signature?: AuthSignature;
|
|
213
|
+
}
|
|
214
|
+
interface PrivateMetadata {
|
|
215
|
+
proofOfLoss: ProofOfLossEntry[] | null;
|
|
216
|
+
createdAt: string | null;
|
|
217
|
+
}
|
|
218
|
+
interface ViewCoverMetadataResponse {
|
|
219
|
+
id: string;
|
|
220
|
+
coverId: number;
|
|
221
|
+
createdAt: string;
|
|
222
|
+
updatedAt: string | null;
|
|
223
|
+
publicData: CoverPublicData | null;
|
|
224
|
+
privateData?: PrivateMetadata;
|
|
225
|
+
}
|
|
226
|
+
type ViewCoverMetadataApiResponse = ApiResponse<ViewCoverMetadataResponse, undefined>;
|
|
227
|
+
interface EditCoverMetadataParams {
|
|
228
|
+
coverMetadataId: string;
|
|
229
|
+
proofOfLoss: ProofOfLossEntry[];
|
|
230
|
+
signature: AuthSignature;
|
|
231
|
+
}
|
|
232
|
+
type EditCoverMetadataApiResponse = ApiResponse<{
|
|
233
|
+
success: boolean;
|
|
234
|
+
}, undefined>;
|
|
235
|
+
|
|
279
236
|
declare const stakingPoolDetailsSchema: z.ZodObject<{
|
|
280
237
|
version: z.ZodLiteral<"1.0">;
|
|
281
238
|
poolName: z.ZodString;
|
|
@@ -433,14 +390,6 @@ declare const coverMetadataRefSchema: z.ZodObject<{
|
|
|
433
390
|
}>;
|
|
434
391
|
|
|
435
392
|
declare enum ContentType {
|
|
436
|
-
coverValidators = "coverValidators",
|
|
437
|
-
coverQuotaShare = "coverQuotaShare",
|
|
438
|
-
coverAumCoverAmountPercentage = "coverAumCoverAmountPercentage",
|
|
439
|
-
coverWalletAddress = "coverWalletAddress",
|
|
440
|
-
coverWalletAddresses = "coverWalletAddresses",
|
|
441
|
-
coverFreeText = "coverFreeText",
|
|
442
|
-
coverDesignatedWallets = "coverDesignatedWallets",
|
|
443
|
-
defiPassContent = "defiPassContent",
|
|
444
393
|
stakingPoolDetails = "stakingPoolDetails",
|
|
445
394
|
claimProof = "claimProof",
|
|
446
395
|
assessmentCriteriaAnswers = "assessmentCriteriaAnswers",
|
|
@@ -451,14 +400,6 @@ declare enum ContentType {
|
|
|
451
400
|
productAnnex = "productAnnex",
|
|
452
401
|
coverMetadataRef = "coverMetadataRef"
|
|
453
402
|
}
|
|
454
|
-
type CoverValidators = z.infer<typeof coverValidatorsSchema>;
|
|
455
|
-
type CoverQuotaShare = z.infer<typeof coverQuotaShareSchema>;
|
|
456
|
-
type CoverAumCoverAmountPercentage = z.infer<typeof coverAumCoverAmountPercentageSchema>;
|
|
457
|
-
type CoverWalletAddress = z.infer<typeof coverWalletAddressSchema>;
|
|
458
|
-
type CoverWalletAddresses = z.infer<typeof coverWalletAddressesSchema>;
|
|
459
|
-
type CoverFreeText = z.infer<typeof coverFreeTextSchema>;
|
|
460
|
-
type CoverDesignatedWallets = z.infer<typeof coverDesignatedWalletsSchema>;
|
|
461
|
-
type DefiPassContent = z.infer<typeof defiPassContentSchema>;
|
|
462
403
|
type StakingPoolDetails = z.infer<typeof stakingPoolDetailsSchema>;
|
|
463
404
|
type ClaimProof = z.infer<typeof claimProofSchema>;
|
|
464
405
|
type AssessmentCriteriaAnswers = z.infer<typeof assessmentCriteriaAnswersSchema>;
|
|
@@ -468,12 +409,50 @@ type File = z.infer<typeof fileSchema>;
|
|
|
468
409
|
type AssessmentReason = z.infer<typeof assessmentReasonSchema>;
|
|
469
410
|
type ProductAnnex = z.infer<typeof productAnnexSchema>;
|
|
470
411
|
type CoverMetadataRef = z.infer<typeof coverMetadataRefSchema>;
|
|
471
|
-
type IPFSContentTypes =
|
|
472
|
-
type IPFSTypeContentTuple = [type: ContentType.
|
|
412
|
+
type IPFSContentTypes = StakingPoolDetails | ClaimProof | AssessmentCriteriaAnswers | AssessmentReason | GovernanceProposal | GovernanceCategory | File | ProductAnnex | CoverMetadataRef;
|
|
413
|
+
type IPFSTypeContentTuple = [type: ContentType.stakingPoolDetails, content: StakingPoolDetails] | [type: ContentType.claimProof, content: ClaimProof] | [type: ContentType.assessmentCriteriaAnswers, content: AssessmentCriteriaAnswers] | [type: ContentType.assessmentReason, content: AssessmentReason] | [type: ContentType.governanceProposal, content: GovernanceProposal] | [type: ContentType.governanceCategory, content: GovernanceCategory] | [type: ContentType.file, content: File] | [type: ContentType.productAnnex, content: ProductAnnex] | [type: ContentType.coverMetadataRef, content: CoverMetadataRef];
|
|
473
414
|
type IPFSUploadServiceResponse = {
|
|
474
415
|
ipfsHash: string;
|
|
475
416
|
};
|
|
476
417
|
|
|
418
|
+
type ProductType = {
|
|
419
|
+
id: Integer;
|
|
420
|
+
name: string;
|
|
421
|
+
metadata: string;
|
|
422
|
+
claimMethod: Integer;
|
|
423
|
+
gracePeriod: string;
|
|
424
|
+
assessmentCooldownPeriod: string;
|
|
425
|
+
payoutRedemptionPeriod: string;
|
|
426
|
+
commissionRatio: string;
|
|
427
|
+
commissionDestination: string;
|
|
428
|
+
buyCoverForm?: BuyCoverFormType;
|
|
429
|
+
};
|
|
430
|
+
type BuyCoverFormType = 'basic' | 'withQuotaShare' | 'withAUM' | 'unsupported';
|
|
431
|
+
type Product = {
|
|
432
|
+
id: Integer;
|
|
433
|
+
productType: ProductType['id'];
|
|
434
|
+
name: string;
|
|
435
|
+
minPrice: string;
|
|
436
|
+
coverAssets: Array<{
|
|
437
|
+
assetId: CoverAsset;
|
|
438
|
+
assetSymbol: string;
|
|
439
|
+
}>;
|
|
440
|
+
initialPriceRatio: string;
|
|
441
|
+
capacityReductionRatio: string;
|
|
442
|
+
isDeprecated: boolean;
|
|
443
|
+
useFixedPrice: boolean;
|
|
444
|
+
metadata: string | {
|
|
445
|
+
annex?: string;
|
|
446
|
+
schedule?: string;
|
|
447
|
+
exclusions?: string;
|
|
448
|
+
};
|
|
449
|
+
allowedPools: Integer[];
|
|
450
|
+
timestamp: number;
|
|
451
|
+
isPrivate: boolean;
|
|
452
|
+
logo?: string;
|
|
453
|
+
proofOfLossInputTypes?: ProofOfLossEntry['type'][];
|
|
454
|
+
};
|
|
455
|
+
|
|
477
456
|
/**
|
|
478
457
|
* Configuration options for the Nexus SDK
|
|
479
458
|
*/
|
|
@@ -519,9 +498,13 @@ interface GetQuoteAndBuyCoverInputsParams {
|
|
|
519
498
|
*/
|
|
520
499
|
slippage?: number;
|
|
521
500
|
/**
|
|
522
|
-
* Optional IPFS CID string
|
|
501
|
+
* Optional IPFS CID string
|
|
523
502
|
*/
|
|
524
|
-
|
|
503
|
+
ipfsCid?: string;
|
|
504
|
+
/**
|
|
505
|
+
* Optional cover metadata (proof of loss and/or public data)
|
|
506
|
+
*/
|
|
507
|
+
coverMetadata?: CoverMetadataInput;
|
|
525
508
|
/**
|
|
526
509
|
* Optional commission ratio
|
|
527
510
|
*/
|
|
@@ -569,6 +552,15 @@ declare class NexusSDKBase {
|
|
|
569
552
|
private parseResponseBody;
|
|
570
553
|
}
|
|
571
554
|
|
|
555
|
+
declare class CoverData extends NexusSDKBase {
|
|
556
|
+
constructor(config?: NexusSDKConfig);
|
|
557
|
+
getCover(coverId: number): Promise<GetCoverApiResponse | ErrorApiResponse>;
|
|
558
|
+
viewCoverMetadata(params: ViewCoverMetadataParams): Promise<ViewCoverMetadataApiResponse | ErrorApiResponse>;
|
|
559
|
+
editCoverMetadata(params: EditCoverMetadataParams): Promise<EditCoverMetadataApiResponse | ErrorApiResponse>;
|
|
560
|
+
createCoverMetadata(input: CoverMetadataInput): Promise<string>;
|
|
561
|
+
private buildAuthHeaders;
|
|
562
|
+
}
|
|
563
|
+
|
|
572
564
|
/**
|
|
573
565
|
* Class for handling IPFS-related functionality
|
|
574
566
|
*/
|
|
@@ -597,34 +589,6 @@ declare class Ipfs extends NexusSDKBase {
|
|
|
597
589
|
* @returns Validated content
|
|
598
590
|
*/
|
|
599
591
|
validateIPFSContent(type: ContentType, content: IPFSContentTypes): {
|
|
600
|
-
version: "1.0";
|
|
601
|
-
validators: string[];
|
|
602
|
-
} | {
|
|
603
|
-
version: "1.0";
|
|
604
|
-
quotaShare: number;
|
|
605
|
-
} | {
|
|
606
|
-
version: "1.0";
|
|
607
|
-
aumCoverAmountPercentage: number;
|
|
608
|
-
} | {
|
|
609
|
-
version: "1.0";
|
|
610
|
-
walletAddress: string;
|
|
611
|
-
} | {
|
|
612
|
-
version: "1.0";
|
|
613
|
-
walletAddresses: string;
|
|
614
|
-
} | {
|
|
615
|
-
version: "2.0";
|
|
616
|
-
walletAddresses: string[];
|
|
617
|
-
} | {
|
|
618
|
-
version: "1.0";
|
|
619
|
-
freeText: string;
|
|
620
|
-
} | {
|
|
621
|
-
version: "1.0";
|
|
622
|
-
wallets: {
|
|
623
|
-
wallet: string;
|
|
624
|
-
amount: string;
|
|
625
|
-
currency: string;
|
|
626
|
-
}[];
|
|
627
|
-
} | {
|
|
628
592
|
version: "1.0";
|
|
629
593
|
poolName: string;
|
|
630
594
|
poolDescription: string;
|
|
@@ -690,12 +654,12 @@ declare class Ipfs extends NexusSDKBase {
|
|
|
690
654
|
declare class Quote extends NexusSDKBase {
|
|
691
655
|
private ipfs;
|
|
692
656
|
private productAPI;
|
|
657
|
+
private coverData;
|
|
693
658
|
/**
|
|
694
659
|
* Create a new Quote instance
|
|
695
660
|
* @param config SDK configuration
|
|
696
|
-
* @param ipfs IPFS instance for content upload and validation
|
|
697
661
|
*/
|
|
698
|
-
constructor(config?: NexusSDKConfig
|
|
662
|
+
constructor(config?: NexusSDKConfig);
|
|
699
663
|
/**
|
|
700
664
|
* Get quote and buy cover inputs
|
|
701
665
|
* @param params Parameters for the quote
|
|
@@ -803,48 +767,13 @@ declare class Swap {
|
|
|
803
767
|
* Main Nexus SDK class that provides access to all SDK functionality
|
|
804
768
|
*/
|
|
805
769
|
declare class NexusSDK extends NexusSDKBase {
|
|
770
|
+
cover: CoverData;
|
|
806
771
|
quote: Quote;
|
|
807
772
|
swap: Swap;
|
|
808
773
|
ipfs: Ipfs;
|
|
809
774
|
constructor(config?: NexusSDKConfig);
|
|
810
775
|
}
|
|
811
776
|
|
|
812
|
-
type ProductType = {
|
|
813
|
-
id: Integer;
|
|
814
|
-
name: string;
|
|
815
|
-
metadata: string;
|
|
816
|
-
claimMethod: Integer;
|
|
817
|
-
gracePeriod: string;
|
|
818
|
-
assessmentCooldownPeriod: string;
|
|
819
|
-
payoutRedemptionPeriod: string;
|
|
820
|
-
commissionRatio: string;
|
|
821
|
-
commissionDestination: string;
|
|
822
|
-
ipfsContentType?: ContentType;
|
|
823
|
-
};
|
|
824
|
-
type Product = {
|
|
825
|
-
id: Integer;
|
|
826
|
-
productType: ProductType['id'];
|
|
827
|
-
name: string;
|
|
828
|
-
minPrice: string;
|
|
829
|
-
coverAssets: Array<{
|
|
830
|
-
assetId: CoverAsset;
|
|
831
|
-
assetSymbol: string;
|
|
832
|
-
}>;
|
|
833
|
-
initialPriceRatio: string;
|
|
834
|
-
capacityReductionRatio: string;
|
|
835
|
-
isDeprecated: boolean;
|
|
836
|
-
useFixedPrice: boolean;
|
|
837
|
-
metadata: string | {
|
|
838
|
-
annex?: string;
|
|
839
|
-
schedule?: string;
|
|
840
|
-
exclusions?: string;
|
|
841
|
-
};
|
|
842
|
-
allowedPools: Integer[];
|
|
843
|
-
timestamp: number;
|
|
844
|
-
isPrivate: boolean;
|
|
845
|
-
logo?: string;
|
|
846
|
-
};
|
|
847
|
-
|
|
848
777
|
declare class ProductAPI extends NexusSDKBase {
|
|
849
778
|
/**
|
|
850
779
|
* Create a new ProductAPI instance
|
|
@@ -854,9 +783,10 @@ declare class ProductAPI extends NexusSDKBase {
|
|
|
854
783
|
/**
|
|
855
784
|
* Get product type details by ID
|
|
856
785
|
* @param productTypeId ID of the product type
|
|
786
|
+
* @param params Optional attributes to include
|
|
857
787
|
* @returns Product type details
|
|
858
788
|
*/
|
|
859
|
-
getProductTypeById(productTypeId: number): Promise<ProductType>;
|
|
789
|
+
getProductTypeById(productTypeId: number, params?: string[]): Promise<ProductType>;
|
|
860
790
|
/**
|
|
861
791
|
* Get all product types
|
|
862
792
|
* @returns List of product types
|
|
@@ -867,7 +797,7 @@ declare class ProductAPI extends NexusSDKBase {
|
|
|
867
797
|
* @param productId ID of the product
|
|
868
798
|
* @returns Product details
|
|
869
799
|
*/
|
|
870
|
-
getProductById(productId: number): Promise<Product>;
|
|
800
|
+
getProductById(productId: number, params?: string[]): Promise<Product>;
|
|
871
801
|
/**
|
|
872
802
|
* Get all products
|
|
873
803
|
* @returns List of products
|
|
@@ -875,9 +805,99 @@ declare class ProductAPI extends NexusSDKBase {
|
|
|
875
805
|
getAllProducts(): Promise<Product[]>;
|
|
876
806
|
}
|
|
877
807
|
|
|
808
|
+
/**
|
|
809
|
+
* Builds a complete EIP-712 typed-data object for Nexus Mutual API authentication.
|
|
810
|
+
* Pass the returned object to your wallet's `signTypedData` (viem, ethers, etc.).
|
|
811
|
+
*/
|
|
812
|
+
declare function buildAuthTypedData(message: string): {
|
|
813
|
+
domain: {
|
|
814
|
+
readonly name: "Nexus Mutual App";
|
|
815
|
+
readonly version: "1.0.0";
|
|
816
|
+
};
|
|
817
|
+
types: {
|
|
818
|
+
readonly Authentication: readonly [{
|
|
819
|
+
readonly name: "timestamp";
|
|
820
|
+
readonly type: "uint256";
|
|
821
|
+
}, {
|
|
822
|
+
readonly name: "message";
|
|
823
|
+
readonly type: "string";
|
|
824
|
+
}];
|
|
825
|
+
};
|
|
826
|
+
primaryType: "Authentication";
|
|
827
|
+
value: {
|
|
828
|
+
timestamp: bigint;
|
|
829
|
+
message: string;
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
/**
|
|
833
|
+
* Builds a complete EIP-712 typed-data object for cover metadata authentication.
|
|
834
|
+
* Pass the returned object to your wallet's `signTypedData` (viem, ethers, etc.).
|
|
835
|
+
*/
|
|
836
|
+
declare function buildCoverMetadataAuthMessage(): {
|
|
837
|
+
domain: {
|
|
838
|
+
readonly name: "Nexus Mutual App";
|
|
839
|
+
readonly version: "1.0.0";
|
|
840
|
+
};
|
|
841
|
+
types: {
|
|
842
|
+
readonly Authentication: readonly [{
|
|
843
|
+
readonly name: "timestamp";
|
|
844
|
+
readonly type: "uint256";
|
|
845
|
+
}, {
|
|
846
|
+
readonly name: "message";
|
|
847
|
+
readonly type: "string";
|
|
848
|
+
}];
|
|
849
|
+
};
|
|
850
|
+
primaryType: "Authentication";
|
|
851
|
+
value: {
|
|
852
|
+
timestamp: bigint;
|
|
853
|
+
message: string;
|
|
854
|
+
};
|
|
855
|
+
};
|
|
856
|
+
|
|
878
857
|
declare const nexusSdk: {
|
|
879
858
|
NexusSDK: typeof NexusSDK;
|
|
880
859
|
ApiError: typeof ApiError;
|
|
860
|
+
buildAuthTypedData(message: string): {
|
|
861
|
+
domain: {
|
|
862
|
+
readonly name: "Nexus Mutual App";
|
|
863
|
+
readonly version: "1.0.0";
|
|
864
|
+
};
|
|
865
|
+
types: {
|
|
866
|
+
readonly Authentication: readonly [{
|
|
867
|
+
readonly name: "timestamp";
|
|
868
|
+
readonly type: "uint256";
|
|
869
|
+
}, {
|
|
870
|
+
readonly name: "message";
|
|
871
|
+
readonly type: "string";
|
|
872
|
+
}];
|
|
873
|
+
};
|
|
874
|
+
primaryType: "Authentication";
|
|
875
|
+
value: {
|
|
876
|
+
timestamp: bigint;
|
|
877
|
+
message: string;
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
buildCoverMetadataAuthMessage(): {
|
|
881
|
+
domain: {
|
|
882
|
+
readonly name: "Nexus Mutual App";
|
|
883
|
+
readonly version: "1.0.0";
|
|
884
|
+
};
|
|
885
|
+
types: {
|
|
886
|
+
readonly Authentication: readonly [{
|
|
887
|
+
readonly name: "timestamp";
|
|
888
|
+
readonly type: "uint256";
|
|
889
|
+
}, {
|
|
890
|
+
readonly name: "message";
|
|
891
|
+
readonly type: "string";
|
|
892
|
+
}];
|
|
893
|
+
};
|
|
894
|
+
primaryType: "Authentication";
|
|
895
|
+
value: {
|
|
896
|
+
timestamp: bigint;
|
|
897
|
+
message: string;
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
CoverData: typeof CoverData;
|
|
881
901
|
CoverAsset: typeof CoverAsset;
|
|
882
902
|
PaymentAsset: typeof PaymentAsset;
|
|
883
903
|
COMMISSION_DENOMINATOR: 10000;
|
|
@@ -36707,4 +36727,4 @@ declare const nexusSdk: {
|
|
|
36707
36727
|
}];
|
|
36708
36728
|
};
|
|
36709
36729
|
|
|
36710
|
-
export { Address, ApiError, ApiResponse, AssessmentCriteriaAnswers, AssessmentReason, BuyCoverInput, BuyCoverParams, COMMISSION_DENOMINATOR, Capacity, ClaimProof, ContentType, CoverAsset,
|
|
36730
|
+
export { Address, AddressValue, ApiError, ApiKeyValue, ApiResponse, AssessmentCriteriaAnswers, AssessmentReason, AuthPayload, AuthSignature, BuyCoverFormType, BuyCoverInput, BuyCoverParams, COMMISSION_DENOMINATOR, Capacity, ClaimProof, ContentType, CoverAsset, CoverData, CoverMetadataInput, CoverMetadataRef, CoverMetadataResponse, CoverPublicData, CoverRouterProductCapacityResponse, CoverRouterQuoteResponse, CsvValue, DEFAULT_SLIPPAGE, EditCoverMetadataApiResponse, EditCoverMetadataParams, ErrorApiResponse, ErrorResponse, File, FloatString, FreeTextValue, GetCoverApiResponse, GetCoverResponse, GetQuoteAndBuyCoverInputsParams, GetQuoteApiResponse, GetQuoteResponse, GovernanceCategory, GovernanceProposal, IPFSContentTypes, IPFSTypeContentTuple, IPFSUploadServiceResponse, IntString, Integer, Ipfs, MAXIMUM_COVER_PERIOD, MINIMUM_COVER_PERIOD, NEXUS_MUTUAL_DAO_TREASURY_ADDRESS, NexusSDK, NexusSDKConfig, PaymentAsset, PoolAllocationRequest, PoolCapacity, PrivateMetadata, Product, ProductAPI, ProductAnnex, ProductCategoryEnum, ProductType, ProofOfLossEntry, Quote, QuoteDisplayInfo, QuoteParams, RequestConfig, Reserves, SLIPPAGE_DENOMINATOR, StakingPoolDetails, Swap, TARGET_PRICE_DENOMINATOR, ValidatorValue, ViewCoverMetadataApiResponse, ViewCoverMetadataParams, ViewCoverMetadataResponse, buildAuthTypedData, buildCoverMetadataAuthMessage, categoryLabelByEnum, nexusSdk as default, productCategoryMap };
|