gondi 0.42.0 → 0.43.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 +13 -0
- package/dist/index.mjs +255 -50
- package/dist/index.mjs.map +3 -3
- package/dist/src/clients/api/index.d.ts +225 -5
- package/dist/src/clients/api/sdk.d.ts +6 -0
- package/dist/src/generated/graphql/index.d.ts +425 -20
- package/dist/src/gondi.d.ts +287 -9
- package/dist/src/model.d.ts +3 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
|
|
2
2
|
import { getSdkApollo } from '../../clients/api/sdk';
|
|
3
3
|
import { Wallet } from '../../clients/contracts';
|
|
4
|
-
import { BnplOrderInput, BulkNftOrdersInput, CollectionOrderInput, CollectionSignedOfferInput, DealInput, ListListingsQueryVariables, ListLoansQueryVariables, ListOffersQueryVariables, NftOrderInput, SingleNftOrderInput, SingleNftSignedOfferInput, TraitOrderInput } from '../../generated/graphql';
|
|
4
|
+
import { BnplOrderInput, BulkNftOrdersInput, CollectionOrderInput, CollectionSignedOfferInput, DealInput, ListListingsQueryVariables, ListLoansQueryVariables, ListOffersQueryVariables, NftOrderInput, SingleNftOrderInput, SingleNftSignedOfferInput, TraitOrderInput, TraitSignedOfferInput } from '../../generated/graphql';
|
|
5
5
|
import { OnStepChange } from '../../gondi';
|
|
6
6
|
import { RenegotiationOffer } from '../../model';
|
|
7
7
|
export type Props = {
|
|
@@ -24,6 +24,9 @@ export declare class Api {
|
|
|
24
24
|
generateCollectionOfferHash: (variables: import("../../generated/graphql").Exact<{
|
|
25
25
|
offerInput: import("../../generated/graphql").CollectionOfferInput;
|
|
26
26
|
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").GenerateCollectionOfferHashMutation>;
|
|
27
|
+
generateTraitOfferHash: (variables: import("../../generated/graphql").Exact<{
|
|
28
|
+
offerInput: import("../../generated/graphql").TraitOfferInput;
|
|
29
|
+
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").GenerateTraitOfferHashMutation>;
|
|
27
30
|
generateRenegotiationOfferHash: (variables: import("../../generated/graphql").Exact<{
|
|
28
31
|
renegotiationInput: import("../../generated/graphql").RenegotiationOfferInput;
|
|
29
32
|
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").GenerateRenegotiationOfferHashMutation>;
|
|
@@ -280,6 +283,31 @@ export declare class Api {
|
|
|
280
283
|
nftCollateralAddress: `0x${string}`;
|
|
281
284
|
nftCollateralTokenId: bigint;
|
|
282
285
|
}>;
|
|
286
|
+
saveTraitOffer(offerInput: TraitSignedOfferInput): Promise<{
|
|
287
|
+
aprBps: import("../../generated/graphql").Scalars["BigInt"];
|
|
288
|
+
borrowerAddress: import("../../generated/graphql").Scalars["Address"];
|
|
289
|
+
capacity: import("../../generated/graphql").Scalars["BigInt"];
|
|
290
|
+
contractAddress: import("../../generated/graphql").Scalars["Address"];
|
|
291
|
+
duration: import("../../generated/graphql").Scalars["BigInt"];
|
|
292
|
+
expirationTime: import("../../generated/graphql").Scalars["BigInt"];
|
|
293
|
+
fee: import("../../generated/graphql").Scalars["BigInt"];
|
|
294
|
+
lenderAddress: import("../../generated/graphql").Scalars["Address"];
|
|
295
|
+
lenderRefinanceDisabled?: import("../../generated/graphql").Scalars["Boolean"];
|
|
296
|
+
maxSeniorRepayment?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").Scalars["BigInt"]>;
|
|
297
|
+
maxTrancheFloor?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").Scalars["BigInt"]>;
|
|
298
|
+
offerHash: import("../../generated/graphql").Scalars["Hash"];
|
|
299
|
+
offerId: import("../../generated/graphql").Scalars["BigInt"];
|
|
300
|
+
offerValidators: Array<import("../../generated/graphql").OfferValidatorInput>;
|
|
301
|
+
principalAddress: import("../../generated/graphql").Scalars["Address"];
|
|
302
|
+
principalAmount: import("../../generated/graphql").Scalars["BigInt"];
|
|
303
|
+
requiresLiquidation?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").Scalars["Boolean"]>;
|
|
304
|
+
signature: import("../../generated/graphql").Scalars["Signature"];
|
|
305
|
+
signerAddress?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").Scalars["Address"]>;
|
|
306
|
+
traitIds: Array<import("../../generated/graphql").Scalars["Int"]>;
|
|
307
|
+
id: string;
|
|
308
|
+
nftCollateralAddress: `0x${string}`;
|
|
309
|
+
nftCollateralTokenId: bigint;
|
|
310
|
+
}>;
|
|
283
311
|
saveRefinanceOffer(renegotiation: RenegotiationOffer, fallbackOffer?: SingleNftSignedOfferInput): Promise<{
|
|
284
312
|
id: string;
|
|
285
313
|
loanId: import("../../generated/graphql").Scalars["String"];
|
|
@@ -301,7 +329,7 @@ export declare class Api {
|
|
|
301
329
|
}>;
|
|
302
330
|
listOffers(props: ListOffersQueryVariables): Promise<{
|
|
303
331
|
offers: ({
|
|
304
|
-
type: "CollectionOffer" | "SingleNFTOffer" | undefined;
|
|
332
|
+
type: "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer" | undefined;
|
|
305
333
|
lender: `0x${string}` | null | undefined;
|
|
306
334
|
borrower: `0x${string}` | null | undefined;
|
|
307
335
|
signer: `0x${string}` | null | undefined;
|
|
@@ -313,6 +341,14 @@ export declare class Api {
|
|
|
313
341
|
__typename?: "OfferValidator";
|
|
314
342
|
arguments: import("viem").Hex;
|
|
315
343
|
validator: import("viem").Address;
|
|
344
|
+
}[] | {
|
|
345
|
+
__typename?: "OfferValidator";
|
|
346
|
+
arguments: import("viem").Hex;
|
|
347
|
+
validator: import("viem").Address;
|
|
348
|
+
}[] | {
|
|
349
|
+
__typename?: "OfferValidator";
|
|
350
|
+
arguments: import("viem").Hex;
|
|
351
|
+
validator: import("viem").Address;
|
|
316
352
|
}[];
|
|
317
353
|
nftCollateralAddress: `0x${string}`;
|
|
318
354
|
nftCollateralTokenId: bigint;
|
|
@@ -359,7 +395,7 @@ export declare class Api {
|
|
|
359
395
|
validator: import("viem").Address;
|
|
360
396
|
}>;
|
|
361
397
|
} | {
|
|
362
|
-
type: "CollectionOffer" | "SingleNFTOffer" | undefined;
|
|
398
|
+
type: "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer" | undefined;
|
|
363
399
|
lender: `0x${string}` | null | undefined;
|
|
364
400
|
borrower: `0x${string}` | null | undefined;
|
|
365
401
|
signer: `0x${string}` | null | undefined;
|
|
@@ -371,6 +407,14 @@ export declare class Api {
|
|
|
371
407
|
__typename?: "OfferValidator";
|
|
372
408
|
arguments: import("viem").Hex;
|
|
373
409
|
validator: import("viem").Address;
|
|
410
|
+
}[] | {
|
|
411
|
+
__typename?: "OfferValidator";
|
|
412
|
+
arguments: import("viem").Hex;
|
|
413
|
+
validator: import("viem").Address;
|
|
414
|
+
}[] | {
|
|
415
|
+
__typename?: "OfferValidator";
|
|
416
|
+
arguments: import("viem").Hex;
|
|
417
|
+
validator: import("viem").Address;
|
|
374
418
|
}[];
|
|
375
419
|
nftCollateralAddress: `0x${string}`;
|
|
376
420
|
nftCollateralTokenId: bigint;
|
|
@@ -421,12 +465,84 @@ export declare class Api {
|
|
|
421
465
|
arguments: import("viem").Hex;
|
|
422
466
|
validator: import("viem").Address;
|
|
423
467
|
}>;
|
|
468
|
+
} | {
|
|
469
|
+
type: "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer" | undefined;
|
|
470
|
+
lender: `0x${string}` | null | undefined;
|
|
471
|
+
borrower: `0x${string}` | null | undefined;
|
|
472
|
+
signer: `0x${string}` | null | undefined;
|
|
473
|
+
offerValidators: {
|
|
474
|
+
__typename?: "OfferValidator";
|
|
475
|
+
arguments: import("viem").Hex;
|
|
476
|
+
validator: import("viem").Address;
|
|
477
|
+
}[] | {
|
|
478
|
+
__typename?: "OfferValidator";
|
|
479
|
+
arguments: import("viem").Hex;
|
|
480
|
+
validator: import("viem").Address;
|
|
481
|
+
}[] | {
|
|
482
|
+
__typename?: "OfferValidator";
|
|
483
|
+
arguments: import("viem").Hex;
|
|
484
|
+
validator: import("viem").Address;
|
|
485
|
+
}[] | {
|
|
486
|
+
__typename?: "OfferValidator";
|
|
487
|
+
arguments: import("viem").Hex;
|
|
488
|
+
validator: import("viem").Address;
|
|
489
|
+
}[];
|
|
490
|
+
nftCollateralAddress: `0x${string}`;
|
|
491
|
+
nftCollateralTokenId: bigint;
|
|
492
|
+
id: string;
|
|
493
|
+
offerId: bigint;
|
|
494
|
+
lenderAddress?: import("viem").Address | null;
|
|
495
|
+
borrowerAddress?: import("viem").Address | null;
|
|
496
|
+
signerAddress?: import("viem").Address | null;
|
|
497
|
+
contractAddress: import("viem").Address;
|
|
498
|
+
requiresLiquidation?: boolean | null;
|
|
499
|
+
principalAddress: import("viem").Address;
|
|
500
|
+
principalAmount: bigint;
|
|
501
|
+
aprBps: bigint;
|
|
502
|
+
fee: bigint;
|
|
503
|
+
capacity: bigint;
|
|
504
|
+
expirationTime: bigint;
|
|
505
|
+
duration: bigint;
|
|
506
|
+
status: string;
|
|
507
|
+
offerHash?: import("viem").Hash | null;
|
|
508
|
+
signature?: import("viem").Hex | null;
|
|
509
|
+
createdDate?: Date | null;
|
|
510
|
+
repayment: bigint;
|
|
511
|
+
hidden?: boolean | null;
|
|
512
|
+
maxSeniorRepayment: bigint;
|
|
513
|
+
lenderRefinanceDisabled: boolean;
|
|
514
|
+
collection: {
|
|
515
|
+
__typename?: "Collection";
|
|
516
|
+
id: string;
|
|
517
|
+
slug: string;
|
|
518
|
+
contractData: {
|
|
519
|
+
__typename?: "ContractData";
|
|
520
|
+
contractAddress: import("viem").Address;
|
|
521
|
+
};
|
|
522
|
+
};
|
|
523
|
+
traits: Array<{
|
|
524
|
+
__typename?: "Trait";
|
|
525
|
+
id: string;
|
|
526
|
+
type: string;
|
|
527
|
+
value: string;
|
|
528
|
+
}>;
|
|
529
|
+
currency: {
|
|
530
|
+
__typename?: "Currency";
|
|
531
|
+
symbol: string;
|
|
532
|
+
decimals: number;
|
|
533
|
+
address: import("viem").Address;
|
|
534
|
+
};
|
|
535
|
+
validators: Array<{
|
|
536
|
+
__typename?: "OfferValidator";
|
|
537
|
+
arguments: import("viem").Hex;
|
|
538
|
+
validator: import("viem").Address;
|
|
539
|
+
}>;
|
|
424
540
|
})[];
|
|
425
541
|
hasNextPage: true;
|
|
426
542
|
cursor: string;
|
|
427
543
|
} | {
|
|
428
544
|
offers: ({
|
|
429
|
-
type: "CollectionOffer" | "SingleNFTOffer" | undefined;
|
|
545
|
+
type: "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer" | undefined;
|
|
430
546
|
lender: `0x${string}` | null | undefined;
|
|
431
547
|
borrower: `0x${string}` | null | undefined;
|
|
432
548
|
signer: `0x${string}` | null | undefined;
|
|
@@ -438,6 +554,14 @@ export declare class Api {
|
|
|
438
554
|
__typename?: "OfferValidator";
|
|
439
555
|
arguments: import("viem").Hex;
|
|
440
556
|
validator: import("viem").Address;
|
|
557
|
+
}[] | {
|
|
558
|
+
__typename?: "OfferValidator";
|
|
559
|
+
arguments: import("viem").Hex;
|
|
560
|
+
validator: import("viem").Address;
|
|
561
|
+
}[] | {
|
|
562
|
+
__typename?: "OfferValidator";
|
|
563
|
+
arguments: import("viem").Hex;
|
|
564
|
+
validator: import("viem").Address;
|
|
441
565
|
}[];
|
|
442
566
|
nftCollateralAddress: `0x${string}`;
|
|
443
567
|
nftCollateralTokenId: bigint;
|
|
@@ -484,7 +608,7 @@ export declare class Api {
|
|
|
484
608
|
validator: import("viem").Address;
|
|
485
609
|
}>;
|
|
486
610
|
} | {
|
|
487
|
-
type: "CollectionOffer" | "SingleNFTOffer" | undefined;
|
|
611
|
+
type: "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer" | undefined;
|
|
488
612
|
lender: `0x${string}` | null | undefined;
|
|
489
613
|
borrower: `0x${string}` | null | undefined;
|
|
490
614
|
signer: `0x${string}` | null | undefined;
|
|
@@ -496,6 +620,14 @@ export declare class Api {
|
|
|
496
620
|
__typename?: "OfferValidator";
|
|
497
621
|
arguments: import("viem").Hex;
|
|
498
622
|
validator: import("viem").Address;
|
|
623
|
+
}[] | {
|
|
624
|
+
__typename?: "OfferValidator";
|
|
625
|
+
arguments: import("viem").Hex;
|
|
626
|
+
validator: import("viem").Address;
|
|
627
|
+
}[] | {
|
|
628
|
+
__typename?: "OfferValidator";
|
|
629
|
+
arguments: import("viem").Hex;
|
|
630
|
+
validator: import("viem").Address;
|
|
499
631
|
}[];
|
|
500
632
|
nftCollateralAddress: `0x${string}`;
|
|
501
633
|
nftCollateralTokenId: bigint;
|
|
@@ -546,6 +678,78 @@ export declare class Api {
|
|
|
546
678
|
arguments: import("viem").Hex;
|
|
547
679
|
validator: import("viem").Address;
|
|
548
680
|
}>;
|
|
681
|
+
} | {
|
|
682
|
+
type: "CollectionOffer" | "SetOffer" | "SingleNFTOffer" | "TraitOffer" | undefined;
|
|
683
|
+
lender: `0x${string}` | null | undefined;
|
|
684
|
+
borrower: `0x${string}` | null | undefined;
|
|
685
|
+
signer: `0x${string}` | null | undefined;
|
|
686
|
+
offerValidators: {
|
|
687
|
+
__typename?: "OfferValidator";
|
|
688
|
+
arguments: import("viem").Hex;
|
|
689
|
+
validator: import("viem").Address;
|
|
690
|
+
}[] | {
|
|
691
|
+
__typename?: "OfferValidator";
|
|
692
|
+
arguments: import("viem").Hex;
|
|
693
|
+
validator: import("viem").Address;
|
|
694
|
+
}[] | {
|
|
695
|
+
__typename?: "OfferValidator";
|
|
696
|
+
arguments: import("viem").Hex;
|
|
697
|
+
validator: import("viem").Address;
|
|
698
|
+
}[] | {
|
|
699
|
+
__typename?: "OfferValidator";
|
|
700
|
+
arguments: import("viem").Hex;
|
|
701
|
+
validator: import("viem").Address;
|
|
702
|
+
}[];
|
|
703
|
+
nftCollateralAddress: `0x${string}`;
|
|
704
|
+
nftCollateralTokenId: bigint;
|
|
705
|
+
id: string;
|
|
706
|
+
offerId: bigint;
|
|
707
|
+
lenderAddress?: import("viem").Address | null;
|
|
708
|
+
borrowerAddress?: import("viem").Address | null;
|
|
709
|
+
signerAddress?: import("viem").Address | null;
|
|
710
|
+
contractAddress: import("viem").Address;
|
|
711
|
+
requiresLiquidation?: boolean | null;
|
|
712
|
+
principalAddress: import("viem").Address;
|
|
713
|
+
principalAmount: bigint;
|
|
714
|
+
aprBps: bigint;
|
|
715
|
+
fee: bigint;
|
|
716
|
+
capacity: bigint;
|
|
717
|
+
expirationTime: bigint;
|
|
718
|
+
duration: bigint;
|
|
719
|
+
status: string;
|
|
720
|
+
offerHash?: import("viem").Hash | null;
|
|
721
|
+
signature?: import("viem").Hex | null;
|
|
722
|
+
createdDate?: Date | null;
|
|
723
|
+
repayment: bigint;
|
|
724
|
+
hidden?: boolean | null;
|
|
725
|
+
maxSeniorRepayment: bigint;
|
|
726
|
+
lenderRefinanceDisabled: boolean;
|
|
727
|
+
collection: {
|
|
728
|
+
__typename?: "Collection";
|
|
729
|
+
id: string;
|
|
730
|
+
slug: string;
|
|
731
|
+
contractData: {
|
|
732
|
+
__typename?: "ContractData";
|
|
733
|
+
contractAddress: import("viem").Address;
|
|
734
|
+
};
|
|
735
|
+
};
|
|
736
|
+
traits: Array<{
|
|
737
|
+
__typename?: "Trait";
|
|
738
|
+
id: string;
|
|
739
|
+
type: string;
|
|
740
|
+
value: string;
|
|
741
|
+
}>;
|
|
742
|
+
currency: {
|
|
743
|
+
__typename?: "Currency";
|
|
744
|
+
symbol: string;
|
|
745
|
+
decimals: number;
|
|
746
|
+
address: import("viem").Address;
|
|
747
|
+
};
|
|
748
|
+
validators: Array<{
|
|
749
|
+
__typename?: "OfferValidator";
|
|
750
|
+
arguments: import("viem").Hex;
|
|
751
|
+
validator: import("viem").Address;
|
|
752
|
+
}>;
|
|
549
753
|
})[];
|
|
550
754
|
hasNextPage: false;
|
|
551
755
|
cursor: null;
|
|
@@ -589,10 +793,18 @@ export declare class Api {
|
|
|
589
793
|
__typename?: "CollectionOffer";
|
|
590
794
|
offerId: bigint;
|
|
591
795
|
signerAddress?: import("viem").Address | null;
|
|
796
|
+
} | {
|
|
797
|
+
__typename?: "SetOffer";
|
|
798
|
+
offerId: bigint;
|
|
799
|
+
signerAddress?: import("viem").Address | null;
|
|
592
800
|
} | {
|
|
593
801
|
__typename?: "SingleNFTOffer";
|
|
594
802
|
offerId: bigint;
|
|
595
803
|
signerAddress?: import("viem").Address | null;
|
|
804
|
+
} | {
|
|
805
|
+
__typename?: "TraitOffer";
|
|
806
|
+
offerId: bigint;
|
|
807
|
+
signerAddress?: import("viem").Address | null;
|
|
596
808
|
};
|
|
597
809
|
currency: {
|
|
598
810
|
__typename?: "Currency";
|
|
@@ -684,10 +896,18 @@ export declare class Api {
|
|
|
684
896
|
__typename?: "CollectionOffer";
|
|
685
897
|
offerId: bigint;
|
|
686
898
|
signerAddress?: import("viem").Address | null;
|
|
899
|
+
} | {
|
|
900
|
+
__typename?: "SetOffer";
|
|
901
|
+
offerId: bigint;
|
|
902
|
+
signerAddress?: import("viem").Address | null;
|
|
687
903
|
} | {
|
|
688
904
|
__typename?: "SingleNFTOffer";
|
|
689
905
|
offerId: bigint;
|
|
690
906
|
signerAddress?: import("viem").Address | null;
|
|
907
|
+
} | {
|
|
908
|
+
__typename?: "TraitOffer";
|
|
909
|
+
offerId: bigint;
|
|
910
|
+
signerAddress?: import("viem").Address | null;
|
|
691
911
|
};
|
|
692
912
|
currency: {
|
|
693
913
|
__typename?: "Currency";
|
|
@@ -28,6 +28,12 @@ export declare function getSdkApollo<C>(client: ApolloClient<C>, onStepChange?:
|
|
|
28
28
|
saveSingleNftOffer(variables: import("../../generated/graphql").Exact<{
|
|
29
29
|
offer: import("../../generated/graphql").SingleNftSignedOfferInput;
|
|
30
30
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").SaveSingleNftOfferMutation>;
|
|
31
|
+
generateTraitOfferHash(variables: import("../../generated/graphql").Exact<{
|
|
32
|
+
offerInput: import("../../generated/graphql").TraitOfferInput;
|
|
33
|
+
}>, options?: {} | undefined): Promise<import("../../generated/graphql").GenerateTraitOfferHashMutation>;
|
|
34
|
+
saveTraitOffer(variables: import("../../generated/graphql").Exact<{
|
|
35
|
+
offer: import("../../generated/graphql").TraitSignedOfferInput;
|
|
36
|
+
}>, options?: {} | undefined): Promise<import("../../generated/graphql").SaveTraitOfferMutation>;
|
|
31
37
|
unhideOffer(variables: import("../../generated/graphql").Exact<{
|
|
32
38
|
contract: import("../../generated/graphql").Scalars["Address"];
|
|
33
39
|
id: import("../../generated/graphql").Scalars["String"];
|