gondi 0.48.0 → 0.50.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 +452 -53
- package/dist/index.mjs.map +4 -4
- package/dist/src/clients/api/index.d.ts +8 -2
- package/dist/src/clients/api/sdk.d.ts +3 -0
- package/dist/src/clients/contracts/MslV5.d.ts +3 -1
- package/dist/src/clients/contracts/MslV6.d.ts +2 -1
- package/dist/src/generated/graphql/index.d.ts +399 -7
- package/dist/src/gondi.d.ts +159 -4
- package/dist/src/index.d.ts +1 -0
- package/dist/src/utils/delegation.d.ts +21 -0
- package/dist/tests/utils/gondiStub.d.ts +61 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/gondi.d.ts
CHANGED
|
@@ -5,11 +5,12 @@ import { Auction } from './blockchain';
|
|
|
5
5
|
import { Api, Props as ApiProps } from './clients/api';
|
|
6
6
|
import { Contracts, GondiPublicClient, Wallet } from './clients/contracts';
|
|
7
7
|
import { CrossCurrencyRenegotiationInput, CrossCurrencyRenegotiationQuote } from './clients/contracts/CrossCurrencyRenegotiation';
|
|
8
|
-
import { CollectionOrderInput, DealInput, GenerateCollectionOfferHashMutation, LoanOfferPublicationInput, MarketplaceEnum, NftOrderInput, OfferValidatorInput, SingleNftOrderInput, SingleNftSignedOfferInput, TokenStandardType, TraitOrderInput } from './generated/graphql';
|
|
8
|
+
import { CollectionOrderInput, DealInput, GenerateCollectionOfferHashMutation, LoanOfferPublicationInput, MarketplaceEnum, NftOrderInput, NftSetOrderInput, OfferValidatorInput, SingleNftOrderInput, SingleNftSignedOfferInput, TokenStandardType, TraitOrderInput } from './generated/graphql';
|
|
9
9
|
import * as model from './model';
|
|
10
10
|
import { NftStandard } from './model';
|
|
11
11
|
import { BuyWithLoanInput, BuyWithLoanQuote } from './utils/buyWithLoan';
|
|
12
12
|
import { CreditPurchaseInput, CreditPurchaseQuote } from './utils/creditPurchase';
|
|
13
|
+
import { LoanDelegation } from './utils/delegation';
|
|
13
14
|
import { LoanToMslLoanType } from './utils/loan';
|
|
14
15
|
import { OptionalNullable } from './utils/types';
|
|
15
16
|
/** An offer any NFT of a set, a collection or the NFTs carrying some traits, can borrow against. */
|
|
@@ -280,7 +281,15 @@ export declare class Gondi {
|
|
|
280
281
|
}>;
|
|
281
282
|
saveOffer: (signedOffer: TOffer & MakeOfferSignedFields) => Promise<TSaved>;
|
|
282
283
|
}): Promise<TSaved>;
|
|
283
|
-
|
|
284
|
+
/**
|
|
285
|
+
* Publishes a bid or listing, signing the order when the API asks for it.
|
|
286
|
+
*
|
|
287
|
+
* The input picks the kind: `tokenId` for one NFT, `traitIds` for a trait bid,
|
|
288
|
+
* `nftIds` for a set bid that fills with any of the listed NFTs of
|
|
289
|
+
* `collectionId` (2 to 1,000), and `collectionId` alone for a collection bid.
|
|
290
|
+
* A trait, set or collection bid fills up to `maxExecutions` times.
|
|
291
|
+
*/
|
|
292
|
+
makeOrder(orderInput: SingleNftOrderInput | CollectionOrderInput | TraitOrderInput | NftSetOrderInput): Promise<{
|
|
284
293
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
285
294
|
contractAddress: import("./generated/graphql").Scalars["Address"];
|
|
286
295
|
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
@@ -331,6 +340,24 @@ export declare class Gondi {
|
|
|
331
340
|
id: string;
|
|
332
341
|
status: string;
|
|
333
342
|
marketPlaceAddress: Address;
|
|
343
|
+
} | {
|
|
344
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
345
|
+
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
346
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
347
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
348
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
349
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
350
|
+
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
351
|
+
nftIds: Array<import("./generated/graphql").Scalars["Int"]>;
|
|
352
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
353
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
354
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
355
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
356
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
357
|
+
__typename?: "MultipleTraitOrder";
|
|
358
|
+
id: string;
|
|
359
|
+
status: string;
|
|
360
|
+
marketPlaceAddress: Address;
|
|
334
361
|
} | {
|
|
335
362
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
336
363
|
contractAddress: import("./generated/graphql").Scalars["Address"];
|
|
@@ -382,6 +409,24 @@ export declare class Gondi {
|
|
|
382
409
|
id: string;
|
|
383
410
|
status: string;
|
|
384
411
|
marketPlaceAddress: Address;
|
|
412
|
+
} | {
|
|
413
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
414
|
+
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
415
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
416
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
417
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
418
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
419
|
+
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
420
|
+
nftIds: Array<import("./generated/graphql").Scalars["Int"]>;
|
|
421
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
422
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
423
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
424
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
425
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
426
|
+
__typename?: "TraitOrder";
|
|
427
|
+
id: string;
|
|
428
|
+
status: string;
|
|
429
|
+
marketPlaceAddress: Address;
|
|
385
430
|
} | {
|
|
386
431
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
387
432
|
contractAddress: import("./generated/graphql").Scalars["Address"];
|
|
@@ -433,6 +478,93 @@ export declare class Gondi {
|
|
|
433
478
|
id: string;
|
|
434
479
|
status: string;
|
|
435
480
|
marketPlaceAddress: Address;
|
|
481
|
+
} | {
|
|
482
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
483
|
+
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
484
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
485
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
486
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
487
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
488
|
+
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
489
|
+
nftIds: Array<import("./generated/graphql").Scalars["Int"]>;
|
|
490
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
491
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
492
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
493
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
494
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
495
|
+
__typename?: "SingleNFTOrder";
|
|
496
|
+
id: string;
|
|
497
|
+
status: string;
|
|
498
|
+
marketPlaceAddress: Address;
|
|
499
|
+
} | {
|
|
500
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
501
|
+
contractAddress: import("./generated/graphql").Scalars["Address"];
|
|
502
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
503
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
504
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
505
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
506
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
507
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
508
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
509
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
510
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
511
|
+
tokenId: import("./generated/graphql").Scalars["BigInt"];
|
|
512
|
+
__typename?: "SetBidOrder";
|
|
513
|
+
id: string;
|
|
514
|
+
status: string;
|
|
515
|
+
marketPlaceAddress: Address;
|
|
516
|
+
} | {
|
|
517
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
518
|
+
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
519
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
520
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
521
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
522
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
523
|
+
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
524
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
525
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
526
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
527
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
528
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
529
|
+
__typename?: "SetBidOrder";
|
|
530
|
+
id: string;
|
|
531
|
+
status: string;
|
|
532
|
+
marketPlaceAddress: Address;
|
|
533
|
+
} | {
|
|
534
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
535
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
536
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
537
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
538
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
539
|
+
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
540
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
541
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
542
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
543
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
544
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
545
|
+
traitIds: Array<import("./generated/graphql").Scalars["Int"]>;
|
|
546
|
+
__typename?: "SetBidOrder";
|
|
547
|
+
id: string;
|
|
548
|
+
status: string;
|
|
549
|
+
marketPlaceAddress: Address;
|
|
550
|
+
} | {
|
|
551
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
552
|
+
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
553
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
554
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
555
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
556
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
557
|
+
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
558
|
+
nftIds: Array<import("./generated/graphql").Scalars["Int"]>;
|
|
559
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
560
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
561
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
562
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
563
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
564
|
+
__typename?: "SetBidOrder";
|
|
565
|
+
id: string;
|
|
566
|
+
status: string;
|
|
567
|
+
marketPlaceAddress: Address;
|
|
436
568
|
} | {
|
|
437
569
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
438
570
|
contractAddress: import("./generated/graphql").Scalars["Address"];
|
|
@@ -484,6 +616,24 @@ export declare class Gondi {
|
|
|
484
616
|
id: string;
|
|
485
617
|
status: string;
|
|
486
618
|
marketPlaceAddress: Address;
|
|
619
|
+
} | {
|
|
620
|
+
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
621
|
+
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
622
|
+
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
623
|
+
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
624
|
+
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
625
|
+
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
626
|
+
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
627
|
+
nftIds: Array<import("./generated/graphql").Scalars["Int"]>;
|
|
628
|
+
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
629
|
+
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
630
|
+
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
631
|
+
stealth?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
632
|
+
taker?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Address"]>;
|
|
633
|
+
__typename?: "CollectionOrder";
|
|
634
|
+
id: string;
|
|
635
|
+
status: string;
|
|
636
|
+
marketPlaceAddress: Address;
|
|
487
637
|
}>;
|
|
488
638
|
makeOrders(orders: SingleNftOrderInput[]): Promise<{
|
|
489
639
|
__typename?: "SingleNFTOrder";
|
|
@@ -2915,10 +3065,15 @@ export declare class Gondi {
|
|
|
2915
3065
|
}>;
|
|
2916
3066
|
/**
|
|
2917
3067
|
* RevokeDelegationsAndEmitLoan should be used when token has been delegated without being revoked,
|
|
2918
|
-
* and a new loan wants to be emitted, erasing the delegations provided as argument
|
|
3068
|
+
* and a new loan wants to be emitted, erasing the delegations provided as argument in the same
|
|
3069
|
+
* transaction as the emit.
|
|
3070
|
+
*
|
|
3071
|
+
* @param delegations The token's delegations, as the API's `Delegation.delegateTo` and
|
|
3072
|
+
* `Delegation.rights` report them: each `{ to, rights }` is revoked with every rights value it
|
|
3073
|
+
* lists, and a bare address with the full-rights `zeroHash`.
|
|
2919
3074
|
*/
|
|
2920
3075
|
revokeDelegationsAndEmitLoan({ delegations, emit, }: {
|
|
2921
|
-
delegations:
|
|
3076
|
+
delegations: readonly LoanDelegation[];
|
|
2922
3077
|
emit: Parameters<Gondi['emitLoan']>[0];
|
|
2923
3078
|
}): Promise<{
|
|
2924
3079
|
txHash: `0x${string}`;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type { OnStepChange } from './gondi';
|
|
|
5
5
|
export type { CreditPurchaseInput, CreditPurchaseQuote } from './utils/creditPurchase';
|
|
6
6
|
export type { CrossCurrencyRenegotiationInput, CrossCurrencyRenegotiationQuote, } from './clients/contracts/CrossCurrencyRenegotiation';
|
|
7
7
|
export type * as Types from './model';
|
|
8
|
+
export type { LoanDelegation } from './utils/delegation';
|
|
8
9
|
export { FULFILLED, REJECTED } from './utils/promises';
|
|
9
10
|
export type { BuyWithLoanInput, BuyWithLoanQuote } from './utils/buyWithLoan';
|
|
10
11
|
export type { LoanOfferPublicationInput } from './generated/graphql';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Address, Hash } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* A delegation the loan contract holds for a token: its delegate and every rights value enabled
|
|
4
|
+
* for it, as the API's `Delegation.delegateTo` and `Delegation.rights` report them. A bare address
|
|
5
|
+
* stands for the delegate's full-rights (`zeroHash`) delegation.
|
|
6
|
+
*/
|
|
7
|
+
export type LoanDelegation = Address | {
|
|
8
|
+
to: Address;
|
|
9
|
+
rights: readonly Hash[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* One `revokeDelegate` call per (delegate, rights) pair of `delegations`.
|
|
13
|
+
*
|
|
14
|
+
* IMPLEMENTATION NOTE: the delegate.xyz registry keys each delegation by its rights, so a
|
|
15
|
+
* revocation names the exact value it removes, and revoking one that was never enabled is a no-op
|
|
16
|
+
* (https://docs.delegate.xyz/technical-documentation/delegate-registry/idelegateregistry.sol).
|
|
17
|
+
*/
|
|
18
|
+
export declare const delegationRevocations: (delegations: readonly LoanDelegation[]) => {
|
|
19
|
+
to: `0x${string}`;
|
|
20
|
+
rights: `0x${string}`;
|
|
21
|
+
}[];
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare const SINGLE_NFT_OFFER_HASH: {
|
|
2
|
+
offer: {
|
|
3
|
+
offerHash: "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
4
|
+
offerId: bigint;
|
|
5
|
+
validators: never[];
|
|
6
|
+
fee: bigint;
|
|
7
|
+
collateralAddress: "0x0000000000000000000000000000000000000000";
|
|
8
|
+
nft: {
|
|
9
|
+
tokenId: bigint;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const RENEGOTIATION_OFFER_HASH: {
|
|
14
|
+
offer: {
|
|
15
|
+
renegotiationId: bigint;
|
|
16
|
+
offerHash: "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
17
|
+
loanId: bigint;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const RENEGOTIATION: {
|
|
21
|
+
loanId: string;
|
|
22
|
+
principalAmount: bigint;
|
|
23
|
+
feeAmount: bigint;
|
|
24
|
+
aprBps: bigint;
|
|
25
|
+
duration: bigint;
|
|
26
|
+
expirationTime: bigint;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Builds a `Gondi` without running its constructor, holding only `fields`.
|
|
30
|
+
*/
|
|
31
|
+
export declare const stubGondi: (fields: object) => import("../../src").Gondi & object;
|
|
32
|
+
/**
|
|
33
|
+
* Builds a `Gondi` without running its constructor: empty pending-publication
|
|
34
|
+
* maps, a zero-address account and wallet, plus the test's own `contracts` and
|
|
35
|
+
* `apiClient` stubs.
|
|
36
|
+
*/
|
|
37
|
+
export declare const gondiWith: (overrides: {
|
|
38
|
+
contracts: object;
|
|
39
|
+
apiClient: object;
|
|
40
|
+
}) => import("../../src").Gondi & object;
|
|
41
|
+
/**
|
|
42
|
+
* The `nftFlaggedByContractAddressAndTokenId` response for an NFT that is not
|
|
43
|
+
* flagged and wraps nothing.
|
|
44
|
+
*/
|
|
45
|
+
export declare const notFlaggedNft: () => Promise<{
|
|
46
|
+
nft: unknown;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Builds the stubs for a test of the flagged-NFT check that runs before a
|
|
50
|
+
* loan is emitted: an `nftFlaggedByContractAddressAndTokenId` mock answering
|
|
51
|
+
* `notFlaggedNft`, and a `createGondi` factory wiring it next to `contracts`,
|
|
52
|
+
* with the check on unless `skipFlaggedNftCheck` is passed.
|
|
53
|
+
*/
|
|
54
|
+
export declare const flaggedNftCheckStub: (contracts: object) => {
|
|
55
|
+
nftFlaggedByContractAddressAndTokenId: import("bun:test").Mock<() => Promise<{
|
|
56
|
+
nft: unknown;
|
|
57
|
+
}>>;
|
|
58
|
+
createGondi: ({ skipFlaggedNftCheck }?: {
|
|
59
|
+
skipFlaggedNftCheck?: boolean | undefined;
|
|
60
|
+
}) => import("../../src").Gondi & object;
|
|
61
|
+
};
|