@0xsequence/marketplace-sdk 0.4.6 → 0.4.8
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/alien_swap-4GAIV7PA.png +0 -0
- package/dist/alien_swap-IZONL4XB.js +8 -0
- package/dist/alien_swap-PMYKGY6A.js +8 -0
- package/dist/aqua-xyz-HLNZIFE2.js +8 -0
- package/dist/aqua-xyz-HLNZIFE2.js.map +1 -0
- package/dist/aqua-xyz-JY5QCI5L.js +8 -0
- package/dist/aqua-xyz-JY5QCI5L.js.map +1 -0
- package/dist/aqua-xyz-WU4JVU2K.png +0 -0
- package/dist/aura-CYKEACX2.js +8 -0
- package/dist/aura-CYKEACX2.js.map +1 -0
- package/dist/aura-HLMWKNSP.js +8 -0
- package/dist/aura-HLMWKNSP.js.map +1 -0
- package/dist/aura-RITZV42R.png +0 -0
- package/dist/blur-2ABQMPTL.png +0 -0
- package/dist/blur-MIPRQYJL.js +8 -0
- package/dist/blur-MIPRQYJL.js.map +1 -0
- package/dist/blur-XDIGHYB7.js +8 -0
- package/dist/blur-XDIGHYB7.js.map +1 -0
- package/dist/{chunk-QVOUL555.js → chunk-6R4G7J6Q.js} +86 -26
- package/dist/chunk-6R4G7J6Q.js.map +1 -0
- package/dist/{chunk-2FOUCP2R.js → chunk-7WCZP6FN.js} +743 -744
- package/dist/chunk-7WCZP6FN.js.map +1 -0
- package/dist/{chunk-RD7HPANB.js → chunk-AQT3BQ67.js} +9 -9
- package/dist/chunk-AQT3BQ67.js.map +1 -0
- package/dist/{chunk-ZEH4JI2U.js → chunk-FCF57DZI.js} +7 -2
- package/dist/chunk-FCF57DZI.js.map +1 -0
- package/dist/{chunk-3C2MT5TM.js → chunk-FWN2MCLI.js} +12 -6
- package/dist/chunk-FWN2MCLI.js.map +1 -0
- package/dist/{chunk-5D3ARFFZ.js → chunk-JEOUQFT3.js} +17 -129
- package/dist/chunk-JEOUQFT3.js.map +1 -0
- package/dist/chunk-MWDG7UTB.js +132 -0
- package/dist/chunk-MWDG7UTB.js.map +1 -0
- package/dist/chunk-RK6KYMZM.js +18 -0
- package/dist/chunk-RK6KYMZM.js.map +1 -0
- package/dist/{chunk-36NGHJH5.js → chunk-WRMJ5FZM.js} +140 -37
- package/dist/chunk-WRMJ5FZM.js.map +1 -0
- package/dist/{chunk-LTHX6RXH.js → chunk-XP3WY5AX.js} +90 -2
- package/dist/chunk-XP3WY5AX.js.map +1 -0
- package/dist/{chunk-DNVERQ5J.js → chunk-YOKGP2EQ.js} +1 -1
- package/dist/chunk-YOKGP2EQ.js.map +1 -0
- package/dist/chunk-ZUEQGPLO.js +302 -0
- package/dist/chunk-ZUEQGPLO.js.map +1 -0
- package/dist/coinbase-MIJPE653.js +8 -0
- package/dist/coinbase-MIJPE653.js.map +1 -0
- package/dist/coinbase-MZUBBEC4.png +0 -0
- package/dist/coinbase-T24XHLQL.js +8 -0
- package/dist/coinbase-T24XHLQL.js.map +1 -0
- package/dist/{create-config-BBTTSJyp.d.ts → create-config-D5WqfUft.d.ts} +2 -2
- package/dist/element-GHIPFSB6.png +0 -0
- package/dist/element-MWATR3ON.js +8 -0
- package/dist/element-MWATR3ON.js.map +1 -0
- package/dist/element-X45NH4D7.js +8 -0
- package/dist/element-X45NH4D7.js.map +1 -0
- package/dist/foundation-BDJUT6CK.js +8 -0
- package/dist/foundation-BDJUT6CK.js.map +1 -0
- package/dist/foundation-FJKIXLS5.png +0 -0
- package/dist/foundation-Z6D6U74V.js +8 -0
- package/dist/foundation-Z6D6U74V.js.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +11 -5
- package/dist/looks-rare-B6G3OQAP.png +0 -0
- package/dist/looks-rare-LBHT6EXZ.js +8 -0
- package/dist/looks-rare-LBHT6EXZ.js.map +1 -0
- package/dist/looks-rare-STS6IKI4.js +8 -0
- package/dist/looks-rare-STS6IKI4.js.map +1 -0
- package/dist/magic-eden-HA3X3P2O.png +0 -0
- package/dist/magic-eden-RMZ24554.js +8 -0
- package/dist/magic-eden-RMZ24554.js.map +1 -0
- package/dist/magic-eden-YMTLPKLE.js +8 -0
- package/dist/magic-eden-YMTLPKLE.js.map +1 -0
- package/dist/manifold-I4NT4V5L.png +0 -0
- package/dist/manifold-L7FLFDRO.js +8 -0
- package/dist/manifold-L7FLFDRO.js.map +1 -0
- package/dist/manifold-YIUSABCZ.js +8 -0
- package/dist/manifold-YIUSABCZ.js.map +1 -0
- package/dist/{marketplace-config-vioKvBQe.d.ts → marketplace-config-C_fDWzz0.d.ts} +2 -2
- package/dist/marketplace.gen-B8S8fflj.d.ts +390 -0
- package/dist/mintify-ARDASD5Z.js +8 -0
- package/dist/mintify-ARDASD5Z.js.map +1 -0
- package/dist/mintify-OLOGFTWQ.png +0 -0
- package/dist/mintify-TSZA3SQT.js +8 -0
- package/dist/mintify-TSZA3SQT.js.map +1 -0
- package/dist/nftx-67RX7ZV6.js +8 -0
- package/dist/nftx-67RX7ZV6.js.map +1 -0
- package/dist/nftx-DJIV3PYG.png +0 -0
- package/dist/nftx-KVJ3T3G2.js +8 -0
- package/dist/nftx-KVJ3T3G2.js.map +1 -0
- package/dist/okx-MOA2EFVR.js +8 -0
- package/dist/okx-MOA2EFVR.js.map +1 -0
- package/dist/okx-WNQRV3WE.png +0 -0
- package/dist/okx-WQA7H7EM.js +8 -0
- package/dist/okx-WQA7H7EM.js.map +1 -0
- package/dist/open-sea-2HWFM4P6.js +8 -0
- package/dist/open-sea-2HWFM4P6.js.map +1 -0
- package/dist/open-sea-C57XWTAR.png +0 -0
- package/dist/open-sea-GESD6S2M.js +8 -0
- package/dist/open-sea-GESD6S2M.js.map +1 -0
- package/dist/rarible-GHMFCPBT.js +8 -0
- package/dist/rarible-GHMFCPBT.js.map +1 -0
- package/dist/rarible-QNNAZZQC.js +8 -0
- package/dist/rarible-QNNAZZQC.js.map +1 -0
- package/dist/rarible-ZCE7U3I5.png +0 -0
- package/dist/react/_internal/api/index.d.ts +4 -2
- package/dist/react/_internal/api/index.js +5 -1
- package/dist/react/_internal/index.d.ts +5 -5
- package/dist/react/_internal/index.js +7 -3
- package/dist/react/_internal/wagmi/index.d.ts +3 -3
- package/dist/react/_internal/wagmi/index.js +1 -1
- package/dist/react/hooks/index.d.ts +668 -5
- package/dist/react/hooks/index.js +16 -6
- package/dist/react/index.d.ts +7 -7
- package/dist/react/index.js +18 -9
- package/dist/react/ssr/index.js +14 -31
- package/dist/react/ssr/index.js.map +1 -1
- package/dist/react/ui/components/collectible-card/index.css.map +1 -0
- package/dist/react/ui/components/{index.d.ts → collectible-card/index.d.ts} +3 -3
- package/dist/react/ui/components/collectible-card/index.js +29 -0
- package/dist/react/ui/components/collectible-card/index.js.map +1 -0
- package/dist/react/ui/components/marketplace-logos/index.d.ts +26 -0
- package/dist/react/ui/components/marketplace-logos/index.js +46 -0
- package/dist/react/ui/components/marketplace-logos/index.js.map +1 -0
- package/dist/react/ui/icons/index.js +0 -8
- package/dist/react/ui/icons/index.js.map +1 -1
- package/dist/react/ui/index.d.ts +4 -4
- package/dist/react/ui/index.js +10 -9
- package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +4 -3
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +8 -6
- package/dist/{sdk-config-CasNGLz4.d.ts → sdk-config-BXVH8PS2.d.ts} +68 -16
- package/dist/sequence-JAFBEQNI.png +0 -0
- package/dist/sequence-OIPVNE5P.js +8 -0
- package/dist/sequence-OIPVNE5P.js.map +1 -0
- package/dist/sequence-QNNBU34G.js +8 -0
- package/dist/sequence-QNNBU34G.js.map +1 -0
- package/dist/{services-CbsurKYr.d.ts → services-CdXAIjt1.d.ts} +1 -1
- package/dist/sudo-swap-D3FAP7W4.js +8 -0
- package/dist/sudo-swap-D3FAP7W4.js.map +1 -0
- package/dist/sudo-swap-XNJ3BIUD.js +8 -0
- package/dist/sudo-swap-XNJ3BIUD.js.map +1 -0
- package/dist/sudo-swap-Y6GICQTL.png +0 -0
- package/dist/super-rare-VIUS3P6B.js +8 -0
- package/dist/super-rare-VIUS3P6B.js.map +1 -0
- package/dist/super-rare-WWXZ3MQL.png +0 -0
- package/dist/super-rare-YPU3Y7EF.js +8 -0
- package/dist/super-rare-YPU3Y7EF.js.map +1 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +8 -5
- package/dist/{types-rupsBCjv.d.ts → types-eX4P9xju.d.ts} +2 -2
- package/dist/utils/index.d.ts +16 -4
- package/dist/utils/index.js +8 -1
- package/dist/x2y2-CXOXXZKS.png +0 -0
- package/dist/x2y2-G2SXS5VR.js +8 -0
- package/dist/x2y2-G2SXS5VR.js.map +1 -0
- package/dist/x2y2-GKWTQTPB.js +8 -0
- package/dist/x2y2-GKWTQTPB.js.map +1 -0
- package/dist/zora-3DPG4KAY.png +0 -0
- package/dist/zora-JUDT67NX.js +8 -0
- package/dist/zora-JUDT67NX.js.map +1 -0
- package/dist/zora-Z5VR477F.js +8 -0
- package/dist/zora-Z5VR477F.js.map +1 -0
- package/package.json +34 -19
- package/src/react/__tests__/provider.test.tsx +75 -0
- package/src/react/_internal/api/__mocks__/marketplace.msw.ts +218 -0
- package/src/react/_internal/api/marketplace.gen.ts +125 -42
- package/src/react/_internal/api/query-keys.ts +8 -0
- package/src/react/_internal/api/zod-schema.ts +33 -0
- package/src/react/_internal/test-utils.tsx +68 -0
- package/src/react/_internal/types.ts +3 -3
- package/src/react/_internal/wagmi/__tests__/create-config.test.ts +196 -0
- package/src/react/_internal/wagmi/create-config.ts +9 -1
- package/src/react/hooks/index.ts +2 -0
- package/src/react/hooks/options/__mocks__/marketplaceConfig.msw.ts +77 -0
- package/src/react/hooks/options/__tests__/marketplaceConfigOptions.test.tsx +144 -0
- package/src/react/hooks/useCancelOrder.tsx +1 -1
- package/src/react/hooks/useCancelTransactionSteps.tsx +6 -6
- package/src/react/hooks/useCurrencies.tsx +2 -5
- package/src/react/hooks/useCurrency.tsx +10 -1
- package/src/react/hooks/useCurrencyBalance.tsx +38 -36
- package/src/react/hooks/useGetReceiptFromHash.tsx +1 -1
- package/src/react/hooks/useListCollectibleActivities.tsx +57 -0
- package/src/react/hooks/useListCollectionActivities.tsx +57 -0
- package/src/react/provider.tsx +5 -0
- package/src/react/ssr/create-ssr-client.ts +1 -1
- package/src/react/ui/components/_internals/custom-select/__tests__/CustomSelect.test.tsx +89 -0
- package/src/react/ui/components/collectible-card/CollectibleCard.tsx +9 -8
- package/src/react/ui/components/collectible-card/Footer.tsx +4 -1
- package/src/react/ui/components/collectible-card/index.ts +1 -0
- package/src/react/ui/components/marketplace-logos/index.ts +23 -0
- package/src/react/ui/components/marketplace-logos/marketplace-logos.tsx +111 -0
- package/src/react/ui/images/marketplaces/alien_swap.png +0 -0
- package/src/react/ui/images/marketplaces/aqua-xyz.png +0 -0
- package/src/react/ui/images/marketplaces/aura.png +0 -0
- package/src/react/ui/images/marketplaces/blur.png +0 -0
- package/src/react/ui/images/marketplaces/coinbase.png +0 -0
- package/src/react/ui/images/marketplaces/element.png +0 -0
- package/src/react/ui/images/marketplaces/foundation.png +0 -0
- package/src/react/ui/images/marketplaces/looks-rare.png +0 -0
- package/src/react/ui/images/marketplaces/magic-eden.png +0 -0
- package/src/react/ui/images/marketplaces/manifold.png +0 -0
- package/src/react/ui/images/marketplaces/mintify.png +0 -0
- package/src/react/ui/images/marketplaces/nftx.png +0 -0
- package/src/react/ui/images/marketplaces/okx.png +0 -0
- package/src/react/ui/images/marketplaces/open-sea.png +0 -0
- package/src/react/ui/images/marketplaces/rarible.png +0 -0
- package/src/react/ui/images/marketplaces/sequence.png +0 -0
- package/src/react/ui/images/marketplaces/sudo-swap.png +0 -0
- package/src/react/ui/images/marketplaces/super-rare.png +0 -0
- package/src/react/ui/images/marketplaces/x2y2.png +0 -0
- package/src/react/ui/images/marketplaces/zora.png +0 -0
- package/src/react/ui/modals/BuyModal/Modal.tsx +14 -3
- package/src/react/ui/modals/BuyModal/hooks/useBuyCollectable.ts +1 -0
- package/src/react/ui/modals/BuyModal/modals/CheckoutModal.tsx +7 -0
- package/src/react/ui/modals/CreateListingModal/Modal.tsx +2 -1
- package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +208 -0
- package/src/react/ui/modals/CreateListingModal/store.ts +26 -16
- package/src/react/ui/modals/MakeOfferModal/Modal.tsx +2 -2
- package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +199 -0
- package/src/react/ui/modals/MakeOfferModal/store.ts +27 -16
- package/src/react/ui/modals/SellModal/Modal.tsx +1 -0
- package/src/react/ui/modals/SellModal/__tests__/Modal.test.tsx +192 -0
- package/src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx +3 -3
- package/src/react/ui/modals/SellModal/hooks/useSell.tsx +3 -3
- package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +8 -8
- package/src/react/ui/modals/SuccessfulPurchaseModal/__tests__/Modal.test.tsx +145 -0
- package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +2 -0
- package/src/react/ui/modals/_internal/components/actionModal/ErrorModal.tsx +7 -1
- package/src/react/ui/modals/_internal/components/actionModal/LoadingModal.tsx +7 -1
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +159 -0
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +4 -5
- package/src/react/ui/modals/_internal/components/priceInput/__tests__/index.test.tsx +124 -0
- package/src/react/ui/modals/_internal/components/priceInput/index.tsx +48 -45
- package/src/react/ui/modals/_internal/components/switchChainModal/__tests__/SwitchChainModal.test.tsx +221 -0
- package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +24 -5
- package/src/react/ui/modals/_internal/components/switchChainModal/store.ts +2 -2
- package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +16 -2
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +147 -0
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/utils.test.ts +218 -0
- package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +27 -10
- package/src/react/ui/modals/_internal/components/transactionStatusModal/util/getMessage.ts +1 -1
- package/src/react/ui/modals/modal-provider.tsx +0 -2
- package/src/types/marketplace-config.ts +1 -1
- package/src/utils/__tests__/address.test.ts +65 -0
- package/src/utils/__tests__/date.test.ts +31 -0
- package/src/utils/__tests__/get-public-rpc-client.test.ts +109 -0
- package/src/utils/__tests__/getMarketplaceDetails.test.ts +134 -0
- package/src/utils/__tests__/price.test.ts +42 -0
- package/src/utils/_internal/error/config.ts +16 -0
- package/src/utils/get-public-rpc-client.ts +6 -0
- package/src/utils/getMarketplaceDetails.ts +110 -0
- package/src/utils/index.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.js +10 -0
- package/dist/chunk-2FOUCP2R.js.map +0 -1
- package/dist/chunk-36NGHJH5.js.map +0 -1
- package/dist/chunk-3C2MT5TM.js.map +0 -1
- package/dist/chunk-5D3ARFFZ.js.map +0 -1
- package/dist/chunk-6WB4GCCJ.js +0 -38
- package/dist/chunk-6WB4GCCJ.js.map +0 -1
- package/dist/chunk-CP2IVRMX.js +0 -85
- package/dist/chunk-CP2IVRMX.js.map +0 -1
- package/dist/chunk-DNVERQ5J.js.map +0 -1
- package/dist/chunk-LTHX6RXH.js.map +0 -1
- package/dist/chunk-MJ4YU7RW.js +0 -2
- package/dist/chunk-QVOUL555.js.map +0 -1
- package/dist/chunk-RD7HPANB.js.map +0 -1
- package/dist/chunk-ZEH4JI2U.js.map +0 -1
- package/dist/react/ui/components/index.css.map +0 -1
- package/dist/react/ui/components/index.js +0 -28
- package/src/react/ui/components/index.ts +0 -1
- package/src/react/ui/modals/Account/index.tsx +0 -29
- package/src/react/ui/modals/_internal/components/priceInput/hooks/useBalanceCheck.ts +0 -67
- package/src/react/ui/modals/_internal/components/priceInput/hooks/usePriceInput.ts +0 -54
- /package/dist/{chunk-MJ4YU7RW.js.map → alien_swap-IZONL4XB.js.map} +0 -0
- /package/dist/{react/ui/components/index.js.map → alien_swap-PMYKGY6A.js.map} +0 -0
- /package/dist/react/ui/components/{index.css → collectible-card/index.css} +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
useSwitchChainModal,
|
|
4
4
|
useWallet
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FWN2MCLI.js";
|
|
6
6
|
import {
|
|
7
7
|
getPublicRpcClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XP3WY5AX.js";
|
|
9
9
|
import {
|
|
10
10
|
EIP2981_ABI
|
|
11
11
|
} from "./chunk-3OHM45R3.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
CollectableIdSchema,
|
|
19
19
|
PROVIDER_ID,
|
|
20
20
|
QueryArgSchema
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YOKGP2EQ.js";
|
|
22
22
|
import {
|
|
23
23
|
CollectibleStatus,
|
|
24
24
|
CollectionStatus,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
getMarketplaceClient,
|
|
49
49
|
getMetadataClient,
|
|
50
50
|
getQueryClient
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6R4G7J6Q.js";
|
|
52
52
|
import {
|
|
53
53
|
BaseError,
|
|
54
54
|
ChainSwitchUserRejectedError,
|
|
@@ -77,6 +77,19 @@ var MarketplaceSdkProviderNotFoundError = class extends BaseError {
|
|
|
77
77
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
78
78
|
import { createContext } from "react";
|
|
79
79
|
import "@0xsequence/design-system/styles.css";
|
|
80
|
+
|
|
81
|
+
// src/utils/_internal/error/config.ts
|
|
82
|
+
var ConfigError = class extends BaseError {
|
|
83
|
+
name = "ConfigError";
|
|
84
|
+
};
|
|
85
|
+
var InvalidProjectAccessKeyError = class extends ConfigError {
|
|
86
|
+
name = "InvalidProjectAccessKeyError";
|
|
87
|
+
constructor(projectAccessKey) {
|
|
88
|
+
super(`Invalid project access key: ${projectAccessKey}`);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// src/react/provider.tsx
|
|
80
93
|
import { jsx } from "react/jsx-runtime";
|
|
81
94
|
var MarketplaceSdkContext = createContext({});
|
|
82
95
|
function MarketplaceQueryClientProvider({
|
|
@@ -89,6 +102,9 @@ function MarketplaceProvider({
|
|
|
89
102
|
config,
|
|
90
103
|
children
|
|
91
104
|
}) {
|
|
105
|
+
if (config.projectAccessKey === "" || !config.projectAccessKey) {
|
|
106
|
+
throw new InvalidProjectAccessKeyError(config.projectAccessKey);
|
|
107
|
+
}
|
|
92
108
|
return /* @__PURE__ */ jsx(MarketplaceQueryClientProvider, { children: /* @__PURE__ */ jsx(MarketplaceSdkContext.Provider, { value: config, children: /* @__PURE__ */ jsx("div", { id: PROVIDER_ID, children }) }) });
|
|
93
109
|
}
|
|
94
110
|
|
|
@@ -561,6 +577,29 @@ var listOffersForCollectibleReturnSchema = z2.object({
|
|
|
561
577
|
offers: z2.array(orderSchema),
|
|
562
578
|
page: pageSchema.optional()
|
|
563
579
|
});
|
|
580
|
+
var getListCollectibleActivitiesArgsSchema = z2.object({
|
|
581
|
+
chainId: ChainIdSchema.pipe(z2.coerce.string()),
|
|
582
|
+
collectionAddress: AddressSchema,
|
|
583
|
+
tokenId: CollectableIdSchema.pipe(z2.coerce.string()),
|
|
584
|
+
query: pageSchema.extend({
|
|
585
|
+
enabled: z2.boolean().optional()
|
|
586
|
+
}).optional()
|
|
587
|
+
});
|
|
588
|
+
var getListCollectibleActivitiesReturnSchema = z2.object({
|
|
589
|
+
activities: z2.array(activitySchema),
|
|
590
|
+
page: pageSchema.optional()
|
|
591
|
+
});
|
|
592
|
+
var getListCollectionActivitiesArgsSchema = z2.object({
|
|
593
|
+
chainId: ChainIdSchema.pipe(z2.coerce.string()),
|
|
594
|
+
collectionAddress: AddressSchema,
|
|
595
|
+
query: pageSchema.extend({
|
|
596
|
+
enabled: z2.boolean().optional()
|
|
597
|
+
}).optional()
|
|
598
|
+
});
|
|
599
|
+
var getListCollectionActivitiesReturnSchema = z2.object({
|
|
600
|
+
activities: z2.array(activitySchema),
|
|
601
|
+
page: pageSchema.optional()
|
|
602
|
+
});
|
|
564
603
|
var getCollectibleLowestOfferReturnSchema = z2.object({
|
|
565
604
|
order: orderSchema.optional()
|
|
566
605
|
});
|
|
@@ -805,9 +844,7 @@ var selectCurrencies = (data, args) => {
|
|
|
805
844
|
(option) => option.toLowerCase()
|
|
806
845
|
);
|
|
807
846
|
filteredData = filteredData.filter(
|
|
808
|
-
(currency) => lowerCaseCurrencyOptions.includes(
|
|
809
|
-
currency.contractAddress.toLowerCase()
|
|
810
|
-
)
|
|
847
|
+
(currency) => lowerCaseCurrencyOptions.includes(currency.contractAddress.toLowerCase())
|
|
811
848
|
);
|
|
812
849
|
}
|
|
813
850
|
return filteredData;
|
|
@@ -911,9 +948,16 @@ var fetchCurrency = async (chainId, currencyAddress, config) => {
|
|
|
911
948
|
const marketplaceClient = getMarketplaceClient(parsedChainId, config);
|
|
912
949
|
currencies = await marketplaceClient.listCurrencies().then((resp) => resp.currencies);
|
|
913
950
|
}
|
|
914
|
-
|
|
915
|
-
|
|
951
|
+
if (!currencies?.length) {
|
|
952
|
+
throw new Error("No currencies returned");
|
|
953
|
+
}
|
|
954
|
+
const currency = currencies.find(
|
|
955
|
+
(currency2) => currency2.contractAddress.toLowerCase() === currencyAddress.toLowerCase()
|
|
916
956
|
);
|
|
957
|
+
if (!currency) {
|
|
958
|
+
throw new Error("Currency not found");
|
|
959
|
+
}
|
|
960
|
+
return currency;
|
|
917
961
|
};
|
|
918
962
|
var currencyOptions = (args, config) => {
|
|
919
963
|
return queryOptions7({
|
|
@@ -1065,6 +1109,34 @@ var useListBalances = (args) => {
|
|
|
1065
1109
|
return useInfiniteQuery(listBalancesOptions(args, config));
|
|
1066
1110
|
};
|
|
1067
1111
|
|
|
1112
|
+
// src/react/hooks/useListCollectibleActivities.tsx
|
|
1113
|
+
import { queryOptions as queryOptions11, useQuery as useQuery11 } from "@tanstack/react-query";
|
|
1114
|
+
var fetchCollectibleActivities = async (args, config) => {
|
|
1115
|
+
const marketplaceClient = getMarketplaceClient(args.chainId, config);
|
|
1116
|
+
return marketplaceClient.listCollectibleActivities({
|
|
1117
|
+
contractAddress: args.collectionAddress,
|
|
1118
|
+
tokenId: args.tokenId,
|
|
1119
|
+
page: args.query?.enabled ? {
|
|
1120
|
+
page: args.query.page ?? 1,
|
|
1121
|
+
pageSize: args.query.pageSize ?? 10,
|
|
1122
|
+
sort: args.query.sort
|
|
1123
|
+
} : void 0
|
|
1124
|
+
}).then((data) => ({
|
|
1125
|
+
activities: data.activities,
|
|
1126
|
+
page: data.page
|
|
1127
|
+
}));
|
|
1128
|
+
};
|
|
1129
|
+
var listCollectibleActivitiesOptions = (args, config) => {
|
|
1130
|
+
return queryOptions11({
|
|
1131
|
+
queryKey: [...collectableKeys.collectibleActivities, args, config],
|
|
1132
|
+
queryFn: () => fetchCollectibleActivities(args, config)
|
|
1133
|
+
});
|
|
1134
|
+
};
|
|
1135
|
+
var useListCollectibleActivities = (args) => {
|
|
1136
|
+
const config = useConfig();
|
|
1137
|
+
return useQuery11(listCollectibleActivitiesOptions(args, config));
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1068
1140
|
// src/react/hooks/useListCollectibles.tsx
|
|
1069
1141
|
import { infiniteQueryOptions as infiniteQueryOptions2, useInfiniteQuery as useInfiniteQuery2 } from "@tanstack/react-query";
|
|
1070
1142
|
import { z as z12 } from "zod";
|
|
@@ -1098,8 +1170,35 @@ var useListCollectibles = (args) => {
|
|
|
1098
1170
|
return useInfiniteQuery2(listCollectiblesOptions(args, config));
|
|
1099
1171
|
};
|
|
1100
1172
|
|
|
1173
|
+
// src/react/hooks/useListCollectionActivities.tsx
|
|
1174
|
+
import { queryOptions as queryOptions12, useQuery as useQuery12 } from "@tanstack/react-query";
|
|
1175
|
+
var fetchListCollectionActivities = async (args, config) => {
|
|
1176
|
+
const marketplaceClient = getMarketplaceClient(args.chainId, config);
|
|
1177
|
+
return marketplaceClient.listCollectionActivities({
|
|
1178
|
+
contractAddress: args.collectionAddress,
|
|
1179
|
+
page: args.query?.enabled ? {
|
|
1180
|
+
page: args.query.page ?? 1,
|
|
1181
|
+
pageSize: args.query.pageSize ?? 10,
|
|
1182
|
+
sort: args.query.sort
|
|
1183
|
+
} : void 0
|
|
1184
|
+
}).then((data) => ({
|
|
1185
|
+
activities: data.activities,
|
|
1186
|
+
page: data.page
|
|
1187
|
+
}));
|
|
1188
|
+
};
|
|
1189
|
+
var listCollectionActivitiesOptions = (args, config) => {
|
|
1190
|
+
return queryOptions12({
|
|
1191
|
+
queryKey: [...collectionKeys.collectionActivities, args, config],
|
|
1192
|
+
queryFn: () => fetchListCollectionActivities(args, config)
|
|
1193
|
+
});
|
|
1194
|
+
};
|
|
1195
|
+
var useListCollectionActivities = (args) => {
|
|
1196
|
+
const config = useConfig();
|
|
1197
|
+
return useQuery12(listCollectionActivitiesOptions(args, config));
|
|
1198
|
+
};
|
|
1199
|
+
|
|
1101
1200
|
// src/react/hooks/useListOffersForCollectible.tsx
|
|
1102
|
-
import { queryOptions as
|
|
1201
|
+
import { queryOptions as queryOptions13, useQuery as useQuery13 } from "@tanstack/react-query";
|
|
1103
1202
|
import { z as z13 } from "zod";
|
|
1104
1203
|
var UseListOffersForCollectibleArgsSchema = listOffersForCollectibleArgsSchema.extend({
|
|
1105
1204
|
chainId: ChainIdSchema.pipe(z13.coerce.string()),
|
|
@@ -1117,18 +1216,18 @@ var fetchListOffersForCollectible = async (config, args) => {
|
|
|
1117
1216
|
return marketplaceClient.listCollectibleOffers(arg);
|
|
1118
1217
|
};
|
|
1119
1218
|
var listOffersForCollectibleOptions = (args, config) => {
|
|
1120
|
-
return
|
|
1219
|
+
return queryOptions13({
|
|
1121
1220
|
queryKey: [...collectableKeys.offers, args, config],
|
|
1122
1221
|
queryFn: () => fetchListOffersForCollectible(config, args)
|
|
1123
1222
|
});
|
|
1124
1223
|
};
|
|
1125
1224
|
var useListOffersForCollectible = (args) => {
|
|
1126
1225
|
const config = useConfig();
|
|
1127
|
-
return
|
|
1226
|
+
return useQuery13(listOffersForCollectibleOptions(args, config));
|
|
1128
1227
|
};
|
|
1129
1228
|
|
|
1130
1229
|
// src/react/hooks/useCountOffersForCollectible.tsx
|
|
1131
|
-
import { queryOptions as
|
|
1230
|
+
import { queryOptions as queryOptions14, useQuery as useQuery14 } from "@tanstack/react-query";
|
|
1132
1231
|
import { z as z14 } from "zod";
|
|
1133
1232
|
var UseCountOffersForCollectibleArgsSchema = countOffersForCollectibleArgsSchema.omit({
|
|
1134
1233
|
contractAddress: true,
|
|
@@ -1149,7 +1248,7 @@ var fetchCountOffersForCollectible = async (args, config) => {
|
|
|
1149
1248
|
});
|
|
1150
1249
|
};
|
|
1151
1250
|
var countOffersForCollectibleOptions = (args, config) => {
|
|
1152
|
-
return
|
|
1251
|
+
return queryOptions14({
|
|
1153
1252
|
...args.query,
|
|
1154
1253
|
queryKey: [...collectableKeys.offersCount, args, config],
|
|
1155
1254
|
queryFn: () => fetchCountOffersForCollectible(args, config)
|
|
@@ -1157,11 +1256,11 @@ var countOffersForCollectibleOptions = (args, config) => {
|
|
|
1157
1256
|
};
|
|
1158
1257
|
var useCountOffersForCollectible = (args) => {
|
|
1159
1258
|
const config = useConfig();
|
|
1160
|
-
return
|
|
1259
|
+
return useQuery14(countOffersForCollectibleOptions(args, config));
|
|
1161
1260
|
};
|
|
1162
1261
|
|
|
1163
1262
|
// src/react/hooks/useListListingsForCollectible.tsx
|
|
1164
|
-
import { queryOptions as
|
|
1263
|
+
import { queryOptions as queryOptions15, useQuery as useQuery15 } from "@tanstack/react-query";
|
|
1165
1264
|
import { z as z15 } from "zod";
|
|
1166
1265
|
var UseListListingsForCollectibleArgsSchema = listListingsForCollectibleArgsSchema.extend({
|
|
1167
1266
|
chainId: ChainIdSchema.pipe(z15.coerce.string()),
|
|
@@ -1179,18 +1278,18 @@ var fetchListListingsForCollectible = async (config, args) => {
|
|
|
1179
1278
|
return marketplaceClient.listCollectibleListings(arg);
|
|
1180
1279
|
};
|
|
1181
1280
|
var listListingsForCollectibleOptions = (args, config) => {
|
|
1182
|
-
return
|
|
1281
|
+
return queryOptions15({
|
|
1183
1282
|
queryKey: [...collectableKeys.listings, args, config],
|
|
1184
1283
|
queryFn: () => fetchListListingsForCollectible(config, args)
|
|
1185
1284
|
});
|
|
1186
1285
|
};
|
|
1187
1286
|
var useListListingsForCollectible = (args) => {
|
|
1188
1287
|
const config = useConfig();
|
|
1189
|
-
return
|
|
1288
|
+
return useQuery15(listListingsForCollectibleOptions(args, config));
|
|
1190
1289
|
};
|
|
1191
1290
|
|
|
1192
1291
|
// src/react/hooks/useCountListingsForCollectible.tsx
|
|
1193
|
-
import { queryOptions as
|
|
1292
|
+
import { queryOptions as queryOptions16, useQuery as useQuery16 } from "@tanstack/react-query";
|
|
1194
1293
|
import { z as z16 } from "zod";
|
|
1195
1294
|
var UseCountListingsForCollectibleArgsSchema = countListingsForCollectibleArgsSchema.omit({
|
|
1196
1295
|
contractAddress: true,
|
|
@@ -1211,7 +1310,7 @@ var fetchCountListingsForCollectible = async (args, config) => {
|
|
|
1211
1310
|
});
|
|
1212
1311
|
};
|
|
1213
1312
|
var countListingsForCollectibleOptions = (args, config) => {
|
|
1214
|
-
return
|
|
1313
|
+
return queryOptions16({
|
|
1215
1314
|
...args.query,
|
|
1216
1315
|
queryKey: [...collectableKeys.listingsCount, args, config],
|
|
1217
1316
|
queryFn: () => fetchCountListingsForCollectible(args, config)
|
|
@@ -1219,11 +1318,11 @@ var countListingsForCollectibleOptions = (args, config) => {
|
|
|
1219
1318
|
};
|
|
1220
1319
|
var useCountListingsForCollectible = (args) => {
|
|
1221
1320
|
const config = useConfig();
|
|
1222
|
-
return
|
|
1321
|
+
return useQuery16(countListingsForCollectibleOptions(args, config));
|
|
1223
1322
|
};
|
|
1224
1323
|
|
|
1225
1324
|
// src/react/hooks/useLowestListing.tsx
|
|
1226
|
-
import { queryOptions as
|
|
1325
|
+
import { queryOptions as queryOptions17, useQuery as useQuery17 } from "@tanstack/react-query";
|
|
1227
1326
|
import { z as z17 } from "zod";
|
|
1228
1327
|
var UseLowestListingSchema = getCollectibleLowestListingArgsSchema.omit({
|
|
1229
1328
|
contractAddress: true
|
|
@@ -1241,7 +1340,7 @@ var fetchLowestListing = async (args, config) => {
|
|
|
1241
1340
|
});
|
|
1242
1341
|
};
|
|
1243
1342
|
var lowestListingOptions = (args, config) => {
|
|
1244
|
-
return
|
|
1343
|
+
return queryOptions17({
|
|
1245
1344
|
...args.query,
|
|
1246
1345
|
queryKey: [...collectableKeys.lowestListings, args, config],
|
|
1247
1346
|
queryFn: () => fetchLowestListing(args, config)
|
|
@@ -1249,11 +1348,11 @@ var lowestListingOptions = (args, config) => {
|
|
|
1249
1348
|
};
|
|
1250
1349
|
var useLowestListing = (args) => {
|
|
1251
1350
|
const config = useConfig();
|
|
1252
|
-
return
|
|
1351
|
+
return useQuery17(lowestListingOptions(args, config));
|
|
1253
1352
|
};
|
|
1254
1353
|
|
|
1255
1354
|
// src/react/hooks/useRoyaltyPercentage.tsx
|
|
1256
|
-
import { queryOptions as
|
|
1355
|
+
import { queryOptions as queryOptions18, useQuery as useQuery18 } from "@tanstack/react-query";
|
|
1257
1356
|
import { getContract } from "viem";
|
|
1258
1357
|
import { z as z18 } from "zod";
|
|
1259
1358
|
var UseRoyaletyPercentageSchema = z18.object({
|
|
@@ -1280,13 +1379,13 @@ var fetchRoyaletyPercentage = async (args) => {
|
|
|
1280
1379
|
return 0n;
|
|
1281
1380
|
}
|
|
1282
1381
|
};
|
|
1283
|
-
var royaletyPercentageOptions = (args) =>
|
|
1382
|
+
var royaletyPercentageOptions = (args) => queryOptions18({
|
|
1284
1383
|
...args.query,
|
|
1285
1384
|
queryKey: [...collectableKeys.royaltyPercentage, args],
|
|
1286
1385
|
queryFn: () => fetchRoyaletyPercentage(args)
|
|
1287
1386
|
});
|
|
1288
1387
|
var useRoyaltyPercentage = (args) => {
|
|
1289
|
-
return
|
|
1388
|
+
return useQuery18(royaletyPercentageOptions(args));
|
|
1290
1389
|
};
|
|
1291
1390
|
|
|
1292
1391
|
// src/react/hooks/useGenerateListingTransaction.tsx
|
|
@@ -1449,7 +1548,7 @@ var useTransferTokens = () => {
|
|
|
1449
1548
|
};
|
|
1450
1549
|
|
|
1451
1550
|
// src/react/hooks/useCheckoutOptions.tsx
|
|
1452
|
-
import { queryOptions as
|
|
1551
|
+
import { queryOptions as queryOptions19, useQuery as useQuery19 } from "@tanstack/react-query";
|
|
1453
1552
|
import { useAccount as useAccount2 } from "wagmi";
|
|
1454
1553
|
import { z as z21 } from "zod";
|
|
1455
1554
|
var UseCheckoutOptionsSchema = z21.object({
|
|
@@ -1477,7 +1576,7 @@ var fetchCheckoutOptions = async (args, config) => {
|
|
|
1477
1576
|
});
|
|
1478
1577
|
};
|
|
1479
1578
|
var checkoutOptionsOptions = (args, config) => {
|
|
1480
|
-
return
|
|
1579
|
+
return queryOptions19({
|
|
1481
1580
|
queryKey: ["checkoutOptions", args],
|
|
1482
1581
|
queryFn: () => fetchCheckoutOptions(args, config)
|
|
1483
1582
|
});
|
|
@@ -1485,14 +1584,14 @@ var checkoutOptionsOptions = (args, config) => {
|
|
|
1485
1584
|
var useCheckoutOptions = (args) => {
|
|
1486
1585
|
const { address } = useAccount2();
|
|
1487
1586
|
const config = useConfig();
|
|
1488
|
-
return
|
|
1587
|
+
return useQuery19(
|
|
1489
1588
|
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
1490
1589
|
checkoutOptionsOptions({ walletAddress: address, ...args }, config)
|
|
1491
1590
|
);
|
|
1492
1591
|
};
|
|
1493
1592
|
|
|
1494
1593
|
// src/react/hooks/useListCollections.tsx
|
|
1495
|
-
import { queryOptions as
|
|
1594
|
+
import { queryOptions as queryOptions20, useQuery as useQuery20 } from "@tanstack/react-query";
|
|
1496
1595
|
import { z as z22 } from "zod";
|
|
1497
1596
|
var UseListCollectionsSchema = z22.object({
|
|
1498
1597
|
query: QueryArgSchema.optional().default({})
|
|
@@ -1520,7 +1619,7 @@ var fetchListCollections = async ({ marketplaceConfig }, config) => {
|
|
|
1520
1619
|
return results.flat();
|
|
1521
1620
|
};
|
|
1522
1621
|
var listCollectionsOptions = (args, config) => {
|
|
1523
|
-
return
|
|
1622
|
+
return queryOptions20({
|
|
1524
1623
|
...args.query,
|
|
1525
1624
|
queryKey: [...collectionKeys.list],
|
|
1526
1625
|
queryFn: () => fetchListCollections(args, config)
|
|
@@ -1529,7 +1628,7 @@ var listCollectionsOptions = (args, config) => {
|
|
|
1529
1628
|
var useListCollections = (args = {}) => {
|
|
1530
1629
|
const config = useConfig();
|
|
1531
1630
|
const { data: marketplaceConfig, isLoading: isLoadingConfig } = useMarketplaceConfig();
|
|
1532
|
-
return
|
|
1631
|
+
return useQuery20({
|
|
1533
1632
|
...listCollectionsOptions(
|
|
1534
1633
|
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
1535
1634
|
{ marketplaceConfig, query: args.query },
|
|
@@ -1540,7 +1639,7 @@ var useListCollections = (args = {}) => {
|
|
|
1540
1639
|
};
|
|
1541
1640
|
|
|
1542
1641
|
// src/react/hooks/useGenerateBuyTransaction.tsx
|
|
1543
|
-
import { queryOptions as
|
|
1642
|
+
import { queryOptions as queryOptions21, useQuery as useQuery21 } from "@tanstack/react-query";
|
|
1544
1643
|
import { useAccount as useAccount3 } from "wagmi";
|
|
1545
1644
|
import { z as z23 } from "zod";
|
|
1546
1645
|
var UseGenerateBuyTransactionArgsSchema = z23.object({
|
|
@@ -1568,7 +1667,7 @@ var fetchGenerateBuyTransaction = async (args, config) => {
|
|
|
1568
1667
|
}).then((data) => data.steps);
|
|
1569
1668
|
};
|
|
1570
1669
|
var generateBuyTransactionOptions = (args, config) => {
|
|
1571
|
-
return
|
|
1670
|
+
return queryOptions21({
|
|
1572
1671
|
queryKey: ["generateBuyTransaction", args],
|
|
1573
1672
|
queryFn: () => fetchGenerateBuyTransaction(args, config),
|
|
1574
1673
|
...args.query
|
|
@@ -1577,7 +1676,7 @@ var generateBuyTransactionOptions = (args, config) => {
|
|
|
1577
1676
|
var useGenerateBuyTransaction = (args) => {
|
|
1578
1677
|
const { address } = useAccount3();
|
|
1579
1678
|
const config = useConfig();
|
|
1580
|
-
return
|
|
1679
|
+
return useQuery21(
|
|
1581
1680
|
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
1582
1681
|
generateBuyTransactionOptions({ buyer: address, ...args }, config)
|
|
1583
1682
|
);
|
|
@@ -1812,8 +1911,12 @@ export {
|
|
|
1812
1911
|
metadataOptionsSchema,
|
|
1813
1912
|
listBalancesOptions,
|
|
1814
1913
|
useListBalances,
|
|
1914
|
+
listCollectibleActivitiesOptions,
|
|
1915
|
+
useListCollectibleActivities,
|
|
1815
1916
|
listCollectiblesOptions,
|
|
1816
1917
|
useListCollectibles,
|
|
1918
|
+
listCollectionActivitiesOptions,
|
|
1919
|
+
useListCollectionActivities,
|
|
1817
1920
|
listOffersForCollectibleOptions,
|
|
1818
1921
|
useListOffersForCollectible,
|
|
1819
1922
|
countOffersForCollectibleOptions,
|
|
@@ -1846,4 +1949,4 @@ export {
|
|
|
1846
1949
|
useGenerateBuyTransaction,
|
|
1847
1950
|
useCancelOrder
|
|
1848
1951
|
};
|
|
1849
|
-
//# sourceMappingURL=chunk-
|
|
1952
|
+
//# sourceMappingURL=chunk-WRMJ5FZM.js.map
|