@0xsequence/marketplace-sdk 0.8.12 → 0.9.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 (327) hide show
  1. package/CHANGELOG.md +91 -23
  2. package/dist/{CartIcon-Bll1rbxv.js → CalendarIcon-DbQ7Vxcw.js} +38 -38
  3. package/dist/CalendarIcon-DbQ7Vxcw.js.map +1 -0
  4. package/dist/{types-BIJOaL4j.d.ts → CollectibleCard-C8Ae64Ab.d.ts} +7 -4
  5. package/dist/{_internal-69NEWNUE.js → _internal-BgWcRIak.js} +2 -14
  6. package/dist/_internal-BgWcRIak.js.map +1 -0
  7. package/dist/{api-1KFxYh7o.js → api-DTIan01C.js} +73 -64
  8. package/dist/api-DTIan01C.js.map +1 -0
  9. package/dist/{builder-api-BQvzykoU.js → builder-api-BFuZNOaN.js} +2 -2
  10. package/dist/{builder-api-BQvzykoU.js.map → builder-api-BFuZNOaN.js.map} +1 -1
  11. package/dist/{builder-api-DoK3907S.d.ts → builder-api-C_zj5mr3.d.ts} +2 -2
  12. package/dist/{builder.gen-CxP9NT1p.js → builder.gen-B9wR2nvF.js} +1 -1
  13. package/dist/builder.gen-B9wR2nvF.js.map +1 -0
  14. package/dist/{index-Cl7PQOGu.d.ts → index-21LE7OhL.d.ts} +24 -24
  15. package/dist/{index-1bezgsFq.d.ts → index-BL9RUSEK.d.ts} +929 -255
  16. package/dist/index-BQsgAvtX.d.ts +2938 -0
  17. package/dist/{index-DafWjEb4.d.ts → index-BUVWziLP.d.ts} +9 -14
  18. package/dist/{index-BIMIpDiI.d.ts → index-ByznONYE.d.ts} +98 -99
  19. package/dist/{index-BjIwVzc4.d.ts → index-CLy8y5hm.d.ts} +238 -238
  20. package/dist/{index-CN8puQQJ.d.ts → index-COt10OgI.d.ts} +4 -4
  21. package/dist/index-DPNWNa7t.d.ts +414 -0
  22. package/dist/{index-BEYefG1G.d.ts → index-DaE5ZNHb.d.ts} +2 -2
  23. package/dist/{index-BfH21xmk.d.ts → index-DsfCs3-x.d.ts} +46 -41
  24. package/dist/{index-4-kfOFdx.d.ts → index-dUb6wb4Y.d.ts} +5 -5
  25. package/dist/index.css +14 -1
  26. package/dist/index.d.ts +7 -7
  27. package/dist/index.js +7 -7
  28. package/dist/marketplace-logos-CSeGcPW4.js.map +1 -1
  29. package/dist/{marketplace.gen-Dqk8vRmD.js → marketplace.gen-BSDIX7NZ.js} +12 -3
  30. package/dist/marketplace.gen-BSDIX7NZ.js.map +1 -0
  31. package/dist/{marketplaceConfig-D2MYFqll.js → marketplaceConfig-C6X1SUik.js} +2 -2
  32. package/dist/marketplaceConfig-C6X1SUik.js.map +1 -0
  33. package/dist/{sdk-config-DJzxVPld.d.ts → new-marketplace-types-Bfis0U4J.d.ts} +65 -54
  34. package/dist/options-B4QN7Xou.js +0 -0
  35. package/dist/{primary-sale-Cw95phYC.js → primary-sale-C55ALnfQ.js} +279 -279
  36. package/dist/primary-sale-C55ALnfQ.js.map +1 -0
  37. package/dist/{queries-DPvwtnO7.js → queries-CUU65uYZ.js} +247 -134
  38. package/dist/queries-CUU65uYZ.js.map +1 -0
  39. package/dist/react/_internal/api/index.d.ts +4 -4
  40. package/dist/react/_internal/api/index.js +5 -5
  41. package/dist/react/_internal/databeat/index.d.ts +3 -3
  42. package/dist/react/_internal/databeat/index.js +15 -15
  43. package/dist/react/_internal/index.d.ts +7 -7
  44. package/dist/react/_internal/index.js +7 -7
  45. package/dist/react/_internal/wagmi/index.d.ts +3 -3
  46. package/dist/react/_internal/wagmi/index.js +2 -2
  47. package/dist/react/hooks/index.d.ts +15 -14
  48. package/dist/react/hooks/index.js +16 -16
  49. package/dist/react/hooks/options/index.d.ts +4 -5
  50. package/dist/react/hooks/options/index.js +9 -9
  51. package/dist/react/index.d.ts +15 -37
  52. package/dist/react/index.js +16 -16
  53. package/dist/react/queries/index.d.ts +8 -8
  54. package/dist/react/queries/index.js +12 -12
  55. package/dist/react/ssr/index.d.ts +6 -6
  56. package/dist/react/ssr/index.js +7 -7
  57. package/dist/react/ssr/index.js.map +1 -1
  58. package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +8 -9
  59. package/dist/react/ui/components/marketplace-collectible-card/index.js +15 -15
  60. package/dist/react/ui/components/marketplace-collectible-card/utils/index.d.ts +7 -7
  61. package/dist/react/ui/components/marketplace-collectible-card/utils/index.js +7 -7
  62. package/dist/react/ui/components/marketplace-logos/index.d.ts +21 -21
  63. package/dist/react/ui/icons/index.js +6 -6
  64. package/dist/react/ui/index.d.ts +8 -9
  65. package/dist/react/ui/index.js +15 -15
  66. package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +5 -5
  67. package/dist/react/ui/modals/_internal/components/actionModal/index.js +15 -15
  68. package/dist/{react-BG7o4PId.js → react-DAIicQPT.js} +7422 -6835
  69. package/dist/react-DAIicQPT.js.map +1 -0
  70. package/dist/{token-CO5llIla.js → token-Da4TdyUk.js} +1540 -761
  71. package/dist/token-Da4TdyUk.js.map +1 -0
  72. package/dist/types/index.d.ts +2 -2
  73. package/dist/types/index.js +2 -2
  74. package/dist/types-DwWE6xOF.js.map +1 -1
  75. package/dist/utils/abi/index.d.ts +3 -3
  76. package/dist/utils/abi/index.js +3 -3
  77. package/dist/utils/abi/primary-sale/index.d.ts +1 -1
  78. package/dist/utils/abi/primary-sale/index.js +1 -1
  79. package/dist/utils/abi/token/index.d.ts +2 -2
  80. package/dist/utils/abi/token/index.js +2 -2
  81. package/dist/utils/index.d.ts +6 -6
  82. package/dist/utils/index.js +6 -6
  83. package/dist/{utils-Cat9_pef.js → utils-BPYfgDSL.js} +2 -2
  84. package/dist/{utils-Cat9_pef.js.map → utils-BPYfgDSL.js.map} +1 -1
  85. package/dist/{utils-BFdxaToy.js → utils-CW2NA5KG.js} +87 -87
  86. package/dist/utils-CW2NA5KG.js.map +1 -0
  87. package/dist/{wagmi-DRctYEk6.js → wagmi-CDzEQbfk.js} +19 -12
  88. package/dist/wagmi-CDzEQbfk.js.map +1 -0
  89. package/eslint/use-client.js +0 -6
  90. package/package.json +30 -31
  91. package/src/index.ts +1 -1
  92. package/src/react/_internal/api/__mocks__/builder.msw.ts +5 -3
  93. package/src/react/_internal/api/__mocks__/indexer.msw.ts +8 -8
  94. package/src/react/_internal/api/__mocks__/marketplace.msw.ts +4 -6
  95. package/src/react/_internal/api/__mocks__/metadata.msw.ts +1 -1
  96. package/src/react/_internal/api/builder.gen.ts +6 -6
  97. package/src/react/_internal/api/get-query-client.ts +2 -2
  98. package/src/react/_internal/api/index.ts +2 -2
  99. package/src/react/_internal/api/marketplace.gen.ts +42 -4
  100. package/src/react/_internal/api/query-keys.ts +13 -6
  101. package/src/react/_internal/api/services.ts +28 -31
  102. package/src/react/_internal/index.ts +1 -1
  103. package/src/react/_internal/types.ts +10 -23
  104. package/src/react/_internal/utils.ts +1 -2
  105. package/src/react/_internal/wagmi/create-config.ts +20 -11
  106. package/src/react/_internal/wagmi/get-connectors.ts +9 -7
  107. package/src/react/_internal/wallet/__tests__/wallet.test.ts +1 -1
  108. package/src/react/_internal/wallet/wallet.ts +18 -18
  109. package/src/react/hooks/__tests__/__snapshots__/useListCollections.test.tsx.snap +20 -0
  110. package/src/react/hooks/__tests__/__snapshots__/useMarketplaceConfig.test.tsx.snap +12 -2
  111. package/src/react/hooks/__tests__/useAutoSelectFeeOption.test.tsx +1 -1
  112. package/src/react/hooks/__tests__/useBalanceOfCollectible.test.tsx +1 -1
  113. package/src/react/hooks/__tests__/useCancelOrder.test.tsx +4 -4
  114. package/src/react/hooks/__tests__/useCancelTransactionSteps.test.tsx +1 -1
  115. package/src/react/hooks/__tests__/useCollectible.test.tsx +14 -16
  116. package/src/react/hooks/__tests__/useCollection.test.tsx +4 -4
  117. package/src/react/hooks/__tests__/useCollectionBalanceDetails.test.tsx +1 -27
  118. package/src/react/hooks/__tests__/useCollectionDetails.test.tsx +1 -1
  119. package/src/react/hooks/__tests__/useCollectionDetailsPolling.test.tsx +1 -1
  120. package/src/react/hooks/__tests__/useComparePrices.test.tsx +7 -6
  121. package/src/react/hooks/__tests__/useConvertPriceToUSD.test.tsx +1 -1
  122. package/src/react/hooks/__tests__/useCountListingsForCollectible.test.tsx +2 -2
  123. package/src/react/hooks/__tests__/useCountOfCollectables.test.tsx +5 -5
  124. package/src/react/hooks/__tests__/useCountOffersForCollectible.test.tsx +2 -2
  125. package/src/react/hooks/__tests__/useCurrency.test.tsx +5 -3
  126. package/src/react/hooks/__tests__/useFilters.test.tsx +1 -1
  127. package/src/react/hooks/__tests__/useFloorOrder.test.tsx +4 -4
  128. package/src/react/hooks/__tests__/useGenerateCancelTransaction.test.tsx +3 -3
  129. package/src/react/hooks/__tests__/useGenerateListingTransaction.test.tsx +1 -1
  130. package/src/react/hooks/__tests__/useGenerateOfferTransaction.test.tsx +1 -1
  131. package/src/react/hooks/__tests__/useGenerateSellTransaction.test.tsx +1 -1
  132. package/src/react/hooks/__tests__/useGetTokenSuppliesMap.test.tsx +104 -0
  133. package/src/react/hooks/__tests__/useHighestOffer.test.tsx +4 -4
  134. package/src/react/hooks/__tests__/useInventory.test.tsx +1 -1
  135. package/src/react/hooks/__tests__/useListCollectibleActivities.test.tsx +11 -13
  136. package/src/react/hooks/__tests__/useListCollectibles.test.tsx +5 -5
  137. package/src/react/hooks/__tests__/useListCollectiblesPaginated.test.tsx +10 -15
  138. package/src/react/hooks/__tests__/useListCollectionActivities.test.tsx +13 -15
  139. package/src/react/hooks/__tests__/useListCollections.test.tsx +3 -3
  140. package/src/react/hooks/__tests__/useListListingsForCollectible.test.tsx +3 -2
  141. package/src/react/hooks/__tests__/useListMarketCardData.test.tsx +301 -0
  142. package/src/react/hooks/__tests__/useListOffersForCollectible.test.tsx +1 -1
  143. package/src/react/hooks/__tests__/useListTokenMetadata.test.tsx +111 -0
  144. package/src/react/hooks/__tests__/useLowestListing.test.tsx +1 -1
  145. package/src/react/hooks/__tests__/useMarketCurrencies.test.tsx +1 -1
  146. package/src/react/hooks/__tests__/useRoyalty.test.tsx +0 -23
  147. package/src/react/hooks/index.ts +27 -24
  148. package/src/react/hooks/options/index.ts +0 -1
  149. package/src/react/hooks/useAutoSelectFeeOption.tsx +1 -1
  150. package/src/react/hooks/useBalanceOfCollectible.tsx +1 -1
  151. package/src/react/hooks/useCancelTransactionSteps.tsx +2 -2
  152. package/src/react/hooks/useCheckoutOptionsSalesContract.tsx +1 -1
  153. package/src/react/hooks/useCollectible.tsx +64 -49
  154. package/src/react/hooks/useCollection.tsx +60 -11
  155. package/src/react/hooks/useCollectionBalanceDetails.tsx +20 -27
  156. package/src/react/hooks/useCollectionDetails.ts +69 -0
  157. package/src/react/hooks/useCollectionDetailsPolling.tsx +10 -2
  158. package/src/react/hooks/useComparePrices.tsx +18 -21
  159. package/src/react/hooks/useConvertPriceToUSD.tsx +20 -37
  160. package/src/react/hooks/useCountListingsForCollectible.tsx +64 -53
  161. package/src/react/hooks/useCountOfCollectables.tsx +60 -69
  162. package/src/react/hooks/useCountOfPrimarySaleItems.tsx +13 -0
  163. package/src/react/hooks/useCountOffersForCollectible.tsx +64 -53
  164. package/src/react/hooks/useCurrency.tsx +56 -64
  165. package/src/react/hooks/useFilterState.tsx +1 -2
  166. package/src/react/hooks/useFloorOrder.tsx +65 -40
  167. package/src/react/hooks/useGenerateCancelTransaction.tsx +5 -10
  168. package/src/react/hooks/useGenerateListingTransaction.tsx +1 -1
  169. package/src/react/hooks/useGenerateOfferTransaction.tsx +1 -1
  170. package/src/react/hooks/useGenerateSellTransaction.tsx +5 -10
  171. package/src/react/hooks/useGetReceiptFromHash.tsx +32 -3
  172. package/src/react/hooks/{useGetTokenSuppliesMap.ts → useGetTokenRanges.tsx} +15 -17
  173. package/src/react/hooks/useGetTokenSuppliesMap.tsx +73 -0
  174. package/src/react/hooks/useHighestOffer.tsx +68 -4
  175. package/src/react/hooks/useInventory.tsx +1 -1
  176. package/src/react/hooks/useList1155ShopCardData.tsx +55 -82
  177. package/src/react/hooks/useList721ShopCardData.tsx +93 -63
  178. package/src/react/hooks/useListBalances.tsx +1 -1
  179. package/src/react/hooks/useListCollectibleActivities.tsx +89 -50
  180. package/src/react/hooks/useListCollectibles.tsx +81 -16
  181. package/src/react/hooks/useListCollectiblesPaginated.tsx +96 -66
  182. package/src/react/hooks/useListCollectionActivities.tsx +84 -50
  183. package/src/react/hooks/useListCollections.tsx +72 -18
  184. package/src/react/hooks/useListListingsForCollectible.tsx +90 -50
  185. package/src/react/hooks/useListMarketCardData.tsx +1 -1
  186. package/src/react/hooks/useListOffersForCollectible.tsx +9 -14
  187. package/src/react/hooks/useListPrimarySaleItems.ts +72 -12
  188. package/src/react/hooks/useListShopCardData.tsx +70 -0
  189. package/src/react/hooks/useListTokenMetadata.tsx +73 -0
  190. package/src/react/hooks/useLowestListing.tsx +68 -4
  191. package/src/react/hooks/useMarketCurrencies.tsx +62 -5
  192. package/src/react/hooks/useRoyalty.tsx +57 -13
  193. package/src/react/hooks/useShopCollectibleSaleData.tsx +349 -0
  194. package/src/react/hooks/useTransferTokens.tsx +1 -1
  195. package/src/react/hooks/util/optimisticCancelUpdates.ts +5 -7
  196. package/src/react/index.ts +5 -3
  197. package/src/react/queries/balanceOfCollectible.ts +1 -1
  198. package/src/react/queries/collectible.ts +66 -0
  199. package/src/react/queries/collection.ts +55 -0
  200. package/src/react/queries/collectionDetails.ts +64 -0
  201. package/src/react/queries/countListingsForCollectible.ts +73 -0
  202. package/src/react/queries/countOfCollectables.ts +83 -0
  203. package/src/react/queries/countOfPrimarySaleItems.ts +48 -0
  204. package/src/react/queries/countOffersForCollectible.ts +73 -0
  205. package/src/react/queries/currency.ts +83 -0
  206. package/src/react/queries/floorOrder.ts +63 -0
  207. package/src/react/queries/getTokenSuppliesMap.ts +77 -0
  208. package/src/react/queries/highestOffer.ts +46 -40
  209. package/src/react/queries/index.ts +7 -4
  210. package/src/react/queries/inventory.ts +4 -4
  211. package/src/react/queries/listBalances.ts +1 -1
  212. package/src/react/queries/listCollectibleActivities.ts +97 -0
  213. package/src/react/queries/listCollectibles.ts +67 -50
  214. package/src/react/queries/listCollectiblesPaginated.ts +87 -0
  215. package/src/react/queries/listCollectionActivities.ts +95 -0
  216. package/src/react/queries/listCollections.ts +47 -8
  217. package/src/react/queries/listListingsForCollectible.ts +82 -0
  218. package/src/react/queries/listTokenMetadata.ts +47 -23
  219. package/src/react/queries/lowestListing.ts +46 -31
  220. package/src/react/queries/marketCurrencies.ts +42 -29
  221. package/src/react/queries/marketplaceConfig.ts +3 -3
  222. package/src/react/ssr/__tests__/__snapshots__/create-ssr-client.test.ts.snap +12 -2
  223. package/src/react/ssr/create-ssr-client.ts +1 -1
  224. package/src/react/types/query.ts +34 -0
  225. package/src/react/ui/components/ModelViewer.tsx +1 -1
  226. package/src/react/ui/components/_internals/action-button/__tests__/useActionButtonLogic.test.tsx +14 -8
  227. package/src/react/ui/components/_internals/action-button/hooks/useActionButtonLogic.ts +12 -15
  228. package/src/react/ui/components/_internals/action-button/store.ts +46 -18
  229. package/src/react/ui/components/marketplace-collectible-card/CollectibleCard.tsx +1 -1
  230. package/src/react/ui/components/marketplace-collectible-card/Footer.tsx +1 -1
  231. package/src/react/ui/components/marketplace-collectible-card/components/BaseCard.tsx +3 -0
  232. package/src/react/ui/components/marketplace-collectible-card/index.ts +1 -1
  233. package/src/react/ui/components/marketplace-collectible-card/types.ts +7 -4
  234. package/src/react/ui/components/marketplace-collectible-card/variants/MarketCard.tsx +3 -2
  235. package/src/react/ui/components/marketplace-collectible-card/variants/ShopCard.tsx +2 -5
  236. package/src/react/ui/components/marketplace-logos/marketplace-logos.tsx +1 -1
  237. package/src/react/ui/components/media/Media.tsx +5 -1
  238. package/src/react/ui/index.ts +8 -10
  239. package/src/react/ui/modals/BuyModal/__tests__/ERC1155ShopModal.test.tsx +94 -87
  240. package/src/react/ui/modals/BuyModal/__tests__/Modal1155.test.tsx +4 -4
  241. package/src/react/ui/modals/BuyModal/__tests__/store.test.ts +1 -1
  242. package/src/react/ui/modals/BuyModal/components/ERC1155QuantityModal.tsx +3 -4
  243. package/src/react/ui/modals/BuyModal/components/ERC1155ShopModal.tsx +1 -1
  244. package/src/react/ui/modals/BuyModal/hooks/__tests__/useCheckoutOptions.test.tsx +1 -1
  245. package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +1 -1
  246. package/src/react/ui/modals/BuyModal/hooks/useERC721SalePaymentParams.ts +1 -1
  247. package/src/react/ui/modals/BuyModal/hooks/usePaymentModalParams.ts +3 -3
  248. package/src/react/ui/modals/CreateListingModal/Modal.tsx +1 -1
  249. package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +2 -2
  250. package/src/react/ui/modals/CreateListingModal/hooks/useCreateListing.tsx +0 -1
  251. package/src/react/ui/modals/CreateListingModal/hooks/useGetTokenApproval.ts +2 -2
  252. package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +7 -6
  253. package/src/react/ui/modals/CreateListingModal/index.tsx +1 -1
  254. package/src/react/ui/modals/MakeOfferModal/Modal.tsx +2 -2
  255. package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +1 -1
  256. package/src/react/ui/modals/MakeOfferModal/hooks/useGetTokenApproval.tsx +1 -1
  257. package/src/react/ui/modals/MakeOfferModal/hooks/useMakeOffer.tsx +0 -1
  258. package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +7 -7
  259. package/src/react/ui/modals/MakeOfferModal/index.tsx +1 -1
  260. package/src/react/ui/modals/SellModal/Modal.tsx +3 -3
  261. package/src/react/ui/modals/SellModal/__tests__/Modal.test.tsx +6 -4
  262. package/src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx +1 -1
  263. package/src/react/ui/modals/SellModal/hooks/useSell.tsx +0 -1
  264. package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +6 -6
  265. package/src/react/ui/modals/SuccessfulPurchaseModal/__tests__/Modal.test.tsx +1 -1
  266. package/src/react/ui/modals/TransferModal/_store.ts +1 -7
  267. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TokenQuantityInput.tsx +2 -3
  268. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +2 -2
  269. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.test.tsx +1 -1
  270. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +2 -4
  271. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +1 -1
  272. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +0 -1
  273. package/src/react/ui/modals/_internal/components/floorPriceText/index.tsx +4 -4
  274. package/src/react/ui/modals/_internal/components/quantityInput/QuantityInputBase.tsx +166 -0
  275. package/src/react/ui/modals/_internal/components/quantityInput/index.tsx +12 -141
  276. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/__tests__/SelectWaasFeeOptions.test.tsx +1 -1
  277. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/_components/BalanceIndicator.tsx +1 -2
  278. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/useWaasFeeOptionManager.tsx +0 -1
  279. package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +1 -1
  280. package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +1 -1
  281. package/src/react/ui/modals/_internal/components/transactionStatusModal/hooks/useTransactionStatus.ts +0 -1
  282. package/src/react/ui/modals/_internal/components/transactionStatusModal/store.ts +1 -1
  283. package/src/react/ui/modals/_internal/components/waasFeeOptionsSelect/WaasFeeOptionsSelect.tsx +1 -1
  284. package/src/react/ui/modals/modal-provider.tsx +2 -3
  285. package/src/types/api-types.ts +36 -36
  286. package/src/types/buyModalErrors.ts +1 -1
  287. package/src/types/index.ts +5 -5
  288. package/src/types/new-marketplace-types.ts +1 -1
  289. package/src/types/sdk-config.ts +2 -1
  290. package/src/types/types.ts +1 -0
  291. package/src/types/waas-types.ts +1 -1
  292. package/src/utils/abi/index.ts +1 -1
  293. package/src/utils/abi/primary-sale/index.ts +1 -1
  294. package/src/utils/abi/token/index.ts +2 -1
  295. package/src/utils/decode/erc20.ts +1 -1
  296. package/src/utils/index.ts +3 -3
  297. package/test/const.ts +3 -1
  298. package/test/mocks/wallet.ts +1 -1
  299. package/test/test-utils.tsx +3 -4
  300. package/.changeset/fluffy-jokes-lay.md +0 -5
  301. package/.changeset/wise-bugs-boil.md +0 -8
  302. package/dist/CartIcon-Bll1rbxv.js.map +0 -1
  303. package/dist/CollectibleCard-CLQTl0_6.d.ts +0 -8
  304. package/dist/_internal-69NEWNUE.js.map +0 -1
  305. package/dist/api-1KFxYh7o.js.map +0 -1
  306. package/dist/builder.gen-CxP9NT1p.js.map +0 -1
  307. package/dist/index-BHiSG-Yi.d.ts +0 -312
  308. package/dist/index-BQW0PUkQ.d.ts +0 -3973
  309. package/dist/marketplace.gen-Dqk8vRmD.js.map +0 -1
  310. package/dist/marketplaceConfig-D2MYFqll.js.map +0 -1
  311. package/dist/options-DCi6_23w.js +0 -34
  312. package/dist/options-DCi6_23w.js.map +0 -1
  313. package/dist/primary-sale-Cw95phYC.js.map +0 -1
  314. package/dist/queries-DPvwtnO7.js.map +0 -1
  315. package/dist/react-BG7o4PId.js.map +0 -1
  316. package/dist/token-CO5llIla.js.map +0 -1
  317. package/dist/useCollection-C-mclKU0.d.ts +0 -66
  318. package/dist/utils-BFdxaToy.js.map +0 -1
  319. package/dist/wagmi-DRctYEk6.js.map +0 -1
  320. package/src/react/_internal/api/zod-schema.ts +0 -678
  321. package/src/react/hooks/options/collectionOptions.ts +0 -41
  322. package/src/react/hooks/useCheckoutOptions.tsx +0 -66
  323. package/src/react/hooks/useCollectionDetails.tsx +0 -50
  324. package/src/react/hooks/useListTokenMetadata.ts +0 -19
  325. package/src/react/queries/getTokenSupplies.ts +0 -38
  326. package/tsconfig.tsbuildinfo +0 -1
  327. /package/dist/{index-ij9f8GAA.d.ts → index-DvpBZgor.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wagmi-CDzEQbfk.js","names":["marketplaceConfig: MarketplaceConfig","sdkConfig: SdkConfig","config: SdkConfig","wallets: Wallet[]","url: string | undefined","name: string","env: Env","marketplaceConfig: MarketplaceConfig","sdkConfig: SdkConfig","ssr?: boolean","marketConfig: MarketplaceConfig","chains: [Chain, ...Chain[]]","projectAccessKey: string","nodeGatewayEnv: Env | undefined","nodeGatewayUrl?: string","rpcUrl: string"],"sources":["../src/react/_internal/consts.ts","../src/react/_internal/wagmi/get-connectors.ts","../src/react/_internal/wagmi/create-config.ts"],"sourcesContent":["export const DEFAULT_NETWORK = 137;\n","import {\n\tapple,\n\tappleWaas,\n\tcoinbaseWallet,\n\tecosystemWallet,\n\temail,\n\temailWaas,\n\tfacebook,\n\tgetConnectWallets,\n\tgoogle,\n\tgoogleWaas,\n\ttype SequenceOptions,\n\tsequence,\n\ttwitch,\n\ttype Wallet,\n\twalletConnect,\n} from '@0xsequence/connect';\nimport React, { type FunctionComponent } from 'react';\nimport type { CreateConnectorFn } from 'wagmi';\nimport type { Env, SdkConfig } from '../../../types';\nimport type { MarketplaceConfig } from '../../../types/new-marketplace-types';\nimport { MissingConfigError } from '../../../utils/_internal/error/transaction';\nimport { MarketplaceWalletType } from '../api/builder.gen';\nimport { DEFAULT_NETWORK } from '../consts';\n\nexport function getConnectors({\n\tmarketplaceConfig,\n\tsdkConfig,\n\twalletType,\n}: {\n\tmarketplaceConfig: MarketplaceConfig;\n\tsdkConfig: SdkConfig;\n\twalletType: MarketplaceWalletType;\n}): CreateConnectorFn[] {\n\tconst connectors = commonConnectors(marketplaceConfig, sdkConfig);\n\n\tif (walletType === MarketplaceWalletType.UNIVERSAL) {\n\t\tconnectors.push(...getUniversalWalletConfigs(sdkConfig, marketplaceConfig));\n\t} else if (walletType === MarketplaceWalletType.EMBEDDED) {\n\t\tconnectors.push(...getWaasConnectors(sdkConfig, marketplaceConfig));\n\t} else if (walletType === MarketplaceWalletType.ECOSYSTEM) {\n\t\tconnectors.push(getEcosystemConnector(marketplaceConfig, sdkConfig));\n\t} else {\n\t\tthrow new Error('Invalid wallet type');\n\t}\n\n\treturn getConnectWallets(sdkConfig.projectAccessKey, connectors);\n}\n\nfunction commonConnectors(\n\tmarketplaceConfig: MarketplaceConfig,\n\tsdkConfig: SdkConfig,\n) {\n\tconst wallets = [];\n\tconst { title: appName } = marketplaceConfig.settings;\n\tconst walletOptions = marketplaceConfig.settings.walletOptions;\n\tconst walletConnectProjectId = sdkConfig.walletConnectProjectId;\n\n\tif (walletOptions.connectors.includes('coinbase')) {\n\t\twallets.push(\n\t\t\tcoinbaseWallet({\n\t\t\t\tappName,\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (\n\t\twalletConnectProjectId &&\n\t\twalletOptions.connectors.includes('walletconnect')\n\t) {\n\t\twallets.push(\n\t\t\twalletConnect({\n\t\t\t\tprojectId: walletConnectProjectId,\n\t\t\t}),\n\t\t);\n\t}\n\n\treturn wallets;\n}\n\nfunction getUniversalWalletConfigs(\n\tconfig: SdkConfig,\n\tmarketplaceConfig: MarketplaceConfig,\n): Wallet[] {\n\tconst sequenceWalletOverrides =\n\t\tconfig._internal?.overrides?.api?.sequenceWallet;\n\tconst sequenceWalletUrl =\n\t\tsequenceWalletOverrides?.url ||\n\t\tgetSequenceWalletURL(sequenceWalletOverrides?.env || 'production');\n\tconst projectAccessKey =\n\t\tsequenceWalletOverrides?.accessKey || config.projectAccessKey;\n\n\tconst sequenceWalletOptions = {\n\t\twalletAppURL: sequenceWalletUrl,\n\t\tdefaultNetwork: DEFAULT_NETWORK,\n\t\tconnect: {\n\t\t\tprojectAccessKey,\n\t\t\tapp: marketplaceConfig.settings.title,\n\t\t\tsettings: {\n\t\t\t\t// TODO: make a separate config for this?\n\t\t\t\tbannerUrl: marketplaceConfig.market.ogImage,\n\t\t\t},\n\t\t},\n\t} satisfies SequenceOptions;\n\n\treturn [\n\t\tsequence(sequenceWalletOptions),\n\t\temail(sequenceWalletOptions),\n\t\tfacebook(sequenceWalletOptions),\n\t\tgoogle(sequenceWalletOptions),\n\t\tapple(sequenceWalletOptions),\n\t\ttwitch(sequenceWalletOptions),\n\t] as const;\n}\n\nexport function getWaasConnectors(\n\tconfig: SdkConfig,\n\tmarketplaceConfig: MarketplaceConfig,\n): Wallet[] {\n\tconst { projectAccessKey } = config;\n\n\tconst waasConfigKey =\n\t\tmarketplaceConfig.settings.walletOptions.embedded?.tenantKey;\n\n\tif (!waasConfigKey)\n\t\tthrow new MissingConfigError(\n\t\t\t'Embedded wallet config is missing, please check your access key',\n\t\t);\n\n\tconst waasOptions = marketplaceConfig.settings.walletOptions.oidcIssuers;\n\tconst googleClientId = waasOptions.google;\n\tconst appleClientId = waasOptions.apple;\n\tconst appleRedirectURI =\n\t\ttypeof window !== 'undefined'\n\t\t\t? `${window.location.origin}${window.location.pathname}`\n\t\t\t: undefined;\n\n\tconst wallets: Wallet[] = [];\n\n\tif (marketplaceConfig.settings.walletOptions.embedded?.emailEnabled) {\n\t\twallets.push(\n\t\t\temailWaas({\n\t\t\t\tprojectAccessKey,\n\t\t\t\twaasConfigKey,\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (googleClientId) {\n\t\twallets.push(\n\t\t\tgoogleWaas({\n\t\t\t\tprojectAccessKey,\n\t\t\t\tgoogleClientId,\n\t\t\t\twaasConfigKey,\n\t\t\t\tnetwork: DEFAULT_NETWORK,\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (appleClientId) {\n\t\twallets.push(\n\t\t\tappleWaas({\n\t\t\t\tprojectAccessKey,\n\t\t\t\tappleClientId,\n\t\t\t\tappleRedirectURI,\n\t\t\t\twaasConfigKey,\n\t\t\t\tnetwork: DEFAULT_NETWORK,\n\t\t\t}),\n\t\t);\n\t}\n\n\treturn wallets;\n}\n\nexport function getEcosystemConnector(\n\tmarketplaceConfig: MarketplaceConfig,\n\tsdkConfig: SdkConfig,\n): Wallet {\n\tconst ecosystemOptions = marketplaceConfig.settings.walletOptions.ecosystem;\n\tif (!ecosystemOptions) throw new MissingConfigError('ecosystem');\n\tconst { walletAppName, walletUrl, logoDarkUrl, logoLightUrl } =\n\t\tecosystemOptions;\n\n\treturn ecosystemWallet({\n\t\tprojectAccessKey: sdkConfig.projectAccessKey,\n\t\twalletUrl,\n\t\tname: walletAppName,\n\t\tdefaultNetwork: DEFAULT_NETWORK,\n\t\tlogoDark: getEcosystemLogo(logoDarkUrl, walletAppName),\n\t\tlogoLight: getEcosystemLogo(logoLightUrl, walletAppName),\n\t});\n}\n\nfunction getEcosystemLogo(\n\turl: string | undefined,\n\tname: string,\n): FunctionComponent {\n\tif (!url) return () => null;\n\tconst Logo = () =>\n\t\tReact.createElement('img', { src: url, alt: name, width: 32, height: 32 });\n\tLogo.displayName = 'EcosystemLogo';\n\treturn Logo;\n}\n\nfunction getSequenceWalletURL(env: Env) {\n\tswitch (env) {\n\t\tcase 'development':\n\t\t\treturn 'https://dev.sequence.app';\n\t\tcase 'next':\n\t\t\treturn 'https://next.sequence.app';\n\t\t// biome-ignore lint/complexity/noUselessSwitchCase: Production case kept for readability alongside other environments\n\t\tcase 'production':\n\t\tdefault:\n\t\t\treturn 'https://sequence.app';\n\t}\n}\n","import { getDefaultChains } from '@0xsequence/connect';\nimport { allNetworks, findNetworkConfig } from '@0xsequence/network';\nimport type { Chain, Transport } from 'viem';\nimport { cookieStorage, createConfig, createStorage, http } from 'wagmi';\nimport type { Env, SdkConfig } from '../../../types';\nimport type { MarketplaceConfig } from '../../../types/new-marketplace-types';\nimport { DEFAULT_NETWORK } from '../consts';\nimport { getConnectors } from './get-connectors';\n\nexport const createWagmiConfig = (\n\tmarketplaceConfig: MarketplaceConfig,\n\tsdkConfig: SdkConfig,\n\tssr?: boolean,\n) => {\n\tconst chains = getChainConfigs(marketplaceConfig);\n\tconst nodeGatewayOverrides = sdkConfig._internal?.overrides?.api?.nodeGateway;\n\tconst nodeGatewayEnv = nodeGatewayOverrides?.env ?? 'production';\n\tconst nodeGatewayUrl = nodeGatewayOverrides?.url;\n\tconst projectAccessKey =\n\t\tnodeGatewayOverrides?.accessKey ?? sdkConfig.projectAccessKey;\n\n\tconst transports = getTransportConfigs(\n\t\tchains,\n\t\tprojectAccessKey,\n\t\tnodeGatewayEnv,\n\t\tnodeGatewayUrl,\n\t);\n\n\tconst walletType = marketplaceConfig.settings.walletOptions.walletType;\n\n\tconst connectors = getConnectors({\n\t\tmarketplaceConfig,\n\t\tsdkConfig,\n\t\twalletType,\n\t});\n\n\tconst multiInjectedProviderDiscovery =\n\t\tmarketplaceConfig.settings.walletOptions.includeEIP6963Wallets;\n\n\treturn createConfig({\n\t\tconnectors,\n\t\tchains,\n\t\tssr,\n\t\tmultiInjectedProviderDiscovery,\n\t\tstorage: ssr\n\t\t\t? createStorage({\n\t\t\t\t\tstorage: cookieStorage,\n\t\t\t\t})\n\t\t\t: undefined,\n\t\ttransports,\n\t});\n};\n\nfunction getAllCollections(marketConfig: MarketplaceConfig) {\n\treturn [...marketConfig.market.collections, ...marketConfig.shop.collections];\n}\n\nfunction getChainConfigs(marketConfig: MarketplaceConfig): [Chain, ...Chain[]] {\n\tconst supportedChainIds = new Set(\n\t\tgetAllCollections(marketConfig).map((c) => c.chainId),\n\t);\n\n\tif (supportedChainIds.size === 0) {\n\t\tsupportedChainIds.add(DEFAULT_NETWORK);\n\t}\n\n\tconst chains = getDefaultChains([...supportedChainIds]);\n\n\treturn chains;\n}\n\nfunction getTransportConfigs(\n\tchains: [Chain, ...Chain[]],\n\tprojectAccessKey: string,\n\tnodeGatewayEnv: Env | undefined,\n\tnodeGatewayUrl?: string,\n): Record<number, Transport> {\n\treturn chains.reduce(\n\t\t(acc, chain) => {\n\t\t\tconst network = findNetworkConfig(allNetworks, chain.id);\n\t\t\tif (network) {\n\t\t\t\tlet rpcUrl: string;\n\t\t\t\tif (nodeGatewayUrl) {\n\t\t\t\t\t// Use manual URL if provided\n\t\t\t\t\trpcUrl = nodeGatewayUrl;\n\t\t\t\t} else {\n\t\t\t\t\t// Use default URL with environment prefix\n\t\t\t\t\trpcUrl = network.rpcUrl;\n\t\t\t\t\tif (nodeGatewayEnv === 'development') {\n\t\t\t\t\t\trpcUrl = rpcUrl.replace('nodes.', 'dev-nodes.');\n\t\t\t\t\t}\n\t\t\t\t\tif (!network.rpcUrl.endsWith(projectAccessKey))\n\t\t\t\t\t\trpcUrl = `${rpcUrl}/${projectAccessKey}`;\n\t\t\t\t}\n\t\t\t\tacc[chain.id] = http(rpcUrl);\n\t\t\t}\n\t\t\treturn acc;\n\t\t},\n\t\t{} as Record<number, Transport>,\n\t);\n}\n"],"mappings":"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"}
@@ -266,14 +266,12 @@ const ClientComponents = {
266
266
  }
267
267
  parentNode = node;
268
268
  const scope = sourceCode.getScope(node);
269
- // biome-ignore lint/complexity/noForEach: <explanation>
270
269
  scope.through.forEach((reference) => {
271
270
  undeclaredReferences.add(reference.identifier.name);
272
271
  });
273
272
  },
274
273
  ImportDeclaration(node) {
275
274
  if (node.source.value === 'react') {
276
- // biome-ignore lint/complexity/noForEach: <explanation>
277
275
  node.specifiers
278
276
  .filter((spec) => spec.type === 'ImportSpecifier')
279
277
  .forEach((spac) => {
@@ -355,18 +353,14 @@ const ClientComponents = {
355
353
  JSXOpeningElement(node) {
356
354
  const scope = sourceCode.getScope(node);
357
355
  const fnsInScope = [];
358
- //biome-ignore lint/complexity/noForEach: <explanation>
359
356
  scope.variables.forEach((variable) => {
360
- //biome-ignore lint/complexity/noForEach: <explanation>
361
357
  variable.defs.forEach((def) => {
362
358
  if (isFunction(def)) {
363
359
  fnsInScope.push(variable.name);
364
360
  }
365
361
  });
366
362
  });
367
- //biome-ignore lint/complexity/noForEach: <explanation>
368
363
  scope.upper?.set.forEach((variable) => {
369
- //biome-ignore lint/complexity/noForEach: <explanation>
370
364
  variable.defs.forEach((def) => {
371
365
  if (isFunction(def)) {
372
366
  fnsInScope.push(variable.name);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@0xsequence/marketplace-sdk",
3
3
  "private": false,
4
- "version": "0.8.12",
4
+ "version": "0.9.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
7
7
  "**/*.css"
@@ -43,60 +43,59 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@databeat/tracker": "^0.9.3",
46
- "@legendapp/state": "^3.0.0-beta.30",
47
- "@tailwindcss/cli": "^4.1.8",
46
+ "@legendapp/state": "^3.0.0-beta.31",
47
+ "@tailwindcss/cli": "^4.1.10",
48
48
  "@xstate/store": "^3.6.2",
49
49
  "class-variance-authority": "^0.7.1",
50
50
  "clsx": "^2.1.1",
51
51
  "date-fns": "^4.1.0",
52
- "dnum": "^2.14.0",
52
+ "dnum": "^2.15.0",
53
53
  "nuqs": "^2.4.3",
54
54
  "react-day-picker": "^9.7.0",
55
- "tailwind-merge": "^3.3.0",
56
- "zod": "^3.25.7"
55
+ "tailwind-merge": "^3.3.1"
57
56
  },
58
57
  "peerDependencies": {
59
- "0xsequence": "^2.3.12",
60
- "@0xsequence/api": "^2.3.12",
61
- "@0xsequence/checkout": "^5.3.3",
62
- "@0xsequence/connect": "^5.3.3",
63
- "@0xsequence/design-system": "^2.1.12",
64
- "@0xsequence/indexer": "^2.3.12",
65
- "@0xsequence/metadata": "^2.3.12",
66
- "@0xsequence/network": "^2.3.12",
58
+ "0xsequence": "^2.3.20",
59
+ "@0xsequence/api": "^2.3.20",
60
+ "@0xsequence/checkout": "^5.3.6",
61
+ "@0xsequence/connect": "^5.3.6",
62
+ "@0xsequence/design-system": "^2.1.15",
63
+ "@0xsequence/indexer": "^2.3.20",
64
+ "@0xsequence/metadata": "^2.3.20",
65
+ "@0xsequence/network": "^2.3.20",
67
66
  "@google/model-viewer": "^4.1.0",
68
- "@tanstack/react-query": "^5.76.1",
67
+ "@tanstack/react-query": "^5.80.10",
69
68
  "react": "^19.1.0",
70
69
  "react-dom": "^19.1.0",
71
- "viem": "^2.30.0",
72
- "wagmi": "^2.15.4"
70
+ "viem": "^2.31.3",
71
+ "wagmi": "^2.15.6"
73
72
  },
74
73
  "devDependencies": {
75
- "@biomejs/biome": "^1.9.4",
74
+ "@biomejs/biome": "^2.0.0",
76
75
  "@changesets/cli": "^2.29.4",
77
- "@eslint/js": "^9.27.0",
76
+ "@eslint/js": "^9.29.0",
78
77
  "@testing-library/jest-dom": "6.4.7",
79
78
  "@testing-library/react": "^16.3.0",
80
- "@types/react": "^19.1.4",
81
- "@types/react-dom": "^19.1.5",
79
+ "@types/react": "^19.1.8",
80
+ "@types/react-dom": "^19.1.6",
82
81
  "@vitest/coverage-v8": "3.0.9",
83
- "eslint": "^9.27.0",
82
+ "eslint": "^9.29.0",
84
83
  "eslint-config-biome": "^1.9.4",
85
84
  "eslint-plugin-react": "^7.37.5",
86
85
  "eslint-plugin-react-hooks": "^5.2.0",
87
- "globals": "^16.1.0",
88
- "happy-dom": "^17.4.7",
86
+ "globals": "^16.2.0",
87
+ "happy-dom": "^18.0.1",
89
88
  "jsdom": "^26.1.0",
90
- "msw": "^2.8.4",
91
- "postcss": "^8.5.3",
89
+ "msw": "^2.10.2",
90
+ "postcss": "^8.5.6",
92
91
  "prool": "^0.0.24",
93
92
  "rollup-preserve-directives": "^1.1.3",
94
- "tailwindcss": "^4.1.7",
95
- "tsdown": "^0.12.5",
93
+ "tailwindcss": "^4.1.10",
94
+ "tsdown": "^0.12.8",
96
95
  "typescript": "^5.8.3",
97
- "typescript-eslint": "^8.32.1",
96
+ "typescript-eslint": "^8.34.1",
98
97
  "vite-tsconfig-paths": "^5.1.4",
99
- "vitest": "^3.1.4"
98
+ "vitest": "^3.2.4"
100
99
  },
101
100
  "scripts": {
102
101
  "build": "tsdown",
@@ -113,6 +112,6 @@
113
112
  "eslint": "eslint .",
114
113
  "eslint:fix": "eslint --fix .",
115
114
  "changeset": "changeset",
116
- "version": "changeset version"
115
+ "version": "changeset version && node ../scripts/update-marketplace-version.js"
117
116
  }
118
117
  }
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './consts';
2
+ export * from './react/_internal/api/builder-api';
2
3
  export * from './types';
3
4
  export * from './utils';
4
- export * from './react/_internal/api/builder-api';
@@ -1,4 +1,4 @@
1
- import { http, HttpResponse } from 'msw';
1
+ import { HttpResponse, http } from 'msw';
2
2
  import { zeroAddress } from 'viem';
3
3
  import {
4
4
  FilterCondition,
@@ -71,6 +71,7 @@ export const mockShopCollections = [
71
71
  name: 'Mock Shop Collection',
72
72
  bannerUrl: 'https://example.com/shop-banner.png',
73
73
  saleBannerUrl: 'https://example.com/shop-sale-banner.png',
74
+ tokenIds: ['1', '2', '3'],
74
75
  createdAt: new Date('2025-03-16T13:04:16.098Z').toISOString(),
75
76
  updatedAt: new Date('2025-03-16T13:04:16.098Z').toISOString(),
76
77
  },
@@ -83,6 +84,7 @@ export const mockShopCollections = [
83
84
  name: 'Polygon Shop Collection',
84
85
  bannerUrl: 'https://example.com/polygon-shop-banner.png',
85
86
  saleBannerUrl: 'https://example.com/polygon-shop-sale-banner.png',
87
+ tokenIds: ['4', '5', '6'],
86
88
  createdAt: new Date('2025-03-16T13:04:16.098Z').toISOString(),
87
89
  updatedAt: new Date('2025-03-16T13:04:16.098Z').toISOString(),
88
90
  },
@@ -116,15 +118,15 @@ export const mockConfig = {
116
118
  },
117
119
  market: {
118
120
  enabled: true,
119
- title: 'Mock Market Page',
120
121
  bannerUrl: 'https://example.com/market-banner.png',
121
122
  ogImage: 'https://example.com/og-image.png',
123
+ private: false,
122
124
  },
123
125
  shop: {
124
126
  enabled: true,
125
- title: 'Mock Shop Page',
126
127
  bannerUrl: 'https://example.com/shop-banner.png',
127
128
  ogImage: 'https://example.com/shop-og-image.png',
129
+ private: false,
128
130
  },
129
131
  createdAt: new Date('2025-03-16T13:04:16.098Z').toISOString(),
130
132
  updatedAt: new Date('2025-03-16T13:04:16.098Z').toISOString(),
@@ -1,10 +1,3 @@
1
- import {
2
- ContractType,
3
- OrderStatus,
4
- ResourceStatus,
5
- TransactionStatus,
6
- TransactionType,
7
- } from '@0xsequence/indexer';
8
1
  import type {
9
2
  ContractInfo,
10
3
  OrderbookOrder,
@@ -13,7 +6,14 @@ import type {
13
6
  TokenSupply,
14
7
  TransactionReceipt,
15
8
  } from '@0xsequence/indexer';
16
- import { http, HttpResponse } from 'msw';
9
+ import {
10
+ ContractType,
11
+ OrderStatus,
12
+ ResourceStatus,
13
+ TransactionStatus,
14
+ TransactionType,
15
+ } from '@0xsequence/indexer';
16
+ import { HttpResponse, http } from 'msw';
17
17
 
18
18
  import { zeroAddress } from 'viem';
19
19
 
@@ -1,5 +1,6 @@
1
- import { http, HttpResponse } from 'msw';
2
-
1
+ import { USDC_ADDRESS } from '@test/const';
2
+ import { HttpResponse, http } from 'msw';
3
+ import { zeroAddress } from 'viem';
3
4
  import {
4
5
  type Activity,
5
6
  ActivityAction,
@@ -23,9 +24,6 @@ import {
23
24
  WalletKind,
24
25
  } from '../marketplace.gen';
25
26
 
26
- import { USDC_ADDRESS } from '@test/const';
27
- import { zeroAddress } from 'viem';
28
-
29
27
  // Mock data
30
28
  export const mockCurrencies: Currency[] = [
31
29
  {
@@ -175,7 +173,7 @@ export const disableDebug = () => {
175
173
  };
176
174
 
177
175
  // Debug logger function
178
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
176
+ // biome-ignore lint/suspicious/noExplicitAny: debug function needs to accept any type of request/response data
179
177
  const debugLog = (endpoint: string, request: any, response: any) => {
180
178
  if (isDebugEnabled) {
181
179
  console.log(`[MSW Debug] ${endpoint}:`, {
@@ -7,7 +7,7 @@ import {
7
7
  ResourceStatus,
8
8
  type TokenMetadata,
9
9
  } from '@0xsequence/metadata';
10
- import { http, HttpResponse } from 'msw';
10
+ import { HttpResponse, http } from 'msw';
11
11
  import { zeroAddress } from 'viem';
12
12
 
13
13
  // Debug configuration
@@ -5,7 +5,7 @@
5
5
  //
6
6
  // webrpc-gen -schema=builder.main.ridl -target=typescript -client -out=../../webapp/src/rpc/proto/builder.gen.ts
7
7
 
8
- import { OrderbookKind } from "./marketplace.gen";
8
+ import type { OrderbookKind } from "./marketplace.gen";
9
9
 
10
10
  export const WebrpcHeader = "Webrpc";
11
11
  export const WebrpcHeaderValue =
@@ -59,10 +59,10 @@ export interface MarketplaceSettings {
59
59
  }
60
60
 
61
61
  export interface MarketplacePage {
62
- enabled: boolean;
63
- title: string;
64
- bannerUrl: string;
65
- ogImage: string;
62
+ enabled: boolean
63
+ bannerUrl: string
64
+ ogImage: string
65
+ private: boolean
66
66
  }
67
67
 
68
68
  export interface MarketplaceSocials {
@@ -135,7 +135,7 @@ export interface ShopCollection {
135
135
  saleAddress: string;
136
136
  name: string;
137
137
  bannerUrl: string;
138
- saleBannerUrl: string;
138
+ tokenIds: Array<string>;
139
139
  createdAt?: string;
140
140
  updatedAt?: string;
141
141
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
- QueryClient,
3
2
  defaultShouldDehydrateQuery,
3
+ QueryClient,
4
4
  } from '@tanstack/react-query';
5
5
  import { hashFn } from 'wagmi/query';
6
6
 
@@ -20,7 +20,7 @@ function makeQueryClient() {
20
20
  });
21
21
  }
22
22
 
23
- let browserQueryClient: QueryClient | undefined = undefined;
23
+ let browserQueryClient: QueryClient | undefined;
24
24
 
25
25
  export function getQueryClient() {
26
26
  if (typeof globalThis.document === 'undefined') {
@@ -1,6 +1,6 @@
1
1
  export * from './get-query-client';
2
- export * from './marketplace-api';
2
+ export * from './laos-api';
3
3
  export * from './marketplace.gen';
4
+ export * from './marketplace-api';
4
5
  export * from './query-keys';
5
6
  export * from './services';
6
- export * from './laos-api';
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // marketplace-api 966f8f49f445aaef13f2daccc968a931178cd71b
2
+ // marketplace-api 6b46374337129883386b9668e652237c3b31eda1
3
3
  // --
4
4
  // Code generated by webrpc-gen@v0.25.4 with typescript generator. DO NOT EDIT.
5
5
  //
@@ -8,7 +8,7 @@
8
8
  export const WebrpcHeader = "Webrpc";
9
9
 
10
10
  export const WebrpcHeaderValue =
11
- "webrpc@v0.25.4;gen-typescript@v0.17.0;marketplace-api@v0.0.0-966f8f49f445aaef13f2daccc968a931178cd71b";
11
+ "webrpc@v0.25.4;gen-typescript@v0.17.0;marketplace-api@v0.0.0-6b46374337129883386b9668e652237c3b31eda1;marketplace-sdk@v0.9.0";
12
12
 
13
13
  // WebRPC description and code-gen version
14
14
  export const WebRPCVersion = "v1";
@@ -17,7 +17,7 @@ export const WebRPCVersion = "v1";
17
17
  export const WebRPCSchemaVersion = "";
18
18
 
19
19
  // Schema hash generated from your RIDL schema
20
- export const WebRPCSchemaHash = "966f8f49f445aaef13f2daccc968a931178cd71b";
20
+ export const WebRPCSchemaHash = "6b46374337129883386b9668e652237c3b31eda1";
21
21
 
22
22
  type WebrpcGenVersions = {
23
23
  webrpcGenVersion: string;
@@ -585,7 +585,7 @@ export interface PrimarySaleItem {
585
585
  priceDecimals: number;
586
586
  priceAmount: string;
587
587
  priceAmountFormatted: string;
588
- supplyCap: string;
588
+ supply: string;
589
589
  createdAt: string;
590
590
  updatedAt: string;
591
591
  deletedAt?: string;
@@ -1024,6 +1024,11 @@ export interface Marketplace {
1024
1024
  headers?: object,
1025
1025
  signal?: AbortSignal
1026
1026
  ): Promise<SupportedMarketplacesReturn>;
1027
+ getPrimarySaleItem(
1028
+ args: GetPrimarySaleItemArgs,
1029
+ headers?: object,
1030
+ signal?: AbortSignal
1031
+ ): Promise<GetPrimarySaleItemReturn>;
1027
1032
  listPrimarySaleItems(
1028
1033
  args: ListPrimarySaleItemsArgs,
1029
1034
  headers?: object,
@@ -1437,6 +1442,15 @@ export interface SupportedMarketplacesArgs {
1437
1442
  export interface SupportedMarketplacesReturn {
1438
1443
  marketplaces: Array<MarketplaceKind>;
1439
1444
  }
1445
+ export interface GetPrimarySaleItemArgs {
1446
+ chainId: string;
1447
+ primarySaleContractAddress: string;
1448
+ tokenId: string;
1449
+ }
1450
+
1451
+ export interface GetPrimarySaleItemReturn {
1452
+ item: CollectiblePrimarySaleItem;
1453
+ }
1440
1454
  export interface ListPrimarySaleItemsArgs {
1441
1455
  chainId: string;
1442
1456
  primarySaleContractAddress: string;
@@ -2764,6 +2778,30 @@ export class Marketplace implements Marketplace {
2764
2778
  );
2765
2779
  };
2766
2780
 
2781
+ getPrimarySaleItem = (
2782
+ args: GetPrimarySaleItemArgs,
2783
+ headers?: object,
2784
+ signal?: AbortSignal
2785
+ ): Promise<GetPrimarySaleItemReturn> => {
2786
+ return this.fetch(
2787
+ this.url("GetPrimarySaleItem"),
2788
+ createHTTPRequest(args, headers, signal)
2789
+ ).then(
2790
+ (res) => {
2791
+ return buildResponse(res).then((_data) => {
2792
+ return {
2793
+ item: <CollectiblePrimarySaleItem>_data.item,
2794
+ };
2795
+ });
2796
+ },
2797
+ (error) => {
2798
+ throw WebrpcRequestFailedError.new({
2799
+ cause: `fetch(): ${error.message || ""}`,
2800
+ });
2801
+ }
2802
+ );
2803
+ };
2804
+
2767
2805
  listPrimarySaleItems = (
2768
2806
  args: ListPrimarySaleItemsArgs,
2769
2807
  headers?: object,
@@ -1,4 +1,4 @@
1
- // biome-ignore lint/complexity/noStaticOnlyClass:
1
+ // biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys
2
2
  class CollectableKeys {
3
3
  static all = ['collectable'] as const;
4
4
  static details = [...CollectableKeys.all, 'details'] as const;
@@ -35,7 +35,7 @@ class CollectableKeys {
35
35
  ] as const;
36
36
  }
37
37
 
38
- // biome-ignore lint/complexity/noStaticOnlyClass:
38
+ // biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys
39
39
  class CollectionKeys {
40
40
  static all = ['collections'] as const;
41
41
  static list = [...CollectionKeys.all, 'list'] as const;
@@ -46,7 +46,7 @@ class CollectionKeys {
46
46
  ] as const;
47
47
  }
48
48
 
49
- // biome-ignore lint/complexity/noStaticOnlyClass:
49
+ // biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys
50
50
  class BalanceQueries {
51
51
  static all = ['balances'] as const;
52
52
  static lists = [...BalanceQueries.all, 'tokenBalances'] as const;
@@ -56,14 +56,14 @@ class BalanceQueries {
56
56
  ] as const;
57
57
  }
58
58
 
59
- // biome-ignore lint/complexity/noStaticOnlyClass:
59
+ // biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys
60
60
  class CheckoutKeys {
61
61
  static all = ['checkouts'] as const;
62
62
  static options = [...CheckoutKeys.all, 'options'] as const;
63
63
  static cartItems = [...CheckoutKeys.all, 'cartItems'] as const;
64
64
  }
65
65
 
66
- // biome-ignore lint/complexity/noStaticOnlyClass:
66
+ // biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys
67
67
  class CurrencyKeys {
68
68
  static all = ['currencies'] as const;
69
69
  static lists = [...CurrencyKeys.all, 'list'] as const;
@@ -71,14 +71,21 @@ class CurrencyKeys {
71
71
  static conversion = [...CurrencyKeys.all, 'conversion'] as const;
72
72
  }
73
73
 
74
- // biome-ignore lint/complexity/noStaticOnlyClass:
74
+ // biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys
75
75
  class ConfigKeys {
76
76
  static all = ['configs'] as const;
77
77
  static marketplace = [...ConfigKeys.all, 'marketplace'] as const;
78
78
  }
79
+
80
+ // biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys
81
+ class MetadataKeys {
82
+ static all = ['metadata'] as const;
83
+ static tokenMetadata = [...MetadataKeys.all, 'tokenMetadata'] as const;
84
+ }
79
85
  export const collectableKeys = CollectableKeys;
80
86
  export const collectionKeys = CollectionKeys;
81
87
  export const balanceQueries = BalanceQueries;
82
88
  export const checkoutKeys = CheckoutKeys;
83
89
  export const currencyKeys = CurrencyKeys;
84
90
  export const configKeys = ConfigKeys;
91
+ export const metadataKeys = MetadataKeys;
@@ -8,10 +8,15 @@ import { BuilderAPI } from './builder-api';
8
8
  import { SequenceMarketplace } from './marketplace-api';
9
9
 
10
10
  const SERVICES = {
11
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function
11
12
  sequenceApi: 'https://${prefix}api.sequence.app',
13
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function
12
14
  metadata: 'https://${prefix}metadata.sequence.app',
15
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function
13
16
  indexer: 'https://${prefix}${network}-indexer.sequence.app',
17
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function
14
18
  marketplaceApi: 'https://${prefix}marketplace-api.sequence.app',
19
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function
15
20
  builderRpcApi: 'https://${prefix}api.sequence.build',
16
21
  };
17
22
 
@@ -41,10 +46,6 @@ const indexerURL = (chain: ChainNameOrId, env: Env = 'production') => {
41
46
  };
42
47
 
43
48
  const marketplaceApiURL = (env: Env = 'production') => {
44
- // TODO: remove this once we have a production endpoint
45
- if (env === 'development') {
46
- return 'https://dev-marketplace-api-v2.sequence-dev.app';
47
- }
48
49
  const prefix = getPrefix(env);
49
50
  return stringTemplate(SERVICES.marketplaceApi, { prefix });
50
51
  };
@@ -60,45 +61,41 @@ export const sequenceApiUrl = (env: Env = 'production') => {
60
61
  };
61
62
 
62
63
  export const getBuilderClient = (config: SdkConfig) => {
63
- const env = config._internal?.overrides?.api?.builder?.env || 'production';
64
- const projectAccessKey =
65
- config._internal?.overrides?.api?.builder?.accessKey ||
66
- config.projectAccessKey;
67
- return new BuilderAPI(builderRpcApiURL(env), projectAccessKey);
64
+ const overrides = config._internal?.overrides?.api?.builder;
65
+ const url =
66
+ overrides?.url || builderRpcApiURL(overrides?.env || 'production');
67
+ const projectAccessKey = overrides?.accessKey || config.projectAccessKey;
68
+ return new BuilderAPI(url, projectAccessKey);
68
69
  };
69
70
 
70
71
  export const getMetadataClient = (config: SdkConfig) => {
71
- const env = config._internal?.overrides?.api?.metadata?.env || 'production';
72
- const projectAccessKey =
73
- config._internal?.overrides?.api?.metadata?.accessKey ||
74
- config.projectAccessKey;
75
- return new SequenceMetadata(metadataURL(env), projectAccessKey);
72
+ const overrides = config._internal?.overrides?.api?.metadata;
73
+ const url = overrides?.url || metadataURL(overrides?.env || 'production');
74
+ const projectAccessKey = overrides?.accessKey || config.projectAccessKey;
75
+ return new SequenceMetadata(url, projectAccessKey);
76
76
  };
77
77
 
78
78
  export const getIndexerClient = (chain: ChainNameOrId, config: SdkConfig) => {
79
- const env = config._internal?.overrides?.api?.indexer?.env || 'production';
80
- const projectAccessKey =
81
- config._internal?.overrides?.api?.indexer?.accessKey ||
82
- config.projectAccessKey;
83
- return new SequenceIndexer(indexerURL(chain, env), projectAccessKey);
79
+ const overrides = config._internal?.overrides?.api?.indexer;
80
+ const url =
81
+ overrides?.url || indexerURL(chain, overrides?.env || 'production');
82
+ const projectAccessKey = overrides?.accessKey || config.projectAccessKey;
83
+ return new SequenceIndexer(url, projectAccessKey);
84
84
  };
85
85
 
86
86
  export const getMarketplaceClient = (config: SdkConfig) => {
87
- const env =
88
- config._internal?.overrides?.api?.marketplace?.env || 'production';
89
- const projectAccessKey =
90
- config._internal?.overrides?.api?.marketplace?.accessKey ||
91
- config.projectAccessKey;
92
- return new SequenceMarketplace(marketplaceApiURL(env), projectAccessKey);
87
+ const overrides = config._internal?.overrides?.api?.marketplace;
88
+ const url =
89
+ overrides?.url || marketplaceApiURL(overrides?.env || 'production');
90
+ const projectAccessKey = overrides?.accessKey || config.projectAccessKey;
91
+ return new SequenceMarketplace(url, projectAccessKey);
93
92
  };
94
93
 
95
94
  export const getSequenceApiClient = (config: SdkConfig) => {
96
- const env =
97
- config._internal?.overrides?.api?.sequenceApi?.env || 'production';
98
- const projectAccessKey =
99
- config._internal?.overrides?.api?.sequenceApi?.accessKey ||
100
- config.projectAccessKey;
101
- return new SequenceAPIClient(sequenceApiUrl(env), projectAccessKey);
95
+ const overrides = config._internal?.overrides?.api?.sequenceApi;
96
+ const url = overrides?.url || sequenceApiUrl(overrides?.env || 'production');
97
+ const projectAccessKey = overrides?.accessKey || config.projectAccessKey;
98
+ return new SequenceAPIClient(url, projectAccessKey);
102
99
  };
103
100
 
104
101
  const getPrefix = (env: ApiConfig['env']) => {
@@ -1,5 +1,5 @@
1
+ export * from './api';
1
2
  export * from './consts';
2
3
  export * from './get-provider';
3
4
  export * from './types';
4
- export * from './api';
5
5
  export * from './wagmi';
@@ -1,30 +1,11 @@
1
- import type { Address } from 'viem';
2
- import { z } from 'zod';
3
1
  import type { ContractType, CreateReq } from '../../types';
4
2
  import type { MarketplaceKind } from './api';
5
3
 
6
- export const QueryArgSchema = z
7
- .object({
8
- enabled: z.boolean().optional(),
9
- })
10
- .optional();
11
-
12
- export type QueryArg = z.infer<typeof QueryArgSchema>;
13
-
14
- export const CollectableIdSchema = z.string().or(z.number());
15
-
16
- export const AddressSchema = z.string().transform((val, ctx) => {
17
- const regex = /^0x[a-fA-F0-9]{40}$/;
18
-
19
- if (!regex.test(val)) {
20
- ctx.addIssue({
21
- code: z.ZodIssueCode.custom,
22
- message: `Invalid Address ${val}`,
23
- });
24
- }
4
+ export interface QueryArg {
5
+ enabled?: boolean;
6
+ }
25
7
 
26
- return val as Address;
27
- });
8
+ export type CollectableId = string | number;
28
9
 
29
10
  export type CollectionType = ContractType.ERC1155 | ContractType.ERC721;
30
11
 
@@ -75,3 +56,9 @@ export interface CancelInput {
75
56
  orderId: string;
76
57
  marketplace: MarketplaceKind;
77
58
  }
59
+
60
+ export type ValuesOptional<T> = {
61
+ [K in keyof T]: T[K] | undefined;
62
+ };
63
+
64
+ export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
@@ -1,5 +1,4 @@
1
- import type { TypedData, TypedDataDomain } from 'viem';
2
- import type { Hex } from 'viem';
1
+ import type { Hex, TypedData, TypedDataDomain } from 'viem';
3
2
  import { type PostRequest, type Signature, type Step, StepType } from './api';
4
3
 
5
4
  export interface SignatureStep {