gondi 0.50.0 → 0.51.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 +4 -4
- package/dist/src/clients/api/index.d.ts +3 -1
- package/dist/src/clients/contracts/index.d.ts +329 -0
- package/dist/src/deploys.d.ts +1 -0
- package/dist/src/generated/blockchain/cryptopunks721.d.ts +329 -0
- package/dist/src/gondi.d.ts +44 -3
- package/dist/src/index.d.ts +1 -1
- package/dist/src/utils/creditPurchase.d.ts +16 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/gondi.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { OperationVariables } from '@apollo/client/core/index.js';
|
|
|
2
2
|
import { Maybe } from 'graphql/jsutils/Maybe';
|
|
3
3
|
import { Account, Address, Hash, Hex, TransactionReceipt } from 'viem';
|
|
4
4
|
import { Auction } from './blockchain';
|
|
5
|
-
import { Api, Props as ApiProps } from './clients/api';
|
|
5
|
+
import { Api, OrderInput, 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 {
|
|
8
|
+
import { DealInput, GenerateCollectionOfferHashMutation, LoanOfferPublicationInput, MarketplaceEnum, NftOrderInput, OfferValidatorInput, SingleNftOrderInput, SingleNftSignedOfferInput, TokenStandardType } from './generated/graphql';
|
|
9
9
|
import * as model from './model';
|
|
10
10
|
import { NftStandard } from './model';
|
|
11
11
|
import { BuyWithLoanInput, BuyWithLoanQuote } from './utils/buyWithLoan';
|
|
@@ -289,7 +289,7 @@ export declare class Gondi {
|
|
|
289
289
|
* `collectionId` (2 to 1,000), and `collectionId` alone for a collection bid.
|
|
290
290
|
* A trait, set or collection bid fills up to `maxExecutions` times.
|
|
291
291
|
*/
|
|
292
|
-
makeOrder(orderInput:
|
|
292
|
+
makeOrder(orderInput: OrderInput): Promise<{
|
|
293
293
|
amount?: import("./generated/graphql").InputMaybe<import("./generated/graphql").Scalars["BigInt"]>;
|
|
294
294
|
contractAddress: import("./generated/graphql").Scalars["Address"];
|
|
295
295
|
currencyAddress: import("./generated/graphql").Scalars["Address"];
|
|
@@ -3894,6 +3894,45 @@ export declare class Gondi {
|
|
|
3894
3894
|
txHash: `0x${string}`;
|
|
3895
3895
|
waitMined: () => Promise<TransactionReceipt>;
|
|
3896
3896
|
}>;
|
|
3897
|
+
/**
|
|
3898
|
+
* Where the wallet's CryptoPunk `tokenId` stands on its way into CryptoPunks 721, read from
|
|
3899
|
+
* chain: `'wallet'` while the wallet holds it naked, `'stash'` once it sits in the wallet's
|
|
3900
|
+
* Stash waiting for {@link wrapPunk721}, `'wrapped'` once the wallet holds its 721 token, and
|
|
3901
|
+
* `'other'` when none of these holds.
|
|
3902
|
+
*
|
|
3903
|
+
* IMPLEMENTATION NOTE: the punks market's `punkIndexToAddress` names the punk's holder and
|
|
3904
|
+
* `CryptoPunks721.punkProxyForUser` the wallet's Stash, deployed or not yet; a wrapped punk is
|
|
3905
|
+
* held by the 721 contract, which mints its token to the wallet
|
|
3906
|
+
* (https://721.cryptopunks.app, https://etherscan.io/address/0x000000000000003607fce1ac9e043a86675c5c2f#code).
|
|
3907
|
+
*/
|
|
3908
|
+
punk721WrapState({ tokenId }: {
|
|
3909
|
+
tokenId: bigint;
|
|
3910
|
+
}): Promise<Punk721WrapState>;
|
|
3911
|
+
/**
|
|
3912
|
+
* Moves the wallet's naked CryptoPunk `tokenId` into its Stash, the first of the two
|
|
3913
|
+
* transactions that wrap it into CryptoPunks 721. Refuses a punk the wallet does not hold.
|
|
3914
|
+
*/
|
|
3915
|
+
transferPunkToStash721({ tokenId }: {
|
|
3916
|
+
tokenId: bigint;
|
|
3917
|
+
}): Promise<{
|
|
3918
|
+
txHash: `0x${string}`;
|
|
3919
|
+
waitTxInBlock: () => Promise<TransactionReceipt>;
|
|
3920
|
+
}>;
|
|
3921
|
+
/**
|
|
3922
|
+
* Wraps the CryptoPunk `tokenId` waiting in the wallet's Stash into CryptoPunks 721, minting
|
|
3923
|
+
* its 721 token to the wallet. Refuses a punk that is not in the Stash: move it there first
|
|
3924
|
+
* with {@link transferPunkToStash721}.
|
|
3925
|
+
*/
|
|
3926
|
+
wrapPunk721({ tokenId }: {
|
|
3927
|
+
tokenId: bigint;
|
|
3928
|
+
}): Promise<{
|
|
3929
|
+
txHash: `0x${string}`;
|
|
3930
|
+
waitTxInBlock: () => Promise<TransactionReceipt>;
|
|
3931
|
+
}>;
|
|
3932
|
+
/** The punk's wrap state with the addresses the wrap transactions need. */
|
|
3933
|
+
private _punk721Holding;
|
|
3934
|
+
/** A sent transaction whose `waitTxInBlock` resolves with its receipt once it succeeds. */
|
|
3935
|
+
private _minedTransaction;
|
|
3897
3936
|
buyWithSellAndRepay({ repaymentCalldata, purchaseBundlerAddress, mslContractAddress, price, swapData, }: {
|
|
3898
3937
|
repaymentCalldata: Hex;
|
|
3899
3938
|
purchaseBundlerAddress?: Address;
|
|
@@ -4022,6 +4061,8 @@ export type BurnAndWithdrawArgs = {
|
|
|
4022
4061
|
erc1155Collections?: Address[];
|
|
4023
4062
|
erc1155TokenIds?: bigint[];
|
|
4024
4063
|
};
|
|
4064
|
+
/** Where a CryptoPunk stands on its way into CryptoPunks 721; see `Gondi.punk721WrapState`. */
|
|
4065
|
+
export type Punk721WrapState = 'wallet' | 'stash' | 'wrapped' | 'other';
|
|
4025
4066
|
type wrapOldERC721Args = {
|
|
4026
4067
|
collection: {
|
|
4027
4068
|
contractData: {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { FlaggedNftError } from './errors';
|
|
2
2
|
export { Gondi } from './gondi';
|
|
3
3
|
export { LoanStatusType, OfferStatus, OffersSortField, Ordering, MarketplaceEnum, TokenStandardType, } from './generated/graphql';
|
|
4
|
-
export type { OnStepChange } from './gondi';
|
|
4
|
+
export type { OnStepChange, Punk721WrapState } 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';
|
|
@@ -25,6 +25,22 @@ 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;
|
|
28
44
|
/** Compares every ABI field against the confirmed terms before signing or submitting an API execution. */
|
|
29
45
|
export declare const assertCreditPurchaseExecution: (expected: ExecutionDataV7, received: unknown) => void;
|
|
30
46
|
/** Rechecks activation, zero additional taxes and router funding before buyer signing. */
|