gondi 0.45.0 → 0.47.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 +366 -195
- package/dist/index.mjs.map +3 -3
- package/dist/src/clients/api/index.d.ts +1 -0
- package/dist/src/clients/contracts/MslV6.d.ts +107 -0
- package/dist/src/generated/graphql/index.d.ts +370 -48
- package/dist/src/gondi.d.ts +135 -7
- package/dist/src/utils/loan.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -360,6 +360,7 @@ export declare class Api {
|
|
|
360
360
|
offerHash: import("../../generated/graphql").Scalars["Hash"];
|
|
361
361
|
feeAmount: import("../../generated/graphql").Scalars["BigInt"];
|
|
362
362
|
isAddNewTranche?: import("../../generated/graphql").InputMaybe<import("../../generated/graphql").Scalars["Boolean"]> | undefined;
|
|
363
|
+
private?: import("../../generated/graphql").Scalars["Boolean"] | undefined;
|
|
363
364
|
signature: import("../../blockchain").Signature;
|
|
364
365
|
}>;
|
|
365
366
|
listOffers(props: ListOffersQueryVariables): Promise<{
|
|
@@ -9055,6 +9055,12 @@ export declare class MslV6 extends BaseContract<typeof multiSourceLoanAbiV6 | ty
|
|
|
9055
9055
|
* a loan the borrower sends, `BORROWER_SIGNATURE_LIFETIME` when the borrower signs it.
|
|
9056
9056
|
*/
|
|
9057
9057
|
private mapEmitLoanToMslEmitLoanArgs;
|
|
9058
|
+
/**
|
|
9059
|
+
* Shapes a `LoanEmitted` event as `emitLoan` returns it: the loan under its SDK id
|
|
9060
|
+
* (`<contract>.<loanId>`) with its contract address, its on-chain id, and the SDK ids
|
|
9061
|
+
* (`<contract>.<lender>.<offerId>`) of the offers its execution data spent.
|
|
9062
|
+
*/
|
|
9063
|
+
private toEmittedLoan;
|
|
9058
9064
|
emitLoan(emitArgs: EmitLoanArgs): Promise<{
|
|
9059
9065
|
txHash: `0x${string}`;
|
|
9060
9066
|
waitTxInBlock: () => Promise<{
|
|
@@ -9142,6 +9148,107 @@ export declare class MslV6 extends BaseContract<typeof multiSourceLoanAbiV6 | ty
|
|
|
9142
9148
|
offerIds: string[];
|
|
9143
9149
|
}>;
|
|
9144
9150
|
}>;
|
|
9151
|
+
/**
|
|
9152
|
+
* Emits one loan per item of `emitArgs` in a single transaction, as one `emitLoan` call each
|
|
9153
|
+
* inside the contract's `multicall`, which reverts every loan when one of them fails.
|
|
9154
|
+
*
|
|
9155
|
+
* @remarks
|
|
9156
|
+
* `waitTxInBlock` resolves to `loans`, in the order of `emitArgs`, each shaped as `emitLoan`
|
|
9157
|
+
* returns it. Each item is paired with the `LoanEmitted` event of its collateral
|
|
9158
|
+
* (`nftCollateralAddress`, `tokenId`) rather than by position, so a result can never
|
|
9159
|
+
* describe another item's loan; two items with the same collateral, which cannot both be
|
|
9160
|
+
* emitted, would take their events in order. It throws when the transaction emitted a
|
|
9161
|
+
* different number of loans than it was sent, or none for an item's collateral.
|
|
9162
|
+
*/
|
|
9163
|
+
emitLoans(emitArgs: EmitLoanArgs[]): Promise<{
|
|
9164
|
+
txHash: `0x${string}`;
|
|
9165
|
+
waitTxInBlock: () => Promise<{
|
|
9166
|
+
blobGasPrice?: bigint | undefined;
|
|
9167
|
+
blobGasUsed?: bigint | undefined;
|
|
9168
|
+
blockHash: Hash;
|
|
9169
|
+
blockNumber: bigint;
|
|
9170
|
+
blockTimestamp?: bigint | undefined;
|
|
9171
|
+
contractAddress: Address | null | undefined;
|
|
9172
|
+
cumulativeGasUsed: bigint;
|
|
9173
|
+
effectiveGasPrice: bigint;
|
|
9174
|
+
from: Address;
|
|
9175
|
+
gasUsed: bigint;
|
|
9176
|
+
logs: import("viem").Log<bigint, number, false>[];
|
|
9177
|
+
logsBloom: Hex;
|
|
9178
|
+
root?: Hash | undefined;
|
|
9179
|
+
status: "success" | "reverted";
|
|
9180
|
+
to: Address | null;
|
|
9181
|
+
transactionHash: Hash;
|
|
9182
|
+
transactionIndex: number;
|
|
9183
|
+
type: import("viem").TransactionType;
|
|
9184
|
+
loans: {
|
|
9185
|
+
loan: {
|
|
9186
|
+
contractAddress: `0x${string}`;
|
|
9187
|
+
borrower: `0x${string}`;
|
|
9188
|
+
nftCollateralTokenId: bigint;
|
|
9189
|
+
nftCollateralAddress: `0x${string}`;
|
|
9190
|
+
principalAddress: `0x${string}`;
|
|
9191
|
+
principalAmount: bigint;
|
|
9192
|
+
startTime: bigint;
|
|
9193
|
+
duration: bigint;
|
|
9194
|
+
tranche: readonly {
|
|
9195
|
+
loanId: bigint;
|
|
9196
|
+
floor: bigint;
|
|
9197
|
+
principalAmount: bigint;
|
|
9198
|
+
lender: `0x${string}`;
|
|
9199
|
+
accruedInterest: bigint;
|
|
9200
|
+
startTime: bigint;
|
|
9201
|
+
aprBps: bigint;
|
|
9202
|
+
}[];
|
|
9203
|
+
protocolFee: bigint;
|
|
9204
|
+
id: string;
|
|
9205
|
+
} | {
|
|
9206
|
+
contractAddress: `0x${string}`;
|
|
9207
|
+
borrower: `0x${string}`;
|
|
9208
|
+
nftCollateralTokenId: bigint;
|
|
9209
|
+
nftCollateralAddress: `0x${string}`;
|
|
9210
|
+
principalAddress: `0x${string}`;
|
|
9211
|
+
principalAmount: bigint;
|
|
9212
|
+
startTime: bigint;
|
|
9213
|
+
duration: bigint;
|
|
9214
|
+
tranche: readonly {
|
|
9215
|
+
loanId: bigint;
|
|
9216
|
+
floor: bigint;
|
|
9217
|
+
principalAmount: bigint;
|
|
9218
|
+
lender: `0x${string}`;
|
|
9219
|
+
accruedInterest: bigint;
|
|
9220
|
+
startTime: bigint;
|
|
9221
|
+
aprBps: bigint;
|
|
9222
|
+
}[];
|
|
9223
|
+
protocolFee: bigint;
|
|
9224
|
+
id: string;
|
|
9225
|
+
} | {
|
|
9226
|
+
contractAddress: `0x${string}`;
|
|
9227
|
+
borrower: `0x${string}`;
|
|
9228
|
+
nftCollateralTokenId: bigint;
|
|
9229
|
+
nftCollateralAddress: `0x${string}`;
|
|
9230
|
+
principalAddress: `0x${string}`;
|
|
9231
|
+
principalAmount: bigint;
|
|
9232
|
+
startTime: bigint;
|
|
9233
|
+
duration: bigint;
|
|
9234
|
+
tranche: readonly {
|
|
9235
|
+
loanId: bigint;
|
|
9236
|
+
floor: bigint;
|
|
9237
|
+
principalAmount: bigint;
|
|
9238
|
+
lender: `0x${string}`;
|
|
9239
|
+
accruedInterest: bigint;
|
|
9240
|
+
startTime: bigint;
|
|
9241
|
+
aprBps: bigint;
|
|
9242
|
+
}[];
|
|
9243
|
+
protocolFee: bigint;
|
|
9244
|
+
lenderRefinanceDisabled: boolean;
|
|
9245
|
+
id: string;
|
|
9246
|
+
};
|
|
9247
|
+
loanId: bigint;
|
|
9248
|
+
offerIds: string[];
|
|
9249
|
+
}[];
|
|
9250
|
+
}>;
|
|
9251
|
+
}>;
|
|
9145
9252
|
revokeDelegationsAndEmitLoan({ delegations, emit, }: {
|
|
9146
9253
|
delegations: Address[];
|
|
9147
9254
|
emit: EmitLoanArgs;
|