@0xsequence/marketplace-sdk 1.1.1 → 1.2.1

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 (381) hide show
  1. package/CHANGELOG.md +54 -3
  2. package/dist/{BellIcon-ByhygxBO.js → BellIcon.js} +4 -4
  3. package/dist/BellIcon.js.map +1 -0
  4. package/dist/{CartIcon-Bt3rQYGk.js → CartIcon.js} +7 -7
  5. package/dist/CartIcon.js.map +1 -0
  6. package/dist/CollectibleCard.d.ts +8 -0
  7. package/dist/{_internal-DkS2VUn5.js → _internal.js} +2 -2
  8. package/dist/_internal.js.map +1 -0
  9. package/dist/{abi-fa-o9gH3.js → abi.js} +2 -2
  10. package/dist/abi.js.map +1 -0
  11. package/dist/{alien_swap-DoY6XfMA.js → alien_swap.js} +1 -1
  12. package/dist/alien_swap.js.map +1 -0
  13. package/dist/{api-BoO0V5aJ.js → api.js} +13 -64
  14. package/dist/api.js.map +1 -0
  15. package/dist/{aqua-xyz-BBDxnG14.js → aqua-xyz.js} +1 -1
  16. package/dist/aqua-xyz.js.map +1 -0
  17. package/dist/{aura-DGx2zwvF.js → aura.js} +1 -1
  18. package/dist/aura.js.map +1 -0
  19. package/dist/{blur-D8GKrRrq.js → blur.js} +1 -1
  20. package/dist/blur.js.map +1 -0
  21. package/dist/{builder-api-BFuZNOaN.js → builder-api.js} +3 -3
  22. package/dist/builder-api.js.map +1 -0
  23. package/dist/{builder.gen-B9wR2nvF.js → builder.gen.js} +3 -6
  24. package/dist/builder.gen.js.map +1 -0
  25. package/dist/{coinbase-DOry4PXY.js → coinbase.js} +1 -1
  26. package/dist/coinbase.js.map +1 -0
  27. package/dist/{collectibles-C_H8jMGH.js → collectibles.js} +9 -48
  28. package/dist/collectibles.js.map +1 -0
  29. package/dist/{collections-CKummc-R.js → collections.js} +79 -8
  30. package/dist/collections.js.map +1 -0
  31. package/dist/{components-CosnX7F9.js → components.js} +12 -14
  32. package/dist/components.js.map +1 -0
  33. package/dist/{contracts-BP_0vX48.js → contracts.js} +4 -4
  34. package/dist/contracts.js.map +1 -0
  35. package/dist/{create-config-ZOB7i4ZJ.d.ts → create-config.d.ts} +47 -60
  36. package/dist/{create-config-CIfejoCk.js → create-config.js} +10 -13
  37. package/dist/create-config.js.map +1 -0
  38. package/dist/{element-ciybd_VF.js → element.js} +1 -1
  39. package/dist/element.js.map +1 -0
  40. package/dist/{filters-V-V8Dn8f.d.ts → filters.d.ts} +7 -7
  41. package/dist/{foundation-Bq4lRz4x.js → foundation.js} +1 -1
  42. package/dist/foundation.js.map +1 -0
  43. package/dist/index.d.ts +8 -8
  44. package/dist/index.js +16 -16
  45. package/dist/{index-DUXfvhxs.d.ts → index10.d.ts} +14 -29
  46. package/dist/{index-CxA34wP1.d.ts → index11.d.ts} +101 -23
  47. package/dist/{index-BtWMBHeP.d.ts → index12.d.ts} +11 -9
  48. package/dist/{index-DmudgrsN.d.ts → index13.d.ts} +16 -16
  49. package/dist/{index-U-zp70of.d.ts → index14.d.ts} +9 -13
  50. package/dist/{index-Stm5u0I0.d.ts → index16.d.ts} +7 -10
  51. package/dist/{index-BZIJTQT0.d.ts → index17.d.ts} +9 -9
  52. package/dist/{index-CnEbXm_t.d.ts → index19.d.ts} +50 -12
  53. package/dist/{index-C-745li7.d.ts → index2.d.ts} +2 -2
  54. package/dist/{index-BOiHR01C.d.ts → index21.d.ts} +9 -9
  55. package/dist/{index-Bsx6XsC2.d.ts → index23.d.ts} +100 -59
  56. package/dist/{index-CPzvNmq9.d.ts → index24.d.ts} +36 -36
  57. package/dist/{index-DFEnA6Wa.d.ts → index25.d.ts} +18 -18
  58. package/dist/{index-DqXd1EeB.d.ts → index26.d.ts} +14 -7
  59. package/dist/{index-NlPMNcqh.d.ts → index27.d.ts} +102 -114
  60. package/dist/{index-DWt6yrIG.d.ts → index28.d.ts} +8 -8
  61. package/dist/{index-C4MUKshG.d.ts → index29.d.ts} +3 -3
  62. package/dist/{index-BeRV-7AX.d.ts → index3.d.ts} +2 -2
  63. package/dist/{index-Bxzjy0d1.d.ts → index4.d.ts} +2 -2
  64. package/dist/{index-DwKr18CI.d.ts → index5.d.ts} +2 -2
  65. package/dist/{index-D9LPlmbC.d.ts → index6.d.ts} +2 -2
  66. package/dist/{index-CS65jqOq.d.ts → index7.d.ts} +19 -3
  67. package/dist/index8.d.ts +18 -0
  68. package/dist/{index-CxpFwGvR.d.ts → index9.d.ts} +4 -4
  69. package/dist/{inventory-Dd7TazvZ.js → inventory.js} +11 -15
  70. package/dist/inventory.js.map +1 -0
  71. package/dist/{listCollectiblesPaginated-Cy2_qEZA.d.ts → listCollectiblesPaginated.d.ts} +24 -29
  72. package/dist/{listCollections-BB9FxKj2.d.ts → listCollections.d.ts} +170 -100
  73. package/dist/{looks-rare-6H--x3AM.js → looks-rare.js} +1 -1
  74. package/dist/looks-rare.js.map +1 -0
  75. package/dist/{lowestListing-Cbsi6M1K.d.ts → lowestListing.d.ts} +28 -28
  76. package/dist/{magic-eden-BoxEQ1Li.js → magic-eden.js} +1 -1
  77. package/dist/magic-eden.js.map +1 -0
  78. package/dist/{manifold-DycKsljb.js → manifold.js} +1 -1
  79. package/dist/manifold.js.map +1 -0
  80. package/dist/{market-C3HV-awQ.js → market.js} +7 -9
  81. package/dist/market.js.map +1 -0
  82. package/dist/{marketCurrencies-Bpw1bIO0.d.ts → marketCurrencies.d.ts} +19 -9
  83. package/dist/{marketCurrencies-sKrTX0og.js → marketCurrencies.js} +10 -7
  84. package/dist/marketCurrencies.js.map +1 -0
  85. package/dist/{marketplace-logos-D4dS1Foy.js → marketplace-logos.js} +23 -23
  86. package/dist/marketplace-logos.js.map +1 -0
  87. package/dist/{marketplace.gen-ksUafDqS.js → marketplace.gen.js} +25 -9
  88. package/dist/marketplace.gen.js.map +1 -0
  89. package/dist/{marketplace-NQB-sEQL.js → marketplace.js} +2 -2
  90. package/dist/marketplace.js.map +1 -0
  91. package/dist/{marketplaceConfig-UHQMM9fq.js → marketplaceConfig.js} +3 -3
  92. package/dist/marketplaceConfig.js.map +1 -0
  93. package/dist/{mintify-Dyqyo8jQ.js → mintify.js} +1 -1
  94. package/dist/mintify.js.map +1 -0
  95. package/dist/{network-DtmiMhcg.js → network.js} +3 -3
  96. package/dist/network.js.map +1 -0
  97. package/dist/{networkconfigToWagmiChain-DbUf6HiO.js → networkconfigToWagmiChain.js} +4 -3
  98. package/dist/networkconfigToWagmiChain.js.map +1 -0
  99. package/dist/{nftx-2LbFjj9Q.js → nftx.js} +1 -1
  100. package/dist/nftx.js.map +1 -0
  101. package/dist/{okx-CBEWJNsR.js → okx.js} +1 -1
  102. package/dist/okx.js.map +1 -0
  103. package/dist/{open-sea-Dxntz_PA.js → open-sea.js} +1 -1
  104. package/dist/open-sea.js.map +1 -0
  105. package/dist/{orders-DnFfZAXV.js → orders.js} +10 -10
  106. package/dist/orders.js.map +1 -0
  107. package/dist/{primary-sale-1u4QlPdA.js → primary-sale.js} +2 -2
  108. package/dist/primary-sale.js.map +1 -0
  109. package/dist/{primary-sales-Dmsi6bqj.js → primary-sales.js} +41 -3
  110. package/dist/primary-sales.js.map +1 -0
  111. package/dist/{query-BWbCsXLY.d.ts → query.d.ts} +2 -2
  112. package/dist/{rarible-CS0SupHr.js → rarible.js} +1 -1
  113. package/dist/rarible.js.map +1 -0
  114. package/dist/react/_internal/api/index.d.ts +2 -2
  115. package/dist/react/_internal/api/index.js +7 -7
  116. package/dist/react/_internal/databeat/index.d.ts +1 -1
  117. package/dist/react/_internal/databeat/index.js +37 -38
  118. package/dist/react/_internal/index.d.ts +2 -2
  119. package/dist/react/_internal/index.js +11 -11
  120. package/dist/react/_internal/wagmi/index.d.ts +1 -1
  121. package/dist/react/_internal/wagmi/index.js +5 -5
  122. package/dist/react/hooks/config/index.d.ts +8 -8
  123. package/dist/react/hooks/config/index.js +37 -38
  124. package/dist/react/hooks/contracts/index.d.ts +6 -6
  125. package/dist/react/hooks/contracts/index.js +15 -15
  126. package/dist/react/hooks/data/collectibles/index.d.ts +4 -10
  127. package/dist/react/hooks/data/collectibles/index.js +37 -38
  128. package/dist/react/hooks/data/collections/index.d.ts +11 -11
  129. package/dist/react/hooks/data/collections/index.js +38 -39
  130. package/dist/react/hooks/data/index.d.ts +37 -37
  131. package/dist/react/hooks/data/index.js +38 -39
  132. package/dist/react/hooks/data/inventory/index.d.ts +36 -36
  133. package/dist/react/hooks/data/inventory/index.js +37 -38
  134. package/dist/react/hooks/data/market/index.d.ts +5 -11
  135. package/dist/react/hooks/data/market/index.js +37 -38
  136. package/dist/react/hooks/data/orders/index.d.ts +4 -10
  137. package/dist/react/hooks/data/orders/index.js +37 -38
  138. package/dist/react/hooks/data/primary-sales/index.d.ts +37 -37
  139. package/dist/react/hooks/data/primary-sales/index.js +38 -39
  140. package/dist/react/hooks/data/tokens/index.d.ts +4 -4
  141. package/dist/react/hooks/data/tokens/index.js +37 -38
  142. package/dist/react/hooks/index.d.ts +37 -37
  143. package/dist/react/hooks/index.js +38 -39
  144. package/dist/react/hooks/transactions/index.d.ts +2 -2
  145. package/dist/react/hooks/transactions/index.js +37 -38
  146. package/dist/react/hooks/ui/index.d.ts +4 -4
  147. package/dist/react/hooks/ui/index.js +37 -38
  148. package/dist/react/hooks/utils/index.d.ts +36 -36
  149. package/dist/react/hooks/utils/index.js +37 -38
  150. package/dist/react/index.d.ts +37 -37
  151. package/dist/react/index.js +38 -39
  152. package/dist/react/queries/collectibles/index.d.ts +4 -10
  153. package/dist/react/queries/collectibles/index.js +20 -21
  154. package/dist/react/queries/collections/index.d.ts +11 -11
  155. package/dist/react/queries/collections/index.js +19 -19
  156. package/dist/react/queries/index.d.ts +24 -24
  157. package/dist/react/queries/index.js +30 -31
  158. package/dist/react/queries/inventory/index.d.ts +2 -2
  159. package/dist/react/queries/inventory/index.js +20 -20
  160. package/dist/react/queries/market/index.d.ts +5 -5
  161. package/dist/react/queries/market/index.js +20 -20
  162. package/dist/react/queries/orders/index.d.ts +4 -10
  163. package/dist/react/queries/orders/index.js +11 -11
  164. package/dist/react/queries/primary-sales/index.d.ts +4 -4
  165. package/dist/react/queries/primary-sales/index.js +12 -12
  166. package/dist/react/queries/tokens/index.d.ts +4 -4
  167. package/dist/react/queries/tokens/index.js +11 -12
  168. package/dist/react/queries/utils/index.d.ts +3 -3
  169. package/dist/react/queries/utils/index.js +20 -20
  170. package/dist/react/ssr/index.d.ts +7 -7
  171. package/dist/react/ssr/index.js +13 -16
  172. package/dist/react/ssr/index.js.map +1 -1
  173. package/dist/react/ui/components/marketplace-collectible-card/components/footer/components/index.d.ts +2 -2
  174. package/dist/react/ui/components/marketplace-collectible-card/components/footer/components/index.js +20 -20
  175. package/dist/react/ui/components/marketplace-collectible-card/components/footer/index.d.ts +7 -10
  176. package/dist/react/ui/components/marketplace-collectible-card/components/footer/index.js +37 -38
  177. package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +4 -4
  178. package/dist/react/ui/components/marketplace-collectible-card/index.js +37 -38
  179. package/dist/react/ui/components/marketplace-collectible-card/utils/index.d.ts +2 -2
  180. package/dist/react/ui/components/marketplace-collectible-card/utils/index.js +11 -11
  181. package/dist/react/ui/components/marketplace-logos/index.d.ts +21 -21
  182. package/dist/react/ui/components/marketplace-logos/index.js +1 -1
  183. package/dist/react/ui/icons/index.js +14 -14
  184. package/dist/react/ui/index.d.ts +4 -4
  185. package/dist/react/ui/index.js +37 -38
  186. package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +2 -2
  187. package/dist/react/ui/modals/_internal/components/actionModal/index.js +37 -38
  188. package/dist/react/utils/index.d.ts +1 -1
  189. package/dist/react/utils/index.js +7 -7
  190. package/dist/{react-DE852KeT.js → react.js} +720 -926
  191. package/dist/react.js.map +1 -0
  192. package/dist/{sequence-paCCener.js → sequence.js} +1 -1
  193. package/dist/sequence.js.map +1 -0
  194. package/dist/{src-Dz2CfBL0.js → src.js} +2 -2
  195. package/dist/src.js.map +1 -0
  196. package/dist/styles/index.css +1 -1
  197. package/dist/{sudo-swap-9rH2EgfT.js → sudo-swap.js} +1 -1
  198. package/dist/sudo-swap.js.map +1 -0
  199. package/dist/{super-rare-DHIuWtRw.js → super-rare.js} +1 -1
  200. package/dist/super-rare.js.map +1 -0
  201. package/dist/{token-Cv7l2ZaL.js → token.js} +2 -2
  202. package/dist/token.js.map +1 -0
  203. package/dist/{tokenBalances-ibDerNmM.js → tokenBalances.js} +4 -11
  204. package/dist/tokenBalances.js.map +1 -0
  205. package/dist/{tokenSupplies-Bfe8RHzI.d.ts → tokenSupplies.d.ts} +19 -30
  206. package/dist/{tokens-cGxMadd8.js → tokens.js} +47 -22
  207. package/dist/tokens.js.map +1 -0
  208. package/dist/{transaction-DZUW5RHu.js → transaction.js} +2 -2
  209. package/dist/transaction.js.map +1 -0
  210. package/dist/types/index.d.ts +1 -1
  211. package/dist/types/index.js +3 -3
  212. package/dist/{types-D2TJ1dwv.d.ts → types.d.ts} +3 -3
  213. package/dist/{types-B_-cnkcP.js → types.js} +2 -2
  214. package/dist/types.js.map +1 -0
  215. package/dist/utils/abi/index.d.ts +4 -4
  216. package/dist/utils/abi/index.js +4 -4
  217. package/dist/utils/abi/marketplace/index.d.ts +1 -1
  218. package/dist/utils/abi/marketplace/index.js +1 -1
  219. package/dist/utils/abi/primary-sale/index.d.ts +1 -1
  220. package/dist/utils/abi/primary-sale/index.js +1 -1
  221. package/dist/utils/abi/token/index.d.ts +1 -1
  222. package/dist/utils/abi/token/index.js +1 -1
  223. package/dist/utils/index.d.ts +7 -7
  224. package/dist/utils/index.js +13 -13
  225. package/dist/{utils-BfpDVibN.js → utils.js} +42 -4
  226. package/dist/utils.js.map +1 -0
  227. package/dist/{utils-BCgNhBFR.js → utils2.js} +11 -5
  228. package/dist/utils2.js.map +1 -0
  229. package/dist/{utils-BqxcalL2.js → utils3.js} +3 -3
  230. package/dist/utils3.js.map +1 -0
  231. package/dist/{waitForTransactionReceipt-DieAnV52.js → waitForTransactionReceipt.js} +3 -3
  232. package/dist/waitForTransactionReceipt.js.map +1 -0
  233. package/dist/{x2y2-45WDooeh.js → x2y2.js} +1 -1
  234. package/dist/x2y2.js.map +1 -0
  235. package/dist/{zora-CbeBoLvQ.js → zora.js} +1 -1
  236. package/dist/zora.js.map +1 -0
  237. package/package.json +42 -42
  238. package/src/react/_internal/api/__mocks__/marketplace.msw.ts +13 -0
  239. package/src/react/_internal/api/index.ts +0 -1
  240. package/src/react/_internal/api/marketplace.gen.ts +70 -26
  241. package/src/react/_internal/api/query-keys.ts +9 -0
  242. package/src/react/_internal/wagmi/get-connectors.ts +12 -1
  243. package/src/react/hooks/data/collectibles/useBalanceOfCollectible.tsx +0 -9
  244. package/src/react/hooks/data/collectibles/useListCollectibles.tsx +1 -16
  245. package/src/react/hooks/data/collectibles/useTokenBalances.tsx +0 -9
  246. package/src/react/hooks/data/collections/index.ts +2 -0
  247. package/src/react/hooks/data/collections/useCollectionActiveListingsCurrencies.test.tsx +112 -0
  248. package/src/react/hooks/data/collections/useCollectionActiveListingsCurrencies.tsx +74 -0
  249. package/src/react/hooks/data/collections/useCollectionActiveOffersCurrencies.test.tsx +110 -0
  250. package/src/react/hooks/data/collections/useCollectionActiveOffersCurrencies.tsx +74 -0
  251. package/src/react/hooks/data/inventory/useInventory.tsx +1 -10
  252. package/src/react/hooks/data/market/useMarketCurrencies.test.tsx +31 -2
  253. package/src/react/hooks/data/primary-sales/index.ts +1 -0
  254. package/src/react/hooks/data/primary-sales/usePrimarySaleItem.tsx +71 -0
  255. package/src/react/hooks/data/tokens/useListBalances.tsx +1 -10
  256. package/src/react/hooks/data/tokens/useTokenSupplies.ts +1 -13
  257. package/src/react/hooks/transactions/useGenerateOfferTransaction.test.tsx +2 -0
  258. package/src/react/hooks/transactions/useProcessStep.test.tsx +8 -6
  259. package/src/react/hooks/transactions/useProcessStep.ts +8 -6
  260. package/src/react/hooks/utils/useComparePrices.test.tsx +1 -1
  261. package/src/react/providers/modal-provider.tsx +2 -1
  262. package/src/react/queries/collectibles/balanceOfCollectible.ts +1 -15
  263. package/src/react/queries/collectibles/listCollectibles.ts +1 -54
  264. package/src/react/queries/collectibles/tokenBalances.ts +1 -15
  265. package/src/react/queries/collections/activeListingsCurrencies.ts +84 -0
  266. package/src/react/queries/collections/activeOffersCurrencies.ts +84 -0
  267. package/src/react/queries/collections/index.ts +2 -0
  268. package/src/react/queries/inventory/inventory.ts +2 -9
  269. package/src/react/queries/market/marketCurrencies.ts +8 -1
  270. package/src/react/queries/primary-sales/index.ts +1 -0
  271. package/src/react/queries/primary-sales/primarySaleItem.ts +80 -0
  272. package/src/react/queries/tokens/listBalances.ts +1 -21
  273. package/src/react/queries/tokens/tokenSupplies.ts +2 -31
  274. package/src/react/queries/utils/comparePrices.ts +13 -1
  275. package/src/react/ui/components/_internals/action-button/ActionButton.stories.tsx +2 -0
  276. package/src/react/ui/components/marketplace-collectible-card/components/footer/Footer.tsx +4 -18
  277. package/src/react/ui/components/marketplace-collectible-card/variants/MarketCard.tsx +2 -2
  278. package/src/react/ui/components/marketplace-collectible-card/variants/ShopCard.tsx +0 -2
  279. package/src/react/ui/modals/BuyModal/__tests__/BuyModalRouter.test.tsx +3 -0
  280. package/src/react/ui/modals/BuyModal/__tests__/ERC1155ShopModal.test.tsx +152 -141
  281. package/src/react/ui/modals/BuyModal/__tests__/Modal1155.test.tsx +1 -0
  282. package/src/react/ui/modals/BuyModal/components/ERC1155ShopModal.tsx +44 -60
  283. package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC1155SalePaymentParams.test.tsx +381 -0
  284. package/src/react/ui/modals/BuyModal/hooks/useERC1155SalePaymentParams.ts +257 -0
  285. package/src/react/ui/modals/BuyModal/hooks/usePaymentModalParams.ts +0 -23
  286. package/src/react/ui/modals/MakeOfferModal/Modal.tsx +22 -2
  287. package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +2 -0
  288. package/src/react/ui/modals/MakeOfferModal/hooks/useGetTokenApproval.tsx +2 -0
  289. package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +2 -0
  290. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +1 -1
  291. package/src/react/ui/modals/TransferModal/index.tsx +24 -2
  292. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +15 -12
  293. package/src/react/ui/modals/_internal/components/floorPriceText/__tests__/FloorPriceText.test.tsx +2 -0
  294. package/src/react/ui/modals/_internal/components/floorPriceText/index.tsx +1 -1
  295. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +148 -11
  296. package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +1 -1
  297. package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/utils.test.ts +2 -0
  298. package/src/styles/styles.ts +2 -2
  299. package/src/utils/networkconfigToWagmiChain.ts +7 -0
  300. package/src/utils/price.ts +58 -0
  301. package/test/const.ts +2 -0
  302. package/test/server-setup.ts +0 -2
  303. package/tsdown.config.ts +1 -0
  304. package/.changeset/honest-peas-arrive.md +0 -5
  305. package/.changeset/real-tips-stick.md +0 -8
  306. package/.changeset/tall-pandas-wear.md +0 -8
  307. package/dist/BellIcon-ByhygxBO.js.map +0 -1
  308. package/dist/CartIcon-Bt3rQYGk.js.map +0 -1
  309. package/dist/CollectibleCard-CVpdgXA8.d.ts +0 -8
  310. package/dist/_internal-DkS2VUn5.js.map +0 -1
  311. package/dist/abi-fa-o9gH3.js.map +0 -1
  312. package/dist/alien_swap-DoY6XfMA.js.map +0 -1
  313. package/dist/api-BoO0V5aJ.js.map +0 -1
  314. package/dist/aqua-xyz-BBDxnG14.js.map +0 -1
  315. package/dist/aura-DGx2zwvF.js.map +0 -1
  316. package/dist/blur-D8GKrRrq.js.map +0 -1
  317. package/dist/builder-api-BFuZNOaN.js.map +0 -1
  318. package/dist/builder.gen-B9wR2nvF.js.map +0 -1
  319. package/dist/coinbase-DOry4PXY.js.map +0 -1
  320. package/dist/collectibles-C_H8jMGH.js.map +0 -1
  321. package/dist/collections-CKummc-R.js.map +0 -1
  322. package/dist/components-CosnX7F9.js.map +0 -1
  323. package/dist/contracts-BP_0vX48.js.map +0 -1
  324. package/dist/create-config-CIfejoCk.js.map +0 -1
  325. package/dist/element-ciybd_VF.js.map +0 -1
  326. package/dist/foundation-Bq4lRz4x.js.map +0 -1
  327. package/dist/index-DNNUeZEq.d.ts +0 -18
  328. package/dist/inventory-Dd7TazvZ.js.map +0 -1
  329. package/dist/listBalances-BxpxBCvn.js +0 -57
  330. package/dist/listBalances-BxpxBCvn.js.map +0 -1
  331. package/dist/looks-rare-6H--x3AM.js.map +0 -1
  332. package/dist/magic-eden-BoxEQ1Li.js.map +0 -1
  333. package/dist/manifold-DycKsljb.js.map +0 -1
  334. package/dist/market-C3HV-awQ.js.map +0 -1
  335. package/dist/marketCurrencies-sKrTX0og.js.map +0 -1
  336. package/dist/marketplace-NQB-sEQL.js.map +0 -1
  337. package/dist/marketplace-logos-D4dS1Foy.js.map +0 -1
  338. package/dist/marketplace.gen-ksUafDqS.js.map +0 -1
  339. package/dist/marketplaceConfig-UHQMM9fq.js.map +0 -1
  340. package/dist/mintify-Dyqyo8jQ.js.map +0 -1
  341. package/dist/network-DtmiMhcg.js.map +0 -1
  342. package/dist/networkconfigToWagmiChain-DbUf6HiO.js.map +0 -1
  343. package/dist/nftx-2LbFjj9Q.js.map +0 -1
  344. package/dist/okx-CBEWJNsR.js.map +0 -1
  345. package/dist/open-sea-Dxntz_PA.js.map +0 -1
  346. package/dist/orders-DnFfZAXV.js.map +0 -1
  347. package/dist/primary-sale-1u4QlPdA.js.map +0 -1
  348. package/dist/primary-sales-Dmsi6bqj.js.map +0 -1
  349. package/dist/rarible-CS0SupHr.js.map +0 -1
  350. package/dist/react-DE852KeT.js.map +0 -1
  351. package/dist/sequence-paCCener.js.map +0 -1
  352. package/dist/src-Dz2CfBL0.js.map +0 -1
  353. package/dist/sudo-swap-9rH2EgfT.js.map +0 -1
  354. package/dist/super-rare-DHIuWtRw.js.map +0 -1
  355. package/dist/token-Cv7l2ZaL.js.map +0 -1
  356. package/dist/tokenBalances-ibDerNmM.js.map +0 -1
  357. package/dist/tokens-cGxMadd8.js.map +0 -1
  358. package/dist/transaction-DZUW5RHu.js.map +0 -1
  359. package/dist/types-B_-cnkcP.js.map +0 -1
  360. package/dist/utils-BCgNhBFR.js.map +0 -1
  361. package/dist/utils-BfpDVibN.js.map +0 -1
  362. package/dist/utils-BqxcalL2.js.map +0 -1
  363. package/dist/waitForTransactionReceipt-DieAnV52.js.map +0 -1
  364. package/dist/x2y2-45WDooeh.js.map +0 -1
  365. package/dist/zora-CbeBoLvQ.js.map +0 -1
  366. package/src/react/_internal/api/__mocks__/laos.msw.ts +0 -387
  367. package/src/react/_internal/api/__tests__/laos-api.test.ts +0 -756
  368. package/src/react/_internal/api/laos-api.ts +0 -106
  369. package/src/react/hooks/data/collectibles/useBalanceOfCollectible.laos.test.tsx +0 -367
  370. package/src/react/queries/collectibles/__tests__/balanceOfCollectible.laos.test.ts +0 -123
  371. package/src/react/queries/collectibles/__tests__/tokenBalances.laos.test.ts +0 -123
  372. package/src/react/queries/inventory/__tests__/inventory.laos.test.ts +0 -499
  373. package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC1155Checkout.test.tsx +0 -395
  374. package/src/react/ui/modals/BuyModal/hooks/useERC1155Checkout.ts +0 -103
  375. package/src/react/ui/modals/_internal/constants/opensea-currencies.ts +0 -481
  376. /package/dist/{index-6wsMChsg.d.ts → index15.d.ts} +0 -0
  377. /package/dist/{index-CZUtOTjh.d.ts → index18.d.ts} +0 -0
  378. /package/dist/{index-DW3njUfb.d.ts → index20.d.ts} +0 -0
  379. /package/dist/{index-DewGsFz5.d.ts → index22.d.ts} +0 -0
  380. /package/dist/{queries-KOcILNJO.js → queries.js} +0 -0
  381. /package/dist/{wagmi-Bseovd6Q.js → wagmi.js} +0 -0
@@ -18,14 +18,13 @@ export type UseListCollectiblesParams = Optional<
18
18
  * Hook to fetch a list of collectibles with infinite pagination support
19
19
  *
20
20
  * Fetches collectibles from the marketplace with support for filtering, pagination,
21
- * and special handling for shop marketplace types and LAOS721 contracts.
21
+ * and special handling for shop marketplace types.
22
22
  *
23
23
  * @param params - Configuration parameters
24
24
  * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
25
25
  * @param params.collectionAddress - The collection contract address
26
26
  * @param params.side - Order side (listing or bid)
27
27
  * @param params.filter - Optional filtering parameters
28
- * @param params.isLaos721 - Whether the collection is a LAOS721 contract
29
28
  * @param params.marketplaceType - Type of marketplace (shop, etc.)
30
29
  * @param params.query - Optional React Query configuration
31
30
  *
@@ -55,20 +54,6 @@ export type UseListCollectiblesParams = Optional<
55
54
  * }
56
55
  * })
57
56
  * ```
58
- *
59
- * @example
60
- * For LAOS721 collections:
61
- * ```typescript
62
- * const { data } = useListCollectibles({
63
- * chainId: 137,
64
- * collectionAddress: '0x...',
65
- * side: OrderSide.listing,
66
- * isLaos721: true,
67
- * filter: {
68
- * inAccounts: ['0x...']
69
- * }
70
- * })
71
- * ```
72
57
  */
73
58
  export function useListCollectibles(params: UseListCollectiblesParams) {
74
59
  const defaultConfig = useConfig();
@@ -1,11 +1,9 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
- import { ContractType } from '../../../_internal';
3
2
  import {
4
3
  tokenBalancesOptions,
5
4
  type UseTokenBalancesArgs,
6
5
  } from '../../../queries/collectibles/tokenBalances';
7
6
  import { useConfig } from '../../config/useConfig';
8
- import { useMarketplaceConfig } from '../../config/useMarketplaceConfig';
9
7
 
10
8
  /**
11
9
  * Hook to fetch all token balances for a user in a collection
@@ -28,18 +26,11 @@ import { useMarketplaceConfig } from '../../config/useMarketplaceConfig';
28
26
  */
29
27
  export function useTokenBalances(args: UseTokenBalancesArgs) {
30
28
  const config = useConfig();
31
- const { data: marketplaceConfig } = useMarketplaceConfig();
32
-
33
- const collection = marketplaceConfig?.market.collections.find(
34
- (collection) => collection.itemsAddress === args.collectionAddress,
35
- );
36
- const isLaos721 = collection?.contractType === ContractType.LAOS_ERC_721;
37
29
 
38
30
  return useQuery(
39
31
  tokenBalancesOptions(
40
32
  {
41
33
  ...args,
42
- isLaos721,
43
34
  },
44
35
  config,
45
36
  ),
@@ -1,4 +1,6 @@
1
1
  export * from './useCollection';
2
+ export * from './useCollectionActiveListingsCurrencies';
3
+ export * from './useCollectionActiveOffersCurrencies';
2
4
  export * from './useCollectionBalanceDetails';
3
5
  export * from './useCollectionDetails';
4
6
  export * from './useCollectionDetailsPolling';
@@ -0,0 +1,112 @@
1
+ import { renderHook, server, waitFor } from '@test';
2
+ import { HttpResponse, http } from 'msw';
3
+ import { zeroAddress } from 'viem';
4
+ import { describe, expect, it } from 'vitest';
5
+ import {
6
+ mockCurrencies,
7
+ mockMarketplaceEndpoint,
8
+ } from '../../../_internal/api/__mocks__/marketplace.msw';
9
+ import type { UseCollectionActiveListingsCurrenciesParams } from './useCollectionActiveListingsCurrencies';
10
+ import { useCollectionActiveListingsCurrencies } from './useCollectionActiveListingsCurrencies';
11
+
12
+ describe('useCollectionActiveListingsCurrencies', () => {
13
+ const defaultArgs: UseCollectionActiveListingsCurrenciesParams = {
14
+ chainId: 1,
15
+ collectionAddress: zeroAddress,
16
+ };
17
+
18
+ it('should fetch active listings currencies data successfully', async () => {
19
+ const { result } = renderHook(() =>
20
+ useCollectionActiveListingsCurrencies(defaultArgs),
21
+ );
22
+
23
+ // Initially loading
24
+ expect(result.current.isLoading).toBe(true);
25
+ expect(result.current.data).toBeUndefined();
26
+
27
+ // Wait for data to be loaded
28
+ await waitFor(() => {
29
+ expect(result.current.isLoading).toBe(false);
30
+ });
31
+
32
+ // Verify the data matches our mock
33
+ expect(result.current.data).toEqual(mockCurrencies);
34
+ expect(result.current.error).toBeNull();
35
+ });
36
+
37
+ it('should handle error states', async () => {
38
+ // Override the handler for this test to return an error
39
+ server.use(
40
+ http.post(
41
+ mockMarketplaceEndpoint('GetCollectionActiveListingsCurrencies'),
42
+ () => {
43
+ return HttpResponse.json(
44
+ {
45
+ error: { message: 'Failed to fetch active listings currencies' },
46
+ },
47
+ { status: 500 },
48
+ );
49
+ },
50
+ ),
51
+ );
52
+
53
+ const { result } = renderHook(() =>
54
+ useCollectionActiveListingsCurrencies(defaultArgs),
55
+ );
56
+
57
+ await waitFor(() => {
58
+ expect(result.current.isError).toBe(true);
59
+ });
60
+
61
+ expect(result.current.error).toBeDefined();
62
+ expect(result.current.data).toBeUndefined();
63
+ });
64
+
65
+ it('should refetch when args change', async () => {
66
+ const { result, rerender } = renderHook(() =>
67
+ useCollectionActiveListingsCurrencies(defaultArgs),
68
+ );
69
+
70
+ // Wait for initial data
71
+ await waitFor(() => {
72
+ expect(result.current.isLoading).toBe(false);
73
+ });
74
+
75
+ // Change args and rerender
76
+ const newArgs = {
77
+ ...defaultArgs,
78
+ collectionAddress:
79
+ '0x1234567890123456789012345678901234567890' as `0x${string}`,
80
+ };
81
+
82
+ rerender(() => useCollectionActiveListingsCurrencies(newArgs));
83
+
84
+ // Wait for new data
85
+ await waitFor(() => {
86
+ expect(result.current.data).toBeDefined();
87
+ });
88
+
89
+ // Verify that the query was refetched with new args
90
+ expect(result.current.data).toBeDefined();
91
+ expect(result.current.isSuccess).toBe(true);
92
+ });
93
+
94
+ it('should handle undefined query params', async () => {
95
+ const argsWithoutQuery: UseCollectionActiveListingsCurrenciesParams = {
96
+ chainId: 1,
97
+ collectionAddress: zeroAddress,
98
+ query: {},
99
+ };
100
+
101
+ const { result } = renderHook(() =>
102
+ useCollectionActiveListingsCurrencies(argsWithoutQuery),
103
+ );
104
+
105
+ await waitFor(() => {
106
+ expect(result.current.isLoading).toBe(false);
107
+ });
108
+
109
+ expect(result.current.data).toBeDefined();
110
+ expect(result.current.error).toBeNull();
111
+ });
112
+ });
@@ -0,0 +1,74 @@
1
+ 'use client';
2
+
3
+ import { useQuery } from '@tanstack/react-query';
4
+ import type { Optional } from '../../../_internal';
5
+ import {
6
+ type CollectionActiveListingsCurrenciesQueryOptions,
7
+ collectionActiveListingsCurrenciesQueryOptions,
8
+ type FetchCollectionActiveListingsCurrenciesParams,
9
+ } from '../../../queries/collections/activeListingsCurrencies';
10
+ import { useConfig } from '../../config/useConfig';
11
+
12
+ export type UseCollectionActiveListingsCurrenciesParams = Optional<
13
+ CollectionActiveListingsCurrenciesQueryOptions,
14
+ 'config'
15
+ >;
16
+
17
+ /**
18
+ * Hook to fetch the active listings currencies for a collection
19
+ *
20
+ * Retrieves all currencies that are currently being used in active listings
21
+ * for a specific collection from the marketplace.
22
+ *
23
+ * @param params - Configuration parameters
24
+ * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
25
+ * @param params.collectionAddress - The collection contract address
26
+ * @param params.query - Optional React Query configuration
27
+ *
28
+ * @returns Query result containing the array of currencies used in active listings
29
+ *
30
+ * @example
31
+ * Basic usage:
32
+ * ```typescript
33
+ * const { data, isLoading } = useCollectionActiveListingsCurrencies({
34
+ * chainId: 137,
35
+ * collectionAddress: '0x...'
36
+ * })
37
+ * ```
38
+ *
39
+ * @example
40
+ * With custom query options:
41
+ * ```typescript
42
+ * const { data, isLoading } = useCollectionActiveListingsCurrencies({
43
+ * chainId: 1,
44
+ * collectionAddress: '0x...',
45
+ * query: {
46
+ * refetchInterval: 30000,
47
+ * enabled: hasCollectionAddress
48
+ * }
49
+ * })
50
+ * ```
51
+ */
52
+ export function useCollectionActiveListingsCurrencies(
53
+ params: UseCollectionActiveListingsCurrenciesParams,
54
+ ) {
55
+ const defaultConfig = useConfig();
56
+
57
+ const { config = defaultConfig, ...rest } = params;
58
+
59
+ const queryOptions = collectionActiveListingsCurrenciesQueryOptions({
60
+ config,
61
+ ...rest,
62
+ });
63
+
64
+ return useQuery({
65
+ ...queryOptions,
66
+ });
67
+ }
68
+
69
+ export { collectionActiveListingsCurrenciesQueryOptions };
70
+
71
+ export type {
72
+ FetchCollectionActiveListingsCurrenciesParams,
73
+ CollectionActiveListingsCurrenciesQueryOptions,
74
+ };
@@ -0,0 +1,110 @@
1
+ import { renderHook, server, waitFor } from '@test';
2
+ import { HttpResponse, http } from 'msw';
3
+ import { zeroAddress } from 'viem';
4
+ import { describe, expect, it } from 'vitest';
5
+ import {
6
+ mockCurrencies,
7
+ mockMarketplaceEndpoint,
8
+ } from '../../../_internal/api/__mocks__/marketplace.msw';
9
+ import type { UseCollectionActiveOffersCurrenciesParams } from './useCollectionActiveOffersCurrencies';
10
+ import { useCollectionActiveOffersCurrencies } from './useCollectionActiveOffersCurrencies';
11
+
12
+ describe('useCollectionActiveOffersCurrencies', () => {
13
+ const defaultArgs: UseCollectionActiveOffersCurrenciesParams = {
14
+ chainId: 1,
15
+ collectionAddress: zeroAddress,
16
+ };
17
+
18
+ it('should fetch active offers currencies data successfully', async () => {
19
+ const { result } = renderHook(() =>
20
+ useCollectionActiveOffersCurrencies(defaultArgs),
21
+ );
22
+
23
+ // Initially loading
24
+ expect(result.current.isLoading).toBe(true);
25
+ expect(result.current.data).toBeUndefined();
26
+
27
+ // Wait for data to be loaded
28
+ await waitFor(() => {
29
+ expect(result.current.isLoading).toBe(false);
30
+ });
31
+
32
+ // Verify the data matches our mock
33
+ expect(result.current.data).toEqual(mockCurrencies);
34
+ expect(result.current.error).toBeNull();
35
+ });
36
+
37
+ it('should handle error states', async () => {
38
+ // Override the handler for this test to return an error
39
+ server.use(
40
+ http.post(
41
+ mockMarketplaceEndpoint('GetCollectionActiveOffersCurrencies'),
42
+ () => {
43
+ return HttpResponse.json(
44
+ { error: { message: 'Failed to fetch active offers currencies' } },
45
+ { status: 500 },
46
+ );
47
+ },
48
+ ),
49
+ );
50
+
51
+ const { result } = renderHook(() =>
52
+ useCollectionActiveOffersCurrencies(defaultArgs),
53
+ );
54
+
55
+ await waitFor(() => {
56
+ expect(result.current.isError).toBe(true);
57
+ });
58
+
59
+ expect(result.current.error).toBeDefined();
60
+ expect(result.current.data).toBeUndefined();
61
+ });
62
+
63
+ it('should refetch when args change', async () => {
64
+ const { result, rerender } = renderHook(() =>
65
+ useCollectionActiveOffersCurrencies(defaultArgs),
66
+ );
67
+
68
+ // Wait for initial data
69
+ await waitFor(() => {
70
+ expect(result.current.isLoading).toBe(false);
71
+ });
72
+
73
+ // Change args and rerender
74
+ const newArgs = {
75
+ ...defaultArgs,
76
+ collectionAddress:
77
+ '0x1234567890123456789012345678901234567890' as `0x${string}`,
78
+ };
79
+
80
+ rerender(() => useCollectionActiveOffersCurrencies(newArgs));
81
+
82
+ // Wait for new data
83
+ await waitFor(() => {
84
+ expect(result.current.data).toBeDefined();
85
+ });
86
+
87
+ // Verify that the query was refetched with new args
88
+ expect(result.current.data).toBeDefined();
89
+ expect(result.current.isSuccess).toBe(true);
90
+ });
91
+
92
+ it('should handle undefined query params', async () => {
93
+ const argsWithoutQuery: UseCollectionActiveOffersCurrenciesParams = {
94
+ chainId: 1,
95
+ collectionAddress: zeroAddress,
96
+ query: {},
97
+ };
98
+
99
+ const { result } = renderHook(() =>
100
+ useCollectionActiveOffersCurrencies(argsWithoutQuery),
101
+ );
102
+
103
+ await waitFor(() => {
104
+ expect(result.current.isLoading).toBe(false);
105
+ });
106
+
107
+ expect(result.current.data).toBeDefined();
108
+ expect(result.current.error).toBeNull();
109
+ });
110
+ });
@@ -0,0 +1,74 @@
1
+ 'use client';
2
+
3
+ import { useQuery } from '@tanstack/react-query';
4
+ import type { Optional } from '../../../_internal';
5
+ import {
6
+ type CollectionActiveOffersCurrenciesQueryOptions,
7
+ collectionActiveOffersCurrenciesQueryOptions,
8
+ type FetchCollectionActiveOffersCurrenciesParams,
9
+ } from '../../../queries/collections/activeOffersCurrencies';
10
+ import { useConfig } from '../../config/useConfig';
11
+
12
+ export type UseCollectionActiveOffersCurrenciesParams = Optional<
13
+ CollectionActiveOffersCurrenciesQueryOptions,
14
+ 'config'
15
+ >;
16
+
17
+ /**
18
+ * Hook to fetch the active offers currencies for a collection
19
+ *
20
+ * Retrieves all currencies that are currently being used in active offers
21
+ * for a specific collection from the marketplace.
22
+ *
23
+ * @param params - Configuration parameters
24
+ * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
25
+ * @param params.collectionAddress - The collection contract address
26
+ * @param params.query - Optional React Query configuration
27
+ *
28
+ * @returns Query result containing the array of currencies used in active offers
29
+ *
30
+ * @example
31
+ * Basic usage:
32
+ * ```typescript
33
+ * const { data, isLoading } = useCollectionActiveOffersCurrencies({
34
+ * chainId: 137,
35
+ * collectionAddress: '0x...'
36
+ * })
37
+ * ```
38
+ *
39
+ * @example
40
+ * With custom query options:
41
+ * ```typescript
42
+ * const { data, isLoading } = useCollectionActiveOffersCurrencies({
43
+ * chainId: 1,
44
+ * collectionAddress: '0x...',
45
+ * query: {
46
+ * refetchInterval: 30000,
47
+ * enabled: hasCollectionAddress
48
+ * }
49
+ * })
50
+ * ```
51
+ */
52
+ export function useCollectionActiveOffersCurrencies(
53
+ params: UseCollectionActiveOffersCurrenciesParams,
54
+ ) {
55
+ const defaultConfig = useConfig();
56
+
57
+ const { config = defaultConfig, ...rest } = params;
58
+
59
+ const queryOptions = collectionActiveOffersCurrenciesQueryOptions({
60
+ config,
61
+ ...rest,
62
+ });
63
+
64
+ return useQuery({
65
+ ...queryOptions,
66
+ });
67
+ }
68
+
69
+ export { collectionActiveOffersCurrenciesQueryOptions };
70
+
71
+ export type {
72
+ FetchCollectionActiveOffersCurrenciesParams,
73
+ CollectionActiveOffersCurrenciesQueryOptions,
74
+ };
@@ -1,21 +1,12 @@
1
1
  import { useQuery } from '@tanstack/react-query';
2
- import { ContractType } from '../../../_internal';
3
2
  import {
4
3
  inventoryOptions,
5
4
  type UseInventoryArgs,
6
5
  } from '../../../queries/inventory/inventory';
7
6
  import { useConfig } from '../../config/useConfig';
8
- import { useMarketplaceConfig } from '../../config/useMarketplaceConfig';
9
7
 
10
8
  export function useInventory(args: UseInventoryArgs) {
11
9
  const config = useConfig();
12
- const { data: marketplaceConfig } = useMarketplaceConfig();
13
10
 
14
- const isLaos721 =
15
- marketplaceConfig?.market?.collections?.find(
16
- (c) =>
17
- c.itemsAddress === args.collectionAddress && c.chainId === args.chainId,
18
- )?.contractType === ContractType.LAOS_ERC_721;
19
-
20
- return useQuery(inventoryOptions({ ...args, isLaos721 }, config));
11
+ return useQuery(inventoryOptions({ ...args }, config));
21
12
  }
@@ -49,7 +49,30 @@ describe('useMarketCurrencies', () => {
49
49
  );
50
50
  });
51
51
 
52
- it('should filter currencies by collection address', async () => {
52
+ it('should filter currencies by collection address for non-OpenSea collections', async () => {
53
+ const args = {
54
+ ...defaultArgs,
55
+ collectionAddress: mockConfig.marketCollections[0]
56
+ .itemsAddress as Address,
57
+ } satisfies Parameters<typeof useMarketCurrencies>[0];
58
+
59
+ const { result } = renderHook(() => useMarketCurrencies(args));
60
+
61
+ await waitFor(() => {
62
+ expect(result.current.isLoading).toBe(false);
63
+ });
64
+
65
+ const currencyAddresses = result.current.data?.map(
66
+ (c) => c.contractAddress,
67
+ );
68
+
69
+ // For non-OpenSea collections, currencies should be filtered by currencyOptions
70
+ expect(currencyAddresses).toEqual(
71
+ mockConfig.marketCollections[0].currencyOptions,
72
+ );
73
+ });
74
+
75
+ it('should not filter currencies by collection address for OpenSea collections', async () => {
53
76
  const args = {
54
77
  ...defaultArgs,
55
78
  collectionAddress: mockConfig.marketCollections[1]
@@ -65,8 +88,12 @@ describe('useMarketCurrencies', () => {
65
88
  const currencyAddresses = result.current.data?.map(
66
89
  (c) => c.contractAddress,
67
90
  );
91
+
92
+ // For OpenSea collections, currencies are not filtered by currencyOptions
93
+ // Instead, all currencies are returned and filtering happens at the UI level
94
+ // based on openseaListing/openseaOffer flags
68
95
  expect(currencyAddresses).toEqual(
69
- mockConfig.marketCollections[1].currencyOptions,
96
+ mockCurrencies.map((c) => c.contractAddress),
70
97
  );
71
98
  });
72
99
 
@@ -161,6 +188,8 @@ describe('useMarketCurrencies', () => {
161
188
  "imageUrl": "https://example.com/usdc.png",
162
189
  "name": "USD Coin",
163
190
  "nativeCurrency": false,
191
+ "openseaListing": true,
192
+ "openseaOffer": true,
164
193
  "status": "active",
165
194
  "symbol": "USDC",
166
195
  "updatedAt": "2025-03-16T13:04:16.098Z",
@@ -4,3 +4,4 @@ export * from './useGetCountOfPrimarySaleItems';
4
4
  export * from './useList721ShopCardData';
5
5
  export * from './useList1155ShopCardData';
6
6
  export * from './useListPrimarySaleItems';
7
+ export * from './usePrimarySaleItem';
@@ -0,0 +1,71 @@
1
+ 'use client';
2
+
3
+ import { useQuery } from '@tanstack/react-query';
4
+ import type { Optional } from '../../../_internal';
5
+ import {
6
+ type FetchPrimarySaleItemParams,
7
+ type PrimarySaleItemQueryOptions,
8
+ primarySaleItemQueryOptions,
9
+ } from '../../../queries/primary-sales/primarySaleItem';
10
+ import { useConfig } from '../../config/useConfig';
11
+
12
+ export type UsePrimarySaleItemParams = Optional<
13
+ PrimarySaleItemQueryOptions,
14
+ 'config'
15
+ >;
16
+
17
+ /**
18
+ * Hook to fetch a single primary sale item
19
+ *
20
+ * Retrieves details for a specific primary sale item from a primary sale contract.
21
+ *
22
+ * @param params - Configuration parameters
23
+ * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
24
+ * @param params.primarySaleContractAddress - The primary sale contract address
25
+ * @param params.tokenId - The token ID of the primary sale item
26
+ * @param params.query - Optional React Query configuration
27
+ *
28
+ * @returns Query result containing the primary sale item data
29
+ *
30
+ * @example
31
+ * Basic usage:
32
+ * ```typescript
33
+ * const { data: item, isLoading } = usePrimarySaleItem({
34
+ * chainId: 137,
35
+ * primarySaleContractAddress: '0x...',
36
+ * tokenId: '1',
37
+ * })
38
+ * ```
39
+ *
40
+ * @example
41
+ * With custom query options:
42
+ * ```typescript
43
+ * const { data } = usePrimarySaleItem({
44
+ * chainId: 1,
45
+ * primarySaleContractAddress: '0x...',
46
+ * tokenId: '42',
47
+ * query: {
48
+ * enabled: Boolean(primarySaleContractAddress && tokenId),
49
+ * staleTime: 30_000
50
+ * }
51
+ * })
52
+ * ```
53
+ */
54
+ export function usePrimarySaleItem(params: UsePrimarySaleItemParams) {
55
+ const defaultConfig = useConfig();
56
+
57
+ const { config = defaultConfig, ...rest } = params;
58
+
59
+ const queryOptions = primarySaleItemQueryOptions({
60
+ config,
61
+ ...rest,
62
+ });
63
+
64
+ return useQuery({
65
+ ...queryOptions,
66
+ });
67
+ }
68
+
69
+ export { primarySaleItemQueryOptions };
70
+
71
+ export type { FetchPrimarySaleItemParams, PrimarySaleItemQueryOptions };
@@ -1,9 +1,7 @@
1
1
  import { useInfiniteQuery } from '@tanstack/react-query';
2
- import { ContractType } from '../../../_internal';
3
2
  import type { UseListBalancesArgs } from '../../../queries/tokens/listBalances';
4
3
  import { listBalancesOptions } from '../../../queries/tokens/listBalances';
5
4
  import { useConfig } from '../../config/useConfig';
6
- import { useMarketplaceConfig } from '../../config/useMarketplaceConfig';
7
5
 
8
6
  /**
9
7
  * Hook to fetch a list of token balances with pagination support
@@ -26,13 +24,6 @@ import { useMarketplaceConfig } from '../../config/useMarketplaceConfig';
26
24
  */
27
25
  export function useListBalances(args: UseListBalancesArgs) {
28
26
  const config = useConfig();
29
- const { data: marketplaceConfig } = useMarketplaceConfig();
30
27
 
31
- const isLaos721 =
32
- marketplaceConfig?.market?.collections?.find(
33
- (c) =>
34
- c.itemsAddress === args.contractAddress && c.chainId === args.chainId,
35
- )?.contractType === ContractType.LAOS_ERC_721;
36
-
37
- return useInfiniteQuery(listBalancesOptions({ ...args, isLaos721 }, config));
28
+ return useInfiniteQuery(listBalancesOptions({ ...args }, config));
38
29
  }
@@ -15,15 +15,13 @@ export type UseTokenSuppliesParams = Optional<
15
15
  >;
16
16
 
17
17
  /**
18
- * Hook to fetch token supplies from the indexer or LAOS API
18
+ * Hook to fetch token supplies from the indexer
19
19
  *
20
20
  * Retrieves supply information for tokens from a specific collection.
21
- * Automatically chooses between indexer and LAOS APIs based on the isLaos721 flag.
22
21
  *
23
22
  * @param params - Configuration parameters
24
23
  * @param params.chainId - The chain ID (must be number, e.g., 1 for Ethereum, 137 for Polygon)
25
24
  * @param params.collectionAddress - The collection contract address
26
- * @param params.isLaos721 - Whether to use LAOS API instead of indexer
27
25
  * @param params.includeMetadata - Whether to include token metadata
28
26
  * @param params.page - Pagination options
29
27
  * @param params.query - Optional React Query configuration
@@ -40,16 +38,6 @@ export type UseTokenSuppliesParams = Optional<
40
38
  * ```
41
39
  *
42
40
  * @example
43
- * With LAOS API:
44
- * ```typescript
45
- * const { data, isLoading } = useTokenSupplies({
46
- * chainId: 1,
47
- * collectionAddress: '0x...',
48
- * isLaos721: true
49
- * })
50
- * ```
51
- *
52
- * @example
53
41
  * With conditional fetching:
54
42
  * ```typescript
55
43
  * const { data, isLoading } = useTokenSupplies({
@@ -9,6 +9,7 @@ import {
9
9
  } from '../../_internal/api/__mocks__/marketplace.msw';
10
10
  import {
11
11
  ContractType,
12
+ OfferType,
12
13
  OrderbookKind,
13
14
  StepType,
14
15
  } from '../../_internal/api/marketplace.gen';
@@ -33,6 +34,7 @@ describe('useGenerateOfferTransaction', () => {
33
34
  orderbook: OrderbookKind.sequence_marketplace_v2,
34
35
  offer: mockOffer,
35
36
  additionalFees: [],
37
+ offerType: OfferType.item,
36
38
  };
37
39
 
38
40
  const defaultArgs = {