@0xsequence/marketplace-sdk 2.0.1 → 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 +10 -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 +1 -1
- package/dist/collection.js +1 -1
- package/dist/create-config.d.ts +597 -201
- package/dist/create-config.js +1 -1
- package/dist/currency.js +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 +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index10.d.ts +3 -3
- package/dist/index11.d.ts +17 -17
- package/dist/index12.d.ts +26 -26
- 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 +86 -86
- 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 +4 -4
- package/dist/index35.d.ts +1 -1
- package/dist/index36.d.ts +7 -7
- package/dist/index37.d.ts +6 -6
- package/dist/index38.d.ts +8 -8
- package/dist/index39.d.ts +1 -1
- package/dist/index4.d.ts +995 -995
- package/dist/index40.d.ts +2 -2
- package/dist/index8.d.ts +2 -2
- package/dist/index9.d.ts +2811 -3
- package/dist/inventory.d.ts +4 -4
- package/dist/inventory.js +2 -2
- package/dist/marketplace2.js +2 -2
- package/dist/metadata.d.ts +73 -73
- package/dist/primary-sale-checkout-options.d.ts +4 -4
- package/dist/quantityInput.js +1 -1
- package/dist/ranges.d.ts +17 -17
- 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 +1 -1
- package/dist/react/ssr/index.js +2 -2
- package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +1 -1
- package/dist/react/ui/components/marketplace-logos/index.d.ts +21 -21
- 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/calendarDropdown/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 -3
- 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 +2192 -1903
- package/dist/react.js.map +1 -1
- 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.js +1 -1
- package/dist/utils.js +20 -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/transactions/useCancelTransactionSteps.tsx +4 -1
- package/src/react/hooks/utils/useEnsureCorrectChain.ts +10 -5
- package/src/react/ui/modals/BuyModal/components/BuyModalContent.tsx +34 -31
- 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/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/MakeOfferModal/internal/context.ts +2 -1
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +2 -1
- package/src/react/ui/modals/_internal/components/priceInput/index.tsx +12 -11
- 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/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/getConduitAddressForOrderbook.ts +2 -10
- package/src/utils/getMarketplaceDetails.ts +11 -4
- package/src/utils/getWebRPCErrorMessage.ts +21 -0
- package/src/utils/normalizeMarketplace.ts +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @0xsequence/marketplace-sdk
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
**Support Trails market buys**: BuyModal now builds Trails destination-call actions for Market orders, including OpenSea-normalized marketplace purchases.
|
|
8
|
+
**Normalize Magic Eden EVM to OpenSea**: Marketplace helpers and API adapters now map Magic Eden EVM orderbooks to OpenSea consistently, including currency limits and conduit lookup.
|
|
9
|
+
**Fix checkout network handling**: Checkout now uses the target-chain public client, waits for readiness after chain switches, resumes correctly, and stops cleanly on failed switches.
|
|
10
|
+
**Improve bundled buy error handling**: Bundled buy totals now include fees for balance checks, and WebRPC errors are surfaced without stringifying useful details.
|
|
11
|
+
**Upgrade Trails dependencies**: Updated `0xtrails`, added the wagmi adapter, and ensured the API package builds before the SDK.
|
|
12
|
+
|
|
3
13
|
## 2.0.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/BellIcon.js
CHANGED
package/dist/Card.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { t as ContractType } from "./dist.js";
|
|
4
4
|
import { t as CollectibleCardAction } from "./types.js";
|
|
5
|
-
import {
|
|
5
|
+
import { f as cn$1, p as compareAddress } from "./utils.js";
|
|
6
6
|
import { t as BellIcon_default } from "./BellIcon.js";
|
|
7
7
|
import { useAccount } from "wagmi";
|
|
8
8
|
import { Suspense, forwardRef, lazy, useEffect, useRef, useState } from "react";
|
package/dist/ShopCard.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as MarketCollectibleCardProps, l as ShopCollectibleCardProps, n as CollectibleCardProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime52 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/ui/components/marketplace-collectible-card/CollectibleCard.d.ts
|
|
5
|
-
declare function CollectibleCard(props: CollectibleCardProps):
|
|
5
|
+
declare function CollectibleCard(props: CollectibleCardProps): react_jsx_runtime52.JSX.Element | undefined;
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/react/ui/components/marketplace-collectible-card/variants/MarketCard.d.ts
|
|
8
8
|
/**
|
|
@@ -39,7 +39,7 @@ declare function MarketCard({
|
|
|
39
39
|
prioritizeOwnerActions,
|
|
40
40
|
hideQuantitySelector,
|
|
41
41
|
classNames
|
|
42
|
-
}: MarketCollectibleCardProps):
|
|
42
|
+
}: MarketCollectibleCardProps): react_jsx_runtime52.JSX.Element | null;
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region src/react/ui/components/marketplace-collectible-card/variants/ShopCard.d.ts
|
|
45
45
|
/**
|
|
@@ -77,7 +77,7 @@ declare function ShopCard({
|
|
|
77
77
|
unlimitedSupply,
|
|
78
78
|
hideQuantitySelector,
|
|
79
79
|
classNames
|
|
80
|
-
}: ShopCollectibleCardProps):
|
|
80
|
+
}: ShopCollectibleCardProps): react_jsx_runtime52.JSX.Element | null;
|
|
81
81
|
//#endregion
|
|
82
82
|
export { MarketCard as n, CollectibleCard as r, ShopCard as t };
|
|
83
83
|
//# sourceMappingURL=ShopCard.d.ts.map
|
package/dist/builder-api.js
CHANGED
package/dist/collectible.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as findMarketCollection } from "./utils.js";
|
|
2
2
|
import { i as getMetadataClient, n as getIndexerClient, r as getMarketplaceClient } from "./api.js";
|
|
3
3
|
import { n as buildInfiniteQueryOptions, r as buildQueryOptions } from "./_internal.js";
|
|
4
4
|
import { i as createCollectibleQueryKey } from "./token-balances.js";
|
package/dist/collection.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as compareAddress } from "./utils.js";
|
|
2
2
|
import { h as serializeBigInts, i as getMetadataClient, n as getIndexerClient, r as getMarketplaceClient } from "./api.js";
|
|
3
3
|
import { n as buildInfiniteQueryOptions, r as buildQueryOptions } from "./_internal.js";
|
|
4
4
|
import { isAddress } from "viem";
|