@0xsequence/marketplace-sdk 2.0.0 → 2.0.2
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/CHANGELOG.md +18 -0
- package/dist/BellIcon.js +1 -1
- package/dist/Card.js +1 -1
- package/dist/ShopCard.d.ts +4 -4
- package/dist/builder-api.js +1 -1
- package/dist/collectible.js +2 -2
- package/dist/collectible.js.map +1 -1
- package/dist/collection.js +1 -1
- package/dist/create-config.d.ts +589 -193
- package/dist/create-config.js +1 -1
- package/dist/currency.js +3 -3
- package/dist/currency.js.map +1 -1
- package/dist/dist.js +167 -148
- package/dist/dist.js.map +1 -1
- package/dist/expirationDateSelect.js +1 -1
- package/dist/filter-state.d.ts +1 -1
- package/dist/filters.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index10.d.ts +1 -1
- package/dist/index11.d.ts +17 -17
- package/dist/index12.d.ts +21 -21
- package/dist/index14.d.ts +3 -3
- package/dist/index15.d.ts +3 -3
- package/dist/index16.d.ts +2 -2
- package/dist/index17.d.ts +75 -75
- package/dist/index18.d.ts +40 -40
- package/dist/index19.d.ts +5 -5
- package/dist/index2.d.ts +4 -1
- package/dist/index21.d.ts +15 -15
- package/dist/index22.d.ts +8 -65
- package/dist/index23.d.ts +21 -13
- package/dist/index26.d.ts +4 -4
- package/dist/index27.d.ts +4 -4
- package/dist/index28.d.ts +10 -10
- package/dist/index3.d.ts +2 -2194
- package/dist/index31.d.ts +5 -5
- package/dist/index33.d.ts +3 -3
- package/dist/index34.d.ts +1 -1
- package/dist/index35.d.ts +1 -1
- package/dist/index36.d.ts +5 -5
- package/dist/index37.d.ts +8 -6
- package/dist/index38.d.ts +5 -5
- package/dist/index39.d.ts +1 -1
- package/dist/index4.d.ts +1356 -1356
- package/dist/index40.d.ts +2 -2
- package/dist/index8.d.ts +11 -3
- package/dist/index9.d.ts +2811 -3
- package/dist/inventory.d.ts +4 -4
- package/dist/inventory.js +3 -3
- package/dist/inventory.js.map +1 -1
- package/dist/marketplace2.js +3 -3
- package/dist/marketplace2.js.map +1 -1
- package/dist/metadata.d.ts +41 -41
- package/dist/primary-sale-checkout-options.d.ts +4 -4
- package/dist/quantityInput.js +1 -1
- package/dist/ranges.d.ts +12 -12
- package/dist/react/_internal/index.d.ts +1 -1
- package/dist/react/_internal/index.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/queries/collectible/index.d.ts +1 -1
- package/dist/react/queries/index.d.ts +1 -1
- package/dist/react/ssr/index.d.ts +3 -3
- package/dist/react/ssr/index.js +3 -3
- package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +1 -1
- package/dist/react/ui/modals/CreateListingModal/internal/hooks/index.d.ts +1 -1
- package/dist/react/ui/modals/MakeOfferModal/internal/hooks/index.d.ts +1 -1
- package/dist/react/ui/modals/_internal/components/alertMessage/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/baseModal/index.d.ts +6 -6
- package/dist/react/ui/modals/_internal/components/calendar/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/currencyImage/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/currencyOptionsSelect/index.d.ts +3 -3
- package/dist/react/ui/modals/_internal/components/floorPriceText/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/priceInput/index.d.ts +3 -5
- package/dist/react/ui/modals/_internal/components/quantityInput/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/selectWaasFeeOptions/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/switchChainErrorModal/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/timeAgo/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/tokenPreview/index.d.ts +3 -3
- package/dist/react/ui/modals/_internal/components/transaction-footer/index.d.ts +3 -3
- package/dist/react/ui/modals/_internal/components/transactionDetails/index.d.ts +3 -3
- package/dist/react/ui/modals/_internal/components/transactionPreview/index.d.ts +3 -3
- package/dist/react/ui/modals/_internal/components/transactionStatusModal/index.d.ts +3 -3
- package/dist/react.js +2279 -1919
- package/dist/react.js.map +1 -1
- package/dist/styles/index.css +15 -0
- package/dist/token-balances.d.ts +28 -28
- package/dist/transaction-footer.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/url-state.js +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/utils.js +31 -4
- package/dist/utils.js.map +1 -1
- package/package.json +7 -5
- package/src/react/hooks/config/useMarketplaceConfig.test.tsx +1 -0
- package/src/react/hooks/currency/list.test.tsx +23 -2
- package/src/react/hooks/transactions/useCancelTransactionSteps.tsx +4 -1
- package/src/react/hooks/transactions/useMarketTransactionSteps.tsx +55 -15
- package/src/react/hooks/utils/useEnsureCorrectChain.ts +10 -5
- package/src/react/queries/collectible/market-list.ts +5 -3
- package/src/react/queries/currency/list.ts +8 -5
- package/src/react/queries/inventory/inventory.ts +5 -3
- package/src/react/queries/marketplace/filters.ts +5 -3
- package/src/react/ui/modals/BuyModal/components/BuyModalContent.tsx +74 -37
- package/src/react/ui/modals/BuyModal/components/CryptoPaymentModal.tsx +74 -11
- package/src/react/ui/modals/BuyModal/components/Modal.tsx +62 -1
- package/src/react/ui/modals/BuyModal/hooks/useExecuteBundledTransactions.ts +13 -26
- package/src/react/ui/modals/BuyModal/hooks/useMarketPlatformFee.ts +5 -5
- package/src/react/ui/modals/BuyModal/internal/__tests__/buildTrailsMarketBuyActions.test.ts +213 -0
- package/src/react/ui/modals/BuyModal/internal/buildTrailsMarketBuyActions.ts +259 -0
- package/src/react/ui/modals/BuyModal/internal/buyModalContext.ts +79 -10
- package/src/react/ui/modals/BuyModal/internal/cryptoPaymentModalContext.tsx +44 -17
- package/src/react/ui/modals/CreateListingModal/internal/store.ts +5 -2
- package/src/react/ui/modals/MakeOfferModal/internal/context.ts +21 -1
- package/src/react/ui/modals/MakeOfferModal/internal/helpers/validation.ts +16 -1
- package/src/react/ui/modals/MakeOfferModal/internal/store.ts +5 -2
- package/src/react/ui/modals/SellModal/internal/store.ts +5 -2
- package/src/react/ui/modals/_internal/components/baseModal/errors/ModalInitializationError.tsx +8 -6
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +2 -1
- package/src/react/ui/modals/_internal/components/priceInput/index.tsx +13 -19
- package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +5 -2
- package/src/react/ui/modals/_internal/helpers/currency.test.ts +27 -0
- package/src/react/ui/modals/_internal/helpers/currency.ts +4 -2
- package/src/styles/styles.ts +18 -0
- package/src/utils/__tests__/getMarketplaceDetails.test.ts +10 -0
- package/src/utils/__tests__/getWebRPCErrorMessage.test.ts +28 -0
- package/src/utils/__tests__/marketplaceNormalization.test.ts +38 -0
- package/src/utils/collection.ts +19 -0
- package/src/utils/getConduitAddressForOrderbook.ts +2 -10
- package/src/utils/getMarketplaceDetails.ts +11 -4
- package/src/utils/getWebRPCErrorMessage.ts +21 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/normalizeMarketplace.ts +31 -0
package/dist/index31.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as Address$1, Mt as Page$1, Ot as GetTokenSuppliesRequest, jt as MetadataOptions$1, kt as GetTokenSuppliesResponse } from "./index2.js";
|
|
2
2
|
import { U as SdkInfiniteQueryParams, X as WithRequired } from "./create-config.js";
|
|
3
3
|
import * as _0xsequence_indexer0 from "@0xsequence/indexer";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _tanstack_react_query72 from "@tanstack/react-query";
|
|
5
5
|
|
|
6
6
|
//#region src/react/queries/token/supplies.d.ts
|
|
7
7
|
type FetchTokenSuppliesParams = Omit<GetTokenSuppliesRequest, 'contractAddress' | 'collectionAddress'> & {
|
|
@@ -20,13 +20,13 @@ declare function getTokenSuppliesQueryKey(params: TokenSuppliesQueryOptions): re
|
|
|
20
20
|
includeMetadata: boolean | undefined;
|
|
21
21
|
metadataOptions: MetadataOptions$1 | undefined;
|
|
22
22
|
}];
|
|
23
|
-
declare function tokenSuppliesQueryOptions(params: TokenSuppliesQueryOptions):
|
|
23
|
+
declare function tokenSuppliesQueryOptions(params: TokenSuppliesQueryOptions): _tanstack_react_query72.OmitKeyof<_tanstack_react_query72.UseInfiniteQueryOptions<GetTokenSuppliesResponse, Error, _tanstack_react_query72.InfiniteData<GetTokenSuppliesResponse, unknown>, readonly ["token", string, {
|
|
24
24
|
chainId: number;
|
|
25
25
|
collectionAddress: string;
|
|
26
26
|
includeMetadata: boolean | undefined;
|
|
27
27
|
metadataOptions: MetadataOptions$1 | undefined;
|
|
28
28
|
}], _0xsequence_indexer0.Page>, "queryFn"> & {
|
|
29
|
-
queryFn?:
|
|
29
|
+
queryFn?: _tanstack_react_query72.QueryFunction<GetTokenSuppliesResponse, readonly ["token", string, {
|
|
30
30
|
chainId: number;
|
|
31
31
|
collectionAddress: string;
|
|
32
32
|
includeMetadata: boolean | undefined;
|
|
@@ -39,7 +39,7 @@ declare function tokenSuppliesQueryOptions(params: TokenSuppliesQueryOptions): _
|
|
|
39
39
|
includeMetadata: boolean | undefined;
|
|
40
40
|
metadataOptions: MetadataOptions$1 | undefined;
|
|
41
41
|
}] & {
|
|
42
|
-
[dataTagSymbol]:
|
|
42
|
+
[dataTagSymbol]: _tanstack_react_query72.InfiniteData<GetTokenSuppliesResponse, unknown>;
|
|
43
43
|
[dataTagErrorSymbol]: Error;
|
|
44
44
|
};
|
|
45
45
|
};
|
package/dist/index33.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as Address$1, Q as Order } from "./index2.js";
|
|
2
2
|
import { l as CardType, u as CollectibleCardAction } from "./create-config.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/react/ui/components/marketplace-collectible-card/ActionButton/ActionButton.d.ts
|
|
6
6
|
type ActionButtonProps = {
|
|
@@ -50,7 +50,7 @@ declare function ActionButton({
|
|
|
50
50
|
hideQuantitySelector,
|
|
51
51
|
labelOverride,
|
|
52
52
|
className
|
|
53
|
-
}: ActionButtonProps):
|
|
53
|
+
}: ActionButtonProps): react_jsx_runtime26.JSX.Element | null;
|
|
54
54
|
//#endregion
|
|
55
55
|
export { ActionButton as t };
|
|
56
56
|
//# sourceMappingURL=index33.d.ts.map
|
package/dist/index34.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as Order, c as ContractType, u as Currency } from "./index2.js";
|
|
2
2
|
import { l as CardType } from "./create-config.js";
|
|
3
3
|
import * as react0 from "react";
|
|
4
4
|
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
package/dist/index35.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as Address$1, c as ContractType, u as Currency } from "./index2.js";
|
|
2
2
|
import { u as CollectibleCardAction } from "./create-config.js";
|
|
3
3
|
|
|
4
4
|
//#region src/react/ui/components/marketplace-collectible-card/utils/determineCardAction.d.ts
|
package/dist/index36.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as Address$1, Nt as TokenBalance$1, dn as OrderbookKind, dt as ContractInfo$1, u as Currency } from "./index2.js";
|
|
2
2
|
import { n as FeeStep, o as TransactionStep, r as FlowState, t as ApprovalStep } from "./steps.js";
|
|
3
3
|
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _tanstack_react_query55 from "@tanstack/react-query";
|
|
5
5
|
|
|
6
6
|
//#region src/react/ui/modals/CreateListingModal/internal/helpers/validation.d.ts
|
|
7
7
|
type FieldValidation = {
|
|
@@ -85,9 +85,9 @@ declare function useCreateListingModalContext(): {
|
|
|
85
85
|
};
|
|
86
86
|
error: Error | null;
|
|
87
87
|
queries: {
|
|
88
|
-
collection:
|
|
89
|
-
currencies:
|
|
90
|
-
collectibleBalance:
|
|
88
|
+
collection: _tanstack_react_query55.UseQueryResult<ContractInfo$1, Error>;
|
|
89
|
+
currencies: _tanstack_react_query55.UseQueryResult<Currency[], Error>;
|
|
90
|
+
collectibleBalance: _tanstack_react_query55.UseQueryResult<TokenBalance$1, Error>;
|
|
91
91
|
};
|
|
92
92
|
readonly formError: string | null | undefined;
|
|
93
93
|
readonly actions: {
|
package/dist/index37.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as Address$1, Q as Order, bt as TokenMetadata$1, dn as OrderbookKind, dt as ContractInfo$1, u as Currency } from "./index2.js";
|
|
2
2
|
import { n as FeeStep, o as TransactionStep, r as FlowState, t as ApprovalStep } from "./steps.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _tanstack_react_query48 from "@tanstack/react-query";
|
|
4
4
|
|
|
5
5
|
//#region src/react/ui/modals/MakeOfferModal/internal/helpers/validation.d.ts
|
|
6
6
|
type FieldValidation = {
|
|
@@ -63,12 +63,14 @@ declare function useMakeOfferModalContext(): {
|
|
|
63
63
|
quantity: FieldValidation;
|
|
64
64
|
balance: FieldValidation;
|
|
65
65
|
openseaCriteria: FieldValidation | undefined;
|
|
66
|
+
openseaMinPrice: FieldValidation | undefined;
|
|
66
67
|
};
|
|
67
68
|
errors: {
|
|
68
69
|
price: string | null | undefined;
|
|
69
70
|
quantity: string | null | undefined;
|
|
70
71
|
balance: string | null | undefined;
|
|
71
72
|
openseaCriteria: string | null | undefined;
|
|
73
|
+
openseaMinPrice: string | null | undefined;
|
|
72
74
|
};
|
|
73
75
|
};
|
|
74
76
|
currencies: {
|
|
@@ -91,10 +93,10 @@ declare function useMakeOfferModalContext(): {
|
|
|
91
93
|
};
|
|
92
94
|
error: Error | null;
|
|
93
95
|
queries: {
|
|
94
|
-
collectible:
|
|
95
|
-
collection:
|
|
96
|
-
currencies:
|
|
97
|
-
lowestListing:
|
|
96
|
+
collectible: _tanstack_react_query48.UseQueryResult<TokenMetadata$1 | undefined, Error>;
|
|
97
|
+
collection: _tanstack_react_query48.UseQueryResult<ContractInfo$1, Error>;
|
|
98
|
+
currencies: _tanstack_react_query48.UseQueryResult<Currency[], Error>;
|
|
99
|
+
lowestListing: _tanstack_react_query48.UseQueryResult<Order | null, Error>;
|
|
98
100
|
};
|
|
99
101
|
readonly formError: string | null | undefined;
|
|
100
102
|
readonly actions: {
|
package/dist/index38.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as Address$1, Q as Order, bt as TokenMetadata$1, dt as ContractInfo$1, u as Currency } from "./index2.js";
|
|
2
2
|
import { n as FeeStep, o as TransactionStep, r as FlowState, t as ApprovalStep } from "./steps.js";
|
|
3
3
|
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _tanstack_react_query52 from "@tanstack/react-query";
|
|
5
5
|
|
|
6
6
|
//#region src/react/ui/modals/SellModal/internal/context.d.ts
|
|
7
7
|
type SellModalSteps = {
|
|
@@ -38,9 +38,9 @@ declare function useSellModalContext(): {
|
|
|
38
38
|
};
|
|
39
39
|
error: Error | null;
|
|
40
40
|
queries: {
|
|
41
|
-
collectible:
|
|
42
|
-
collection:
|
|
43
|
-
currency:
|
|
41
|
+
collectible: _tanstack_react_query52.UseQueryResult<TokenMetadata$1 | undefined, Error>;
|
|
42
|
+
collection: _tanstack_react_query52.UseQueryResult<ContractInfo$1, Error>;
|
|
43
|
+
currency: _tanstack_react_query52.UseQueryResult<Currency | undefined, Error>;
|
|
44
44
|
};
|
|
45
45
|
readonly actions: {
|
|
46
46
|
approve: {
|
package/dist/index39.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ct as index_d_exports$1 } from "./index2.js";
|
|
2
2
|
import { c as SdkConfig } from "./create-config.js";
|
|
3
3
|
import { ContractType } from "@0xsequence/indexer";
|
|
4
4
|
import { Address, Hash, Hex, TypedDataDomain } from "viem";
|