@0xsequence/marketplace-sdk 1.2.1 → 2.0.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.
Files changed (906) hide show
  1. package/.storybook/preview.tsx +4 -7
  2. package/CHANGELOG.md +171 -0
  3. package/compile-tailwind.js +1 -1
  4. package/dist/BellIcon.js +6 -3
  5. package/dist/BellIcon.js.map +1 -1
  6. package/dist/Card.js +831 -0
  7. package/dist/Card.js.map +1 -0
  8. package/dist/ShopCard.d.ts +83 -0
  9. package/dist/_internal.js +57 -1
  10. package/dist/_internal.js.map +1 -1
  11. package/dist/abi.js +24 -1
  12. package/dist/abi.js.map +1 -1
  13. package/dist/alertMessage.js +29 -0
  14. package/dist/alertMessage.js.map +1 -0
  15. package/dist/api.js +95 -108
  16. package/dist/api.js.map +1 -1
  17. package/dist/builder-api.js +17 -4
  18. package/dist/builder-api.js.map +1 -1
  19. package/dist/calendar.js +51 -0
  20. package/dist/calendar.js.map +1 -0
  21. package/dist/checkout.js +52 -0
  22. package/dist/checkout.js.map +1 -0
  23. package/dist/collectible.js +620 -0
  24. package/dist/collectible.js.map +1 -0
  25. package/dist/collection.js +396 -0
  26. package/dist/collection.js.map +1 -0
  27. package/dist/{marketplaceConfig.js → config.js} +25 -31
  28. package/dist/config.js.map +1 -0
  29. package/dist/consts.d.ts +7 -0
  30. package/dist/consts.js +8 -0
  31. package/dist/consts.js.map +1 -0
  32. package/dist/contracts.js +22 -2
  33. package/dist/contracts.js.map +1 -1
  34. package/dist/create-config.d.ts +12037 -1801
  35. package/dist/create-config.js +9 -7
  36. package/dist/create-config.js.map +1 -1
  37. package/dist/currency.js +186 -0
  38. package/dist/currency.js.map +1 -0
  39. package/dist/currencyImage.js +28 -0
  40. package/dist/currencyImage.js.map +1 -0
  41. package/dist/dist.js +2771 -0
  42. package/dist/dist.js.map +1 -0
  43. package/dist/expirationDateSelect.js +245 -0
  44. package/dist/expirationDateSelect.js.map +1 -0
  45. package/dist/filter-state.d.ts +153 -0
  46. package/dist/filters.d.ts +14 -45
  47. package/dist/hooks.js +26 -0
  48. package/dist/hooks.js.map +1 -0
  49. package/dist/hooks2.js +24 -0
  50. package/dist/hooks2.js.map +1 -0
  51. package/dist/index.d.ts +12 -8
  52. package/dist/index.js +6 -9
  53. package/dist/index10.d.ts +39 -261
  54. package/dist/index11.d.ts +461 -220
  55. package/dist/index12.d.ts +511 -85
  56. package/dist/index13.d.ts +17 -493
  57. package/dist/index14.d.ts +15 -66
  58. package/dist/index15.d.ts +25 -1
  59. package/dist/index16.d.ts +5 -47
  60. package/dist/index17.d.ts +840 -108
  61. package/dist/index18.d.ts +552 -1
  62. package/dist/index19.d.ts +317 -147
  63. package/dist/index2.d.ts +2172 -5
  64. package/dist/index21.d.ts +306 -93
  65. package/dist/index22.d.ts +230 -1
  66. package/dist/index23.d.ts +323 -797
  67. package/dist/index24.d.ts +22 -445
  68. package/dist/index25.d.ts +1 -357
  69. package/dist/index26.d.ts +20 -151
  70. package/dist/index27.d.ts +18 -794
  71. package/dist/index28.d.ts +109 -58
  72. package/dist/index29.d.ts +1 -24
  73. package/dist/index3.d.ts +2212 -51
  74. package/dist/index30.d.ts +1 -0
  75. package/dist/index31.d.ts +48 -0
  76. package/dist/index32.d.ts +1 -0
  77. package/dist/index33.d.ts +56 -0
  78. package/dist/index34.d.ts +99 -0
  79. package/dist/index35.d.ts +171 -0
  80. package/dist/index36.d.ts +131 -0
  81. package/dist/index37.d.ts +135 -0
  82. package/dist/index38.d.ts +85 -0
  83. package/dist/index39.d.ts +91 -0
  84. package/dist/index4.d.ts +2678 -61
  85. package/dist/index40.d.ts +46 -0
  86. package/dist/index5.d.ts +535 -2267
  87. package/dist/index6.d.ts +2025 -1287
  88. package/dist/index7.d.ts +1798 -116
  89. package/dist/index8.d.ts +115 -12
  90. package/dist/index9.d.ts +42 -56
  91. package/dist/inventory.d.ts +46 -0
  92. package/dist/inventory.js +56 -33
  93. package/dist/inventory.js.map +1 -1
  94. package/dist/marketplace-logos.js +1 -1
  95. package/dist/marketplace-logos.js.map +1 -1
  96. package/dist/marketplace2.js +70 -0
  97. package/dist/marketplace2.js.map +1 -0
  98. package/dist/metadata.d.ts +733 -0
  99. package/dist/network.js +1 -1
  100. package/dist/networkconfigToWagmiChain.js.map +1 -1
  101. package/dist/primary-sale-checkout-options.d.ts +29 -0
  102. package/dist/quantityInput.js +93 -0
  103. package/dist/quantityInput.js.map +1 -0
  104. package/dist/ranges.d.ts +125 -0
  105. package/dist/react/_internal/api/index.d.ts +5 -2
  106. package/dist/react/_internal/api/index.js +4 -7
  107. package/dist/react/_internal/databeat/index.d.ts +4 -1
  108. package/dist/react/_internal/databeat/index.js +4 -37
  109. package/dist/react/_internal/index.d.ts +5 -2
  110. package/dist/react/_internal/index.js +5 -10
  111. package/dist/react/_internal/wagmi/index.d.ts +4 -1
  112. package/dist/react/_internal/wagmi/index.js +1 -4
  113. package/dist/react/hooks/_deprecated/index.d.ts +47 -0
  114. package/dist/react/hooks/_deprecated/index.js +4 -0
  115. package/dist/react/hooks/checkout/index.d.ts +7 -0
  116. package/dist/react/hooks/checkout/index.js +7 -0
  117. package/dist/react/hooks/collectible/index.d.ts +7 -0
  118. package/dist/react/hooks/collectible/index.js +7 -0
  119. package/dist/react/hooks/collection/index.d.ts +11 -0
  120. package/dist/react/hooks/collection/index.js +7 -0
  121. package/dist/react/hooks/config/index.d.ts +5 -4
  122. package/dist/react/hooks/config/index.js +4 -37
  123. package/dist/react/hooks/contracts/index.d.ts +4 -7
  124. package/dist/react/hooks/contracts/index.js +3 -16
  125. package/dist/react/hooks/currency/index.d.ts +47 -0
  126. package/dist/react/hooks/currency/index.js +7 -0
  127. package/dist/react/hooks/index.d.ts +41 -31
  128. package/dist/react/hooks/index.js +14 -38
  129. package/dist/react/hooks/inventory/index.d.ts +7 -0
  130. package/dist/react/hooks/inventory/index.js +4 -0
  131. package/dist/react/hooks/token/index.d.ts +7 -0
  132. package/dist/react/hooks/token/index.js +7 -0
  133. package/dist/react/hooks/transactions/index.d.ts +5 -2
  134. package/dist/react/hooks/transactions/index.js +5 -38
  135. package/dist/react/hooks/ui/card-data/index.d.ts +8 -0
  136. package/dist/react/hooks/ui/card-data/index.js +4 -0
  137. package/dist/react/hooks/ui/index.d.ts +9 -3
  138. package/dist/react/hooks/ui/index.js +8 -38
  139. package/dist/react/hooks/ui/url-state/index.d.ts +7 -0
  140. package/dist/react/hooks/ui/url-state/index.js +4 -0
  141. package/dist/react/hooks/utils/index.d.ts +3 -34
  142. package/dist/react/hooks/utils/index.js +5 -38
  143. package/dist/react/index.d.ts +45 -35
  144. package/dist/react/index.js +19 -37
  145. package/dist/react/providers/index.d.ts +6 -0
  146. package/dist/react/providers/index.js +6 -0
  147. package/dist/react/queries/checkout/index.d.ts +7 -0
  148. package/dist/react/queries/checkout/index.js +4 -0
  149. package/dist/react/queries/collectible/index.d.ts +7 -0
  150. package/dist/react/queries/collectible/index.js +5 -0
  151. package/dist/react/queries/collection/index.d.ts +11 -0
  152. package/dist/react/queries/collection/index.js +4 -0
  153. package/dist/react/queries/currency/index.d.ts +6 -0
  154. package/dist/react/queries/currency/index.js +4 -0
  155. package/dist/react/queries/index.d.ts +20 -21
  156. package/dist/react/queries/index.js +11 -30
  157. package/dist/react/queries/inventory/index.d.ts +6 -2
  158. package/dist/react/queries/inventory/index.js +3 -21
  159. package/dist/react/queries/marketplace/index.d.ts +7 -0
  160. package/dist/react/queries/marketplace/index.js +5 -0
  161. package/dist/react/queries/token/index.d.ts +7 -0
  162. package/dist/react/queries/token/index.js +4 -0
  163. package/dist/react/ssr/index.d.ts +12 -24
  164. package/dist/react/ssr/index.js +13 -33
  165. package/dist/react/ui/components/marketplace-collectible-card/ActionButton/index.d.ts +6 -0
  166. package/dist/react/ui/components/marketplace-collectible-card/ActionButton/index.js +6 -0
  167. package/dist/react/ui/components/marketplace-collectible-card/Card/index.d.ts +10 -0
  168. package/dist/react/ui/components/marketplace-collectible-card/Card/index.js +6 -0
  169. package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +44 -4
  170. package/dist/react/ui/components/marketplace-collectible-card/index.js +6 -38
  171. package/dist/react/ui/components/marketplace-collectible-card/utils/index.d.ts +5 -2
  172. package/dist/react/ui/components/marketplace-collectible-card/utils/index.js +3 -12
  173. package/dist/react/ui/components/marketplace-logos/index.d.ts +23 -22
  174. package/dist/react/ui/hooks/index.d.ts +47 -0
  175. package/dist/react/ui/hooks/index.js +15 -0
  176. package/dist/react/ui/icons/index.d.ts +3 -1
  177. package/dist/react/ui/icons/index.js +3 -14
  178. package/dist/react/ui/index.d.ts +47 -5
  179. package/dist/react/ui/index.js +6 -38
  180. package/dist/react/ui/modals/BuyModal/index.d.ts +47 -0
  181. package/dist/react/ui/modals/BuyModal/index.js +4 -0
  182. package/dist/react/ui/modals/CreateListingModal/index.d.ts +4 -0
  183. package/dist/react/ui/modals/CreateListingModal/index.js +6 -0
  184. package/dist/react/ui/modals/CreateListingModal/internal/hooks/index.d.ts +190 -0
  185. package/dist/react/ui/modals/CreateListingModal/internal/hooks/index.js +4 -0
  186. package/dist/react/ui/modals/MakeOfferModal/index.d.ts +4 -0
  187. package/dist/react/ui/modals/MakeOfferModal/index.js +4 -0
  188. package/dist/react/ui/modals/MakeOfferModal/internal/hooks/index.d.ts +188 -0
  189. package/dist/react/ui/modals/MakeOfferModal/internal/hooks/index.js +3 -0
  190. package/dist/react/ui/modals/SellModal/index.d.ts +6 -0
  191. package/dist/react/ui/modals/SellModal/index.js +6 -0
  192. package/dist/react/ui/modals/TransferModal/index.d.ts +47 -0
  193. package/dist/react/ui/modals/TransferModal/index.js +6 -0
  194. package/dist/react/ui/modals/_internal/components/alertMessage/index.d.ts +14 -0
  195. package/dist/react/ui/modals/_internal/components/alertMessage/index.js +3 -0
  196. package/dist/react/ui/modals/_internal/components/baseModal/index.d.ts +144 -0
  197. package/dist/react/ui/modals/_internal/components/baseModal/index.js +6 -0
  198. package/dist/react/ui/modals/_internal/components/calendar/index.d.ts +73 -0
  199. package/dist/react/ui/modals/_internal/components/calendar/index.js +5 -0
  200. package/dist/react/ui/modals/_internal/components/calendarDropdown/index.d.ts +21 -0
  201. package/dist/react/ui/modals/_internal/components/calendarDropdown/index.js +6 -0
  202. package/dist/react/ui/modals/_internal/components/currencyImage/index.d.ts +15 -0
  203. package/dist/react/ui/modals/_internal/components/currencyImage/index.js +5 -0
  204. package/dist/react/ui/modals/_internal/components/currencyOptionsSelect/index.d.ts +30 -0
  205. package/dist/react/ui/modals/_internal/components/currencyOptionsSelect/index.js +6 -0
  206. package/dist/react/ui/modals/_internal/components/expirationDateSelect/index.d.ts +2 -0
  207. package/dist/react/ui/modals/_internal/components/expirationDateSelect/index.js +6 -0
  208. package/dist/react/ui/modals/_internal/components/floorPriceText/index.d.ts +24 -0
  209. package/dist/react/ui/modals/_internal/components/floorPriceText/index.js +6 -0
  210. package/dist/react/ui/modals/_internal/components/priceInput/index.d.ts +45 -0
  211. package/dist/react/ui/modals/_internal/components/priceInput/index.js +6 -0
  212. package/dist/react/ui/modals/_internal/components/quantityInput/index.d.ts +24 -0
  213. package/dist/react/ui/modals/_internal/components/quantityInput/index.js +6 -0
  214. package/dist/react/ui/modals/_internal/components/selectWaasFeeOptions/index.d.ts +18 -0
  215. package/dist/react/ui/modals/_internal/components/selectWaasFeeOptions/index.js +6 -0
  216. package/dist/react/ui/modals/_internal/components/switchChainErrorModal/index.d.ts +14 -0
  217. package/dist/react/ui/modals/_internal/components/switchChainErrorModal/index.js +6 -0
  218. package/dist/react/ui/modals/_internal/components/timeAgo/index.d.ts +12 -0
  219. package/dist/react/ui/modals/_internal/components/timeAgo/index.js +5 -0
  220. package/dist/react/ui/modals/_internal/components/tokenPreview/index.d.ts +19 -0
  221. package/dist/react/ui/modals/_internal/components/tokenPreview/index.js +6 -0
  222. package/dist/react/ui/modals/_internal/components/transaction-footer/index.d.ts +26 -0
  223. package/dist/react/ui/modals/_internal/components/transaction-footer/index.js +4 -0
  224. package/dist/react/ui/modals/_internal/components/transactionDetails/index.d.ts +28 -0
  225. package/dist/react/ui/modals/_internal/components/transactionDetails/index.js +6 -0
  226. package/dist/react/ui/modals/_internal/components/transactionHeader/index.d.ts +16 -0
  227. package/dist/react/ui/modals/_internal/components/transactionHeader/index.js +3 -0
  228. package/dist/react/ui/modals/_internal/components/transactionPreview/index.d.ts +36 -0
  229. package/dist/react/ui/modals/_internal/components/transactionPreview/index.js +6 -0
  230. package/dist/react/ui/modals/_internal/components/transactionStatusModal/index.d.ts +27 -0
  231. package/dist/react/ui/modals/_internal/components/transactionStatusModal/index.js +6 -0
  232. package/dist/react/utils/index.d.ts +6 -19
  233. package/dist/react/utils/index.js +3 -8
  234. package/dist/react.js +12634 -9807
  235. package/dist/react.js.map +1 -1
  236. package/dist/src.js +0 -8
  237. package/dist/ssr.js +26 -0
  238. package/dist/ssr.js.map +1 -0
  239. package/dist/steps.d.ts +85 -0
  240. package/dist/styles/index.css +2040 -375
  241. package/dist/switchChainErrorModal.js +97 -0
  242. package/dist/switchChainErrorModal.js.map +1 -0
  243. package/dist/timeAgo.js +29 -0
  244. package/dist/timeAgo.js.map +1 -0
  245. package/dist/token-balances.d.ts +359 -0
  246. package/dist/token-balances.js +62 -0
  247. package/dist/token-balances.js.map +1 -0
  248. package/dist/token2.js +247 -0
  249. package/dist/token2.js.map +1 -0
  250. package/dist/transaction-footer.js +45 -0
  251. package/dist/transaction-footer.js.map +1 -0
  252. package/dist/transaction.js +1 -7
  253. package/dist/transaction.js.map +1 -1
  254. package/dist/transactionHeader.js +32 -0
  255. package/dist/transactionHeader.js.map +1 -0
  256. package/dist/types/index.d.ts +5 -2
  257. package/dist/types/index.js +3 -4
  258. package/dist/types.d.ts +26 -16
  259. package/dist/types.js +29 -1
  260. package/dist/types.js.map +1 -1
  261. package/dist/url-state.js +170 -0
  262. package/dist/url-state.js.map +1 -0
  263. package/dist/utils/abi/index.d.ts +6 -5
  264. package/dist/utils/abi/index.js +2 -2
  265. package/dist/utils/abi/marketplace/index.d.ts +1 -1
  266. package/dist/utils/abi/primary-sale/index.d.ts +1 -1
  267. package/dist/utils/abi/token/index.d.ts +1 -1
  268. package/dist/utils/index.d.ts +9 -7
  269. package/dist/utils/index.js +4 -8
  270. package/dist/utils.js +8 -8
  271. package/dist/utils.js.map +1 -1
  272. package/dist/utils2.js +64 -106
  273. package/dist/utils2.js.map +1 -1
  274. package/dist/waas-types.d.ts +19 -0
  275. package/dist/xstate-store.cjs.d.ts +18 -0
  276. package/eslint/sequence-types.js +1069 -0
  277. package/eslint.config.mjs +337 -9
  278. package/image.d.ts +5 -0
  279. package/package.json +49 -47
  280. package/postcss.config.mjs +1 -1
  281. package/preserve-directives.ts +235 -0
  282. package/public/mockServiceWorker.js +0 -1
  283. package/src/react/_internal/api/builder-api.ts +26 -4
  284. package/src/react/_internal/api/index.ts +1 -2
  285. package/src/react/_internal/api/marketplace-api.ts +57 -25
  286. package/src/react/_internal/api/services.ts +56 -4
  287. package/src/react/_internal/api-mocks.ts +8 -0
  288. package/src/react/_internal/databeat/index.ts +4 -0
  289. package/src/react/_internal/databeat/types.ts +24 -28
  290. package/src/react/_internal/index.ts +70 -0
  291. package/src/react/_internal/query-builder.ts +203 -0
  292. package/src/react/_internal/types.ts +88 -18
  293. package/src/react/_internal/utils.ts +34 -52
  294. package/src/react/_internal/wagmi/__tests__/create-config.test.ts +11 -5
  295. package/src/react/_internal/wagmi/create-config.ts +2 -2
  296. package/src/react/_internal/wagmi/get-connectors.ts +10 -6
  297. package/src/react/hooks/_deprecated/index.ts +61 -0
  298. package/src/react/hooks/checkout/index.ts +1 -0
  299. package/src/react/hooks/{utils/useCheckoutOptionsSalesContract.test.tsx → checkout/primary-sale-checkout-options.test.tsx} +23 -23
  300. package/src/react/hooks/{utils/useCheckoutOptionsSalesContract.tsx → checkout/primary-sale-checkout-options.tsx} +35 -32
  301. package/src/react/hooks/{data/collectibles/useBalanceOfCollectible.test.tsx → collectible/balance.test.tsx} +37 -29
  302. package/src/react/hooks/{data/collectibles/useBalanceOfCollectible.tsx → collectible/balance.tsx} +11 -11
  303. package/src/react/hooks/{data/primary-sales/useErc721SalesData.tsx → collectible/erc721-sale-details.tsx} +6 -6
  304. package/src/react/hooks/collectible/index.ts +16 -0
  305. package/src/react/hooks/{data/collectibles/useCountOfCollectables.test.tsx → collectible/market-count.test.tsx} +21 -16
  306. package/src/react/hooks/{data/collectibles/useCountOfCollectables.tsx → collectible/market-count.tsx} +13 -8
  307. package/src/react/hooks/{data/orders/useHighestOffer.test.tsx → collectible/market-highest-offer.test.tsx} +35 -24
  308. package/src/react/hooks/{data/orders/useHighestOffer.tsx → collectible/market-highest-offer.tsx} +12 -10
  309. package/src/react/hooks/{data/collectibles/useListCollectiblesPaginated.test.tsx → collectible/market-list-paginated.test.tsx} +18 -18
  310. package/src/react/hooks/{data/collectibles/useListCollectiblesPaginated.tsx → collectible/market-list-paginated.tsx} +12 -10
  311. package/src/react/hooks/{data/collectibles/useListCollectibles.test.tsx → collectible/market-list.test.tsx} +51 -39
  312. package/src/react/hooks/{data/collectibles/useListCollectibles.tsx → collectible/market-list.tsx} +11 -10
  313. package/src/react/hooks/{data/orders/useCountListingsForCollectible.test.tsx → collectible/market-listings-count.test.tsx} +13 -10
  314. package/src/react/hooks/{data/orders/useCountListingsForCollectible.tsx → collectible/market-listings-count.tsx} +11 -11
  315. package/src/react/hooks/{data/orders/useListListingsForCollectible.test.tsx → collectible/market-listings.test.tsx} +19 -19
  316. package/src/react/hooks/{data/orders/useListListingsForCollectible.tsx → collectible/market-listings.tsx} +17 -19
  317. package/src/react/hooks/{data/orders/useLowestListing.test.tsx → collectible/market-lowest-listing.test.tsx} +35 -24
  318. package/src/react/hooks/{data/orders/useLowestListing.tsx → collectible/market-lowest-listing.tsx} +12 -10
  319. package/src/react/hooks/{data/orders/useCountOffersForCollectible.test.tsx → collectible/market-offers-count.test.tsx} +13 -10
  320. package/src/react/hooks/{data/orders/useCountOffersForCollectible.tsx → collectible/market-offers-count.tsx} +11 -11
  321. package/src/react/hooks/{data/orders/useListOffersForCollectible.test.tsx → collectible/market-offers.test.tsx} +17 -17
  322. package/src/react/hooks/{data/orders/useListOffersForCollectible.tsx → collectible/market-offers.tsx} +16 -17
  323. package/src/react/hooks/{data/collectibles/useCollectible.test.tsx → collectible/metadata.test.tsx} +25 -23
  324. package/src/react/hooks/{data/collectibles/useCollectible.tsx → collectible/metadata.tsx} +17 -14
  325. package/src/react/hooks/collectible/primary-sale-item.test.tsx +503 -0
  326. package/src/react/hooks/{data/primary-sales/usePrimarySaleItem.tsx → collectible/primary-sale-item.tsx} +6 -8
  327. package/src/react/hooks/collectible/primary-sale-items-count.test.tsx +154 -0
  328. package/src/react/hooks/collectible/primary-sale-items-count.tsx +22 -0
  329. package/src/react/hooks/collectible/primary-sale-items.test.tsx +259 -0
  330. package/src/react/hooks/{data/primary-sales/useListPrimarySaleItems.tsx → collectible/primary-sale-items.tsx} +9 -9
  331. package/src/react/hooks/{data/collectibles/useTokenBalances.test.tsx → collectible/token-balances.test.tsx} +52 -28
  332. package/src/react/hooks/{data/collectibles/useTokenBalances.tsx → collectible/token-balances.tsx} +10 -10
  333. package/src/react/hooks/{data/collections/__snapshots__/useListCollections.test.tsx.snap → collection/__snapshots__/list.test.tsx.snap} +20 -20
  334. package/src/react/hooks/{data/collections/useCollectionBalanceDetails.test.tsx → collection/balance-details.test.tsx} +13 -8
  335. package/src/react/hooks/{data/collections/useCollectionBalanceDetails.tsx → collection/balance-details.tsx} +3 -3
  336. package/src/react/hooks/collection/index.ts +11 -0
  337. package/src/react/hooks/{data/collections/useListCollections.test.tsx → collection/list.test.tsx} +15 -14
  338. package/src/react/hooks/{data/collections/useListCollections.tsx → collection/list.tsx} +7 -7
  339. package/src/react/hooks/collection/market-detail-polling.test.tsx +146 -0
  340. package/src/react/hooks/{data/collections/useCollectionDetailsPolling.tsx → collection/market-detail-polling.tsx} +13 -12
  341. package/src/react/hooks/collection/market-filtered-count.test.tsx +121 -0
  342. package/src/react/hooks/{data/orders/useGetCountOfFilteredOrders.tsx → collection/market-filtered-count.tsx} +6 -6
  343. package/src/react/hooks/{data/orders/useFloorOrder.test.tsx → collection/market-floor.test.tsx} +19 -15
  344. package/src/react/hooks/{data/orders/useFloorOrder.tsx → collection/market-floor.tsx} +13 -9
  345. package/src/react/hooks/collection/market-items-count.test.tsx +121 -0
  346. package/src/react/hooks/{data/orders/useCountItemsOrdersForCollection.tsx → collection/market-items-count.tsx} +9 -9
  347. package/src/react/hooks/collection/market-items-paginated.test.tsx +142 -0
  348. package/src/react/hooks/{data/orders/useListItemsOrdersForCollectionPaginated.tsx → collection/market-items-paginated.tsx} +11 -9
  349. package/src/react/hooks/collection/market-items.test.tsx +184 -0
  350. package/src/react/hooks/{data/orders/useListItemsOrdersForCollection.tsx → collection/market-items.tsx} +16 -14
  351. package/src/react/hooks/{data/collections/useCollection.test.tsx → collection/metadata.test.tsx} +18 -13
  352. package/src/react/hooks/{data/collections/useCollection.tsx → collection/metadata.tsx} +16 -7
  353. package/src/react/hooks/collection/useCollectionActiveListingsCurrencies.test.tsx +150 -0
  354. package/src/react/hooks/{data/collections → collection}/useCollectionActiveListingsCurrencies.tsx +3 -3
  355. package/src/react/hooks/collection/useCollectionActiveOffersCurrencies.test.tsx +150 -0
  356. package/src/react/hooks/{data/collections → collection}/useCollectionActiveOffersCurrencies.tsx +3 -3
  357. package/src/react/hooks/config/__snapshots__/useMarketplaceConfig.test.tsx.snap +12 -11
  358. package/src/react/hooks/config/useConnectorMetadata.tsx +1 -1
  359. package/src/react/hooks/config/useMarketplaceConfig.test.tsx +3 -1
  360. package/src/react/hooks/config/useMarketplaceConfig.tsx +1 -1
  361. package/src/react/hooks/contracts/index.ts +1 -0
  362. package/src/react/hooks/contracts/useERC721Owner.test.tsx +82 -0
  363. package/src/react/hooks/contracts/useERC721Owner.tsx +47 -0
  364. package/src/react/hooks/contracts/useSalesContractABI.ts +2 -2
  365. package/src/react/hooks/{utils/useComparePrices.test.tsx → currency/compare-prices.test.tsx} +17 -11
  366. package/src/react/hooks/{utils/useComparePrices.tsx → currency/compare-prices.tsx} +8 -6
  367. package/src/react/hooks/{utils/useConvertPriceToUSD.test.tsx → currency/convert-to-usd.test.tsx} +17 -16
  368. package/src/react/hooks/{utils/useConvertPriceToUSD.tsx → currency/convert-to-usd.tsx} +6 -6
  369. package/src/react/hooks/{data/market/useCurrency.test.tsx → currency/currency.test.tsx} +18 -14
  370. package/src/react/hooks/{data/market/useCurrency.tsx → currency/currency.tsx} +3 -3
  371. package/src/react/hooks/currency/index.ts +4 -0
  372. package/src/react/hooks/{data/market/useMarketCurrencies.test.tsx → currency/list.test.tsx} +49 -74
  373. package/src/react/hooks/{data/market/useMarketCurrencies.tsx → currency/list.tsx} +7 -7
  374. package/src/react/hooks/data/orders/useOrders.test.tsx +143 -0
  375. package/src/react/hooks/data/orders/useOrders.tsx +73 -0
  376. package/src/react/hooks/data/tokens/useCurrencyBalance.tsx +1 -1
  377. package/src/react/hooks/index.ts +9 -12
  378. package/src/react/hooks/inventory/index.ts +1 -0
  379. package/src/react/hooks/{data/inventory/useInventory.test.tsx → inventory/inventory.test.tsx} +12 -14
  380. package/src/react/hooks/inventory/inventory.tsx +17 -0
  381. package/src/react/hooks/{data/tokens/useListBalances.test.tsx → token/balances.test.tsx} +22 -11
  382. package/src/react/hooks/token/balances.tsx +59 -0
  383. package/src/react/hooks/{data/tokens/useCurrencyBalance.test.tsx → token/currency-balance.test.tsx} +6 -6
  384. package/src/react/hooks/token/currency-balance.tsx +151 -0
  385. package/src/react/hooks/token/index.ts +5 -0
  386. package/src/react/hooks/{data/tokens/useSearchTokenMetadata.test.tsx → token/metadata-search.test.tsx} +38 -30
  387. package/src/react/hooks/{data/tokens/useSearchTokenMetadata.tsx → token/metadata-search.tsx} +27 -24
  388. package/src/react/hooks/{data/tokens/useListTokenMetadata.test.tsx → token/metadata.test.tsx} +27 -24
  389. package/src/react/hooks/{data/tokens/useListTokenMetadata.tsx → token/metadata.tsx} +7 -7
  390. package/src/react/hooks/{data/tokens/useGetTokenRanges.test.tsx → token/ranges.test.tsx} +15 -14
  391. package/src/react/hooks/{data/tokens/useGetTokenRanges.tsx → token/ranges.tsx} +12 -13
  392. package/src/react/hooks/transactions/index.ts +5 -0
  393. package/src/react/hooks/transactions/useBuyTransaction.tsx +95 -0
  394. package/src/react/hooks/transactions/useCancelOrder.test.tsx +15 -35
  395. package/src/react/hooks/transactions/useCancelOrder.tsx +3 -9
  396. package/src/react/hooks/transactions/useCancelTransactionSteps.tsx +3 -9
  397. package/src/react/hooks/transactions/useGenerateCancelTransaction.test.tsx +23 -12
  398. package/src/react/hooks/transactions/useGenerateCancelTransaction.tsx +16 -11
  399. package/src/react/hooks/transactions/useGenerateListingTransaction.test.tsx +17 -57
  400. package/src/react/hooks/transactions/useGenerateListingTransaction.tsx +17 -12
  401. package/src/react/hooks/transactions/useGenerateOfferTransaction.test.tsx +14 -15
  402. package/src/react/hooks/transactions/useGenerateOfferTransaction.tsx +11 -11
  403. package/src/react/hooks/transactions/useGenerateSellTransaction.test.tsx +28 -38
  404. package/src/react/hooks/transactions/useGenerateSellTransaction.tsx +16 -15
  405. package/src/react/hooks/transactions/useMarketTransactionSteps.test.tsx +105 -0
  406. package/src/react/hooks/transactions/useMarketTransactionSteps.tsx +89 -0
  407. package/src/react/hooks/transactions/useOrderSteps.tsx +23 -36
  408. package/src/react/hooks/transactions/usePrimarySaleTransactionSteps.ts +196 -0
  409. package/src/react/hooks/transactions/useProcessStep.test.tsx +63 -59
  410. package/src/react/hooks/transactions/useProcessStep.ts +52 -54
  411. package/src/react/hooks/transactions/useTransactionExecution.test.tsx +99 -0
  412. package/src/react/hooks/transactions/useTransactionExecution.ts +31 -0
  413. package/src/react/hooks/transactions/useTransactionType.ts +20 -0
  414. package/src/react/hooks/transactions/useTransferTokens.test.tsx +16 -16
  415. package/src/react/hooks/transactions/useTransferTokens.tsx +17 -5
  416. package/src/react/hooks/ui/card-data/index.ts +4 -0
  417. package/src/react/hooks/ui/card-data/market-card-data-paged.test.tsx +375 -0
  418. package/src/react/hooks/ui/card-data/market-card-data-paged.tsx +265 -0
  419. package/src/react/hooks/{data/market/useListMarketCardData.test.tsx → ui/card-data/market-card-data.test.tsx} +30 -28
  420. package/src/react/hooks/{data/market/useListMarketCardData.tsx → ui/card-data/market-card-data.tsx} +44 -31
  421. package/src/react/hooks/{data/primary-sales/useList1155ShopCardData.tsx → ui/card-data/primary-sale-1155-card-data.tsx} +24 -31
  422. package/src/react/hooks/{data/primary-sales/useList721ShopCardData.tsx → ui/card-data/primary-sale-721-card-data.tsx} +70 -37
  423. package/src/react/hooks/ui/index.ts +3 -1
  424. package/src/react/hooks/ui/url-state/filter-state.test.tsx +569 -0
  425. package/src/react/hooks/ui/{useFilterState.tsx → url-state/filter-state.tsx} +34 -20
  426. package/src/react/hooks/ui/url-state/index.ts +1 -0
  427. package/src/react/hooks/ui/useCollectibleCardOfferState.test.tsx +75 -0
  428. package/src/react/hooks/ui/useCollectibleCardOfferState.ts +47 -0
  429. package/src/react/hooks/ui/useFilters.test.tsx +4 -1
  430. package/src/react/hooks/ui/useFilters.tsx +2 -2
  431. package/src/react/hooks/util/optimisticCancelUpdates.test.ts +489 -0
  432. package/src/react/hooks/util/optimisticCancelUpdates.ts +21 -22
  433. package/src/react/hooks/utils/index.ts +0 -4
  434. package/src/react/hooks/utils/useAutoSelectFeeOption.test.tsx +8 -5
  435. package/src/react/hooks/utils/useAutoSelectFeeOption.tsx +33 -17
  436. package/src/react/hooks/utils/useRoyalty.test.tsx +1 -1
  437. package/src/react/hooks/utils/useRoyalty.tsx +99 -34
  438. package/src/react/hooks/utils/useWaasFeeOptions.tsx +234 -0
  439. package/src/react/hooks/utils/waasFeeOptionsStore.ts +141 -0
  440. package/src/react/index.ts +3 -0
  441. package/src/react/providers/index.tsx +3 -3
  442. package/src/react/providers/modal-provider.tsx +6 -17
  443. package/src/react/providers/provider.test.tsx +1 -1
  444. package/src/react/providers/shadow-root.tsx +1 -1
  445. package/src/react/providers/theme-provider.tsx +1 -1
  446. package/src/react/queries/checkout/index.ts +1 -0
  447. package/src/react/queries/checkout/primary-sale-checkout-options.ts +118 -0
  448. package/src/react/queries/collectible/balance.ts +113 -0
  449. package/src/react/queries/collectible/index.ts +15 -0
  450. package/src/react/queries/collectible/market-count.ts +91 -0
  451. package/src/react/queries/collectible/market-highest-offer.ts +74 -0
  452. package/src/react/queries/collectible/market-list-paginated.ts +110 -0
  453. package/src/react/queries/collectible/market-list.ts +116 -0
  454. package/src/react/queries/collectible/market-listings-count.ts +70 -0
  455. package/src/react/queries/collectible/market-listings.ts +71 -0
  456. package/src/react/queries/collectible/market-lowest-listing.ts +74 -0
  457. package/src/react/queries/collectible/market-offers-count.ts +70 -0
  458. package/src/react/queries/collectible/market-offers.ts +90 -0
  459. package/src/react/queries/collectible/metadata.ts +84 -0
  460. package/src/react/queries/collectible/primary-sale-item.ts +79 -0
  461. package/src/react/queries/collectible/primary-sale-items-count.ts +67 -0
  462. package/src/react/queries/collectible/primary-sale-items.ts +96 -0
  463. package/src/react/queries/collectible/queryKeys.ts +12 -0
  464. package/src/react/queries/collectible/token-balances.ts +83 -0
  465. package/src/react/queries/collection/activeListingsCurrencies.ts +74 -0
  466. package/src/react/queries/collection/activeOffersCurrencies.ts +74 -0
  467. package/src/react/queries/collection/balance-details.ts +103 -0
  468. package/src/react/queries/collection/index.ts +9 -0
  469. package/src/react/queries/collection/list.ts +195 -0
  470. package/src/react/queries/collection/market-detail.ts +60 -0
  471. package/src/react/queries/collection/market-filtered-count.ts +67 -0
  472. package/src/react/queries/collection/market-floor.ts +58 -0
  473. package/src/react/queries/collection/market-items-count.ts +69 -0
  474. package/src/react/queries/collection/market-items-paginated.ts +84 -0
  475. package/src/react/queries/collection/market-items.ts +72 -0
  476. package/src/react/queries/collection/metadata.ts +60 -0
  477. package/src/react/queries/collection/queryKeys.ts +12 -0
  478. package/src/react/queries/currency/compare-prices.ts +122 -0
  479. package/src/react/queries/currency/convert-to-usd.ts +99 -0
  480. package/src/react/queries/currency/currency.ts +82 -0
  481. package/src/react/queries/currency/index.ts +4 -0
  482. package/src/react/queries/currency/list.ts +100 -0
  483. package/src/react/queries/index.ts +6 -7
  484. package/src/react/queries/inventory/inventory.ts +139 -91
  485. package/src/react/queries/marketplace/config.ts +85 -0
  486. package/src/react/queries/{market → marketplace}/filters.ts +48 -61
  487. package/src/react/queries/marketplace/index.ts +2 -0
  488. package/src/react/queries/marketplace/queryKeys.ts +12 -0
  489. package/src/react/queries/orders.ts +48 -0
  490. package/src/react/queries/token/balances.ts +107 -0
  491. package/src/react/queries/token/index.ts +5 -0
  492. package/src/react/queries/token/metadata-search.ts +95 -0
  493. package/src/react/queries/token/metadata.ts +80 -0
  494. package/src/react/queries/token/queryKeys.ts +12 -0
  495. package/src/react/queries/token/ranges.ts +74 -0
  496. package/src/react/queries/token/supplies.ts +86 -0
  497. package/src/react/ssr/__tests__/__snapshots__/create-ssr-client.test.ts.snap +11 -10
  498. package/src/react/ssr/create-ssr-client.ts +1 -1
  499. package/src/react/ssr/index.ts +5 -0
  500. package/src/react/types/query.ts +8 -7
  501. package/src/react/ui/components/_internals/ErrorDisplay.tsx +87 -0
  502. package/src/react/ui/components/_internals/ErrorLogBox.tsx +8 -1
  503. package/src/react/ui/components/_internals/custom-select/CustomSelect.tsx +13 -14
  504. package/src/react/ui/components/_internals/pill/__tests__/Pill.test.tsx +9 -5
  505. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/ActionButton.stories.tsx +24 -29
  506. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/ActionButton.tsx +20 -14
  507. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/__tests__/ActionButtonBody.test.tsx +7 -5
  508. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/__tests__/NonOwnerActions.test.tsx +11 -6
  509. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/__tests__/OwnerActions.test.tsx +8 -6
  510. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/__tests__/useActionButtonLogic.test.tsx +6 -4
  511. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/components/ActionButtonBody.tsx +14 -9
  512. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/components/NonOwnerActions.tsx +26 -35
  513. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/components/OwnerActions.tsx +21 -13
  514. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/hooks/useActionButtonLogic.ts +3 -3
  515. package/src/react/ui/components/marketplace-collectible-card/ActionButton/index.ts +1 -0
  516. package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/store.ts +4 -4
  517. package/src/react/ui/components/marketplace-collectible-card/Card/card-badge.tsx +37 -0
  518. package/src/react/ui/components/marketplace-collectible-card/Card/card-content.tsx +27 -0
  519. package/src/react/ui/components/marketplace-collectible-card/Card/card-footer.tsx +38 -0
  520. package/src/react/ui/components/marketplace-collectible-card/Card/card-media.tsx +69 -0
  521. package/src/react/ui/components/marketplace-collectible-card/Card/card-price.tsx +44 -0
  522. package/src/react/ui/components/marketplace-collectible-card/Card/card-sale-details.tsx +37 -0
  523. package/src/react/ui/components/marketplace-collectible-card/Card/card-skeleton.tsx +39 -0
  524. package/src/react/ui/components/marketplace-collectible-card/Card/card-title.tsx +109 -0
  525. package/src/react/ui/components/marketplace-collectible-card/Card/card.tsx +51 -0
  526. package/src/react/ui/components/marketplace-collectible-card/Card/index.ts +30 -0
  527. package/src/react/ui/components/marketplace-collectible-card/CollectibleCardSkeleton.tsx +1 -1
  528. package/src/react/ui/components/marketplace-collectible-card/_internals/PriceDisplay.tsx +87 -0
  529. package/src/react/ui/components/marketplace-collectible-card/constants.ts +20 -0
  530. package/src/react/ui/components/marketplace-collectible-card/index.ts +6 -0
  531. package/src/react/ui/components/marketplace-collectible-card/types.ts +31 -16
  532. package/src/react/ui/components/marketplace-collectible-card/utils/determineCardAction.ts +63 -0
  533. package/src/react/ui/components/marketplace-collectible-card/utils/formatPrice.ts +71 -2
  534. package/src/react/ui/components/marketplace-collectible-card/utils/index.ts +3 -0
  535. package/src/react/ui/components/marketplace-collectible-card/utils/renderSkeleton.tsx +44 -0
  536. package/src/react/ui/components/marketplace-collectible-card/utils/shopCardState.ts +83 -0
  537. package/src/react/ui/components/marketplace-collectible-card/utils/supplyStatus.ts +5 -5
  538. package/src/react/ui/components/marketplace-collectible-card/variants/MarketCard.tsx +63 -78
  539. package/src/react/ui/components/marketplace-collectible-card/variants/MarketCardPresentation.tsx +170 -0
  540. package/src/react/ui/components/marketplace-collectible-card/variants/NonTradableInventoryCard.tsx +56 -38
  541. package/src/react/ui/components/marketplace-collectible-card/variants/ShopCard.tsx +55 -65
  542. package/src/react/ui/components/marketplace-collectible-card/variants/ShopCardPresentation.tsx +144 -0
  543. package/src/react/ui/components/marketplace-logos/marketplace-logos.tsx +1 -5
  544. package/src/react/ui/components/media/Media.tsx +1 -1
  545. package/src/react/ui/components/media/MediaSkeleton.tsx +1 -1
  546. package/src/react/ui/hooks/index.ts +2 -0
  547. package/src/react/ui/icons/BellIcon.tsx +7 -3
  548. package/src/react/ui/icons/iconVariants.ts +11 -0
  549. package/src/react/ui/icons/index.ts +0 -3
  550. package/src/react/ui/index.ts +37 -8
  551. package/src/react/ui/modals/BuyModal/components/BuyModalContent.tsx +161 -0
  552. package/src/react/ui/modals/BuyModal/components/CollectibleMetadataSummary.tsx +141 -0
  553. package/src/react/ui/modals/BuyModal/components/CryptoPaymentModal.tsx +177 -0
  554. package/src/react/ui/modals/BuyModal/components/CryptoPaymentModalSkeleton.tsx +48 -0
  555. package/src/react/ui/modals/BuyModal/components/Modal.tsx +2 -2
  556. package/src/react/ui/modals/BuyModal/components/TrailsCss.ts +216 -0
  557. package/src/react/ui/modals/BuyModal/components/{ERC1155QuantityModal.tsx → sequence-checkout/ERC1155QuantityModal.tsx} +71 -82
  558. package/src/react/ui/modals/BuyModal/components/sequence-checkout/SequenceCheckoutNew.tsx +161 -0
  559. package/src/react/ui/modals/BuyModal/{hooks → components/sequence-checkout}/usePaymentModalParams.ts +73 -112
  560. package/src/react/ui/modals/BuyModal/components/types.ts +6 -5
  561. package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC1155SalePaymentParams.test.tsx +2 -14
  562. package/src/react/ui/modals/BuyModal/hooks/useBuyModalData.ts +151 -0
  563. package/src/react/ui/modals/BuyModal/hooks/useERC1155SalePaymentParams.ts +15 -28
  564. package/src/react/ui/modals/BuyModal/hooks/useExecuteBundledTransactions.ts +167 -0
  565. package/src/react/ui/modals/BuyModal/hooks/useHasSufficientBalance.ts +30 -0
  566. package/src/react/ui/modals/BuyModal/hooks/useMarketPlatformFee.ts +2 -2
  567. package/src/react/ui/modals/BuyModal/index.tsx +6 -3
  568. package/src/react/ui/modals/BuyModal/internal/__tests__/determineCheckoutMode.test.ts +119 -0
  569. package/src/react/ui/modals/BuyModal/internal/buyModalContext.ts +146 -0
  570. package/src/react/ui/modals/BuyModal/internal/cryptoPaymentModalContext.tsx +399 -0
  571. package/src/react/ui/modals/BuyModal/internal/determineCheckoutMode.ts +49 -0
  572. package/src/react/ui/modals/BuyModal/store.ts +25 -94
  573. package/src/react/ui/modals/CreateListingModal/Modal.tsx +141 -308
  574. package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +35 -61
  575. package/src/react/ui/modals/CreateListingModal/index.tsx +16 -9
  576. package/src/react/ui/modals/CreateListingModal/internal/context.ts +416 -0
  577. package/src/react/ui/modals/CreateListingModal/internal/helpers/validation.ts +79 -0
  578. package/src/react/ui/modals/CreateListingModal/internal/hooks/index.ts +1 -0
  579. package/src/react/ui/modals/CreateListingModal/internal/hooks/use-collectible-approval.ts +49 -0
  580. package/src/react/ui/modals/CreateListingModal/internal/listing-mutations.ts +267 -0
  581. package/src/react/ui/modals/CreateListingModal/internal/store.ts +150 -0
  582. package/src/react/ui/modals/MakeOfferModal/Modal.tsx +130 -348
  583. package/src/react/ui/modals/MakeOfferModal/__stories__/MakeOfferModal.mock-data.ts +494 -0
  584. package/src/react/ui/modals/MakeOfferModal/__stories__/MakeOfferModal.stories.tsx +699 -0
  585. package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +28 -155
  586. package/src/react/ui/modals/MakeOfferModal/index.tsx +17 -11
  587. package/src/react/ui/modals/MakeOfferModal/internal/context.ts +453 -0
  588. package/src/react/ui/modals/MakeOfferModal/internal/helpers/validation.ts +99 -0
  589. package/src/react/ui/modals/MakeOfferModal/internal/hooks/index.ts +1 -0
  590. package/src/react/ui/modals/MakeOfferModal/internal/hooks/use-erc20-allowance.ts +43 -0
  591. package/src/react/ui/modals/MakeOfferModal/internal/offer-mutations.ts +231 -0
  592. package/src/react/ui/modals/MakeOfferModal/internal/store.ts +150 -0
  593. package/src/react/ui/modals/SellModal/Modal.tsx +74 -213
  594. package/src/react/ui/modals/SellModal/index.tsx +5 -11
  595. package/src/react/ui/modals/SellModal/internal/context.ts +284 -0
  596. package/src/react/ui/modals/SellModal/internal/sell-mutations.ts +163 -0
  597. package/src/react/ui/modals/SellModal/internal/store.ts +76 -0
  598. package/src/react/ui/modals/SellModal/internal/use-generate-sell-transaction.ts +93 -0
  599. package/src/react/ui/modals/TransferModal/__tests__/store.test.ts +51 -345
  600. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TokenQuantityInput.tsx +36 -34
  601. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/WalletAddressInput.tsx +19 -28
  602. package/src/react/ui/modals/TransferModal/index.tsx +98 -119
  603. package/src/react/ui/modals/TransferModal/internal/context.ts +404 -0
  604. package/src/react/ui/modals/TransferModal/internal/store.ts +118 -0
  605. package/src/react/ui/modals/_internal/components/alertMessage/index.tsx +2 -3
  606. package/src/react/ui/modals/_internal/components/baseModal/ActionModal.tsx +338 -0
  607. package/src/react/ui/modals/_internal/components/baseModal/BaseModal.tsx +51 -0
  608. package/src/react/ui/modals/_internal/components/baseModal/ErrorBoundary.tsx +83 -0
  609. package/src/react/ui/modals/_internal/components/baseModal/ErrorModal.tsx +51 -0
  610. package/src/react/ui/modals/_internal/components/baseModal/LoadingModal.tsx +35 -0
  611. package/src/react/ui/modals/_internal/components/baseModal/SmartErrorHandler.tsx +31 -0
  612. package/src/react/ui/modals/_internal/components/baseModal/__tests__/ErrorBoundary.test.tsx +390 -0
  613. package/src/react/ui/modals/_internal/components/baseModal/errors/ModalInitializationError.tsx +91 -0
  614. package/src/react/ui/modals/_internal/components/baseModal/errors/errorActionType.ts +5 -0
  615. package/src/react/ui/modals/_internal/components/baseModal/index.ts +13 -0
  616. package/src/react/ui/modals/_internal/components/calendarDropdown/TimeSelector.tsx +1 -1
  617. package/src/react/ui/modals/_internal/components/calendarDropdown/index.tsx +14 -9
  618. package/src/react/ui/modals/_internal/components/consts.ts +19 -5
  619. package/src/react/ui/modals/_internal/components/currencyImage/index.tsx +5 -7
  620. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +6 -14
  621. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +17 -24
  622. package/src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx +1 -1
  623. package/src/react/ui/modals/_internal/components/floorPriceText/__tests__/FloorPriceText.test.tsx +61 -40
  624. package/src/react/ui/modals/_internal/components/floorPriceText/index.tsx +23 -19
  625. package/src/react/ui/modals/_internal/components/priceInput/__tests__/PriceInput.test.tsx +3 -3
  626. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +66 -66
  627. package/src/react/ui/modals/_internal/components/quantityInput/__tests__/index.test.tsx +22 -137
  628. package/src/react/ui/modals/_internal/components/quantityInput/index.tsx +84 -131
  629. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/__tests__/SelectWaasFeeOptions.test.tsx +14 -31
  630. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/_components/ActionButtons.tsx +37 -25
  631. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/index.tsx +13 -6
  632. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/store.ts +9 -26
  633. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/useWaasFeeOptionManager.tsx +27 -29
  634. package/src/react/ui/modals/_internal/components/switchChainErrorModal/store.ts +2 -2
  635. package/src/react/ui/modals/_internal/components/tokenPreview/index.tsx +10 -9
  636. package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +11 -7
  637. package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +8 -7
  638. package/src/react/ui/modals/_internal/components/transactionPreview/useTransactionPreviewTitle.tsx +1 -1
  639. package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +3 -5
  640. package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/utils.test.ts +3 -3
  641. package/src/react/ui/modals/_internal/components/transactionStatusModal/hooks/useTransactionStatus.ts +4 -15
  642. package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +14 -15
  643. package/src/react/ui/modals/_internal/components/transactionStatusModal/store.ts +8 -11
  644. package/src/react/ui/modals/_internal/components/waasFeeOptionsSelect/WaasFeeOptionsSelect.tsx +65 -10
  645. package/src/react/ui/modals/_internal/constants/opensea-currencies.ts +484 -0
  646. package/src/react/ui/modals/_internal/helpers/currency.ts +56 -0
  647. package/src/react/ui/modals/_internal/helpers/dnum-utils.ts +40 -0
  648. package/src/react/ui/modals/_internal/helpers/flow-state.ts +269 -0
  649. package/src/react/ui/modals/_internal/helpers/step-guards.ts +131 -0
  650. package/src/react/ui/modals/_internal/types/steps.ts +145 -0
  651. package/src/react/ui/modals/_internal/types.ts +2 -9
  652. package/src/react/utils/index.ts +2 -0
  653. package/src/react/utils/normalize-attributes.test.ts +94 -0
  654. package/src/react/utils/normalize-attributes.ts +89 -0
  655. package/src/react/utils/normalize-properties.test.ts +77 -0
  656. package/src/react/utils/normalize-properties.ts +60 -0
  657. package/src/react/utils/normalizePriceFilters.ts +25 -0
  658. package/src/react/utils/waitForTransactionReceipt.ts +2 -2
  659. package/src/styles/index.css +2 -0
  660. package/src/styles/styles.ts +2036 -374
  661. package/src/types/api-types.ts +6 -14
  662. package/src/types/buyModalErrors.ts +24 -30
  663. package/src/types/index.ts +4 -2
  664. package/src/types/sdk-config.ts +14 -1
  665. package/src/types/transactions.ts +10 -0
  666. package/src/types/types.ts +93 -14
  667. package/src/utils/__tests__/getMarketplaceDetails.test.ts +1 -1
  668. package/src/utils/_internal/error/base.ts +1 -1
  669. package/src/utils/_internal/error/transaction.ts +4 -5
  670. package/src/utils/abi/helpers.ts +38 -0
  671. package/src/utils/abi/index.ts +1 -0
  672. package/src/utils/decode/erc20.ts +2 -2
  673. package/src/utils/errors.ts +527 -0
  674. package/src/utils/getConduitAddressForOrderbook.ts +38 -0
  675. package/src/utils/getErrorMessage.ts +37 -0
  676. package/src/utils/getMarketplaceDetails.ts +1 -1
  677. package/src/utils/getSequenceMarketRequestId.ts +3 -7
  678. package/src/utils/getWagmiErrorMessage.ts +241 -0
  679. package/src/utils/getWebRPCErrorMessage.ts +63 -0
  680. package/src/utils/networkconfigToWagmiChain.ts +2 -1
  681. package/src/utils/price.ts +12 -10
  682. package/test/const.ts +3 -3
  683. package/test/globalSetup.ts +4 -5
  684. package/test/handlers.ts +2 -2
  685. package/test/server-setup.ts +8 -8
  686. package/test/setup.ts +11 -0
  687. package/test/test-utils.tsx +23 -6
  688. package/tsconfig.json +8 -1
  689. package/tsdown.config.ts +12 -3
  690. package/dist/CartIcon.js +0 -102
  691. package/dist/CartIcon.js.map +0 -1
  692. package/dist/CollectibleCard.d.ts +0 -8
  693. package/dist/builder.gen.js +0 -300
  694. package/dist/builder.gen.js.map +0 -1
  695. package/dist/collectibles.js +0 -319
  696. package/dist/collectibles.js.map +0 -1
  697. package/dist/collections.js +0 -320
  698. package/dist/collections.js.map +0 -1
  699. package/dist/components.js +0 -117
  700. package/dist/components.js.map +0 -1
  701. package/dist/listCollectiblesPaginated.d.ts +0 -322
  702. package/dist/listCollections.d.ts +0 -821
  703. package/dist/lowestListing.d.ts +0 -465
  704. package/dist/market.js +0 -207
  705. package/dist/market.js.map +0 -1
  706. package/dist/marketCurrencies.d.ts +0 -163
  707. package/dist/marketCurrencies.js +0 -56
  708. package/dist/marketCurrencies.js.map +0 -1
  709. package/dist/marketplace.gen.js +0 -1144
  710. package/dist/marketplace.gen.js.map +0 -1
  711. package/dist/marketplaceConfig.js.map +0 -1
  712. package/dist/orders.js +0 -462
  713. package/dist/orders.js.map +0 -1
  714. package/dist/primary-sales.js +0 -152
  715. package/dist/primary-sales.js.map +0 -1
  716. package/dist/query.d.ts +0 -31
  717. package/dist/react/hooks/data/collectibles/index.d.ts +0 -5
  718. package/dist/react/hooks/data/collectibles/index.js +0 -39
  719. package/dist/react/hooks/data/collections/index.d.ts +0 -11
  720. package/dist/react/hooks/data/collections/index.js +0 -39
  721. package/dist/react/hooks/data/index.d.ts +0 -37
  722. package/dist/react/hooks/data/index.js +0 -39
  723. package/dist/react/hooks/data/inventory/index.d.ts +0 -37
  724. package/dist/react/hooks/data/inventory/index.js +0 -39
  725. package/dist/react/hooks/data/market/index.d.ts +0 -6
  726. package/dist/react/hooks/data/market/index.js +0 -39
  727. package/dist/react/hooks/data/orders/index.d.ts +0 -5
  728. package/dist/react/hooks/data/orders/index.js +0 -39
  729. package/dist/react/hooks/data/primary-sales/index.d.ts +0 -37
  730. package/dist/react/hooks/data/primary-sales/index.js +0 -39
  731. package/dist/react/hooks/data/tokens/index.d.ts +0 -5
  732. package/dist/react/hooks/data/tokens/index.js +0 -39
  733. package/dist/react/queries/collectibles/index.d.ts +0 -5
  734. package/dist/react/queries/collectibles/index.js +0 -22
  735. package/dist/react/queries/collections/index.d.ts +0 -11
  736. package/dist/react/queries/collections/index.js +0 -20
  737. package/dist/react/queries/market/index.d.ts +0 -6
  738. package/dist/react/queries/market/index.js +0 -22
  739. package/dist/react/queries/orders/index.d.ts +0 -5
  740. package/dist/react/queries/orders/index.js +0 -13
  741. package/dist/react/queries/primary-sales/index.d.ts +0 -4
  742. package/dist/react/queries/primary-sales/index.js +0 -13
  743. package/dist/react/queries/tokens/index.d.ts +0 -5
  744. package/dist/react/queries/tokens/index.js +0 -13
  745. package/dist/react/queries/utils/index.d.ts +0 -4
  746. package/dist/react/queries/utils/index.js +0 -22
  747. package/dist/react/ssr/index.js.map +0 -1
  748. package/dist/react/ui/components/marketplace-collectible-card/components/footer/components/index.d.ts +0 -3
  749. package/dist/react/ui/components/marketplace-collectible-card/components/footer/components/index.js +0 -22
  750. package/dist/react/ui/components/marketplace-collectible-card/components/footer/index.d.ts +0 -51
  751. package/dist/react/ui/components/marketplace-collectible-card/components/footer/index.js +0 -39
  752. package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +0 -40
  753. package/dist/react/ui/modals/_internal/components/actionModal/index.js +0 -39
  754. package/dist/src.js.map +0 -1
  755. package/dist/tokenBalances.js +0 -56
  756. package/dist/tokenBalances.js.map +0 -1
  757. package/dist/tokenSupplies.d.ts +0 -261
  758. package/dist/tokens.js +0 -219
  759. package/dist/tokens.js.map +0 -1
  760. package/dist/utils3.js +0 -43
  761. package/dist/utils3.js.map +0 -1
  762. package/dist/waitForTransactionReceipt.js +0 -25
  763. package/dist/waitForTransactionReceipt.js.map +0 -1
  764. package/src/react/_internal/api/__mocks__/builder.msw.ts +0 -239
  765. package/src/react/_internal/api/__mocks__/indexer.msw.ts +0 -216
  766. package/src/react/_internal/api/__mocks__/marketplace.msw.ts +0 -402
  767. package/src/react/_internal/api/__mocks__/metadata.msw.ts +0 -195
  768. package/src/react/_internal/api/builder.gen.ts +0 -773
  769. package/src/react/_internal/api/marketplace.gen.ts +0 -2718
  770. package/src/react/_internal/api/query-keys.ts +0 -124
  771. package/src/react/hooks/data/collectibles/index.ts +0 -6
  772. package/src/react/hooks/data/collectibles/useListCollectibleActivities.test.tsx +0 -192
  773. package/src/react/hooks/data/collectibles/useListCollectibleActivities.tsx +0 -98
  774. package/src/react/hooks/data/collections/index.ts +0 -8
  775. package/src/react/hooks/data/collections/useCollectionActiveListingsCurrencies.test.tsx +0 -112
  776. package/src/react/hooks/data/collections/useCollectionActiveOffersCurrencies.test.tsx +0 -110
  777. package/src/react/hooks/data/collections/useCollectionDetails.test.tsx +0 -83
  778. package/src/react/hooks/data/collections/useCollectionDetails.ts +0 -69
  779. package/src/react/hooks/data/collections/useCollectionDetailsPolling.test.tsx +0 -137
  780. package/src/react/hooks/data/collections/useListCollectionActivities.test.tsx +0 -227
  781. package/src/react/hooks/data/collections/useListCollectionActivities.tsx +0 -93
  782. package/src/react/hooks/data/index.ts +0 -6
  783. package/src/react/hooks/data/inventory/index.ts +0 -1
  784. package/src/react/hooks/data/inventory/useInventory.tsx +0 -12
  785. package/src/react/hooks/data/market/index.ts +0 -3
  786. package/src/react/hooks/data/orders/index.ts +0 -11
  787. package/src/react/hooks/data/primary-sales/index.ts +0 -7
  788. package/src/react/hooks/data/primary-sales/useCountOfPrimarySaleItems.tsx +0 -13
  789. package/src/react/hooks/data/primary-sales/useGetCountOfPrimarySaleItems.tsx +0 -48
  790. package/src/react/hooks/data/tokens/index.ts +0 -5
  791. package/src/react/hooks/data/tokens/useListBalances.tsx +0 -29
  792. package/src/react/hooks/data/tokens/useTokenSupplies.ts +0 -69
  793. package/src/react/hooks/utils/useCheckoutOptions.test.tsx +0 -162
  794. package/src/react/hooks/utils/useCheckoutOptions.tsx +0 -98
  795. package/src/react/queries/collectibles/balanceOfCollectible.ts +0 -90
  796. package/src/react/queries/collectibles/collectible.ts +0 -81
  797. package/src/react/queries/collectibles/countOfCollectables.ts +0 -109
  798. package/src/react/queries/collectibles/index.ts +0 -7
  799. package/src/react/queries/collectibles/listCollectibleActivities.ts +0 -121
  800. package/src/react/queries/collectibles/listCollectibles.ts +0 -115
  801. package/src/react/queries/collectibles/listCollectiblesPaginated.ts +0 -104
  802. package/src/react/queries/collectibles/tokenBalances.ts +0 -89
  803. package/src/react/queries/collections/activeListingsCurrencies.ts +0 -84
  804. package/src/react/queries/collections/activeOffersCurrencies.ts +0 -84
  805. package/src/react/queries/collections/collection.ts +0 -69
  806. package/src/react/queries/collections/collectionBalanceDetails.ts +0 -107
  807. package/src/react/queries/collections/collectionDetails.ts +0 -79
  808. package/src/react/queries/collections/index.ts +0 -7
  809. package/src/react/queries/collections/listCollectionActivities.ts +0 -117
  810. package/src/react/queries/collections/listCollections.ts +0 -175
  811. package/src/react/queries/market/checkoutOptions.ts +0 -107
  812. package/src/react/queries/market/checkoutOptionsSalesContract.ts +0 -108
  813. package/src/react/queries/market/currency.ts +0 -92
  814. package/src/react/queries/market/index.ts +0 -6
  815. package/src/react/queries/market/marketCurrencies.ts +0 -120
  816. package/src/react/queries/market/marketplaceConfig.ts +0 -117
  817. package/src/react/queries/orders/countItemsOrdersForCollection.ts +0 -86
  818. package/src/react/queries/orders/countListingsForCollectible.ts +0 -90
  819. package/src/react/queries/orders/countOffersForCollectible.ts +0 -90
  820. package/src/react/queries/orders/floorOrder.ts +0 -74
  821. package/src/react/queries/orders/getCountOfFilteredOrders.ts +0 -88
  822. package/src/react/queries/orders/highestOffer.ts +0 -78
  823. package/src/react/queries/orders/index.ts +0 -11
  824. package/src/react/queries/orders/listItemsOrdersForCollection.ts +0 -90
  825. package/src/react/queries/orders/listItemsOrdersForCollectionPaginated.ts +0 -90
  826. package/src/react/queries/orders/listListingsForCollectible.ts +0 -97
  827. package/src/react/queries/orders/listOffersForCollectible.ts +0 -116
  828. package/src/react/queries/orders/lowestListing.ts +0 -81
  829. package/src/react/queries/primary-sales/countOfPrimarySaleItems.ts +0 -62
  830. package/src/react/queries/primary-sales/index.ts +0 -4
  831. package/src/react/queries/primary-sales/primarySaleItem.ts +0 -80
  832. package/src/react/queries/primary-sales/primarySaleItems.ts +0 -94
  833. package/src/react/queries/primary-sales/primarySaleItemsCount.ts +0 -79
  834. package/src/react/queries/tokens/getTokenRanges.ts +0 -75
  835. package/src/react/queries/tokens/index.ts +0 -5
  836. package/src/react/queries/tokens/listBalances.ts +0 -71
  837. package/src/react/queries/tokens/listTokenMetadata.ts +0 -81
  838. package/src/react/queries/tokens/searchTokenMetadata.ts +0 -101
  839. package/src/react/queries/tokens/tokenSupplies.ts +0 -84
  840. package/src/react/queries/utils/comparePrices.ts +0 -132
  841. package/src/react/queries/utils/convertPriceToUSD.ts +0 -105
  842. package/src/react/queries/utils/index.ts +0 -2
  843. package/src/react/ui/components/marketplace-collectible-card/components/ActionButtonWrapper.tsx +0 -79
  844. package/src/react/ui/components/marketplace-collectible-card/components/BaseCard.tsx +0 -68
  845. package/src/react/ui/components/marketplace-collectible-card/components/footer/Footer.tsx +0 -165
  846. package/src/react/ui/components/marketplace-collectible-card/components/footer/components/FooterName.tsx +0 -103
  847. package/src/react/ui/components/marketplace-collectible-card/components/footer/components/PriceDisplay.tsx +0 -80
  848. package/src/react/ui/components/marketplace-collectible-card/components/footer/components/SaleDetailsPill.tsx +0 -29
  849. package/src/react/ui/components/marketplace-collectible-card/components/footer/components/TokenTypeBalancePill.tsx +0 -30
  850. package/src/react/ui/components/marketplace-collectible-card/components/footer/components/index.ts +0 -4
  851. package/src/react/ui/components/marketplace-collectible-card/components/footer/index.ts +0 -2
  852. package/src/react/ui/icons/CalendarIcon.tsx +0 -37
  853. package/src/react/ui/icons/CartIcon.tsx +0 -52
  854. package/src/react/ui/icons/InfoIcon.tsx +0 -44
  855. package/src/react/ui/modals/BuyModal/__tests__/BuyModalRouter.test.tsx +0 -557
  856. package/src/react/ui/modals/BuyModal/__tests__/ERC1155ShopModal.test.tsx +0 -409
  857. package/src/react/ui/modals/BuyModal/__tests__/ERC721ShopModal.test.tsx +0 -272
  858. package/src/react/ui/modals/BuyModal/__tests__/Modal.test.tsx.bak +0 -112
  859. package/src/react/ui/modals/BuyModal/__tests__/Modal1155.test.tsx +0 -251
  860. package/src/react/ui/modals/BuyModal/__tests__/store.test.ts +0 -105
  861. package/src/react/ui/modals/BuyModal/components/BuyModalRouter.tsx +0 -157
  862. package/src/react/ui/modals/BuyModal/components/ERC1155BuyModal.tsx +0 -198
  863. package/src/react/ui/modals/BuyModal/components/ERC1155ShopModal.tsx +0 -108
  864. package/src/react/ui/modals/BuyModal/components/ERC721BuyModal.tsx +0 -116
  865. package/src/react/ui/modals/BuyModal/components/ERC721ShopModal.tsx +0 -86
  866. package/src/react/ui/modals/BuyModal/hooks/__tests__/useCheckoutOptions.test.tsx +0 -115
  867. package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC721SalePaymentParams.test.tsx +0 -283
  868. package/src/react/ui/modals/BuyModal/hooks/__tests__/useMarketPlatformFee.test.tsx +0 -145
  869. package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +0 -86
  870. package/src/react/ui/modals/BuyModal/hooks/useERC721SalePaymentParams.ts +0 -216
  871. package/src/react/ui/modals/BuyModal/hooks/useLoadData.ts +0 -120
  872. package/src/react/ui/modals/CreateListingModal/hooks/useCreateListing.tsx +0 -98
  873. package/src/react/ui/modals/CreateListingModal/hooks/useGetTokenApproval.ts +0 -87
  874. package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +0 -246
  875. package/src/react/ui/modals/CreateListingModal/store.ts +0 -99
  876. package/src/react/ui/modals/MakeOfferModal/hooks/useGetTokenApproval.tsx +0 -90
  877. package/src/react/ui/modals/MakeOfferModal/hooks/useMakeOffer.tsx +0 -71
  878. package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +0 -241
  879. package/src/react/ui/modals/MakeOfferModal/store.ts +0 -94
  880. package/src/react/ui/modals/SellModal/__tests__/Modal.test.tsx +0 -85
  881. package/src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx +0 -79
  882. package/src/react/ui/modals/SellModal/hooks/useSell.tsx +0 -77
  883. package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +0 -242
  884. package/src/react/ui/modals/SellModal/store.ts +0 -62
  885. package/src/react/ui/modals/SellModal/utils.ts +0 -38
  886. package/src/react/ui/modals/SuccessfulPurchaseModal/__tests__/Modal.test.tsx +0 -157
  887. package/src/react/ui/modals/SuccessfulPurchaseModal/index.tsx +0 -154
  888. package/src/react/ui/modals/SuccessfulPurchaseModal/store.ts +0 -71
  889. package/src/react/ui/modals/TransferModal/__tests__/__snapshots__/store.test.ts.snap +0 -17
  890. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/__tests__/useHandleTransfer.test.tsx +0 -412
  891. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TransferButton.tsx +0 -66
  892. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +0 -137
  893. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/useHandleTransfer.tsx +0 -97
  894. package/src/react/ui/modals/TransferModal/_views/followWalletInstructions/index.tsx +0 -31
  895. package/src/react/ui/modals/TransferModal/messages.ts +0 -14
  896. package/src/react/ui/modals/TransferModal/store.ts +0 -122
  897. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.test.tsx +0 -281
  898. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +0 -113
  899. package/src/react/ui/modals/_internal/components/actionModal/ErrorModal.tsx +0 -35
  900. package/src/react/ui/modals/_internal/components/actionModal/LoadingModal.tsx +0 -32
  901. package/src/react/ui/modals/_internal/components/actionModal/index.ts +0 -1
  902. package/src/types/custom.d.ts +0 -1
  903. package/src/types/messages.ts +0 -43
  904. package/src/types/new-marketplace-types.ts +0 -95
  905. /package/src/react/ui/components/{_internals/action-button → marketplace-collectible-card/ActionButton}/types.ts +0 -0
  906. /package/src/react/ui/modals/_internal/hooks/{useSelectWaasFeeOptions.ts → useSelectWaasFeeOptions.tsx} +0 -0
package/dist/index23.d.ts CHANGED
@@ -1,431 +1,321 @@
1
- import { Ct as CheckoutOptionsMarketplaceReturn, G as SdkConfig, Gr as ListPrimarySaleItemsReturn, Lt as ContractType, Ot as CollectiblePrimarySaleItem, Ri as TokenMetadata$1, T as QueryArg, Tt as CheckoutOptionsSalesContractReturn, W as MarketplaceSdkContext, Xn as GetCountOfPrimarySaleItemsReturn, bt as CheckoutOptionsItem, fi as PrimarySaleItem, qr as MarketplaceKind, w as Optional } from "./create-config.js";
2
- import { n as UseInventoryArgs, t as CollectiblesResponse } from "./index16.js";
3
- import { i as fetchCheckoutOptionsSalesContract, l as fetchCheckoutOptions, o as CheckoutOptionsQueryOptions, t as CheckoutOptionsSalesContractQueryOptions } from "./index17.js";
4
- import { f as PrimarySaleItemQueryOptions, g as UseCountOfPrimarySaleItemsArgs, s as ListPrimarySaleItemsQueryOptions } from "./index19.js";
5
- import { c as ComparePricesReturn, n as ConvertPriceToUSDReturn, s as ComparePricesQueryOptions, t as ConvertPriceToUSDQueryOptions } from "./index21.js";
6
- import * as react0 from "react";
7
- import * as _tanstack_react_query92 from "@tanstack/react-query";
8
- import { skipToken } from "@tanstack/react-query";
9
- import * as _0xsequence_indexer12 from "@0xsequence/indexer";
10
- import { TokenMetadata } from "@0xsequence/metadata";
11
- import * as react_jsx_runtime7 from "react/jsx-runtime";
12
- import * as viem2 from "viem";
13
- import { Address, Hex } from "viem";
1
+ import { $ as PrimarySaleItem, Ft as Address$1, Lt as Hash$1, Z as Order, it as Step, l as Currency, s as ContractType, ut as ContractInfo$1, yt as TokenMetadata$1 } from "./index2.js";
2
+ import { B as Optional, I as CollectionType, a as CheckoutMode, l as CardType, s as MarketplaceSdkContext, u as CollectibleCardAction, w as BuyModalProps } from "./create-config.js";
3
+ import { R as useCollectibleBalance } from "./index11.js";
4
+ import { f as useCollectionMetadata } from "./index12.js";
5
+ import { t as CardClassNames } from "./types.js";
6
+ import { _ as ComparePricesQueryOptions, d as ConvertPriceToUSDQueryOptions, f as ConvertPriceToUSDReturn, n as MarketCurrenciesQueryOptions, o as CurrencyQueryOptions, v as ComparePricesReturn } from "./index28.js";
7
+ import { u as CollectibleMetadata } from "./index34.js";
8
+ import { a as ModalSteps, i as ModalContext } from "./steps.js";
9
+ import { ReactNode } from "react";
10
+ import * as react_jsx_runtime56 from "react/jsx-runtime";
11
+ import * as _tanstack_react_query386 from "@tanstack/react-query";
14
12
 
15
- //#region src/react/hooks/data/primary-sales/useCountOfPrimarySaleItems.d.ts
16
- declare function useCountOfPrimarySaleItems(args: UseCountOfPrimarySaleItemsArgs): _tanstack_react_query92.UseQueryResult<number, Error>;
13
+ //#region src/react/providers/modal-provider.d.ts
14
+ interface ModalProviderProps {
15
+ children?: ReactNode;
16
+ }
17
+ declare const ModalProvider: ({
18
+ children
19
+ }: ModalProviderProps) => react_jsx_runtime56.JSX.Element;
17
20
  //#endregion
18
- //#region src/react/hooks/data/primary-sales/useErc721SalesData.d.ts
19
- interface UseErc721CollectionDataProps {
21
+ //#region src/react/ui/components/marketplace-collectible-card/variants/MarketCardPresentation.d.ts
22
+ interface MarketCardPresentationProps {
23
+ /** Token identification */
24
+ tokenId: bigint;
20
25
  chainId: number;
21
- salesContractAddress: Address;
22
- itemsContractAddress: Address;
23
- enabled: boolean;
26
+ collectionAddress: Address$1;
27
+ collectionType: ContractType;
28
+ /** Display data */
29
+ collectibleMetadata: CollectibleMetadata;
30
+ currency?: Currency;
31
+ lowestListing?: Order;
32
+ highestOffer?: Order;
33
+ balance?: string;
34
+ /** Asset configuration */
35
+ assetSrcPrefixUrl?: string;
36
+ /** Interaction handlers */
37
+ onCollectibleClick?: (tokenId: bigint) => void;
38
+ onOfferClick?: (params: {
39
+ order: Order;
40
+ e: React.MouseEvent<HTMLButtonElement>;
41
+ }) => void;
42
+ /** Action button configuration */
43
+ action: CollectibleCardAction;
44
+ showActionButton?: boolean;
45
+ onCannotPerformAction?: (action: CollectibleCardAction.BUY | CollectibleCardAction.OFFER) => void;
46
+ prioritizeOwnerActions?: boolean;
47
+ hideQuantitySelector?: boolean;
48
+ classNames?: CardClassNames;
24
49
  }
25
- declare function useErc721SaleDetails({
26
- chainId,
27
- salesContractAddress,
28
- itemsContractAddress,
29
- enabled
30
- }: UseErc721CollectionDataProps): {
31
- saleDetails: {
32
- supplyCap: bigint;
33
- cost: bigint;
34
- paymentToken: `0x${string}`;
35
- startTime: bigint;
36
- endTime: bigint;
37
- merkleRoot: `0x${string}`;
38
- } | {
39
- remainingSupply: bigint;
40
- cost: bigint;
41
- paymentToken: `0x${string}`;
42
- startTime: bigint;
43
- endTime: bigint;
44
- merkleRoot: `0x${string}`;
45
- } | undefined;
46
- quantityMinted: bigint | undefined;
47
- quantityTotal: bigint | undefined;
48
- quantityRemaining: bigint | undefined;
49
- isLoading: boolean;
50
- error: Error | null;
51
- };
52
- //#endregion
53
- //#region src/react/hooks/data/primary-sales/useGetCountOfPrimarySaleItems.d.ts
54
- type UseGetCountParams = Optional<ListPrimarySaleItemsQueryOptions, 'config'>;
55
50
  /**
56
- * Hook to get the total count of primary sale items
51
+ * MarketCardPresentation - Pure presentation component for market cards
57
52
  *
58
- * Retrieves the total count of primary sale items for a specific contract address
59
- * from the marketplace.
60
- *
61
- * @param params - Configuration parameters
62
- * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
63
- * @param params.primarySaleContractAddress - The primary sale contract address
64
- * @param params.filter - Optional filter parameters for the query
65
- * @param params.query - Optional React Query configuration
53
+ * This is a "dumb" component that receives all data as props and handles no data fetching.
54
+ * Use this when you want full control over data fetching, or for SSR/SSG scenarios.
66
55
  *
67
- * @returns Query result containing the count of primary sale items
56
+ * For a convenient "smart" component with built-in data fetching, use MarketCard instead.
68
57
  *
69
58
  * @example
70
- * ```typescript
71
- * const { data: count, isLoading } = useGetCountOfPrimarySaleItems({
72
- * chainId: 137,
73
- * primarySaleContractAddress: '0x...',
74
- * })
59
+ * ```tsx
60
+ * // With pre-fetched data
61
+ * <MarketCardPresentation
62
+ * tokenId="123"
63
+ * chainId={1}
64
+ * collectibleMetadata={metadata}
65
+ * currency={currency}
66
+ * lowestListing={listing}
67
+ * />
75
68
  * ```
76
69
  */
77
- declare function useGetCountOfPrimarySaleItems(params: UseGetCountParams): _tanstack_react_query92.UseQueryResult<GetCountOfPrimarySaleItemsReturn, Error>;
78
- //#endregion
79
- //#region src/react/hooks/data/primary-sales/useList721ShopCardData.d.ts
80
- interface UseList721ShopCardDataProps {
81
- primarySaleItemsWithMetadata: CollectiblePrimarySaleItem[];
82
- chainId: number;
83
- contractAddress: Address;
84
- salesContractAddress: Address;
85
- enabled?: boolean;
86
- }
87
- declare function useList721ShopCardData({
88
- primarySaleItemsWithMetadata,
70
+ declare function MarketCardPresentation({
71
+ tokenId,
89
72
  chainId,
90
- contractAddress,
91
- salesContractAddress,
92
- enabled
93
- }: UseList721ShopCardDataProps): {
94
- salePrice: {
95
- amount: string;
96
- currencyAddress: Address;
97
- } | {
98
- amount: string;
99
- currencyAddress: "0x0000000000000000000000000000000000000000";
100
- };
101
- collectibleCards: ({
102
- collectibleId: string;
103
- chainId: number;
104
- collectionAddress: `0x${string}`;
105
- collectionType: ContractType.ERC721;
106
- tokenMetadata: TokenMetadata$1;
107
- cardLoading: boolean;
108
- salesContractAddress: `0x${string}`;
109
- salePrice: {
110
- amount: string;
111
- currencyAddress: Address;
112
- };
113
- quantityInitial: string;
114
- quantityRemaining: string;
115
- quantityDecimals: number;
116
- saleStartsAt: string;
117
- saleEndsAt: string;
118
- cardType: "shop";
119
- } | {
120
- collectibleId: string;
121
- chainId: number;
122
- collectionAddress: `0x${string}`;
123
- collectionType: ContractType.ERC721;
124
- tokenMetadata: TokenMetadata;
125
- cardLoading: boolean;
126
- salesContractAddress: `0x${string}`;
127
- salePrice: {
128
- amount: string;
129
- currencyAddress: "0x0000000000000000000000000000000000000000";
130
- };
131
- quantityInitial: undefined;
132
- quantityRemaining: undefined;
133
- quantityDecimals: number;
134
- saleStartsAt: undefined;
135
- saleEndsAt: undefined;
136
- cardType: "shop";
137
- })[];
138
- saleDetailsError: viem2.ReadContractErrorType | null;
139
- saleDetails: {
140
- supplyCap: bigint;
141
- cost: bigint;
142
- paymentToken: `0x${string}`;
143
- startTime: bigint;
144
- endTime: bigint;
145
- merkleRoot: `0x${string}`;
146
- } | {
147
- remainingSupply: bigint;
148
- cost: bigint;
149
- paymentToken: `0x${string}`;
150
- startTime: bigint;
151
- endTime: bigint;
152
- merkleRoot: `0x${string}`;
153
- } | undefined;
154
- isLoading: boolean;
155
- tokenSuppliesData: _tanstack_react_query92.InfiniteData<_0xsequence_indexer12.GetTokenSuppliesReturn, unknown> | undefined;
156
- };
73
+ collectionAddress,
74
+ collectionType,
75
+ collectibleMetadata,
76
+ currency,
77
+ lowestListing,
78
+ highestOffer,
79
+ balance,
80
+ assetSrcPrefixUrl,
81
+ onCollectibleClick,
82
+ onOfferClick,
83
+ action,
84
+ showActionButton,
85
+ onCannotPerformAction,
86
+ prioritizeOwnerActions,
87
+ hideQuantitySelector,
88
+ classNames
89
+ }: MarketCardPresentationProps): react_jsx_runtime56.JSX.Element;
157
90
  //#endregion
158
- //#region src/react/hooks/data/primary-sales/useList1155ShopCardData.d.ts
159
- interface UseList1155ShopCardDataProps {
160
- primarySaleItemsWithMetadata: Array<{
161
- metadata: TokenMetadata$1;
162
- primarySaleItem: PrimarySaleItem;
163
- }>;
91
+ //#region src/react/ui/components/marketplace-collectible-card/variants/ShopCardPresentation.d.ts
92
+ interface ShopCardPresentationProps {
93
+ /** Token identification */
94
+ tokenId: bigint;
164
95
  chainId: number;
165
- contractAddress: Address;
166
- salesContractAddress: Address;
167
- enabled?: boolean;
168
- }
169
- declare function useList1155ShopCardData({
170
- primarySaleItemsWithMetadata,
171
- chainId,
172
- contractAddress,
173
- salesContractAddress,
174
- enabled
175
- }: UseList1155ShopCardDataProps): {
176
- collectibleCards: {
177
- collectibleId: string;
178
- chainId: number;
179
- collectionAddress: `0x${string}`;
180
- collectionType: ContractType.ERC1155;
181
- tokenMetadata: TokenMetadata$1;
182
- cardLoading: boolean;
183
- salesContractAddress: `0x${string}`;
184
- salePrice: {
185
- amount: string;
186
- currencyAddress: Address;
187
- };
188
- quantityInitial: string;
189
- quantityDecimals: number;
190
- quantityRemaining: string;
191
- unlimitedSupply: boolean;
192
- saleStartsAt: string;
193
- saleEndsAt: string;
194
- cardType: "shop";
195
- }[];
196
- tokenMetadataError: null;
197
- tokenSaleDetailsError: null;
198
- isLoading: boolean;
199
- };
200
- //#endregion
201
- //#region src/react/hooks/data/inventory/useInventory.d.ts
202
- declare function useInventory(args: UseInventoryArgs): _tanstack_react_query92.UseQueryResult<CollectiblesResponse, Error>;
203
- //#endregion
204
- //#region src/types/waas-types.d.ts
205
- type FeeOption = {
206
- gasLimit: number;
207
- to: string;
208
- token: {
209
- chainId: number;
210
- contractAddress: string | null;
211
- decimals: number;
212
- logoURL: string;
213
- name: string;
214
- symbol: string;
215
- tokenID: string | null;
216
- type: string;
96
+ collectionAddress: Address$1;
97
+ collectionType: ContractType;
98
+ /** Display data */
99
+ tokenMetadata: CollectibleMetadata;
100
+ saleCurrency?: Currency;
101
+ /** Sale information */
102
+ salePrice?: {
103
+ amount: bigint;
104
+ currencyAddress: Address$1;
217
105
  };
218
- value: string;
219
- };
220
- //#endregion
221
- //#region src/react/hooks/utils/useAutoSelectFeeOption.d.ts
222
- declare enum AutoSelectFeeOptionError {
223
- UserNotConnected = "User not connected",
224
- NoOptionsProvided = "No options provided",
225
- FailedToCheckBalances = "Failed to check balances",
226
- InsufficientBalanceForAnyFeeOption = "Insufficient balance for any fee option",
227
- }
228
- type UseAutoSelectFeeOptionArgs = {
229
- pendingFeeOptionConfirmation: {
230
- id: string;
231
- options: FeeOption[] | undefined;
232
- chainId: number;
106
+ /** Asset configuration */
107
+ assetSrcPrefixUrl?: string;
108
+ /** Shop card state */
109
+ shopState: {
110
+ mediaClassName?: string;
111
+ titleClassName?: string;
112
+ showActionButton: boolean;
233
113
  };
234
- enabled?: boolean;
235
- };
114
+ /** Action button configuration */
115
+ cardType: CardType;
116
+ salesContractAddress?: Address$1;
117
+ quantityRemaining?: bigint;
118
+ unlimitedSupply?: boolean;
119
+ hideQuantitySelector?: boolean;
120
+ classNames?: CardClassNames;
121
+ }
236
122
  /**
237
- * A React hook that automatically selects the first fee option for which the user has sufficient balance.
238
- *
239
- * @param {Object} params.pendingFeeOptionConfirmation - Configuration for fee option selection
123
+ * ShopCardPresentation - Pure presentation component for shop/primary sale cards
240
124
  *
241
- * @returns {Promise<{
242
- * selectedOption: FeeOption | null,
243
- * error: AutoSelectFeeOptionError | null,
244
- * isLoading?: boolean
245
- * }>} A promise that resolves to an object containing:
246
- * - selectedOption: The first fee option with sufficient balance, or null if none found
247
- * - error: Error message if selection fails, null otherwise
248
- * - isLoading: True while checking balances
125
+ * This is a "dumb" component that receives all data as props and handles no data fetching.
126
+ * Use this when you want full control over data fetching, or for SSR/SSG scenarios.
249
127
  *
250
- * @throws {AutoSelectFeeOptionError} Possible errors:
251
- * - UserNotConnected: When no wallet is connected
252
- * - NoOptionsProvided: When fee options array is undefined
253
- * - FailedToCheckBalances: When balance checking fails
254
- * - InsufficientBalanceForAnyFeeOption: When user has insufficient balance for all options
128
+ * For a convenient "smart" component with built-in data fetching, use ShopCard instead.
255
129
  *
256
130
  * @example
257
131
  * ```tsx
258
- * function MyComponent() {
259
- * const [pendingFeeOptionConfirmation, confirmPendingFeeOption] = useWaasFeeOptions();
260
- *
261
- * const autoSelectOptionPromise = useAutoSelectFeeOption({
262
- * pendingFeeOptionConfirmation: pendingFeeOptionConfirmation
263
- * ? {
264
- * id: pendingFeeOptionConfirmation.id,
265
- * options: pendingFeeOptionConfirmation.options,
266
- * chainId: 1
267
- * }
268
- * : {
269
- * id: '',
270
- * options: undefined,
271
- * chainId: 1
272
- * }
273
- * });
274
- *
275
- * useEffect(() => {
276
- * autoSelectOptionPromise.then((result) => {
277
- * if (result.isLoading) {
278
- * console.log('Checking balances...');
279
- * return;
280
- * }
281
- *
282
- * if (result.error) {
283
- * console.error('Failed to select fee option:', result.error);
284
- * return;
285
- * }
286
- *
287
- * if (pendingFeeOptionConfirmation?.id && result.selectedOption) {
288
- * confirmPendingFeeOption(
289
- * pendingFeeOptionConfirmation.id,
290
- * result.selectedOption.token.contractAddress
291
- * );
292
- * }
293
- * });
294
- * }, [autoSelectOptionPromise, confirmPendingFeeOption, pendingFeeOptionConfirmation]);
295
- *
296
- * return <div>...</div>;
297
- * }
132
+ * // With pre-fetched data
133
+ * <ShopCardPresentation
134
+ * tokenId="123"
135
+ * chainId={1}
136
+ * tokenMetadata={metadata}
137
+ * saleCurrency={currency}
138
+ * shopState={shopState}
139
+ * />
298
140
  * ```
299
141
  */
300
- declare function useAutoSelectFeeOption({
301
- pendingFeeOptionConfirmation,
302
- enabled
303
- }: UseAutoSelectFeeOptionArgs): Promise<{
304
- selectedOption: null;
305
- error: AutoSelectFeeOptionError;
306
- isLoading?: undefined;
307
- } | {
308
- selectedOption: null;
309
- error: null;
310
- isLoading: boolean;
311
- } | {
312
- selectedOption: FeeOption;
313
- error: null;
314
- isLoading?: undefined;
315
- }>;
142
+ declare function ShopCardPresentation({
143
+ tokenId,
144
+ chainId,
145
+ collectionAddress,
146
+ collectionType,
147
+ tokenMetadata,
148
+ saleCurrency,
149
+ salePrice,
150
+ assetSrcPrefixUrl,
151
+ shopState,
152
+ cardType,
153
+ salesContractAddress,
154
+ quantityRemaining,
155
+ unlimitedSupply,
156
+ hideQuantitySelector,
157
+ classNames
158
+ }: ShopCardPresentationProps): react_jsx_runtime56.JSX.Element;
159
+ //#endregion
160
+ //#region src/react/ui/components/media/types.d.ts
161
+ type MediaProps = {
162
+ name?: string;
163
+ assets: (string | undefined)[];
164
+ assetSrcPrefixUrl?: string;
165
+ /**
166
+ * @deprecated Use containerClassName instead
167
+ */
168
+ className?: string;
169
+ containerClassName?: string;
170
+ mediaClassname?: string;
171
+ isLoading?: boolean;
172
+ fallbackContent?: ReactNode;
173
+ shouldListenForLoad?: boolean;
174
+ };
316
175
  //#endregion
317
- //#region src/react/hooks/utils/useCheckoutOptions.d.ts
318
- type UseCheckoutOptionsParams = Optional<CheckoutOptionsQueryOptions, 'config' | 'walletAddress'>;
176
+ //#region src/react/ui/components/media/Media.d.ts
319
177
  /**
320
- * Hook to fetch checkout options for marketplace orders
321
- *
322
- * Retrieves checkout options including available payment methods, fees, and transaction details
323
- * for a set of marketplace orders. Requires a connected wallet to calculate wallet-specific options.
324
- *
325
- * @param params - Configuration parameters
326
- * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
327
- * @param params.orders - Array of orders to checkout containing collection address, order ID, and marketplace
328
- * @param params.additionalFee - Additional fee to include in checkout (defaults to 0)
329
- * @param params.query - Optional React Query configuration
330
- *
331
- * @returns Query result containing checkout options with payment methods and fees
332
- *
333
- * @example
334
- * Basic usage:
335
- * ```typescript
336
- * const { data: checkoutOptions, isLoading } = useCheckoutOptions({
337
- * chainId: 137,
338
- * orders: [{
339
- * collectionAddress: '0x1234...',
340
- * orderId: '123',
341
- * marketplace: MarketplaceKind.sequence_marketplace_v2
342
- * }],
343
- * additionalFee: 0
344
- * })
345
- * ```
178
+ * @description This component is used to display a collectible asset.
179
+ * It will display the first valid asset from the assets array.
180
+ * If no valid asset is found, it will display the fallback content or the default placeholder image.
346
181
  *
347
182
  * @example
348
- * With custom query options:
349
- * ```typescript
350
- * const { data: checkoutOptions } = useCheckoutOptions({
351
- * chainId: 1,
352
- * orders: orders,
353
- * query: {
354
- * enabled: orders.length > 0,
355
- * staleTime: 30000
356
- * }
357
- * })
358
- * ```
183
+ * <Media
184
+ * name="Collectible"
185
+ * assets={[undefined, "some-image-url", undefined]} // undefined assets will be ignored, "some-image-url" will be rendered
186
+ * assetSrcPrefixUrl="https://example.com/"
187
+ * className="w-full h-full"
188
+ * fallbackContent={<YourCustomFallbackComponent />} // Optional custom fallback content
189
+ * />
359
190
  */
360
- declare function useCheckoutOptions(params: UseCheckoutOptionsParams): _tanstack_react_query92.UseQueryResult<CheckoutOptionsMarketplaceReturn, Error>;
361
- type UseCheckoutOptionsArgs = {
191
+ declare function Media({
192
+ name,
193
+ assets,
194
+ assetSrcPrefixUrl,
195
+ className,
196
+ containerClassName,
197
+ mediaClassname,
198
+ isLoading,
199
+ fallbackContent,
200
+ shouldListenForLoad
201
+ }: MediaProps): react_jsx_runtime56.JSX.Element;
202
+ //#endregion
203
+ //#region src/react/ui/modals/BuyModal/internal/buyModalContext.d.ts
204
+ declare function useBuyModalContext(): {
205
+ config: MarketplaceSdkContext;
206
+ modalProps: BuyModalProps;
207
+ close: () => void;
208
+ steps: Step[] | undefined;
209
+ collectible: TokenMetadata$1 | undefined;
210
+ collection: ContractInfo$1 | undefined;
211
+ primarySaleItem: PrimarySaleItem | undefined;
212
+ marketOrder: Order | undefined;
213
+ isShop: boolean;
214
+ buyStep: Step | undefined;
215
+ isLoading: boolean;
216
+ checkoutMode: CheckoutMode | undefined;
217
+ formattedAmount: string | undefined;
218
+ handleTransactionSuccess: (hash: Hash$1) => void;
219
+ handleTrailsSuccess: (data: {
220
+ txHash: string;
221
+ chainId: number;
222
+ sessionId: string;
223
+ }) => void;
224
+ error: Error | null;
225
+ refetchAll: () => Promise<void>;
226
+ };
227
+ type BuyModalContext = ReturnType<typeof useBuyModalContext>;
228
+ //#endregion
229
+ //#region src/react/ui/modals/BuyModal/index.d.ts
230
+ declare const useBuyModal: () => {
231
+ show: (args: BuyModalProps) => void;
232
+ close: () => void;
233
+ };
234
+ //#endregion
235
+ //#region src/react/ui/modals/TransferModal/internal/store.d.ts
236
+ type ShowTransferModalArgs = {
237
+ collectionAddress: Address$1;
238
+ tokenId: bigint;
362
239
  chainId: number;
363
- orders: Array<{
364
- collectionAddress: string;
365
- orderId: string;
366
- marketplace: MarketplaceKind;
367
- }>;
368
- query?: {
369
- enabled?: boolean;
240
+ collectionType?: CollectionType;
241
+ };
242
+ type UseTransferModalArgs = {
243
+ prefetch?: {
244
+ tokenId: bigint;
245
+ chainId: number;
246
+ collectionAddress: Address$1;
370
247
  };
371
248
  };
372
- type UseCheckoutOptionsReturn = Awaited<ReturnType<typeof fetchCheckoutOptions>>;
249
+ declare const useTransferModal: (args?: UseTransferModalArgs) => {
250
+ show: (openArgs: ShowTransferModalArgs) => void;
251
+ close: () => void;
252
+ };
373
253
  //#endregion
374
- //#region src/react/hooks/utils/useCheckoutOptionsSalesContract.d.ts
375
- type UseCheckoutOptionsSalesContractParams = Optional<CheckoutOptionsSalesContractQueryOptions, 'config' | 'walletAddress'>;
376
- /**
377
- * Hook to fetch checkout options for sales contract items
378
- *
379
- * Retrieves checkout options including available payment methods, fees, and transaction details
380
- * for items from a sales contract. Requires a connected wallet to calculate wallet-specific options.
381
- *
382
- * @param params - Configuration parameters or skipToken to skip the query
383
- * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
384
- * @param params.contractAddress - The sales contract address
385
- * @param params.collectionAddress - The collection contract address
386
- * @param params.items - Array of items to purchase with tokenId and quantity
387
- * @param params.query - Optional React Query configuration
388
- *
389
- * @returns Query result containing checkout options with payment methods and fees
390
- *
391
- * @example
392
- * Basic usage:
393
- * ```typescript
394
- * const { data: checkoutOptions, isLoading } = useCheckoutOptionsSalesContract({
395
- * chainId: 137,
396
- * contractAddress: '0x1234...',
397
- * collectionAddress: '0x5678...',
398
- * items: [{
399
- * tokenId: '1',
400
- * quantity: '1'
401
- * }]
402
- * })
403
- * ```
404
- *
405
- * @example
406
- * With skipToken to conditionally skip:
407
- * ```typescript
408
- * const { data: checkoutOptions } = useCheckoutOptionsSalesContract(
409
- * items.length > 0 ? {
410
- * chainId: 1,
411
- * contractAddress: contractAddress,
412
- * collectionAddress: collectionAddress,
413
- * items: items
414
- * } : skipToken
415
- * )
416
- * ```
417
- */
418
- declare function useCheckoutOptionsSalesContract(params: UseCheckoutOptionsSalesContractParams | typeof skipToken): _tanstack_react_query92.UseQueryResult<CheckoutOptionsSalesContractReturn, Error>;
419
- type UseCheckoutOptionsSalesContractArgs = {
420
- chainId: number;
421
- contractAddress: string;
422
- collectionAddress: string;
423
- items: Array<CheckoutOptionsItem>;
254
+ //#region src/react/ui/modals/TransferModal/internal/context.d.ts
255
+ type TransferModalSteps = ModalSteps<'transfer'>;
256
+ type TransferModalContext = ModalContext<'transfer', TransferModalSteps> & {
257
+ item: {
258
+ chainId: number;
259
+ collectionAddress: Address$1;
260
+ tokenId: bigint;
261
+ };
262
+ form: {
263
+ receiver: {
264
+ input: string;
265
+ update: (value: string) => void;
266
+ touch: () => void;
267
+ isTouched: boolean;
268
+ validation: {
269
+ isValid: boolean;
270
+ error: string | null;
271
+ };
272
+ };
273
+ quantity: {
274
+ input: bigint;
275
+ update: (value: bigint) => void;
276
+ touch: () => void;
277
+ isTouched: boolean;
278
+ validation: {
279
+ isValid: boolean;
280
+ error: string | null;
281
+ };
282
+ };
283
+ isValid: boolean;
284
+ errors: {
285
+ receiver?: string;
286
+ quantity?: string;
287
+ contractType?: string | null;
288
+ };
289
+ };
290
+ queries: {
291
+ collection: ReturnType<typeof useCollectionMetadata>;
292
+ collectibleBalance: ReturnType<typeof useCollectibleBalance>;
293
+ };
294
+ transactions: {
295
+ transfer: string | undefined;
296
+ };
297
+ loading: {
298
+ collection: boolean;
299
+ collectibleBalance: boolean;
300
+ };
301
+ formError: string | undefined;
302
+ actions: {
303
+ transfer: {
304
+ label: string;
305
+ onClick: () => Promise<void>;
306
+ loading: boolean;
307
+ disabled: boolean;
308
+ testid: string;
309
+ };
310
+ };
424
311
  };
425
- type UseCheckoutOptionsSalesContractReturn = Awaited<ReturnType<typeof fetchCheckoutOptionsSalesContract>>;
312
+ declare function useTransferModalContext(): TransferModalContext;
313
+ //#endregion
314
+ //#region src/react/ui/modals/TransferModal/index.d.ts
315
+ declare const TransferModal: () => react_jsx_runtime56.JSX.Element | null;
426
316
  //#endregion
427
- //#region src/react/hooks/utils/useComparePrices.d.ts
428
- type UseComparePricesParams = Optional<ComparePricesQueryOptions, 'config'>;
317
+ //#region src/react/hooks/currency/compare-prices.d.ts
318
+ type UseCurrencyComparePricesParams = Optional<ComparePricesQueryOptions, 'config'>;
429
319
  /**
430
320
  * Hook to compare prices between different currencies by converting both to USD
431
321
  *
@@ -445,7 +335,7 @@ type UseComparePricesParams = Optional<ComparePricesQueryOptions, 'config'>;
445
335
  * @example
446
336
  * Basic usage:
447
337
  * ```typescript
448
- * const { data: comparison, isLoading } = useComparePrices({
338
+ * const { data: comparison, isLoading } = useCurrencyComparePrices({
449
339
  * chainId: 1,
450
340
  * priceAmountRaw: '1000000000000000000', // 1 ETH in wei
451
341
  * priceCurrencyAddress: '0x0000000000000000000000000000000000000000', // ETH
@@ -462,7 +352,7 @@ type UseComparePricesParams = Optional<ComparePricesQueryOptions, 'config'>;
462
352
  * @example
463
353
  * With custom query options:
464
354
  * ```typescript
465
- * const { data: comparison } = useComparePrices({
355
+ * const { data: comparison } = useCurrencyComparePrices({
466
356
  * chainId: 137,
467
357
  * priceAmountRaw: price1,
468
358
  * priceCurrencyAddress: currency1Address,
@@ -475,13 +365,13 @@ type UseComparePricesParams = Optional<ComparePricesQueryOptions, 'config'>;
475
365
  * })
476
366
  * ```
477
367
  */
478
- declare function useComparePrices(params: UseComparePricesParams): _tanstack_react_query92.UseQueryResult<ComparePricesReturn, Error>;
368
+ declare function useCurrencyComparePrices(params: UseCurrencyComparePricesParams): _tanstack_react_query386.UseQueryResult<ComparePricesReturn, Error>;
479
369
  type UseComparePricesArgs = {
480
370
  chainId: number;
481
371
  priceAmountRaw: string;
482
- priceCurrencyAddress: Address;
372
+ priceCurrencyAddress: Address$1;
483
373
  compareToPriceAmountRaw: string;
484
- compareToPriceCurrencyAddress: Address;
374
+ compareToPriceCurrencyAddress: Address$1;
485
375
  query?: {
486
376
  enabled?: boolean;
487
377
  };
@@ -492,8 +382,8 @@ type UseComparePricesReturn = {
492
382
  status: 'above' | 'same' | 'below';
493
383
  };
494
384
  //#endregion
495
- //#region src/react/hooks/utils/useConvertPriceToUSD.d.ts
496
- type UseConvertPriceToUSDParams = Optional<ConvertPriceToUSDQueryOptions, 'config'>;
385
+ //#region src/react/hooks/currency/convert-to-usd.d.ts
386
+ type UseCurrencyConvertToUSDParams = Optional<ConvertPriceToUSDQueryOptions, 'config'>;
497
387
  /**
498
388
  * Hook to convert a price amount from a specific currency to USD
499
389
  *
@@ -512,7 +402,7 @@ type UseConvertPriceToUSDParams = Optional<ConvertPriceToUSDQueryOptions, 'confi
512
402
  * @example
513
403
  * Basic ETH to USD conversion:
514
404
  * ```typescript
515
- * const { data: conversion, isLoading } = useConvertPriceToUSD({
405
+ * const { data: conversion, isLoading } = useCurrencyConvertToUSD({
516
406
  * chainId: 1,
517
407
  * currencyAddress: '0x0000000000000000000000000000000000000000', // ETH
518
408
  * amountRaw: '1000000000000000000' // 1 ETH in wei
@@ -527,7 +417,7 @@ type UseConvertPriceToUSDParams = Optional<ConvertPriceToUSDQueryOptions, 'confi
527
417
  * @example
528
418
  * ERC-20 token conversion with conditional enabling:
529
419
  * ```typescript
530
- * const { data: conversion } = useConvertPriceToUSD({
420
+ * const { data: conversion } = useCurrencyConvertToUSD({
531
421
  * chainId: 137,
532
422
  * currencyAddress: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // USDC on Polygon
533
423
  * amountRaw: '1000000', // 1 USDC (6 decimals)
@@ -538,10 +428,10 @@ type UseConvertPriceToUSDParams = Optional<ConvertPriceToUSDQueryOptions, 'confi
538
428
  * })
539
429
  * ```
540
430
  */
541
- declare function useConvertPriceToUSD(params: UseConvertPriceToUSDParams): _tanstack_react_query92.UseQueryResult<ConvertPriceToUSDReturn, Error>;
431
+ declare function useCurrencyConvertToUSD(params: UseCurrencyConvertToUSDParams): _tanstack_react_query386.UseQueryResult<ConvertPriceToUSDReturn, Error>;
542
432
  type UseConvertPriceToUSDArgs = {
543
433
  chainId: number;
544
- currencyAddress: Address;
434
+ currencyAddress: Address$1;
545
435
  amountRaw: string;
546
436
  query?: {
547
437
  enabled?: boolean;
@@ -549,442 +439,78 @@ type UseConvertPriceToUSDArgs = {
549
439
  };
550
440
  type UseConvertPriceToUSDReturn = ConvertPriceToUSDReturn;
551
441
  //#endregion
552
- //#region src/react/hooks/utils/useEnsureCorrectChain.d.ts
553
- declare const useEnsureCorrectChain: () => {
554
- ensureCorrectChain: (targetChainId: number, callbacks?: {
555
- onSuccess?: () => void;
556
- }) => void;
557
- ensureCorrectChainAsync: (targetChainId: number) => Promise<void | {
558
- blockExplorers?: {
559
- [key: string]: {
560
- name: string;
561
- url: string;
562
- apiUrl?: string | undefined;
563
- };
564
- default: {
565
- name: string;
566
- url: string;
567
- apiUrl?: string | undefined;
568
- };
569
- } | undefined | undefined;
570
- blockTime?: number | undefined | undefined;
571
- contracts?: {
572
- [x: string]: viem2.ChainContract | {
573
- [sourceId: number]: viem2.ChainContract | undefined;
574
- } | undefined;
575
- ensRegistry?: viem2.ChainContract | undefined;
576
- ensUniversalResolver?: viem2.ChainContract | undefined;
577
- multicall3?: viem2.ChainContract | undefined;
578
- erc6492Verifier?: viem2.ChainContract | undefined;
579
- } | undefined;
580
- ensTlds?: readonly string[] | undefined;
581
- id: number;
582
- name: string;
583
- nativeCurrency: {
584
- name: string;
585
- symbol: string;
586
- decimals: number;
587
- };
588
- experimental_preconfirmationTime?: number | undefined | undefined;
589
- rpcUrls: {
590
- [key: string]: {
591
- http: readonly string[];
592
- webSocket?: readonly string[] | undefined;
593
- };
594
- default: {
595
- http: readonly string[];
596
- webSocket?: readonly string[] | undefined;
597
- };
598
- };
599
- sourceId?: number | undefined | undefined;
600
- testnet?: boolean | undefined | undefined;
601
- custom?: Record<string, unknown> | undefined;
602
- fees?: viem2.ChainFees<viem2.ChainFormatters | undefined> | undefined;
603
- formatters?: viem2.ChainFormatters | undefined;
604
- serializers?: viem2.ChainSerializers<viem2.ChainFormatters | undefined, viem2.TransactionSerializable> | undefined;
605
- }>;
606
- currentChainId: number | undefined;
607
- };
608
- //#endregion
609
- //#region src/react/hooks/utils/useGetReceiptFromHash.d.ts
442
+ //#region src/react/hooks/currency/currency.d.ts
443
+ type UseCurrencyParams = Optional<CurrencyQueryOptions, 'config'>;
610
444
  /**
611
- * Hook to get transaction receipt from hash
612
- *
613
- * Provides a function to wait for a transaction receipt using a transaction hash.
614
- * This is a wagmi-based hook for direct blockchain interaction.
445
+ * Hook to fetch currency details from the marketplace
615
446
  *
616
- * @returns Object containing waitForReceipt function
617
- *
618
- * @example
619
- * Basic usage:
620
- * ```typescript
621
- * const { waitForReceipt } = useGetReceiptFromHash();
622
- *
623
- * // Wait for transaction receipt
624
- * const receipt = await waitForReceipt('0x123...');
625
- * console.log('Transaction status:', receipt.status);
626
- * ```
627
- *
628
- * @example
629
- * In transaction flow:
630
- * ```typescript
631
- * const { waitForReceipt } = useGetReceiptFromHash();
632
- *
633
- * const handleTransaction = async () => {
634
- * try {
635
- * const hash = await writeContract({ ... });
636
- * const receipt = await waitForReceipt(hash);
637
- * if (receipt.status === 'success') {
638
- * console.log('Transaction confirmed!');
639
- * }
640
- * } catch (error) {
641
- * console.error('Transaction failed:', error);
642
- * }
643
- * };
644
- * ```
645
- */
646
- declare const useGetReceiptFromHash: () => {
647
- waitForReceipt: (transactionHash: Hex) => Promise<viem2.TransactionReceipt>;
648
- };
649
- //#endregion
650
- //#region src/react/hooks/utils/useRoyalty.d.ts
651
- interface UseRoyaltyArgs {
652
- chainId: number;
653
- collectionAddress: Address;
654
- collectibleId: string;
655
- query?: QueryArg;
656
- }
657
- /**
658
- * Hook to fetch royalty information for a collectible
659
- *
660
- * Reads royalty information from the blockchain using the EIP-2981 standard.
661
- * This hook queries the contract directly to get royalty percentage and recipient
662
- * address for a specific token.
663
- *
664
- * @param args - Configuration parameters
665
- * @param args.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
666
- * @param args.collectionAddress - The collection contract address
667
- * @param args.collectibleId - The token ID within the collection
668
- * @param args.query - Optional React Query configuration
669
- *
670
- * @returns Query result containing royalty information (percentage and recipient) or null
671
- *
672
- * @example
673
- * Basic usage:
674
- * ```typescript
675
- * const { data, isLoading } = useRoyalty({
676
- * chainId: 137,
677
- * collectionAddress: '0x...',
678
- * collectibleId: '1'
679
- * })
680
- *
681
- * if (data) {
682
- * console.log('Royalty:', data.percentage, 'Recipient:', data.recipient)
683
- * }
684
- * ```
685
- *
686
- * @example
687
- * With custom query options:
688
- * ```typescript
689
- * const { data, isLoading } = useRoyalty({
690
- * chainId: 1,
691
- * collectionAddress: '0x...',
692
- * collectibleId: '42',
693
- * query: {
694
- * refetchInterval: 60000,
695
- * enabled: hasTokenId
696
- * }
697
- * })
698
- * ```
699
- */
700
- declare function useRoyalty(args: UseRoyaltyArgs): {
701
- data: {
702
- percentage: bigint;
703
- recipient: Address;
704
- } | null;
705
- error: viem2.ReadContractErrorType;
706
- isError: true;
707
- isPending: false;
708
- isLoading: false;
709
- isLoadingError: false;
710
- isRefetchError: true;
711
- isSuccess: false;
712
- isPlaceholderData: false;
713
- status: "error";
714
- dataUpdatedAt: number;
715
- errorUpdatedAt: number;
716
- failureCount: number;
717
- failureReason: viem2.ReadContractErrorType | null;
718
- errorUpdateCount: number;
719
- isFetched: boolean;
720
- isFetchedAfterMount: boolean;
721
- isFetching: boolean;
722
- isInitialLoading: boolean;
723
- isPaused: boolean;
724
- isRefetching: boolean;
725
- isStale: boolean;
726
- isEnabled: boolean;
727
- refetch: (options?: _tanstack_react_query92.RefetchOptions) => Promise<_tanstack_react_query92.QueryObserverResult<readonly [`0x${string}`, bigint], viem2.ReadContractErrorType>>;
728
- fetchStatus: _tanstack_react_query92.FetchStatus;
729
- promise: Promise<readonly [`0x${string}`, bigint]>;
730
- queryKey: _tanstack_react_query92.QueryKey;
731
- } | {
732
- data: {
733
- percentage: bigint;
734
- recipient: Address;
735
- } | null;
736
- error: null;
737
- isError: false;
738
- isPending: false;
739
- isLoading: false;
740
- isLoadingError: false;
741
- isRefetchError: false;
742
- isSuccess: true;
743
- isPlaceholderData: false;
744
- status: "success";
745
- dataUpdatedAt: number;
746
- errorUpdatedAt: number;
747
- failureCount: number;
748
- failureReason: viem2.ReadContractErrorType | null;
749
- errorUpdateCount: number;
750
- isFetched: boolean;
751
- isFetchedAfterMount: boolean;
752
- isFetching: boolean;
753
- isInitialLoading: boolean;
754
- isPaused: boolean;
755
- isRefetching: boolean;
756
- isStale: boolean;
757
- isEnabled: boolean;
758
- refetch: (options?: _tanstack_react_query92.RefetchOptions) => Promise<_tanstack_react_query92.QueryObserverResult<readonly [`0x${string}`, bigint], viem2.ReadContractErrorType>>;
759
- fetchStatus: _tanstack_react_query92.FetchStatus;
760
- promise: Promise<readonly [`0x${string}`, bigint]>;
761
- queryKey: _tanstack_react_query92.QueryKey;
762
- } | {
763
- data: {
764
- percentage: bigint;
765
- recipient: Address;
766
- } | null;
767
- error: viem2.ReadContractErrorType;
768
- isError: true;
769
- isPending: false;
770
- isLoading: false;
771
- isLoadingError: true;
772
- isRefetchError: false;
773
- isSuccess: false;
774
- isPlaceholderData: false;
775
- status: "error";
776
- dataUpdatedAt: number;
777
- errorUpdatedAt: number;
778
- failureCount: number;
779
- failureReason: viem2.ReadContractErrorType | null;
780
- errorUpdateCount: number;
781
- isFetched: boolean;
782
- isFetchedAfterMount: boolean;
783
- isFetching: boolean;
784
- isInitialLoading: boolean;
785
- isPaused: boolean;
786
- isRefetching: boolean;
787
- isStale: boolean;
788
- isEnabled: boolean;
789
- refetch: (options?: _tanstack_react_query92.RefetchOptions) => Promise<_tanstack_react_query92.QueryObserverResult<readonly [`0x${string}`, bigint], viem2.ReadContractErrorType>>;
790
- fetchStatus: _tanstack_react_query92.FetchStatus;
791
- promise: Promise<readonly [`0x${string}`, bigint]>;
792
- queryKey: _tanstack_react_query92.QueryKey;
793
- } | {
794
- data: {
795
- percentage: bigint;
796
- recipient: Address;
797
- } | null;
798
- error: null;
799
- isError: false;
800
- isPending: true;
801
- isLoading: true;
802
- isLoadingError: false;
803
- isRefetchError: false;
804
- isSuccess: false;
805
- isPlaceholderData: false;
806
- status: "pending";
807
- dataUpdatedAt: number;
808
- errorUpdatedAt: number;
809
- failureCount: number;
810
- failureReason: viem2.ReadContractErrorType | null;
811
- errorUpdateCount: number;
812
- isFetched: boolean;
813
- isFetchedAfterMount: boolean;
814
- isFetching: boolean;
815
- isInitialLoading: boolean;
816
- isPaused: boolean;
817
- isRefetching: boolean;
818
- isStale: boolean;
819
- isEnabled: boolean;
820
- refetch: (options?: _tanstack_react_query92.RefetchOptions) => Promise<_tanstack_react_query92.QueryObserverResult<readonly [`0x${string}`, bigint], viem2.ReadContractErrorType>>;
821
- fetchStatus: _tanstack_react_query92.FetchStatus;
822
- promise: Promise<readonly [`0x${string}`, bigint]>;
823
- queryKey: _tanstack_react_query92.QueryKey;
824
- } | {
825
- data: {
826
- percentage: bigint;
827
- recipient: Address;
828
- } | null;
829
- error: null;
830
- isError: false;
831
- isPending: true;
832
- isLoadingError: false;
833
- isRefetchError: false;
834
- isSuccess: false;
835
- isPlaceholderData: false;
836
- status: "pending";
837
- dataUpdatedAt: number;
838
- errorUpdatedAt: number;
839
- failureCount: number;
840
- failureReason: viem2.ReadContractErrorType | null;
841
- errorUpdateCount: number;
842
- isFetched: boolean;
843
- isFetchedAfterMount: boolean;
844
- isFetching: boolean;
845
- isLoading: boolean;
846
- isInitialLoading: boolean;
847
- isPaused: boolean;
848
- isRefetching: boolean;
849
- isStale: boolean;
850
- isEnabled: boolean;
851
- refetch: (options?: _tanstack_react_query92.RefetchOptions) => Promise<_tanstack_react_query92.QueryObserverResult<readonly [`0x${string}`, bigint], viem2.ReadContractErrorType>>;
852
- fetchStatus: _tanstack_react_query92.FetchStatus;
853
- promise: Promise<readonly [`0x${string}`, bigint]>;
854
- queryKey: _tanstack_react_query92.QueryKey;
855
- } | {
856
- data: {
857
- percentage: bigint;
858
- recipient: Address;
859
- } | null;
860
- isError: false;
861
- error: null;
862
- isPending: false;
863
- isLoading: false;
864
- isLoadingError: false;
865
- isRefetchError: false;
866
- isSuccess: true;
867
- isPlaceholderData: true;
868
- status: "success";
869
- dataUpdatedAt: number;
870
- errorUpdatedAt: number;
871
- failureCount: number;
872
- failureReason: viem2.ReadContractErrorType | null;
873
- errorUpdateCount: number;
874
- isFetched: boolean;
875
- isFetchedAfterMount: boolean;
876
- isFetching: boolean;
877
- isInitialLoading: boolean;
878
- isPaused: boolean;
879
- isRefetching: boolean;
880
- isStale: boolean;
881
- isEnabled: boolean;
882
- refetch: (options?: _tanstack_react_query92.RefetchOptions) => Promise<_tanstack_react_query92.QueryObserverResult<readonly [`0x${string}`, bigint], viem2.ReadContractErrorType>>;
883
- fetchStatus: _tanstack_react_query92.FetchStatus;
884
- promise: Promise<readonly [`0x${string}`, bigint]>;
885
- queryKey: _tanstack_react_query92.QueryKey;
886
- };
887
- //#endregion
888
- //#region src/react/providers/index.d.ts
889
- declare const MarketplaceSdkContext$1: react0.Context<MarketplaceSdkContext>;
890
- type MarketplaceSdkProviderProps = {
891
- config: SdkConfig;
892
- children: React.ReactNode;
893
- openConnectModal?: () => void;
894
- };
895
- declare function MarketplaceProvider({
896
- config,
897
- children,
898
- openConnectModal
899
- }: MarketplaceSdkProviderProps): react_jsx_runtime7.JSX.Element;
900
- declare function MarketplaceQueryClientProvider({
901
- children
902
- }: {
903
- children: React.ReactNode;
904
- }): react_jsx_runtime7.JSX.Element;
905
- //#endregion
906
- //#region src/react/hooks/data/primary-sales/useListPrimarySaleItems.d.ts
907
- type UseListPrimarySaleItemsParams = Optional<ListPrimarySaleItemsQueryOptions, 'config'>;
908
- /**
909
- * Hook to fetch primary sale items with pagination support
910
- *
911
- * Retrieves a paginated list of primary sale items for a specific contract address
912
- * from the marketplace.
447
+ * Retrieves detailed information about a specific currency by its contract address.
448
+ * The currency data is cached from previous currency list calls when possible.
913
449
  *
914
450
  * @param params - Configuration parameters
915
451
  * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
916
- * @param params.primarySaleContractAddress - The primary sale contract address
917
- * @param params.filter - Optional filter parameters for the query
918
- * @param params.page - Optional pagination parameters
452
+ * @param params.currencyAddress - The currency contract address
919
453
  * @param params.query - Optional React Query configuration
920
454
  *
921
- * @returns Infinite query result containing the primary sale items data
455
+ * @returns Query result containing currency details
922
456
  *
923
457
  * @example
924
458
  * Basic usage:
925
459
  * ```typescript
926
- * const { data, isLoading } = useListPrimarySaleItems({
460
+ * const { data, isLoading } = useCurrency({
927
461
  * chainId: 137,
928
- * primarySaleContractAddress: '0x...',
462
+ * currencyAddress: '0x...'
929
463
  * })
930
464
  * ```
931
465
  *
932
466
  * @example
933
- * With filters and pagination:
467
+ * With custom query options:
934
468
  * ```typescript
935
- * const { data, isLoading } = useListPrimarySaleItems({
469
+ * const { data, isLoading } = useCurrency({
936
470
  * chainId: 1,
937
- * primarySaleContractAddress: '0x...',
938
- * filter: { status: 'active' },
939
- * page: { page: 1, pageSize: 20 },
471
+ * currencyAddress: '0x...',
940
472
  * query: {
941
- * enabled: isReady
473
+ * enabled: Boolean(selectedCurrency)
942
474
  * }
943
475
  * })
944
476
  * ```
945
477
  */
946
- declare function useListPrimarySaleItems(params: UseListPrimarySaleItemsParams): _tanstack_react_query92.UseInfiniteQueryResult<_tanstack_react_query92.InfiniteData<ListPrimarySaleItemsReturn, unknown>, Error>;
478
+ declare function useCurrency(params: UseCurrencyParams): _tanstack_react_query386.UseQueryResult<Currency | undefined, Error>;
947
479
  //#endregion
948
- //#region src/react/hooks/data/primary-sales/usePrimarySaleItem.d.ts
949
- type UsePrimarySaleItemParams = Optional<PrimarySaleItemQueryOptions, 'config'>;
480
+ //#region src/react/hooks/currency/list.d.ts
481
+ type UseCurrencyListParams = Optional<MarketCurrenciesQueryOptions, 'config'>;
950
482
  /**
951
- * Hook to fetch a single primary sale item
483
+ * Hook to fetch supported currencies for a marketplace
952
484
  *
953
- * Retrieves details for a specific primary sale item from a primary sale contract.
485
+ * Retrieves the list of currencies supported by the marketplace for a specific chain.
486
+ * Can optionally filter to exclude native currency or filter by collection.
954
487
  *
955
488
  * @param params - Configuration parameters
956
489
  * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
957
- * @param params.primarySaleContractAddress - The primary sale contract address
958
- * @param params.tokenId - The token ID of the primary sale item
490
+ * @param params.includeNativeCurrency - Whether to include native currency (default: true)
491
+ * @param params.collectionAddress - Optional collection address to filter currencies
959
492
  * @param params.query - Optional React Query configuration
960
493
  *
961
- * @returns Query result containing the primary sale item data
494
+ * @returns Query result containing supported currencies
962
495
  *
963
496
  * @example
964
497
  * Basic usage:
965
498
  * ```typescript
966
- * const { data: item, isLoading } = usePrimarySaleItem({
967
- * chainId: 137,
968
- * primarySaleContractAddress: '0x...',
969
- * tokenId: '1',
499
+ * const { data, isLoading } = useCurrencyList({
500
+ * chainId: 137
970
501
  * })
971
502
  * ```
972
503
  *
973
504
  * @example
974
- * With custom query options:
505
+ * Exclude native currency:
975
506
  * ```typescript
976
- * const { data } = usePrimarySaleItem({
507
+ * const { data, isLoading } = useCurrencyList({
977
508
  * chainId: 1,
978
- * primarySaleContractAddress: '0x...',
979
- * tokenId: '42',
980
- * query: {
981
- * enabled: Boolean(primarySaleContractAddress && tokenId),
982
- * staleTime: 30_000
983
- * }
509
+ * includeNativeCurrency: false
984
510
  * })
985
511
  * ```
986
512
  */
987
- declare function usePrimarySaleItem(params: UsePrimarySaleItemParams): _tanstack_react_query92.UseQueryResult<CollectiblePrimarySaleItem, Error>;
513
+ declare function useCurrencyList(params: UseCurrencyListParams): _tanstack_react_query386.UseQueryResult<Currency[], Error>;
988
514
  //#endregion
989
- export { useInventory as A, UseCheckoutOptionsSalesContractReturn as C, UseCheckoutOptionsReturn as D, UseCheckoutOptionsParams as E, useErc721SaleDetails as F, useCountOfPrimarySaleItems as I, useList721ShopCardData as M, UseGetCountParams as N, useCheckoutOptions as O, useGetCountOfPrimarySaleItems as P, UseCheckoutOptionsSalesContractParams as S, UseCheckoutOptionsArgs as T, UseComparePricesArgs as _, MarketplaceProvider as a, useComparePrices as b, MarketplaceSdkProviderProps as c, useGetReceiptFromHash as d, useEnsureCorrectChain as f, useConvertPriceToUSD as g, UseConvertPriceToUSDReturn as h, useListPrimarySaleItems as i, useList1155ShopCardData as j, useAutoSelectFeeOption as k, UseRoyaltyArgs as l, UseConvertPriceToUSDParams as m, usePrimarySaleItem as n, MarketplaceQueryClientProvider as o, UseConvertPriceToUSDArgs as p, UseListPrimarySaleItemsParams as r, MarketplaceSdkContext$1 as s, UsePrimarySaleItemParams as t, useRoyalty as u, UseComparePricesParams as v, useCheckoutOptionsSalesContract as w, UseCheckoutOptionsSalesContractArgs as x, UseComparePricesReturn as y };
515
+ export { ShopCardPresentation as C, ModalProvider as D, MarketCardPresentationProps as E, Media as S, MarketCardPresentation as T, UseTransferModalArgs as _, UseConvertPriceToUSDArgs as a, BuyModalContext as b, useCurrencyConvertToUSD as c, UseCurrencyComparePricesParams as d, useCurrencyComparePrices as f, ShowTransferModalArgs as g, useTransferModalContext as h, useCurrency as i, UseComparePricesArgs as l, TransferModalContext as m, useCurrencyList as n, UseConvertPriceToUSDReturn as o, TransferModal as p, UseCurrencyParams as r, UseCurrencyConvertToUSDParams as s, UseCurrencyListParams as t, UseComparePricesReturn as u, useTransferModal as v, ShopCardPresentationProps as w, useBuyModalContext as x, useBuyModal as y };
990
516
  //# sourceMappingURL=index23.d.ts.map