gondi 0.51.0 → 0.53.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 +308 -60
- package/dist/index.mjs.map +3 -3
- package/dist/src/clients/contracts/OldERC721Wrapper.d.ts +2 -0
- package/dist/src/clients/contracts/PurchaseBundlerV2.d.ts +16 -0
- package/dist/src/generated/graphql/index.d.ts +231 -21
- package/dist/src/gondi.d.ts +26 -9
- package/dist/src/utils/blockchain.d.ts +7 -2
- package/dist/src/utils/creditPurchase.d.ts +0 -16
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/gondi.d.ts
CHANGED
|
@@ -286,7 +286,9 @@ export declare class Gondi {
|
|
|
286
286
|
*
|
|
287
287
|
* The input picks the kind: `tokenId` for one NFT, `traitIds` for a trait bid,
|
|
288
288
|
* `nftIds` for a set bid that fills with any of the listed NFTs of
|
|
289
|
-
* `collectionId` (2 to 1,000),
|
|
289
|
+
* `collectionId` (2 to 1,000), `condition.anyTraitIds` for an OR trait bid that
|
|
290
|
+
* fills with any NFT of `collectionId` carrying one of those values of a trait
|
|
291
|
+
* key, and `collectionId` alone for a collection bid.
|
|
290
292
|
* A trait, set or collection bid fills up to `maxExecutions` times.
|
|
291
293
|
*/
|
|
292
294
|
makeOrder(orderInput: OrderInput): Promise<{
|
|
@@ -343,12 +345,13 @@ export declare class Gondi {
|
|
|
343
345
|
} | {
|
|
344
346
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
345
347
|
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
348
|
+
condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
|
|
346
349
|
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
347
350
|
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
348
351
|
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
349
352
|
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
350
353
|
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
351
|
-
nftIds
|
|
354
|
+
nftIds?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").Scalars["Int"]>>;
|
|
352
355
|
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
353
356
|
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
354
357
|
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
@@ -412,12 +415,13 @@ export declare class Gondi {
|
|
|
412
415
|
} | {
|
|
413
416
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
414
417
|
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
418
|
+
condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
|
|
415
419
|
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
416
420
|
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
417
421
|
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
418
422
|
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
419
423
|
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
420
|
-
nftIds
|
|
424
|
+
nftIds?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").Scalars["Int"]>>;
|
|
421
425
|
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
422
426
|
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
423
427
|
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
@@ -481,12 +485,13 @@ export declare class Gondi {
|
|
|
481
485
|
} | {
|
|
482
486
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
483
487
|
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
488
|
+
condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
|
|
484
489
|
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
485
490
|
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
486
491
|
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
487
492
|
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
488
493
|
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
489
|
-
nftIds
|
|
494
|
+
nftIds?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").Scalars["Int"]>>;
|
|
490
495
|
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
491
496
|
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
492
497
|
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
@@ -550,12 +555,13 @@ export declare class Gondi {
|
|
|
550
555
|
} | {
|
|
551
556
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
552
557
|
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
558
|
+
condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
|
|
553
559
|
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
554
560
|
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
555
561
|
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
556
562
|
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
557
563
|
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
558
|
-
nftIds
|
|
564
|
+
nftIds?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").Scalars["Int"]>>;
|
|
559
565
|
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
560
566
|
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
561
567
|
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
@@ -619,12 +625,13 @@ export declare class Gondi {
|
|
|
619
625
|
} | {
|
|
620
626
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
621
627
|
collectionId: import("./generated/graphql").Scalars["Int"];
|
|
628
|
+
condition?: import("./generated/graphql").InputMaybe<import("./generated/graphql").NftSetConditionInput>;
|
|
622
629
|
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
623
630
|
expirationTime: import("./generated/graphql").Scalars["BigInt"];
|
|
624
631
|
fees?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").OrderFee>>;
|
|
625
632
|
isAsk?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["Boolean"]>;
|
|
626
633
|
maxExecutions?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
627
|
-
nftIds
|
|
634
|
+
nftIds?: import("./generated/graphql").InputMaybe<Array<import("./generated/graphql").Scalars["Int"]>>;
|
|
628
635
|
price?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
629
636
|
signature: import("./generated/graphql").InputMaybe<`0x${string}`>;
|
|
630
637
|
startTime: import("./generated/graphql").Scalars["BigInt"];
|
|
@@ -3929,10 +3936,20 @@ export declare class Gondi {
|
|
|
3929
3936
|
txHash: `0x${string}`;
|
|
3930
3937
|
waitTxInBlock: () => Promise<TransactionReceipt>;
|
|
3931
3938
|
}>;
|
|
3932
|
-
/**
|
|
3939
|
+
/**
|
|
3940
|
+
* Unwraps the wallet's CryptoPunks 721 token `tokenId` back into a naked CryptoPunk: the 721
|
|
3941
|
+
* contract burns the token and hands the punk to the wallet, in one transaction with no
|
|
3942
|
+
* approval. Refuses unless the wallet holds the 721 token, so a token held by a loan, a vault
|
|
3943
|
+
* or someone else is never sent.
|
|
3944
|
+
*/
|
|
3945
|
+
unwrapPunk721({ tokenId }: {
|
|
3946
|
+
tokenId: bigint;
|
|
3947
|
+
}): Promise<{
|
|
3948
|
+
txHash: `0x${string}`;
|
|
3949
|
+
waitTxInBlock: () => Promise<TransactionReceipt>;
|
|
3950
|
+
}>;
|
|
3951
|
+
/** The punk's wrap state with the addresses the wrap and unwrap transactions need. */
|
|
3933
3952
|
private _punk721Holding;
|
|
3934
|
-
/** A sent transaction whose `waitTxInBlock` resolves with its receipt once it succeeds. */
|
|
3935
|
-
private _minedTransaction;
|
|
3936
3953
|
buyWithSellAndRepay({ repaymentCalldata, purchaseBundlerAddress, mslContractAddress, price, swapData, }: {
|
|
3937
3954
|
repaymentCalldata: Hex;
|
|
3938
3955
|
purchaseBundlerAddress?: Address;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublicClient, TransactionReceipt } from 'viem';
|
|
1
|
+
import { Hash, PublicClient, TransactionReceipt } from 'viem';
|
|
2
2
|
import { HexString } from '../blockchain';
|
|
3
3
|
export declare const isEmptyCalldata: (calldata: HexString) => calldata is "0x";
|
|
4
4
|
/**
|
|
@@ -11,13 +11,18 @@ export declare const isEmptyCalldata: (calldata: HexString) => calldata is "0x";
|
|
|
11
11
|
* caller that awaits the receipt alone treats a reverted transaction as mined.
|
|
12
12
|
*/
|
|
13
13
|
export declare const assertTransactionSucceeded: (receipt: TransactionReceipt) => TransactionReceipt;
|
|
14
|
+
type ReceiptWaiter = Pick<PublicClient, 'waitForTransactionReceipt'>;
|
|
15
|
+
/** A sent transaction whose `waitTxInBlock` resolves with its receipt once it succeeds. */
|
|
16
|
+
export declare const minedTransaction: (client: ReceiptWaiter, txHash: Hash) => {
|
|
17
|
+
txHash: `0x${string}`;
|
|
18
|
+
waitTxInBlock: () => Promise<TransactionReceipt>;
|
|
19
|
+
};
|
|
14
20
|
/**
|
|
15
21
|
* Total time a receipt wait keeps trying before giving up on a broadcast
|
|
16
22
|
* transaction. Slow-to-mine transactions usually confirm well within this
|
|
17
23
|
* window; viem's own default gives up after 180s.
|
|
18
24
|
*/
|
|
19
25
|
export declare const WAIT_FOR_RECEIPT_TIMEOUT_MILLIS = 360000;
|
|
20
|
-
type ReceiptWaiter = Pick<PublicClient, 'waitForTransactionReceipt'>;
|
|
21
26
|
interface ReceiptWaitOptions {
|
|
22
27
|
timeoutMillis?: number;
|
|
23
28
|
retryDelayMillis?: number;
|
|
@@ -25,22 +25,6 @@ export type CreditPurchaseQuote = Readonly<{
|
|
|
25
25
|
loanSwapData: Hex;
|
|
26
26
|
callbackData: Hex;
|
|
27
27
|
}>;
|
|
28
|
-
/** Decodes the purchase bundler's `executionInfo` callback carried by an execution or a seller repayment. */
|
|
29
|
-
export declare const decodePurchaseCallback: (data: Hex) => {
|
|
30
|
-
reservoirExecutionInfo: {
|
|
31
|
-
module: `0x${string}`;
|
|
32
|
-
data: `0x${string}`;
|
|
33
|
-
value: bigint;
|
|
34
|
-
};
|
|
35
|
-
contractMustBeOwner: boolean;
|
|
36
|
-
purchaseCurrency: `0x${string}`;
|
|
37
|
-
amount: bigint;
|
|
38
|
-
swapData: `0x${string}`;
|
|
39
|
-
swapValue: bigint;
|
|
40
|
-
maxSlippage: bigint;
|
|
41
|
-
};
|
|
42
|
-
/** The callback's purchase currency, with every native spelling (including the ETH sentinel) as `zeroAddress`. */
|
|
43
|
-
export declare const callbackPurchaseCurrency: (callback: ReturnType<typeof decodePurchaseCallback>) => Address;
|
|
44
28
|
/** Compares every ABI field against the confirmed terms before signing or submitting an API execution. */
|
|
45
29
|
export declare const assertCreditPurchaseExecution: (expected: ExecutionDataV7, received: unknown) => void;
|
|
46
30
|
/** Rechecks activation, zero additional taxes and router funding before buyer signing. */
|