gondi 0.52.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 +55 -55
- 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/gondi.d.ts +13 -3
- 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
|
@@ -18,4 +18,6 @@ export declare class OldERC721Wrapper extends BaseContract<typeof oldErc721Wrapp
|
|
|
18
18
|
txHash: `0x${string}`;
|
|
19
19
|
waitMined: () => Promise<import("viem").TransactionReceipt>;
|
|
20
20
|
}>;
|
|
21
|
+
/** The wrapper's public shape of {@link minedTransaction}: its wait is named `waitMined`. */
|
|
22
|
+
private _sentTransaction;
|
|
21
23
|
}
|
|
@@ -51,6 +51,22 @@ export declare class PurchaseBundlerV2 extends BaseContract<typeof purchaseBundl
|
|
|
51
51
|
}];
|
|
52
52
|
};
|
|
53
53
|
static ETH_SENTINEL: string;
|
|
54
|
+
/** Decodes the `executionInfo` callback carried by an execution or a seller repayment. */
|
|
55
|
+
static decodePurchaseCallback(data: Hex): {
|
|
56
|
+
reservoirExecutionInfo: {
|
|
57
|
+
module: `0x${string}`;
|
|
58
|
+
data: `0x${string}`;
|
|
59
|
+
value: bigint;
|
|
60
|
+
};
|
|
61
|
+
contractMustBeOwner: boolean;
|
|
62
|
+
purchaseCurrency: `0x${string}`;
|
|
63
|
+
amount: bigint;
|
|
64
|
+
swapData: `0x${string}`;
|
|
65
|
+
swapValue: bigint;
|
|
66
|
+
maxSlippage: bigint;
|
|
67
|
+
};
|
|
68
|
+
/** The callback's purchase currency, with every native spelling (including the ETH sentinel) as `zeroAddress`. */
|
|
69
|
+
static callbackPurchaseCurrency(callback: ReturnType<typeof PurchaseBundlerV2.decodePurchaseCallback>): Address;
|
|
54
70
|
buy({ emitCalldata, value }: {
|
|
55
71
|
emitCalldata: Hex;
|
|
56
72
|
value: bigint;
|
package/dist/src/gondi.d.ts
CHANGED
|
@@ -3936,10 +3936,20 @@ export declare class Gondi {
|
|
|
3936
3936
|
txHash: `0x${string}`;
|
|
3937
3937
|
waitTxInBlock: () => Promise<TransactionReceipt>;
|
|
3938
3938
|
}>;
|
|
3939
|
-
/**
|
|
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. */
|
|
3940
3952
|
private _punk721Holding;
|
|
3941
|
-
/** A sent transaction whose `waitTxInBlock` resolves with its receipt once it succeeds. */
|
|
3942
|
-
private _minedTransaction;
|
|
3943
3953
|
buyWithSellAndRepay({ repaymentCalldata, purchaseBundlerAddress, mslContractAddress, price, swapData, }: {
|
|
3944
3954
|
repaymentCalldata: Hex;
|
|
3945
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. */
|