@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.
Files changed (116) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/BellIcon.js +1 -1
  3. package/dist/Card.js +1 -1
  4. package/dist/ShopCard.d.ts +4 -4
  5. package/dist/builder-api.js +1 -1
  6. package/dist/collectible.js +1 -1
  7. package/dist/collection.js +1 -1
  8. package/dist/create-config.d.ts +597 -201
  9. package/dist/create-config.js +1 -1
  10. package/dist/currency.js +1 -1
  11. package/dist/dist.js +167 -148
  12. package/dist/dist.js.map +1 -1
  13. package/dist/expirationDateSelect.js +1 -1
  14. package/dist/filter-state.d.ts +1 -1
  15. package/dist/filters.d.ts +4 -4
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +2 -2
  18. package/dist/index10.d.ts +3 -3
  19. package/dist/index11.d.ts +17 -17
  20. package/dist/index12.d.ts +26 -26
  21. package/dist/index14.d.ts +3 -3
  22. package/dist/index15.d.ts +3 -3
  23. package/dist/index16.d.ts +2 -2
  24. package/dist/index17.d.ts +86 -86
  25. package/dist/index18.d.ts +40 -40
  26. package/dist/index19.d.ts +5 -5
  27. package/dist/index2.d.ts +4 -1
  28. package/dist/index21.d.ts +15 -15
  29. package/dist/index22.d.ts +8 -65
  30. package/dist/index23.d.ts +21 -13
  31. package/dist/index26.d.ts +4 -4
  32. package/dist/index27.d.ts +4 -4
  33. package/dist/index28.d.ts +10 -10
  34. package/dist/index3.d.ts +2 -2194
  35. package/dist/index31.d.ts +5 -5
  36. package/dist/index33.d.ts +3 -3
  37. package/dist/index34.d.ts +4 -4
  38. package/dist/index35.d.ts +1 -1
  39. package/dist/index36.d.ts +7 -7
  40. package/dist/index37.d.ts +6 -6
  41. package/dist/index38.d.ts +8 -8
  42. package/dist/index39.d.ts +1 -1
  43. package/dist/index4.d.ts +995 -995
  44. package/dist/index40.d.ts +2 -2
  45. package/dist/index8.d.ts +2 -2
  46. package/dist/index9.d.ts +2811 -3
  47. package/dist/inventory.d.ts +4 -4
  48. package/dist/inventory.js +2 -2
  49. package/dist/marketplace2.js +2 -2
  50. package/dist/metadata.d.ts +73 -73
  51. package/dist/primary-sale-checkout-options.d.ts +4 -4
  52. package/dist/quantityInput.js +1 -1
  53. package/dist/ranges.d.ts +17 -17
  54. package/dist/react/_internal/index.d.ts +1 -1
  55. package/dist/react/_internal/index.js +1 -1
  56. package/dist/react/index.d.ts +1 -1
  57. package/dist/react/queries/collectible/index.d.ts +1 -1
  58. package/dist/react/queries/index.d.ts +1 -1
  59. package/dist/react/ssr/index.d.ts +1 -1
  60. package/dist/react/ssr/index.js +2 -2
  61. package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +1 -1
  62. package/dist/react/ui/components/marketplace-logos/index.d.ts +21 -21
  63. package/dist/react/ui/modals/CreateListingModal/internal/hooks/index.d.ts +1 -1
  64. package/dist/react/ui/modals/MakeOfferModal/internal/hooks/index.d.ts +1 -1
  65. package/dist/react/ui/modals/_internal/components/alertMessage/index.d.ts +2 -2
  66. package/dist/react/ui/modals/_internal/components/baseModal/index.d.ts +6 -6
  67. package/dist/react/ui/modals/_internal/components/calendar/index.d.ts +2 -2
  68. package/dist/react/ui/modals/_internal/components/calendarDropdown/index.d.ts +2 -2
  69. package/dist/react/ui/modals/_internal/components/currencyImage/index.d.ts +2 -2
  70. package/dist/react/ui/modals/_internal/components/currencyOptionsSelect/index.d.ts +3 -3
  71. package/dist/react/ui/modals/_internal/components/floorPriceText/index.d.ts +2 -2
  72. package/dist/react/ui/modals/_internal/components/priceInput/index.d.ts +3 -3
  73. package/dist/react/ui/modals/_internal/components/quantityInput/index.d.ts +2 -2
  74. package/dist/react/ui/modals/_internal/components/selectWaasFeeOptions/index.d.ts +2 -2
  75. package/dist/react/ui/modals/_internal/components/switchChainErrorModal/index.d.ts +2 -2
  76. package/dist/react/ui/modals/_internal/components/timeAgo/index.d.ts +2 -2
  77. package/dist/react/ui/modals/_internal/components/tokenPreview/index.d.ts +3 -3
  78. package/dist/react/ui/modals/_internal/components/transaction-footer/index.d.ts +3 -3
  79. package/dist/react/ui/modals/_internal/components/transactionDetails/index.d.ts +3 -3
  80. package/dist/react/ui/modals/_internal/components/transactionPreview/index.d.ts +3 -3
  81. package/dist/react/ui/modals/_internal/components/transactionStatusModal/index.d.ts +3 -3
  82. package/dist/react.js +2192 -1903
  83. package/dist/react.js.map +1 -1
  84. package/dist/token-balances.d.ts +28 -28
  85. package/dist/transaction-footer.js +1 -1
  86. package/dist/types/index.d.ts +1 -1
  87. package/dist/types/index.js +1 -1
  88. package/dist/types.d.ts +1 -1
  89. package/dist/url-state.js +1 -1
  90. package/dist/utils/index.js +1 -1
  91. package/dist/utils.js +20 -4
  92. package/dist/utils.js.map +1 -1
  93. package/package.json +7 -5
  94. package/src/react/hooks/config/useMarketplaceConfig.test.tsx +1 -0
  95. package/src/react/hooks/transactions/useCancelTransactionSteps.tsx +4 -1
  96. package/src/react/hooks/utils/useEnsureCorrectChain.ts +10 -5
  97. package/src/react/ui/modals/BuyModal/components/BuyModalContent.tsx +34 -31
  98. package/src/react/ui/modals/BuyModal/components/CryptoPaymentModal.tsx +74 -11
  99. package/src/react/ui/modals/BuyModal/components/Modal.tsx +62 -1
  100. package/src/react/ui/modals/BuyModal/hooks/useExecuteBundledTransactions.ts +13 -26
  101. package/src/react/ui/modals/BuyModal/internal/__tests__/buildTrailsMarketBuyActions.test.ts +213 -0
  102. package/src/react/ui/modals/BuyModal/internal/buildTrailsMarketBuyActions.ts +259 -0
  103. package/src/react/ui/modals/BuyModal/internal/buyModalContext.ts +79 -10
  104. package/src/react/ui/modals/BuyModal/internal/cryptoPaymentModalContext.tsx +44 -17
  105. package/src/react/ui/modals/MakeOfferModal/internal/context.ts +2 -1
  106. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +2 -1
  107. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +12 -11
  108. package/src/react/ui/modals/_internal/helpers/currency.test.ts +27 -0
  109. package/src/react/ui/modals/_internal/helpers/currency.ts +4 -2
  110. package/src/utils/__tests__/getMarketplaceDetails.test.ts +10 -0
  111. package/src/utils/__tests__/getWebRPCErrorMessage.test.ts +28 -0
  112. package/src/utils/__tests__/marketplaceNormalization.test.ts +38 -0
  113. package/src/utils/getConduitAddressForOrderbook.ts +2 -10
  114. package/src/utils/getMarketplaceDetails.ts +11 -4
  115. package/src/utils/getWebRPCErrorMessage.ts +21 -0
  116. package/src/utils/normalizeMarketplace.ts +31 -0
package/dist/index26.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { hn as PrimarySaleItemsFilter, nn as GetCountOfPrimarySaleItemsResponse, x as GetCountOfPrimarySaleItemsRequest } from "./index2.js";
1
+ import { S as GetCountOfPrimarySaleItemsRequest, gn as PrimarySaleItemsFilter, rn as GetCountOfPrimarySaleItemsResponse } from "./index2.js";
2
2
  import { W as SdkQueryParams, X as WithRequired, it as WithOptionalParams } from "./create-config.js";
3
- import * as _tanstack_react_query409 from "@tanstack/react-query";
3
+ import * as _tanstack_react_query117 from "@tanstack/react-query";
4
4
 
5
5
  //#region src/react/queries/collectible/primary-sale-items-count.d.ts
6
6
  type FetchPrimarySaleItemsCountParams = GetCountOfPrimarySaleItemsRequest;
@@ -14,8 +14,8 @@ declare function getPrimarySaleItemsCountQueryKey(params: PrimarySaleItemsCountQ
14
14
  readonly primarySaleContractAddress: string;
15
15
  readonly filter: PrimarySaleItemsFilter | undefined;
16
16
  }];
17
- declare const primarySaleItemsCountQueryOptions: (params: WithOptionalParams<WithRequired<PrimarySaleItemsCountQueryOptions, "primarySaleContractAddress" | "chainId" | "config">>) => _tanstack_react_query409.OmitKeyof<_tanstack_react_query409.UseQueryOptions<GetCountOfPrimarySaleItemsResponse, Error, GetCountOfPrimarySaleItemsResponse, readonly unknown[]>, "queryFn"> & {
18
- queryFn?: _tanstack_react_query409.QueryFunction<GetCountOfPrimarySaleItemsResponse, readonly unknown[], never> | undefined;
17
+ declare const primarySaleItemsCountQueryOptions: (params: WithOptionalParams<WithRequired<PrimarySaleItemsCountQueryOptions, "primarySaleContractAddress" | "chainId" | "config">>) => _tanstack_react_query117.OmitKeyof<_tanstack_react_query117.UseQueryOptions<GetCountOfPrimarySaleItemsResponse, Error, GetCountOfPrimarySaleItemsResponse, readonly unknown[]>, "queryFn"> & {
18
+ queryFn?: _tanstack_react_query117.QueryFunction<GetCountOfPrimarySaleItemsResponse, readonly unknown[], never> | undefined;
19
19
  } & {
20
20
  queryKey: readonly unknown[] & {
21
21
  [dataTagSymbol]: GetCountOfPrimarySaleItemsResponse;
package/dist/index27.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Kt as Collection, m as GetCollectionDetailRequest } from "./index2.js";
1
+ import { h as GetCollectionDetailRequest, qt as Collection } from "./index2.js";
2
2
  import { W as SdkQueryParams, X as WithRequired, it as WithOptionalParams } from "./create-config.js";
3
- import * as _tanstack_react_query352 from "@tanstack/react-query";
3
+ import * as _tanstack_react_query139 from "@tanstack/react-query";
4
4
 
5
5
  //#region src/react/queries/collection/market-detail.d.ts
6
6
  type MarketCollectionDetailQueryOptions = SdkQueryParams<GetCollectionDetailRequest>;
@@ -12,8 +12,8 @@ declare function getCollectionMarketDetailQueryKey(params: MarketCollectionDetai
12
12
  readonly chainId: number;
13
13
  readonly collectionAddress: "" | `0x${string}`;
14
14
  }];
15
- declare function collectionMarketDetailQueryOptions(params: WithOptionalParams<WithRequired<MarketCollectionDetailQueryOptions, 'collectionAddress' | 'chainId' | 'config'>>): _tanstack_react_query352.OmitKeyof<_tanstack_react_query352.UseQueryOptions<Collection, Error, Collection, readonly unknown[]>, "queryFn"> & {
16
- queryFn?: _tanstack_react_query352.QueryFunction<Collection, readonly unknown[], never> | undefined;
15
+ declare function collectionMarketDetailQueryOptions(params: WithOptionalParams<WithRequired<MarketCollectionDetailQueryOptions, 'collectionAddress' | 'chainId' | 'config'>>): _tanstack_react_query139.OmitKeyof<_tanstack_react_query139.UseQueryOptions<Collection, Error, Collection, readonly unknown[]>, "queryFn"> & {
16
+ queryFn?: _tanstack_react_query139.QueryFunction<Collection, readonly unknown[], never> | undefined;
17
17
  } & {
18
18
  queryKey: readonly unknown[] & {
19
19
  [dataTagSymbol]: Collection;
package/dist/index28.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Ft as Address$1, It as ChainId, N as ListCurrenciesRequest, l as Currency } from "./index2.js";
1
+ import { It as Address$1, Lt as ChainId, P as ListCurrenciesRequest, u as Currency } from "./index2.js";
2
2
  import { W as SdkQueryParams, X as WithRequired, it as WithOptionalParams } from "./create-config.js";
3
- import * as _tanstack_react_query329 from "@tanstack/react-query";
3
+ import * as _tanstack_react_query162 from "@tanstack/react-query";
4
4
 
5
5
  //#region src/react/queries/currency/compare-prices.d.ts
6
6
  type FetchComparePricesParams = {
@@ -27,8 +27,8 @@ declare function getComparePricesQueryKey(params: ComparePricesQueryOptions): re
27
27
  compareToPriceAmountRaw: string | undefined;
28
28
  compareToPriceCurrencyAddress: `0x${string}` | undefined;
29
29
  }];
30
- declare function comparePricesQueryOptions(params: WithOptionalParams<WithRequired<ComparePricesQueryOptions, 'chainId' | 'priceAmountRaw' | 'priceCurrencyAddress' | 'compareToPriceAmountRaw' | 'compareToPriceCurrencyAddress' | 'config'>>): _tanstack_react_query329.OmitKeyof<_tanstack_react_query329.UseQueryOptions<ComparePricesReturn, Error, ComparePricesReturn, readonly unknown[]>, "queryFn"> & {
31
- queryFn?: _tanstack_react_query329.QueryFunction<ComparePricesReturn, readonly unknown[], never> | undefined;
30
+ declare function comparePricesQueryOptions(params: WithOptionalParams<WithRequired<ComparePricesQueryOptions, 'chainId' | 'priceAmountRaw' | 'priceCurrencyAddress' | 'compareToPriceAmountRaw' | 'compareToPriceCurrencyAddress' | 'config'>>): _tanstack_react_query162.OmitKeyof<_tanstack_react_query162.UseQueryOptions<ComparePricesReturn, Error, ComparePricesReturn, readonly unknown[]>, "queryFn"> & {
31
+ queryFn?: _tanstack_react_query162.QueryFunction<ComparePricesReturn, readonly unknown[], never> | undefined;
32
32
  } & {
33
33
  queryKey: readonly unknown[] & {
34
34
  [dataTagSymbol]: ComparePricesReturn;
@@ -56,8 +56,8 @@ declare function getConvertPriceToUSDQueryKey(params: ConvertPriceToUSDQueryOpti
56
56
  currencyAddress: `0x${string}` | undefined;
57
57
  amountRaw: string | undefined;
58
58
  }];
59
- declare function convertPriceToUSDQueryOptions(params: WithOptionalParams<WithRequired<ConvertPriceToUSDQueryOptions, 'chainId' | 'currencyAddress' | 'amountRaw' | 'config'>>): _tanstack_react_query329.OmitKeyof<_tanstack_react_query329.UseQueryOptions<ConvertPriceToUSDReturn, Error, ConvertPriceToUSDReturn, readonly unknown[]>, "queryFn"> & {
60
- queryFn?: _tanstack_react_query329.QueryFunction<ConvertPriceToUSDReturn, readonly unknown[], never> | undefined;
59
+ declare function convertPriceToUSDQueryOptions(params: WithOptionalParams<WithRequired<ConvertPriceToUSDQueryOptions, 'chainId' | 'currencyAddress' | 'amountRaw' | 'config'>>): _tanstack_react_query162.OmitKeyof<_tanstack_react_query162.UseQueryOptions<ConvertPriceToUSDReturn, Error, ConvertPriceToUSDReturn, readonly unknown[]>, "queryFn"> & {
60
+ queryFn?: _tanstack_react_query162.QueryFunction<ConvertPriceToUSDReturn, readonly unknown[], never> | undefined;
61
61
  } & {
62
62
  queryKey: readonly unknown[] & {
63
63
  [dataTagSymbol]: ConvertPriceToUSDReturn;
@@ -78,8 +78,8 @@ declare function getCurrencyQueryKey(params: CurrencyQueryOptions): readonly ["c
78
78
  chainId: string;
79
79
  currencyAddress: string;
80
80
  }];
81
- declare function currencyQueryOptions(params: WithOptionalParams<WithRequired<CurrencyQueryOptions, 'chainId' | 'currencyAddress' | 'config'>>): _tanstack_react_query329.OmitKeyof<_tanstack_react_query329.UseQueryOptions<Currency | undefined, Error, Currency | undefined, readonly unknown[]>, "queryFn"> & {
82
- queryFn?: _tanstack_react_query329.QueryFunction<Currency | undefined, readonly unknown[], never> | undefined;
81
+ declare function currencyQueryOptions(params: WithOptionalParams<WithRequired<CurrencyQueryOptions, 'chainId' | 'currencyAddress' | 'config'>>): _tanstack_react_query162.OmitKeyof<_tanstack_react_query162.UseQueryOptions<Currency | undefined, Error, Currency | undefined, readonly unknown[]>, "queryFn"> & {
82
+ queryFn?: _tanstack_react_query162.QueryFunction<Currency | undefined, readonly unknown[], never> | undefined;
83
83
  } & {
84
84
  queryKey: readonly unknown[] & {
85
85
  [dataTagSymbol]: Currency | undefined;
@@ -102,8 +102,8 @@ declare function getMarketCurrenciesQueryKey(params: MarketCurrenciesQueryOption
102
102
  readonly includeNativeCurrency: boolean | undefined;
103
103
  readonly collectionAddress: `0x${string}` | undefined;
104
104
  }];
105
- declare function marketCurrenciesQueryOptions(params: WithOptionalParams<WithRequired<MarketCurrenciesQueryOptions, 'chainId' | 'config'>>): _tanstack_react_query329.OmitKeyof<_tanstack_react_query329.UseQueryOptions<Currency[], Error, Currency[], readonly unknown[]>, "queryFn"> & {
106
- queryFn?: _tanstack_react_query329.QueryFunction<Currency[], readonly unknown[], never> | undefined;
105
+ declare function marketCurrenciesQueryOptions(params: WithOptionalParams<WithRequired<MarketCurrenciesQueryOptions, 'chainId' | 'config'>>): _tanstack_react_query162.OmitKeyof<_tanstack_react_query162.UseQueryOptions<Currency[], Error, Currency[], readonly unknown[]>, "queryFn"> & {
106
+ queryFn?: _tanstack_react_query162.QueryFunction<Currency[], readonly unknown[], never> | undefined;
107
107
  } & {
108
108
  queryKey: readonly unknown[] & {
109
109
  [dataTagSymbol]: Currency[];