gondi 0.44.0 → 0.45.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/dist/index.mjs +855 -64
- package/dist/index.mjs.map +3 -3
- package/dist/src/clients/api/index.d.ts +37 -6
- package/dist/src/clients/api/sdk.d.ts +11 -0
- package/dist/src/generated/graphql/index.d.ts +1019 -42
- package/dist/src/gondi.d.ts +33 -7
- package/dist/src/index.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
|
@@ -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, TraitSignedOfferInput } from '../../generated/graphql';
|
|
4
|
+
import { BnplOrderInput, BulkNftOrdersInput, CollectionOrderInput, CollectionSignedOfferInput, DealInput, ListListingsQueryVariables, ListLoansQueryVariables, ListOffersQueryVariables, LoanOfferPublicationInput, NftOrderInput, RenegotiationOfferInput, SingleNftOfferInput, SingleNftOrderInput, SingleNftSignedOfferInput, TraitOrderInput, TraitSignedOfferInput } from '../../generated/graphql';
|
|
5
5
|
import { OnStepChange } from '../../gondi';
|
|
6
6
|
import { RenegotiationOffer } from '../../model';
|
|
7
7
|
export type Props = {
|
|
@@ -19,7 +19,7 @@ export declare class Api {
|
|
|
19
19
|
taker: import("../../generated/graphql").Scalars["Address"];
|
|
20
20
|
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").GetSaleCalldataQuery>;
|
|
21
21
|
generateSingleNftOfferHash: (variables: import("../../generated/graphql").Exact<{
|
|
22
|
-
offerInput:
|
|
22
|
+
offerInput: SingleNftOfferInput;
|
|
23
23
|
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").GenerateSingleNftOfferHashMutation>;
|
|
24
24
|
generateCollectionOfferHash: (variables: import("../../generated/graphql").Exact<{
|
|
25
25
|
offerInput: import("../../generated/graphql").CollectionOfferInput;
|
|
@@ -28,7 +28,7 @@ export declare class Api {
|
|
|
28
28
|
offerInput: import("../../generated/graphql").TraitOfferInput;
|
|
29
29
|
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").GenerateTraitOfferHashMutation>;
|
|
30
30
|
generateRenegotiationOfferHash: (variables: import("../../generated/graphql").Exact<{
|
|
31
|
-
renegotiationInput:
|
|
31
|
+
renegotiationInput: RenegotiationOfferInput;
|
|
32
32
|
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").GenerateRenegotiationOfferHashMutation>;
|
|
33
33
|
nftIdBySlugTokenId: (variables: import("../../generated/graphql").Exact<{
|
|
34
34
|
slug: import("../../generated/graphql").Scalars["String"];
|
|
@@ -106,7 +106,38 @@ export declare class Api {
|
|
|
106
106
|
collectionId: import("../../generated/graphql").Scalars["Int"];
|
|
107
107
|
}>, options?: {} | undefined) => Promise<import("../../generated/graphql").CollectionStepsByIdQuery>;
|
|
108
108
|
constructor({ apiClient, wallet, onStepChange }: Props);
|
|
109
|
-
|
|
109
|
+
/** Check competition before asking the wallet to sign; saving rechecks atomically. */
|
|
110
|
+
previewSingleNftPublication(offerInput: SingleNftOfferInput, publication: LoanOfferPublicationInput): Promise<{
|
|
111
|
+
__typename?: "LoanOfferCompetitionPreview";
|
|
112
|
+
complete: boolean;
|
|
113
|
+
qualifies: boolean;
|
|
114
|
+
reason?: string | null;
|
|
115
|
+
replacementIds: Array<string>;
|
|
116
|
+
references: Array<{
|
|
117
|
+
__typename?: "LoanOfferCompetitionReference";
|
|
118
|
+
optionId: string;
|
|
119
|
+
sourceIds: Array<string>;
|
|
120
|
+
requiredNetPrincipal: bigint;
|
|
121
|
+
maximumEaprNumerator: bigint;
|
|
122
|
+
maximumEaprDenominator: bigint;
|
|
123
|
+
}>;
|
|
124
|
+
}>;
|
|
125
|
+
previewRenegotiationPublication(renegotiationInput: RenegotiationOfferInput, publication: LoanOfferPublicationInput): Promise<{
|
|
126
|
+
__typename?: "LoanOfferCompetitionPreview";
|
|
127
|
+
complete: boolean;
|
|
128
|
+
qualifies: boolean;
|
|
129
|
+
reason?: string | null;
|
|
130
|
+
replacementIds: Array<string>;
|
|
131
|
+
references: Array<{
|
|
132
|
+
__typename?: "LoanOfferCompetitionReference";
|
|
133
|
+
optionId: string;
|
|
134
|
+
sourceIds: Array<string>;
|
|
135
|
+
requiredNetPrincipal: bigint;
|
|
136
|
+
maximumEaprNumerator: bigint;
|
|
137
|
+
maximumEaprDenominator: bigint;
|
|
138
|
+
}>;
|
|
139
|
+
}>;
|
|
140
|
+
saveSingleNftOffer(offerInput: SingleNftSignedOfferInput, publication?: LoanOfferPublicationInput): Promise<{
|
|
110
141
|
aprBps: import("../../generated/graphql").Scalars["BigInt"];
|
|
111
142
|
borrowerAddress: import("../../generated/graphql").Scalars["Address"];
|
|
112
143
|
capacity: import("../../generated/graphql").Scalars["BigInt"];
|
|
@@ -262,7 +293,7 @@ export declare class Api {
|
|
|
262
293
|
message: object;
|
|
263
294
|
};
|
|
264
295
|
}>;
|
|
265
|
-
saveCollectionOffer(offerInput: CollectionSignedOfferInput): Promise<{
|
|
296
|
+
saveCollectionOffer(offerInput: CollectionSignedOfferInput, publication?: LoanOfferPublicationInput): Promise<{
|
|
266
297
|
aprBps: import("../../generated/graphql").Scalars["BigInt"];
|
|
267
298
|
borrowerAddress: import("../../generated/graphql").Scalars["Address"];
|
|
268
299
|
capacity: import("../../generated/graphql").Scalars["BigInt"];
|
|
@@ -312,7 +343,7 @@ export declare class Api {
|
|
|
312
343
|
nftCollateralAddress: `0x${string}`;
|
|
313
344
|
nftCollateralTokenId: bigint;
|
|
314
345
|
}>;
|
|
315
|
-
saveRefinanceOffer(renegotiation: RenegotiationOffer, fallbackOffer?: SingleNftSignedOfferInput): Promise<{
|
|
346
|
+
saveRefinanceOffer(renegotiation: RenegotiationOffer, fallbackOffer?: SingleNftSignedOfferInput, publication?: LoanOfferPublicationInput): Promise<{
|
|
316
347
|
id: string;
|
|
317
348
|
loanId: import("../../generated/graphql").Scalars["String"];
|
|
318
349
|
duration: import("../../generated/graphql").Scalars["BigInt"];
|
|
@@ -13,6 +13,7 @@ export declare function getSdkApollo<C>(client: ApolloClient<C>, onStepChange?:
|
|
|
13
13
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").GenerateCollectionOfferHashMutation>;
|
|
14
14
|
saveCollectionOffer(variables: import("../../generated/graphql").Exact<{
|
|
15
15
|
offer: import("../../generated/graphql").CollectionSignedOfferInput;
|
|
16
|
+
publication?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").LoanOfferPublicationInput>;
|
|
16
17
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").SaveCollectionOfferMutation>;
|
|
17
18
|
hideOffer(variables: import("../../generated/graphql").Exact<{
|
|
18
19
|
contract: import("../../generated/graphql").Scalars["Address"];
|
|
@@ -27,6 +28,7 @@ export declare function getSdkApollo<C>(client: ApolloClient<C>, onStepChange?:
|
|
|
27
28
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").GenerateSingleNftOfferHashMutation>;
|
|
28
29
|
saveSingleNftOffer(variables: import("../../generated/graphql").Exact<{
|
|
29
30
|
offer: import("../../generated/graphql").SingleNftSignedOfferInput;
|
|
31
|
+
publication?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").LoanOfferPublicationInput>;
|
|
30
32
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").SaveSingleNftOfferMutation>;
|
|
31
33
|
generateTraitOfferHash(variables: import("../../generated/graphql").Exact<{
|
|
32
34
|
offerInput: import("../../generated/graphql").TraitOfferInput;
|
|
@@ -77,6 +79,7 @@ export declare function getSdkApollo<C>(client: ApolloClient<C>, onStepChange?:
|
|
|
77
79
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").HideRenegotiationOfferMutation>;
|
|
78
80
|
saveRenegotiationOffer(variables: import("../../generated/graphql").Exact<{
|
|
79
81
|
renegotiation: import("../../generated/graphql").SignedRenegotiationOfferInput;
|
|
82
|
+
publication?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").LoanOfferPublicationInput>;
|
|
80
83
|
fallbackOffer?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").SingleNftSignedOfferInput>;
|
|
81
84
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").SaveRenegotiationOfferMutation>;
|
|
82
85
|
unhideRenegotiationOffer(variables: import("../../generated/graphql").Exact<{
|
|
@@ -165,5 +168,13 @@ export declare function getSdkApollo<C>(client: ApolloClient<C>, onStepChange?:
|
|
|
165
168
|
nftId: import("../../generated/graphql").Scalars["Int"];
|
|
166
169
|
taker: import("../../generated/graphql").Scalars["Address"];
|
|
167
170
|
}>, options?: {} | undefined): Promise<import("../../generated/graphql").GetSaleCalldataQuery>;
|
|
171
|
+
previewItemLoanOfferCompetition(variables: import("../../generated/graphql").Exact<{
|
|
172
|
+
offerInput: import("../../generated/graphql").SingleNftOfferInput;
|
|
173
|
+
replacementIds?: import("../../generated/graphql").InputMaybe<Array<import("../../generated/graphql").Scalars["String"]> | import("../../generated/graphql").Scalars["String"]>;
|
|
174
|
+
}>, options?: {} | undefined): Promise<import("../../generated/graphql").PreviewItemLoanOfferCompetitionQuery>;
|
|
175
|
+
previewRenegotiationCompetition(variables: import("../../generated/graphql").Exact<{
|
|
176
|
+
renegotiationInput: import("../../generated/graphql").RenegotiationOfferInput;
|
|
177
|
+
replacementIds?: import("../../generated/graphql").InputMaybe<Array<import("../../generated/graphql").Scalars["String"]> | import("../../generated/graphql").Scalars["String"]>;
|
|
178
|
+
}>, options?: {} | undefined): Promise<import("../../generated/graphql").PreviewRenegotiationCompetitionQuery>;
|
|
168
179
|
};
|
|
169
180
|
export type Sdk = ReturnType<typeof getSdkApollo>;
|