@0xsequence/marketplace-sdk 0.9.0 → 0.10.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 (326) hide show
  1. package/.storybook/main.ts +63 -0
  2. package/.storybook/preview.ts +24 -0
  3. package/.storybook/vitest.setup.ts +6 -0
  4. package/CHANGELOG.md +77 -8
  5. package/dist/{CalendarIcon-DbQ7Vxcw.js → CalendarIcon-CqsuAuCm.js} +4 -51
  6. package/dist/CalendarIcon-CqsuAuCm.js.map +1 -0
  7. package/dist/{CollectibleCard-C8Ae64Ab.d.ts → CollectibleCard-Dd-CG6dE.d.ts} +8 -7
  8. package/dist/InfoIcon-v0w_Lu7t.js +53 -0
  9. package/dist/InfoIcon-v0w_Lu7t.js.map +1 -0
  10. package/dist/{_internal-BgWcRIak.js → _internal-C75gOSNo.js} +2 -10
  11. package/dist/_internal-C75gOSNo.js.map +1 -0
  12. package/dist/actionModal-CMUeVsFX.js +116 -0
  13. package/dist/actionModal-CMUeVsFX.js.map +1 -0
  14. package/dist/{alien_swap-B_76IMma.js → alien_swap-CYv6YlOF.js} +1 -1
  15. package/dist/{alien_swap-B_76IMma.js.map → alien_swap-CYv6YlOF.js.map} +1 -1
  16. package/dist/{api-DTIan01C.js → api-BiMGqWdz.js} +17 -34
  17. package/dist/api-BiMGqWdz.js.map +1 -0
  18. package/dist/{aqua-xyz-CMN_TFY5.js → aqua-xyz-Bzn5baeH.js} +1 -1
  19. package/dist/{aqua-xyz-CMN_TFY5.js.map → aqua-xyz-Bzn5baeH.js.map} +1 -1
  20. package/dist/{aura-Cye_TuHj.js → aura-DzIWh8WT.js} +1 -1
  21. package/dist/{aura-Cye_TuHj.js.map → aura-DzIWh8WT.js.map} +1 -1
  22. package/dist/base-DqaJPvfN.js +22 -0
  23. package/dist/base-DqaJPvfN.js.map +1 -0
  24. package/dist/{blur-DWDMyMpK.js → blur-DSH-Cbpj.js} +1 -1
  25. package/dist/{blur-DWDMyMpK.js.map → blur-DSH-Cbpj.js.map} +1 -1
  26. package/dist/{coinbase-ByA_XRB0.js → coinbase-Df8URNxq.js} +1 -1
  27. package/dist/{coinbase-ByA_XRB0.js.map → coinbase-Df8URNxq.js.map} +1 -1
  28. package/dist/{new-marketplace-types-Bfis0U4J.d.ts → create-config-DKJ-F0jc.d.ts} +402 -41
  29. package/dist/{wagmi-CDzEQbfk.js → create-config-fQ-jbJD1.js} +20 -10
  30. package/dist/create-config-fQ-jbJD1.js.map +1 -0
  31. package/dist/{element-b77CyXIZ.js → element-Cx6uJu5N.js} +1 -1
  32. package/dist/{element-b77CyXIZ.js.map → element-Cx6uJu5N.js.map} +1 -1
  33. package/dist/{foundation-DbOrKP9Y.js → foundation-D6U4aRLN.js} +1 -1
  34. package/dist/{foundation-DbOrKP9Y.js.map → foundation-D6U4aRLN.js.map} +1 -1
  35. package/dist/get-provider-CYYHfrlg.js +10 -0
  36. package/dist/get-provider-CYYHfrlg.js.map +1 -0
  37. package/dist/get-query-client-D19vvfJo.js +23 -0
  38. package/dist/get-query-client-D19vvfJo.js.map +1 -0
  39. package/dist/hooks-4pxIbLbM.js +4044 -0
  40. package/dist/hooks-4pxIbLbM.js.map +1 -0
  41. package/dist/{index-BL9RUSEK.d.ts → index-136YrWDH.d.ts} +1 -1
  42. package/dist/{index-D5v5iluA.d.ts → index-BAhaEfqY.d.ts} +1 -1
  43. package/dist/index-BKBin-rq.d.ts +979 -0
  44. package/dist/{index-BQsgAvtX.d.ts → index-BUWB_RXp.d.ts} +776 -570
  45. package/dist/{index-21LE7OhL.d.ts → index-BhVFc2rX.d.ts} +6 -3
  46. package/dist/{index-DXMfTZ1F.d.ts → index-C5aqo8xu.d.ts} +1 -1
  47. package/dist/{index-ByznONYE.d.ts → index-CKrYP7ot.d.ts} +20 -48
  48. package/dist/{index-DaE5ZNHb.d.ts → index-CUwMH7Ht.d.ts} +5 -5
  49. package/dist/{index-CLy8y5hm.d.ts → index-Cu70Lw-w.d.ts} +1 -1
  50. package/dist/index.css +414 -1
  51. package/dist/index.d.ts +8 -10
  52. package/dist/index.js +13 -9
  53. package/dist/{looks-rare-C1VqNcSM.js → looks-rare-ChBRBY-p.js} +1 -1
  54. package/dist/{looks-rare-C1VqNcSM.js.map → looks-rare-ChBRBY-p.js.map} +1 -1
  55. package/dist/{magic-eden-ea_AGCZr.js → magic-eden-D5U7N1xL.js} +1 -1
  56. package/dist/{magic-eden-ea_AGCZr.js.map → magic-eden-D5U7N1xL.js.map} +1 -1
  57. package/dist/{manifold-8y8J2sjT.js → manifold-CtLF52zU.js} +1 -1
  58. package/dist/{manifold-8y8J2sjT.js.map → manifold-CtLF52zU.js.map} +1 -1
  59. package/dist/{marketplace-nwnZv9Cb.js → marketplace-DmFiyBoS.js} +1 -1
  60. package/dist/{marketplace-nwnZv9Cb.js.map → marketplace-DmFiyBoS.js.map} +1 -1
  61. package/dist/{marketplace-logos-CSeGcPW4.js → marketplace-logos-Cd6W-qOq.js} +21 -21
  62. package/dist/{marketplace-logos-CSeGcPW4.js.map → marketplace-logos-Cd6W-qOq.js.map} +1 -1
  63. package/dist/{marketplace.gen-BSDIX7NZ.js → marketplace.gen-HpnpL5xU.js} +3 -3
  64. package/dist/marketplace.gen-HpnpL5xU.js.map +1 -0
  65. package/dist/{marketplaceConfig-C6X1SUik.js → marketplaceConfig-GQTTmihy.js} +3 -3
  66. package/dist/marketplaceConfig-GQTTmihy.js.map +1 -0
  67. package/dist/{mintify-LA68TzWg.js → mintify-Bi3Bce68.js} +1 -1
  68. package/dist/{mintify-LA68TzWg.js.map → mintify-Bi3Bce68.js.map} +1 -1
  69. package/dist/network-CGD0oKtS.js +15 -0
  70. package/dist/network-CGD0oKtS.js.map +1 -0
  71. package/dist/{nftx-D3Tc8nzd.js → nftx-BDQZjtkX.js} +1 -1
  72. package/dist/{nftx-D3Tc8nzd.js.map → nftx-BDQZjtkX.js.map} +1 -1
  73. package/dist/{okx-hbqg6oIJ.js → okx-D4meadLe.js} +1 -1
  74. package/dist/{okx-hbqg6oIJ.js.map → okx-D4meadLe.js.map} +1 -1
  75. package/dist/{open-sea-BccuK8-t.js → open-sea-DN0hgfVw.js} +1 -1
  76. package/dist/{open-sea-BccuK8-t.js.map → open-sea-DN0hgfVw.js.map} +1 -1
  77. package/dist/{primary-sale-C55ALnfQ.js → primary-sale-CmWxSfFQ.js} +1 -1
  78. package/dist/{primary-sale-C55ALnfQ.js.map → primary-sale-CmWxSfFQ.js.map} +1 -1
  79. package/dist/provider-DPGUA10G.js +125 -0
  80. package/dist/provider-DPGUA10G.js.map +1 -0
  81. package/dist/{queries-CUU65uYZ.js → queries-Ce_2othB.js} +165 -7
  82. package/dist/queries-Ce_2othB.js.map +1 -0
  83. package/dist/{rarible-BgTwwj9g.js → rarible-B0xlD88A.js} +1 -1
  84. package/dist/{rarible-BgTwwj9g.js.map → rarible-B0xlD88A.js.map} +1 -1
  85. package/dist/react/_internal/api/index.d.ts +2 -4
  86. package/dist/react/_internal/api/index.js +7 -4
  87. package/dist/react/_internal/databeat/index.d.ts +2 -73
  88. package/dist/react/_internal/databeat/index.js +4 -21
  89. package/dist/react/_internal/index.d.ts +2 -7
  90. package/dist/react/_internal/index.js +11 -6
  91. package/dist/react/_internal/wagmi/index.d.ts +2 -4
  92. package/dist/react/_internal/wagmi/index.js +5 -3
  93. package/dist/react/hooks/index.d.ts +12 -17
  94. package/dist/react/hooks/index.js +23 -19
  95. package/dist/react/hooks/options/index.d.ts +2 -3
  96. package/dist/react/hooks/options/index.js +12 -7
  97. package/dist/react/index.d.ts +12 -17
  98. package/dist/react/index.js +28 -19
  99. package/dist/react/queries/index.d.ts +9 -8
  100. package/dist/react/queries/index.js +20 -15
  101. package/dist/react/ssr/index.d.ts +7 -9
  102. package/dist/react/ssr/index.js +11 -6
  103. package/dist/react/ssr/index.js.map +1 -1
  104. package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +3 -8
  105. package/dist/react/ui/components/marketplace-collectible-card/index.js +27 -18
  106. package/dist/react/ui/components/marketplace-collectible-card/utils/index.d.ts +2 -7
  107. package/dist/react/ui/components/marketplace-collectible-card/utils/index.js +11 -6
  108. package/dist/react/ui/components/marketplace-logos/index.d.ts +21 -21
  109. package/dist/react/ui/components/marketplace-logos/index.js +1 -1
  110. package/dist/react/ui/icons/index.js +13 -9
  111. package/dist/react/ui/index.d.ts +3 -8
  112. package/dist/react/ui/index.js +27 -18
  113. package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +2 -2
  114. package/dist/react/ui/modals/_internal/components/actionModal/index.js +23 -18
  115. package/dist/{react-DAIicQPT.js → react-DP0M2Wfm.js} +799 -4306
  116. package/dist/react-DP0M2Wfm.js.map +1 -0
  117. package/dist/{react-BbHBl6gg.css → react-DeDyTgo7.css} +1 -1
  118. package/dist/{react-BbHBl6gg.css.map → react-DeDyTgo7.css.map} +1 -1
  119. package/dist/{sequence-Do3kzb4J.js → sequence-BIrOVRXO.js} +1 -1
  120. package/dist/{sequence-Do3kzb4J.js.map → sequence-BIrOVRXO.js.map} +1 -1
  121. package/dist/{sudo-swap-B6vPKxBz.js → sudo-swap-BPMon-M5.js} +1 -1
  122. package/dist/{sudo-swap-B6vPKxBz.js.map → sudo-swap-BPMon-M5.js.map} +1 -1
  123. package/dist/{super-rare-eCm1SE6O.js → super-rare-kPN6Ua8i.js} +1 -1
  124. package/dist/{super-rare-eCm1SE6O.js.map → super-rare-kPN6Ua8i.js.map} +1 -1
  125. package/dist/{token-Da4TdyUk.js → token-CHSBPYVG.js} +1 -1
  126. package/dist/{token-Da4TdyUk.js.map → token-CHSBPYVG.js.map} +1 -1
  127. package/dist/{transaction-CcVViHEL.js → transaction-CnctdNzS.js} +3 -21
  128. package/dist/transaction-CnctdNzS.js.map +1 -0
  129. package/dist/types/index.d.ts +2 -3
  130. package/dist/types/index.js +2 -2
  131. package/dist/{types-DwWE6xOF.js → types-Yw2ywj6j.js} +1 -1
  132. package/dist/{types-DwWE6xOF.js.map → types-Yw2ywj6j.js.map} +1 -1
  133. package/dist/utils/abi/index.d.ts +4 -4
  134. package/dist/utils/abi/index.js +4 -4
  135. package/dist/utils/abi/marketplace/index.d.ts +1 -1
  136. package/dist/utils/abi/marketplace/index.js +1 -1
  137. package/dist/utils/abi/primary-sale/index.d.ts +1 -1
  138. package/dist/utils/abi/primary-sale/index.js +1 -1
  139. package/dist/utils/abi/token/index.d.ts +1 -1
  140. package/dist/utils/abi/token/index.js +1 -1
  141. package/dist/utils/index.d.ts +7 -8
  142. package/dist/utils/index.js +12 -9
  143. package/dist/{utils-CW2NA5KG.js → utils-9RXDgcBl.js} +4 -11
  144. package/dist/utils-9RXDgcBl.js.map +1 -0
  145. package/dist/{utils-BPYfgDSL.js → utils-DjVJ9tov.js} +5 -6
  146. package/dist/utils-DjVJ9tov.js.map +1 -0
  147. package/dist/wagmi-Do_KW5ke.js +0 -0
  148. package/dist/{x2y2-DD17tT91.js → x2y2-BLz-_Q2O.js} +1 -1
  149. package/dist/{x2y2-DD17tT91.js.map → x2y2-BLz-_Q2O.js.map} +1 -1
  150. package/dist/{zora-BpSG9UzS.js → zora-UGhKs-aL.js} +1 -1
  151. package/dist/{zora-BpSG9UzS.js.map → zora-UGhKs-aL.js.map} +1 -1
  152. package/eslint.config.mjs +4 -0
  153. package/package.json +27 -14
  154. package/postcss.config.mjs +6 -0
  155. package/src/index.css +5 -4
  156. package/src/index.ts +1 -0
  157. package/src/react/__tests__/provider.test.tsx +4 -3
  158. package/src/react/_internal/api/__mocks__/indexer.msw.ts +16 -0
  159. package/src/react/_internal/api/__mocks__/laos.msw.ts +387 -0
  160. package/src/react/_internal/api/__mocks__/marketplace.msw.ts +2 -0
  161. package/src/react/_internal/api/__tests__/laos-api.test.ts +756 -0
  162. package/src/react/_internal/api/laos-api.ts +3 -0
  163. package/src/react/_internal/api/marketplace.gen.ts +5 -3
  164. package/src/react/_internal/api/query-keys.ts +12 -4
  165. package/src/react/_internal/api/services.ts +2 -14
  166. package/src/react/_internal/databeat/index.ts +15 -14
  167. package/src/react/_internal/databeat/types.ts +22 -0
  168. package/src/react/_internal/databeat/utils.ts +26 -0
  169. package/src/react/_internal/utils.ts +4 -4
  170. package/src/react/_internal/wagmi/create-config.ts +28 -13
  171. package/src/react/_internal/wallet/wallet.ts +4 -4
  172. package/src/react/hooks/__tests__/useBalanceOfCollectible.laos.test.tsx +367 -0
  173. package/src/react/hooks/__tests__/useCheckoutOptions.test.tsx +158 -0
  174. package/src/react/hooks/__tests__/useCheckoutOptionsSalesContract.test.tsx +42 -65
  175. package/src/react/hooks/__tests__/useCollectionBalanceDetails.test.tsx +17 -0
  176. package/src/react/hooks/__tests__/useCollectionDetailsPolling.test.tsx +11 -3
  177. package/src/react/hooks/__tests__/useConvertPriceToUSD.test.tsx +3 -3
  178. package/src/react/hooks/__tests__/useCurrencyBalance.test.tsx +7 -3
  179. package/src/react/hooks/__tests__/useFilters.test.tsx +2 -2
  180. package/src/react/hooks/__tests__/useGetTokenRanges.test.tsx +111 -0
  181. package/src/react/hooks/__tests__/useListTokenMetadata.test.tsx +83 -57
  182. package/src/react/hooks/__tests__/useTransferTokens.test.tsx +469 -0
  183. package/src/react/hooks/index.ts +3 -1
  184. package/src/react/hooks/useCheckoutOptions.tsx +96 -0
  185. package/src/react/hooks/useCheckoutOptionsSalesContract.tsx +98 -57
  186. package/src/react/hooks/useCollectionBalanceDetails.tsx +95 -68
  187. package/src/react/hooks/useCollectionDetailsPolling.tsx +3 -7
  188. package/src/react/hooks/useComparePrices.tsx +90 -82
  189. package/src/react/hooks/useConvertPriceToUSD.tsx +85 -71
  190. package/src/react/hooks/useCurrencyBalance.tsx +132 -46
  191. package/src/react/hooks/useERC721SaleMintedTokens.tsx +8 -5
  192. package/src/react/hooks/useFilters.tsx +154 -111
  193. package/src/react/hooks/useGetCountOfPrimarySaleItems.tsx +48 -0
  194. package/src/react/hooks/useGetTokenRanges.tsx +83 -22
  195. package/src/react/hooks/useList1155ShopCardData.tsx +2 -0
  196. package/src/react/hooks/useList721ShopCardData.tsx +12 -7
  197. package/src/react/hooks/useListCollections.tsx +25 -25
  198. package/src/react/hooks/useListMarketCardData.tsx +2 -1
  199. package/src/react/hooks/useListPrimarySaleItems.tsx +66 -0
  200. package/src/react/hooks/useListTokenMetadata.ts +71 -0
  201. package/src/react/hooks/useOpenConnectModal.tsx +9 -0
  202. package/src/react/hooks/useTokenSaleDetailsBatch.tsx +3 -7
  203. package/src/react/hooks/useTokenSupplies.ts +81 -0
  204. package/src/react/hooks/useTransferTokens.tsx +2 -2
  205. package/src/react/provider.tsx +73 -9
  206. package/src/react/queries/__tests__/balanceOfCollectible.laos.test.ts +123 -0
  207. package/src/react/queries/__tests__/inventory.laos.test.ts +496 -0
  208. package/src/react/queries/balanceOfCollectible.ts +7 -4
  209. package/src/react/queries/checkoutOptions.ts +85 -0
  210. package/src/react/queries/checkoutOptionsSalesContract.ts +89 -0
  211. package/src/react/queries/collectionBalanceDetails.ts +92 -0
  212. package/src/react/queries/comparePrices.ts +108 -0
  213. package/src/react/queries/convertPriceToUSD.ts +92 -0
  214. package/src/react/queries/filters.ts +138 -0
  215. package/src/react/queries/getTokenRanges.ts +62 -0
  216. package/src/react/queries/index.ts +3 -0
  217. package/src/react/queries/inventory.ts +6 -0
  218. package/src/react/queries/listBalances.ts +4 -3
  219. package/src/react/queries/listCollections.ts +7 -3
  220. package/src/react/queries/listTokenMetadata.ts +2 -2
  221. package/src/react/queries/marketplaceConfig.ts +1 -1
  222. package/src/react/queries/primarySaleItems.ts +85 -0
  223. package/src/react/queries/primarySaleItemsCount.ts +64 -0
  224. package/src/react/queries/tokenSupplies.ts +93 -0
  225. package/src/react/ui/components/_internals/action-button/ActionButton.tsx +66 -66
  226. package/src/react/ui/components/_internals/action-button/__tests__/ActionButtonBody.test.tsx +22 -4
  227. package/src/react/ui/components/_internals/action-button/components/ActionButtonBody.tsx +5 -4
  228. package/src/react/ui/components/_internals/action-button/components/NonOwnerActions.tsx +3 -0
  229. package/src/react/ui/components/_internals/action-button/components/OwnerActions.tsx +4 -4
  230. package/src/react/ui/components/_internals/action-button/hooks/useActionButtonLogic.ts +13 -8
  231. package/src/react/ui/components/_internals/action-button/store.ts +44 -34
  232. package/src/react/ui/components/_internals/custom-select/CustomSelect.stories.tsx +582 -0
  233. package/src/react/ui/components/_internals/pill/Pill.stories.tsx +83 -0
  234. package/src/react/ui/components/marketplace-collectible-card/Footer.tsx +11 -4
  235. package/src/react/ui/components/marketplace-collectible-card/components/ActionButtonWrapper.tsx +7 -4
  236. package/src/react/ui/components/marketplace-collectible-card/types.ts +4 -3
  237. package/src/react/ui/components/marketplace-collectible-card/utils/supplyStatus.ts +4 -7
  238. package/src/react/ui/components/marketplace-collectible-card/variants/ShopCard.tsx +5 -1
  239. package/src/react/ui/components/marketplace-logos/marketplace-logos.stories.tsx +199 -0
  240. package/src/react/ui/components/media/Media.stories.tsx +642 -0
  241. package/src/react/ui/components/media/Media.tsx +24 -19
  242. package/src/react/ui/components/media/types.ts +6 -0
  243. package/src/react/ui/modals/BuyModal/__tests__/BuyModalRouter.test.tsx +15 -0
  244. package/src/react/ui/modals/BuyModal/__tests__/ERC1155ShopModal.test.tsx +6 -0
  245. package/src/react/ui/modals/BuyModal/__tests__/Modal1155.test.tsx +7 -1
  246. package/src/react/ui/modals/BuyModal/__tests__/store.test.ts +9 -1
  247. package/src/react/ui/modals/BuyModal/components/ERC1155QuantityModal.tsx +15 -8
  248. package/src/react/ui/modals/BuyModal/components/ERC1155ShopModal.tsx +3 -0
  249. package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC1155Checkout.test.tsx +30 -27
  250. package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +2 -2
  251. package/src/react/ui/modals/BuyModal/hooks/useERC1155Checkout.ts +11 -2
  252. package/src/react/ui/modals/BuyModal/hooks/useERC721SalePaymentParams.ts +1 -1
  253. package/src/react/ui/modals/BuyModal/hooks/usePaymentModalParams.ts +7 -0
  254. package/src/react/ui/modals/BuyModal/index.tsx +9 -1
  255. package/src/react/ui/modals/BuyModal/store.ts +26 -0
  256. package/src/react/ui/modals/CreateListingModal/Modal.tsx +28 -11
  257. package/src/react/ui/modals/CreateListingModal/store.ts +3 -3
  258. package/src/react/ui/modals/MakeOfferModal/Modal.tsx +30 -13
  259. package/src/react/ui/modals/MakeOfferModal/store.ts +3 -3
  260. package/src/react/ui/modals/SellModal/Modal.tsx +11 -8
  261. package/src/react/ui/modals/SellModal/store.ts +3 -3
  262. package/src/react/ui/modals/TransferModal/__tests__/__snapshots__/store.test.ts.snap +17 -0
  263. package/src/react/ui/modals/TransferModal/__tests__/store.test.ts +366 -0
  264. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/__tests__/useHandleTransfer.test.tsx +402 -0
  265. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TokenQuantityInput.tsx +51 -48
  266. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TransferButton.tsx +39 -47
  267. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/WalletAddressInput.tsx +9 -8
  268. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +31 -35
  269. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/useHandleTransfer.tsx +19 -10
  270. package/src/react/ui/modals/TransferModal/index.tsx +28 -31
  271. package/src/react/ui/modals/TransferModal/messages.ts +1 -1
  272. package/src/react/ui/modals/TransferModal/store.ts +122 -0
  273. package/src/react/ui/modals/_internal/components/calendar/index.tsx +0 -1
  274. package/src/react/ui/modals/_internal/components/currencyImage/index.tsx +10 -14
  275. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +5 -2
  276. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +23 -17
  277. package/src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx +10 -10
  278. package/src/react/ui/modals/_internal/components/floorPriceText/__tests__/FloorPriceText.test.tsx +6 -6
  279. package/src/react/ui/modals/_internal/components/priceInput/__tests__/PriceInput.test.tsx +13 -5
  280. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +41 -26
  281. package/src/react/ui/modals/_internal/components/quantityInput/__tests__/index.test.tsx +68 -59
  282. package/src/react/ui/modals/_internal/components/quantityInput/index.tsx +155 -20
  283. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/__tests__/SelectWaasFeeOptions.test.tsx +339 -40
  284. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/index.tsx +95 -101
  285. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/store.ts +72 -14
  286. package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/useWaasFeeOptionManager.tsx +29 -13
  287. package/src/react/ui/modals/_internal/components/tokenPreview/index.tsx +2 -2
  288. package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +2 -2
  289. package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +88 -89
  290. package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +36 -10
  291. package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +32 -20
  292. package/src/react/ui/modals/_internal/components/transactionStatusModal/store.ts +91 -62
  293. package/src/react/ui/modals/_internal/components/waasFeeOptionsSelect/WaasFeeOptionsSelect.tsx +43 -44
  294. package/src/react/ui/modals/_internal/types.ts +2 -2
  295. package/src/types/sdk-config.ts +6 -1
  296. package/src/utils/network.ts +15 -0
  297. package/test/test-utils.tsx +2 -0
  298. package/vitest.shims.d.ts +2 -0
  299. package/vitest.storybook.config.js +33 -0
  300. package/dist/CalendarIcon-DbQ7Vxcw.js.map +0 -1
  301. package/dist/_internal-BgWcRIak.js.map +0 -1
  302. package/dist/api-DTIan01C.js.map +0 -1
  303. package/dist/builder-api-C_zj5mr3.d.ts +0 -12
  304. package/dist/index-BUVWziLP.d.ts +0 -60
  305. package/dist/index-COt10OgI.d.ts +0 -24
  306. package/dist/index-DPNWNa7t.d.ts +0 -414
  307. package/dist/index-DsfCs3-x.d.ts +0 -122
  308. package/dist/index-dUb6wb4Y.d.ts +0 -22
  309. package/dist/marketplace.gen-BSDIX7NZ.js.map +0 -1
  310. package/dist/marketplaceConfig-C6X1SUik.js.map +0 -1
  311. package/dist/queries-CUU65uYZ.js.map +0 -1
  312. package/dist/react-DAIicQPT.js.map +0 -1
  313. package/dist/transaction-CcVViHEL.js.map +0 -1
  314. package/dist/utils-BPYfgDSL.js.map +0 -1
  315. package/dist/utils-CW2NA5KG.js.map +0 -1
  316. package/dist/wagmi-CDzEQbfk.js.map +0 -1
  317. package/src/react/hooks/__tests__/useGetTokenSuppliesMap.test.tsx +0 -104
  318. package/src/react/hooks/useGetTokenSuppliesMap.tsx +0 -73
  319. package/src/react/hooks/useListPrimarySaleItems.ts +0 -102
  320. package/src/react/queries/getTokenSuppliesMap.ts +0 -77
  321. package/src/react/ui/modals/TransferModal/_store.ts +0 -66
  322. package/src/react/ui/modals/_internal/components/quantityInput/QuantityInputBase.tsx +0 -166
  323. package/src/react/ui/modals/_internal/stores/accountModal.ts +0 -3
  324. /package/dist/{abi-BKyRjVcZ.js → abi-BMvgNbKQ.js} +0 -0
  325. /package/dist/{index-C39K_8SG.d.ts → index-CD2bj_xW.d.ts} +0 -0
  326. /package/dist/{options-B4QN7Xou.js → options-BBBR8u_4.js} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-DTIan01C.js","names":["browserQueryClient: QueryClient | undefined","baseUrl?: string","hostname: string","projectAccessKey: string","jwtAuth?: string","input: RequestInfo","init?: RequestInit","headers: Record<string, string>","nameOrId: ChainNameOrId","env: Env","chain: ChainNameOrId","config: SdkConfig","env: ApiConfig['env']"],"sources":["../src/react/_internal/api/get-query-client.ts","../src/react/_internal/api/laos-api.ts","../src/react/_internal/api/marketplace-api.ts","../src/react/_internal/api/query-keys.ts","../src/react/_internal/api/services.ts"],"sourcesContent":["import {\n\tdefaultShouldDehydrateQuery,\n\tQueryClient,\n} from '@tanstack/react-query';\nimport { hashFn } from 'wagmi/query';\n\nfunction makeQueryClient() {\n\treturn new QueryClient({\n\t\tdefaultOptions: {\n\t\t\tqueries: {\n\t\t\t\tstaleTime: 60 * 1000,\n\t\t\t\tqueryKeyHashFn: hashFn,\n\t\t\t},\n\t\t\tdehydrate: {\n\t\t\t\tshouldDehydrateQuery: (query) =>\n\t\t\t\t\tdefaultShouldDehydrateQuery(query) ||\n\t\t\t\t\tquery.state.status === 'pending',\n\t\t\t},\n\t\t},\n\t});\n}\n\nlet browserQueryClient: QueryClient | undefined;\n\nexport function getQueryClient() {\n\tif (typeof globalThis.document === 'undefined') {\n\t\treturn makeQueryClient();\n\t}\n\n\tif (!browserQueryClient) browserQueryClient = makeQueryClient();\n\treturn browserQueryClient;\n}\n","import type {\n\tGetTokenBalancesReturn,\n\tGetTokenSuppliesReturn,\n} from '@0xsequence/indexer';\n\nexport type SortOption = {\n\tcolumn: string;\n\torder: 'ASC' | 'DESC';\n};\n\nexport type PaginationOptions = {\n\tsort: SortOption[];\n};\n\nexport type TokenSuppliesParams = {\n\tchainId: string;\n\tcontractAddress: string;\n\tincludeMetadata?: boolean;\n\tpage?: PaginationOptions;\n};\n\nexport type TokenBalancesParams = {\n\tchainId: string;\n\taccountAddress: string;\n\tincludeMetadata?: boolean;\n\tpage?: PaginationOptions;\n};\n\nexport class LaosAPI {\n\tprivate baseUrl = 'https://extensions.api.laosnetwork.io';\n\n\tconstructor(baseUrl?: string) {\n\t\tif (baseUrl) {\n\t\t\tthis.baseUrl = baseUrl;\n\t\t}\n\t}\n\n\tasync getTokenSupplies({\n\t\tchainId,\n\t\tcontractAddress,\n\t\tincludeMetadata = true,\n\t\tpage = {\n\t\t\tsort: [\n\t\t\t\t{\n\t\t\t\t\tcolumn: 'CREATED_AT',\n\t\t\t\t\torder: 'DESC',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t}: TokenSuppliesParams): Promise<GetTokenSuppliesReturn> {\n\t\tconst response = await fetch(`${this.baseUrl}/token/GetTokenSupplies`, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t\tbody: JSON.stringify({\n\t\t\t\tchainId,\n\t\t\t\tcontractAddress,\n\t\t\t\tincludeMetadata,\n\t\t\t\tpage,\n\t\t\t}),\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tthrow new Error(`Failed to get token supplies: ${response.statusText}`);\n\t\t}\n\n\t\treturn await response.json();\n\t}\n\n\tasync getTokenBalances({\n\t\tchainId,\n\t\taccountAddress,\n\t\tincludeMetadata = true,\n\t\tpage = {\n\t\t\tsort: [\n\t\t\t\t{\n\t\t\t\t\tcolumn: 'CREATED_AT',\n\t\t\t\t\torder: 'DESC',\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t}: TokenBalancesParams): Promise<GetTokenBalancesReturn> {\n\t\tconst response = await fetch(`${this.baseUrl}/token/GetTokenBalances`, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t\tbody: JSON.stringify({\n\t\t\t\tchainId,\n\t\t\t\taccountAddress,\n\t\t\t\tincludeMetadata,\n\t\t\t\tpage,\n\t\t\t}),\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tthrow new Error(`Failed to get token balances: ${response.statusText}`);\n\t\t}\n\n\t\treturn await response.json();\n\t}\n}\n","import { Marketplace } from './marketplace.gen';\n\nexport class SequenceMarketplace extends Marketplace {\n\tconstructor(\n\t\thostname: string,\n\t\tpublic projectAccessKey: string,\n\t\tpublic jwtAuth?: string,\n\t) {\n\t\tsuper(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);\n\t\tthis.fetch = this._fetch;\n\t}\n\n\t_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {\n\t\tconst headers: Record<string, string> = {};\n\n\t\tconst jwtAuth = this.jwtAuth;\n\t\tconst projectAccessKey = this.projectAccessKey;\n\n\t\tif (jwtAuth && jwtAuth.length > 0) {\n\t\t\theaders.Authorization = `BEARER ${jwtAuth}`;\n\t\t}\n\n\t\tif (projectAccessKey && projectAccessKey.length > 0) {\n\t\t\theaders['X-Access-Key'] = projectAccessKey;\n\t\t}\n\n\t\tconst requestInit = init || {};\n\t\trequestInit.headers = { ...init?.headers, ...headers };\n\n\t\treturn fetch(input, requestInit);\n\t};\n}\n","// biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys\nclass CollectableKeys {\n\tstatic all = ['collectable'] as const;\n\tstatic details = [...CollectableKeys.all, 'details'] as const;\n\tstatic lists = [...CollectableKeys.all, 'list'] as const;\n\tstatic floorOrders = [...CollectableKeys.all, 'floorOrders'] as const;\n\tstatic userBalances = [\n\t\t...CollectableKeys.all,\n\t\t...CollectableKeys.details,\n\t\t'userBalances',\n\t] as const;\n\tstatic royaltyPercentage = [\n\t\t...CollectableKeys.all,\n\t\t'royaltyPercentage',\n\t] as const;\n\tstatic highestOffers = [\n\t\t...CollectableKeys.all,\n\t\t...CollectableKeys.details,\n\t\t'highestOffers',\n\t] as const;\n\tstatic lowestListings = [\n\t\t...CollectableKeys.all,\n\t\t...CollectableKeys.details,\n\t\t'lowestListings',\n\t] as const;\n\tstatic offers = [...CollectableKeys.all, 'offers'] as const;\n\tstatic offersCount = [...CollectableKeys.all, 'offersCount'] as const;\n\tstatic listings = [...CollectableKeys.all, 'listings'] as const;\n\tstatic listingsCount = [...CollectableKeys.all, 'listingsCount'] as const;\n\tstatic filter = [...CollectableKeys.all, 'filter'] as const;\n\tstatic counts = [...CollectableKeys.all, 'counts'] as const;\n\tstatic collectibleActivities = [\n\t\t...CollectableKeys.all,\n\t\t'collectibleActivities',\n\t] as const;\n}\n\n// biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys\nclass CollectionKeys {\n\tstatic all = ['collections'] as const;\n\tstatic list = [...CollectionKeys.all, 'list'] as const;\n\tstatic detail = [...CollectionKeys.all, 'detail'] as const;\n\tstatic collectionActivities = [\n\t\t...CollectionKeys.all,\n\t\t'collectionActivities',\n\t] as const;\n}\n\n// biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys\nclass BalanceQueries {\n\tstatic all = ['balances'] as const;\n\tstatic lists = [...BalanceQueries.all, 'tokenBalances'] as const;\n\tstatic collectionBalanceDetails = [\n\t\t...BalanceQueries.all,\n\t\t'collectionBalanceDetails',\n\t] as const;\n}\n\n// biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys\nclass CheckoutKeys {\n\tstatic all = ['checkouts'] as const;\n\tstatic options = [...CheckoutKeys.all, 'options'] as const;\n\tstatic cartItems = [...CheckoutKeys.all, 'cartItems'] as const;\n}\n\n// biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys\nclass CurrencyKeys {\n\tstatic all = ['currencies'] as const;\n\tstatic lists = [...CurrencyKeys.all, 'list'] as const;\n\tstatic details = [...CurrencyKeys.all, 'details'] as const;\n\tstatic conversion = [...CurrencyKeys.all, 'conversion'] as const;\n}\n\n// biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys\nclass ConfigKeys {\n\tstatic all = ['configs'] as const;\n\tstatic marketplace = [...ConfigKeys.all, 'marketplace'] as const;\n}\n\n// biome-ignore lint/complexity/noStaticOnlyClass: static class provides better organization and type safety for query keys\nclass MetadataKeys {\n\tstatic all = ['metadata'] as const;\n\tstatic tokenMetadata = [...MetadataKeys.all, 'tokenMetadata'] as const;\n}\nexport const collectableKeys = CollectableKeys;\nexport const collectionKeys = CollectionKeys;\nexport const balanceQueries = BalanceQueries;\nexport const checkoutKeys = CheckoutKeys;\nexport const currencyKeys = CurrencyKeys;\nexport const configKeys = ConfigKeys;\nexport const metadataKeys = MetadataKeys;\n","import { SequenceAPIClient } from '@0xsequence/api';\nimport { SequenceIndexer } from '@0xsequence/indexer';\nimport { SequenceMetadata } from '@0xsequence/metadata';\nimport { networks, stringTemplate } from '@0xsequence/network';\nimport type { ApiConfig, Env, SdkConfig } from '../../../types/sdk-config';\nimport { MissingConfigError } from '../../../utils/_internal/error/transaction';\nimport { BuilderAPI } from './builder-api';\nimport { SequenceMarketplace } from './marketplace-api';\n\nconst SERVICES = {\n\t// biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function\n\tsequenceApi: 'https://${prefix}api.sequence.app',\n\t// biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function\n\tmetadata: 'https://${prefix}metadata.sequence.app',\n\t// biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function\n\tindexer: 'https://${prefix}${network}-indexer.sequence.app',\n\t// biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function\n\tmarketplaceApi: 'https://${prefix}marketplace-api.sequence.app',\n\t// biome-ignore lint/suspicious/noTemplateCurlyInString: template placeholder for stringTemplate function\n\tbuilderRpcApi: 'https://${prefix}api.sequence.build',\n};\n\ntype ChainNameOrId = string | number;\n\nconst getNetwork = (nameOrId: ChainNameOrId) => {\n\tfor (const network of Object.values(networks)) {\n\t\tif (\n\t\t\tnetwork.name === String(nameOrId).toLowerCase() ||\n\t\t\tnetwork.chainId === Number(nameOrId)\n\t\t) {\n\t\t\treturn network;\n\t\t}\n\t}\n\tthrow new MissingConfigError(`Network configuration for chain ${nameOrId}`);\n};\n\nconst metadataURL = (env: Env = 'production') => {\n\tconst prefix = getPrefix(env);\n\treturn stringTemplate(SERVICES.metadata, { prefix });\n};\n\nconst indexerURL = (chain: ChainNameOrId, env: Env = 'production') => {\n\tconst prefix = getPrefix(env);\n\tconst network = getNetwork(chain).name;\n\treturn stringTemplate(SERVICES.indexer, { network: network, prefix });\n};\n\nconst marketplaceApiURL = (env: Env = 'production') => {\n\tconst prefix = getPrefix(env);\n\treturn stringTemplate(SERVICES.marketplaceApi, { prefix });\n};\n\nconst builderRpcApiURL = (env: Env = 'production') => {\n\tconst prefix = getPrefix(env);\n\treturn stringTemplate(SERVICES.builderRpcApi, { prefix });\n};\n\nexport const sequenceApiUrl = (env: Env = 'production') => {\n\tconst prefix = getPrefix(env);\n\treturn stringTemplate(SERVICES.sequenceApi, { prefix });\n};\n\nexport const getBuilderClient = (config: SdkConfig) => {\n\tconst overrides = config._internal?.overrides?.api?.builder;\n\tconst url =\n\t\toverrides?.url || builderRpcApiURL(overrides?.env || 'production');\n\tconst projectAccessKey = overrides?.accessKey || config.projectAccessKey;\n\treturn new BuilderAPI(url, projectAccessKey);\n};\n\nexport const getMetadataClient = (config: SdkConfig) => {\n\tconst overrides = config._internal?.overrides?.api?.metadata;\n\tconst url = overrides?.url || metadataURL(overrides?.env || 'production');\n\tconst projectAccessKey = overrides?.accessKey || config.projectAccessKey;\n\treturn new SequenceMetadata(url, projectAccessKey);\n};\n\nexport const getIndexerClient = (chain: ChainNameOrId, config: SdkConfig) => {\n\tconst overrides = config._internal?.overrides?.api?.indexer;\n\tconst url =\n\t\toverrides?.url || indexerURL(chain, overrides?.env || 'production');\n\tconst projectAccessKey = overrides?.accessKey || config.projectAccessKey;\n\treturn new SequenceIndexer(url, projectAccessKey);\n};\n\nexport const getMarketplaceClient = (config: SdkConfig) => {\n\tconst overrides = config._internal?.overrides?.api?.marketplace;\n\tconst url =\n\t\toverrides?.url || marketplaceApiURL(overrides?.env || 'production');\n\tconst projectAccessKey = overrides?.accessKey || config.projectAccessKey;\n\treturn new SequenceMarketplace(url, projectAccessKey);\n};\n\nexport const getSequenceApiClient = (config: SdkConfig) => {\n\tconst overrides = config._internal?.overrides?.api?.sequenceApi;\n\tconst url = overrides?.url || sequenceApiUrl(overrides?.env || 'production');\n\tconst projectAccessKey = overrides?.accessKey || config.projectAccessKey;\n\treturn new SequenceAPIClient(url, projectAccessKey);\n};\n\nconst getPrefix = (env: ApiConfig['env']) => {\n\tswitch (env) {\n\t\tcase 'development':\n\t\t\treturn 'dev-';\n\t\tcase 'production':\n\t\t\treturn '';\n\t\tcase 'next':\n\t\t\treturn 'next-';\n\t}\n};\n"],"mappings":";;;;;;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AAa,OAAO;AACxD,QAAO,IAAI,WAAW,KAAK;AAC3B;AAED,MAAa,oBAAoB,CAACA,WAAsB;CACvD,MAAM,YAAY,OAAO,WAAW,WAAW,KAAK;CACpD,MAAM,MAAM,WAAW,OAAO,YAAY,WAAW,OAAO,aAAa;CACzE,MAAM,mBAAmB,WAAW,aAAa,OAAO;AACxD,QAAO,IAAI,iBAAiB,KAAK;AACjC;AAED,MAAa,mBAAmB,CAACD,OAAsBC,WAAsB;CAC5E,MAAM,YAAY,OAAO,WAAW,WAAW,KAAK;CACpD,MAAM,MACL,WAAW,OAAO,WAAW,OAAO,WAAW,OAAO,aAAa;CACpE,MAAM,mBAAmB,WAAW,aAAa,OAAO;AACxD,QAAO,IAAI,gBAAgB,KAAK;AAChC;AAED,MAAa,uBAAuB,CAACA,WAAsB;CAC1D,MAAM,YAAY,OAAO,WAAW,WAAW,KAAK;CACpD,MAAM,MACL,WAAW,OAAO,kBAAkB,WAAW,OAAO,aAAa;CACpE,MAAM,mBAAmB,WAAW,aAAa,OAAO;AACxD,QAAO,IAAI,oBAAoB,KAAK;AACpC;AAED,MAAa,uBAAuB,CAACA,WAAsB;CAC1D,MAAM,YAAY,OAAO,WAAW,WAAW,KAAK;CACpD,MAAM,MAAM,WAAW,OAAO,eAAe,WAAW,OAAO,aAAa;CAC5E,MAAM,mBAAmB,WAAW,aAAa,OAAO;AACxD,QAAO,IAAI,kBAAkB,KAAK;AAClC;AAED,MAAM,YAAY,CAACC,QAA0B;AAC5C,SAAQ,KAAR;EACC,KAAK,cACJ,QAAO;EACR,KAAK,aACJ,QAAO;EACR,KAAK,OACJ,QAAO;CACR;AACD"}
@@ -1,12 +0,0 @@
1
- import { MarketplaceService } from "./new-marketplace-types-Bfis0U4J.js";
2
-
3
- //#region src/react/_internal/api/builder-api.d.ts
4
- declare class BuilderAPI extends MarketplaceService {
5
- projectAccessKey?: string | undefined;
6
- jwtAuth?: string | undefined;
7
- constructor(hostname: string, projectAccessKey?: string | undefined, jwtAuth?: string | undefined);
8
- _fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
9
- }
10
- //#endregion
11
- export { BuilderAPI };
12
- //# sourceMappingURL=builder-api-C_zj5mr3.d.ts.map
@@ -1,60 +0,0 @@
1
- import { ContractType, CreateReq, MarketplaceKind } from "./new-marketplace-types-Bfis0U4J.js";
2
-
3
- //#region src/react/_internal/consts.d.ts
4
- declare const DEFAULT_NETWORK = 137;
5
- //#endregion
6
- //#region src/react/_internal/get-provider.d.ts
7
- declare const PROVIDER_ID = "sdk-provider";
8
- declare function getProviderEl(): HTMLElement | null;
9
- //#endregion
10
- //#region src/react/_internal/types.d.ts
11
- interface QueryArg {
12
- enabled?: boolean;
13
- }
14
- type CollectableId = string | number;
15
- type CollectionType = ContractType.ERC1155 | ContractType.ERC721;
16
- type TransactionStep = {
17
- exist: boolean;
18
- isExecuting: boolean;
19
- execute: () => Promise<void>;
20
- };
21
- type TransactionSteps = {
22
- approval: TransactionStep;
23
- transaction: TransactionStep;
24
- };
25
- declare enum TransactionType {
26
- BUY = "BUY",
27
- SELL = "SELL",
28
- LISTING = "LISTING",
29
- OFFER = "OFFER",
30
- TRANSFER = "TRANSFER",
31
- CANCEL = "CANCEL",
32
- }
33
- interface BuyInput {
34
- orderId: string;
35
- collectableDecimals: number;
36
- marketplace: MarketplaceKind;
37
- quantity: string;
38
- }
39
- interface SellInput {
40
- orderId: string;
41
- marketplace: MarketplaceKind;
42
- quantity?: string;
43
- }
44
- interface ListingInput {
45
- contractType: ContractType;
46
- listing: CreateReq;
47
- }
48
- interface OfferInput {
49
- contractType: ContractType;
50
- offer: CreateReq;
51
- }
52
- interface CancelInput {
53
- orderId: string;
54
- marketplace: MarketplaceKind;
55
- }
56
- type ValuesOptional<T> = { [K in keyof T]: T[K] | undefined };
57
- type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
58
- //#endregion
59
- export { BuyInput, CancelInput, CollectableId, CollectionType, DEFAULT_NETWORK, ListingInput, OfferInput, Optional, PROVIDER_ID, QueryArg, SellInput, TransactionSteps, TransactionType, ValuesOptional, getProviderEl };
60
- //# sourceMappingURL=index-BUVWziLP.d.ts.map
@@ -1,24 +0,0 @@
1
- import { MarketplaceConfig, MarketplaceWalletType, SdkConfig } from "./new-marketplace-types-Bfis0U4J.js";
2
- import { Wallet } from "@0xsequence/connect";
3
- import * as wagmi113 from "wagmi";
4
- import { CreateConnectorFn } from "wagmi";
5
- import { Chain, Transport } from "viem";
6
-
7
- //#region src/react/_internal/wagmi/create-config.d.ts
8
- declare const createWagmiConfig: (marketplaceConfig: MarketplaceConfig, sdkConfig: SdkConfig, ssr?: boolean) => wagmi113.Config<[Chain, ...Chain[]], Record<number, Transport>, wagmi113.CreateConnectorFn[]>;
9
- //#endregion
10
- //#region src/react/_internal/wagmi/get-connectors.d.ts
11
- declare function getConnectors({
12
- marketplaceConfig,
13
- sdkConfig,
14
- walletType
15
- }: {
16
- marketplaceConfig: MarketplaceConfig;
17
- sdkConfig: SdkConfig;
18
- walletType: MarketplaceWalletType;
19
- }): CreateConnectorFn[];
20
- declare function getWaasConnectors(config: SdkConfig, marketplaceConfig: MarketplaceConfig): Wallet[];
21
- declare function getEcosystemConnector(marketplaceConfig: MarketplaceConfig, sdkConfig: SdkConfig): Wallet;
22
- //#endregion
23
- export { createWagmiConfig, getConnectors, getEcosystemConnector, getWaasConnectors };
24
- //# sourceMappingURL=index-COt10OgI.d.ts.map
@@ -1,414 +0,0 @@
1
- import { CollectibleOrder, Collection, ContractType, CurrencyStatus, GetCollectibleHighestOfferArgs, GetCollectibleLowestListingArgs, GetCollectibleLowestListingReturn, GetCollectionDetailArgs, GetCountOfPrimarySaleItemsArgs, GetFloorOrderArgs, ListCollectiblesArgs, ListCollectiblesReturn, MarketplaceConfig, MarketplaceType, Order, Page, PrimarySaleItemsFilter, SdkConfig } from "./new-marketplace-types-Bfis0U4J.js";
2
- import { ValuesOptional } from "./index-BUVWziLP.js";
3
- import * as _tanstack_react_query27 from "@tanstack/react-query";
4
- import { UseQueryParameters } from "wagmi/query";
5
- import * as _0xsequence_indexer24 from "@0xsequence/indexer";
6
- import { ContractInfo, GetTokenBalancesReturn, Page as Page$1 } from "@0xsequence/indexer";
7
- import * as _0xsequence_metadata32 from "@0xsequence/metadata";
8
- import { GetTokenMetadataArgs } from "@0xsequence/metadata";
9
- import { Address, Hex } from "viem";
10
-
11
- //#region src/react/queries/balanceOfCollectible.d.ts
12
- type UseBalanceOfCollectibleArgs = {
13
- collectionAddress: Hex;
14
- collectableId: string;
15
- userAddress: Hex | undefined;
16
- chainId: number;
17
- isLaos721?: boolean;
18
- query?: UseQueryParameters;
19
- };
20
- /**
21
- * Fetches the balance of a specific collectible for a user
22
- *
23
- * @param args - Arguments for the API call
24
- * @param config - SDK configuration
25
- * @returns The balance data
26
- */
27
- declare function fetchBalanceOfCollectible(args: Omit<UseBalanceOfCollectibleArgs, 'userAddress'> & {
28
- userAddress: Hex;
29
- }, config: SdkConfig): Promise<_0xsequence_indexer24.TokenBalance>;
30
- /**
31
- * Creates a tanstack query options object for the balance query
32
- *
33
- * @param args - The query arguments
34
- * @param config - SDK configuration
35
- * @returns Query options configuration
36
- */
37
- declare function balanceOfCollectibleOptions(args: UseBalanceOfCollectibleArgs, config: SdkConfig): _tanstack_react_query27.UseQueryOptions<_0xsequence_indexer24.TokenBalance, Error, _0xsequence_indexer24.TokenBalance, (UseBalanceOfCollectibleArgs | "collectable" | "details" | "userBalances")[]> & {
38
- initialData?: _0xsequence_indexer24.TokenBalance | _tanstack_react_query27.InitialDataFunction<_0xsequence_indexer24.TokenBalance> | undefined;
39
- } & {
40
- queryKey: (UseBalanceOfCollectibleArgs | "collectable" | "details" | "userBalances")[] & {
41
- [dataTagSymbol]: _0xsequence_indexer24.TokenBalance;
42
- [dataTagErrorSymbol]: Error;
43
- };
44
- };
45
- //#endregion
46
- //#region src/react/types/query.d.ts
47
- /**
48
- * Standard query options that can be used across all marketplace SDK hooks
49
- *
50
- * Based on TanStack Query v5 UseQueryOptions, but simplified, the type from TanStack is hard to modify
51
- */
52
- interface StandardQueryOptions<TError = Error> {
53
- /** Whether the query should be enabled/disabled */
54
- enabled?: boolean;
55
- /** Time in milliseconds that data is considered fresh */
56
- staleTime?: number;
57
- gcTime?: number;
58
- refetchInterval?: number | false | ((query: any) => number | false);
59
- refetchOnWindowFocus?: boolean;
60
- refetchOnMount?: boolean;
61
- refetchOnReconnect?: boolean;
62
- retry?: boolean | number | ((failureCount: number, error: TError) => boolean);
63
- retryDelay?: number | ((retryAttempt: number, error: TError) => number);
64
- suspense?: boolean;
65
- }
66
- /**
67
- * Standard infinite query options that can be used across all marketplace SDK hooks
68
- * that support infinite pagination
69
- */
70
- interface StandardInfiniteQueryOptions<TError = Error> extends StandardQueryOptions<TError> {
71
- /** Maximum number of pages to fetch */
72
- maxPages?: number;
73
- }
74
- //#endregion
75
- //#region src/react/queries/collectible.d.ts
76
- interface FetchCollectibleParams extends Omit<GetTokenMetadataArgs, 'chainID' | 'contractAddress' | 'tokenIDs'> {
77
- chainId: number;
78
- collectionAddress: string;
79
- collectibleId: string;
80
- config: SdkConfig;
81
- }
82
- /**
83
- * Fetches collectible metadata from the metadata API
84
- */
85
- declare function fetchCollectible(params: FetchCollectibleParams): Promise<_0xsequence_metadata32.TokenMetadata>;
86
- type CollectibleQueryOptions = ValuesOptional<FetchCollectibleParams> & {
87
- query?: StandardQueryOptions;
88
- };
89
- declare function collectibleQueryOptions(params: CollectibleQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<_0xsequence_metadata32.TokenMetadata, Error, _0xsequence_metadata32.TokenMetadata, ("collectable" | "details" | CollectibleQueryOptions)[]>, "queryFn"> & {
90
- queryFn?: _tanstack_react_query27.QueryFunction<_0xsequence_metadata32.TokenMetadata, ("collectable" | "details" | CollectibleQueryOptions)[], never> | undefined;
91
- } & {
92
- queryKey: ("collectable" | "details" | CollectibleQueryOptions)[] & {
93
- [dataTagSymbol]: _0xsequence_metadata32.TokenMetadata;
94
- [dataTagErrorSymbol]: Error;
95
- };
96
- };
97
- //#endregion
98
- //#region src/react/queries/collectionDetails.d.ts
99
- interface FetchCollectionDetailsParams extends Omit<GetCollectionDetailArgs, 'chainId' | 'contractAddress'> {
100
- chainId: number;
101
- collectionAddress: string;
102
- config: SdkConfig;
103
- }
104
- /**
105
- * Fetches collection details from the marketplace API
106
- */
107
- declare function fetchCollectionDetails(params: FetchCollectionDetailsParams): Promise<Collection>;
108
- type CollectionDetailsQueryOptions = ValuesOptional<FetchCollectionDetailsParams> & {
109
- query?: StandardQueryOptions;
110
- };
111
- declare function collectionDetailsQueryOptions(params: CollectionDetailsQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<Collection, Error, Collection, ("collections" | "detail" | CollectionDetailsQueryOptions)[]>, "queryFn"> & {
112
- queryFn?: _tanstack_react_query27.QueryFunction<Collection, ("collections" | "detail" | CollectionDetailsQueryOptions)[], never> | undefined;
113
- } & {
114
- queryKey: ("collections" | "detail" | CollectionDetailsQueryOptions)[] & {
115
- [dataTagSymbol]: Collection;
116
- [dataTagErrorSymbol]: Error;
117
- };
118
- };
119
- //#endregion
120
- //#region src/react/queries/countOfPrimarySaleItems.d.ts
121
- interface UseCountOfPrimarySaleItemsArgs extends Omit<GetCountOfPrimarySaleItemsArgs, 'chainId' | 'primarySaleContractAddress'> {
122
- chainId: number;
123
- primarySaleContractAddress: Address;
124
- filter?: PrimarySaleItemsFilter;
125
- query?: {
126
- enabled?: boolean;
127
- };
128
- }
129
- declare function fetchCountOfPrimarySaleItems(args: UseCountOfPrimarySaleItemsArgs, config: SdkConfig): Promise<number>;
130
- declare function countOfPrimarySaleItemsOptions(args: UseCountOfPrimarySaleItemsArgs, config: SdkConfig): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<number, Error, number, (string | UseCountOfPrimarySaleItemsArgs)[]>, "queryFn"> & {
131
- queryFn?: _tanstack_react_query27.QueryFunction<number, (string | UseCountOfPrimarySaleItemsArgs)[], never> | undefined;
132
- } & {
133
- queryKey: (string | UseCountOfPrimarySaleItemsArgs)[] & {
134
- [dataTagSymbol]: number;
135
- [dataTagErrorSymbol]: Error;
136
- };
137
- };
138
- //#endregion
139
- //#region src/react/queries/floorOrder.d.ts
140
- interface FetchFloorOrderParams extends Omit<GetFloorOrderArgs, 'contractAddress' | 'chainId'> {
141
- collectionAddress: string;
142
- chainId: number;
143
- config: SdkConfig;
144
- }
145
- /**
146
- * Fetches the floor order for a collection from the marketplace API
147
- */
148
- declare function fetchFloorOrder(params: FetchFloorOrderParams): Promise<CollectibleOrder>;
149
- type FloorOrderQueryOptions = ValuesOptional<FetchFloorOrderParams> & {
150
- query?: StandardQueryOptions;
151
- };
152
- declare function floorOrderQueryOptions(params: FloorOrderQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<CollectibleOrder, Error, CollectibleOrder, ("collectable" | "floorOrders" | FloorOrderQueryOptions)[]>, "queryFn"> & {
153
- queryFn?: _tanstack_react_query27.QueryFunction<CollectibleOrder, ("collectable" | "floorOrders" | FloorOrderQueryOptions)[], never> | undefined;
154
- } & {
155
- queryKey: ("collectable" | "floorOrders" | FloorOrderQueryOptions)[] & {
156
- [dataTagSymbol]: CollectibleOrder;
157
- [dataTagErrorSymbol]: Error;
158
- };
159
- };
160
- //#endregion
161
- //#region src/react/queries/highestOffer.d.ts
162
- interface FetchHighestOfferParams extends Omit<GetCollectibleHighestOfferArgs, 'contractAddress' | 'chainId'> {
163
- collectionAddress: string;
164
- chainId: number;
165
- config: SdkConfig;
166
- }
167
- /**
168
- * Fetches the highest offer for a collectible from the marketplace API
169
- */
170
- declare function fetchHighestOffer(params: FetchHighestOfferParams): Promise<Order | null>;
171
- type HighestOfferQueryOptions = ValuesOptional<FetchHighestOfferParams> & {
172
- query?: StandardQueryOptions;
173
- };
174
- declare function highestOfferQueryOptions(params: HighestOfferQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<Order | null, Error, Order | null, ("collectable" | "details" | "highestOffers" | HighestOfferQueryOptions)[]>, "queryFn"> & {
175
- queryFn?: _tanstack_react_query27.QueryFunction<Order | null, ("collectable" | "details" | "highestOffers" | HighestOfferQueryOptions)[], never> | undefined;
176
- } & {
177
- queryKey: ("collectable" | "details" | "highestOffers" | HighestOfferQueryOptions)[] & {
178
- [dataTagSymbol]: Order | null;
179
- [dataTagErrorSymbol]: Error;
180
- };
181
- };
182
- //#endregion
183
- //#region src/react/queries/inventory.d.ts
184
- interface UseInventoryArgs {
185
- accountAddress: Address;
186
- collectionAddress: Address;
187
- chainId: number;
188
- isLaos721?: boolean;
189
- query?: {
190
- enabled?: boolean;
191
- };
192
- }
193
- interface GetInventoryArgs extends Omit<UseInventoryArgs, 'query'> {
194
- isLaos721: boolean;
195
- }
196
- interface CollectibleWithBalance extends CollectibleOrder {
197
- balance: string;
198
- contractInfo?: ContractInfo;
199
- contractType: ContractType.ERC1155 | ContractType.ERC721;
200
- }
201
- interface CollectiblesResponse {
202
- collectibles: CollectibleWithBalance[];
203
- page: Page;
204
- }
205
- declare function fetchInventory(args: GetInventoryArgs, config: SdkConfig, page: Page): Promise<CollectiblesResponse>;
206
- declare function inventoryOptions(args: UseInventoryArgs, config: SdkConfig): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseInfiniteQueryOptions<CollectiblesResponse, Error, _tanstack_react_query27.InfiniteData<CollectiblesResponse, unknown>, (string | number)[], Page>, "queryFn"> & {
207
- queryFn?: _tanstack_react_query27.QueryFunction<CollectiblesResponse, (string | number)[], Page> | undefined;
208
- } & {
209
- queryKey: (string | number)[] & {
210
- [dataTagSymbol]: _tanstack_react_query27.InfiniteData<CollectiblesResponse, unknown>;
211
- [dataTagErrorSymbol]: Error;
212
- };
213
- };
214
- //#endregion
215
- //#region src/react/queries/listBalances.d.ts
216
- type UseListBalancesArgs = {
217
- chainId: number;
218
- accountAddress?: Hex;
219
- contractAddress?: Hex;
220
- tokenId?: string;
221
- includeMetadata?: boolean;
222
- metadataOptions?: {
223
- verifiedOnly?: boolean;
224
- unverifiedOnly?: boolean;
225
- includeContracts?: Hex[];
226
- };
227
- includeCollectionTokens?: boolean;
228
- page?: Page$1;
229
- isLaos721?: boolean;
230
- query?: {
231
- enabled?: boolean;
232
- };
233
- };
234
- declare function fetchBalances(args: UseListBalancesArgs, config: SdkConfig, page: Page$1): Promise<GetTokenBalancesReturn>;
235
- /**
236
- * Creates a tanstack infinite query options object for the balances query
237
- *
238
- * @param args - The query arguments
239
- * @param config - SDK configuration
240
- * @returns Query options configuration
241
- */
242
- declare function listBalancesOptions(args: UseListBalancesArgs, config: SdkConfig): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseInfiniteQueryOptions<GetTokenBalancesReturn, Error, _tanstack_react_query27.InfiniteData<GetTokenBalancesReturn, unknown>, (SdkConfig | UseListBalancesArgs | "balances" | "tokenBalances")[], any>, "queryFn"> & {
243
- queryFn?: _tanstack_react_query27.QueryFunction<GetTokenBalancesReturn, (SdkConfig | UseListBalancesArgs | "balances" | "tokenBalances")[], any> | undefined;
244
- } & {
245
- queryKey: (SdkConfig | UseListBalancesArgs | "balances" | "tokenBalances")[] & {
246
- [dataTagSymbol]: _tanstack_react_query27.InfiniteData<GetTokenBalancesReturn, unknown>;
247
- [dataTagErrorSymbol]: Error;
248
- };
249
- };
250
- //#endregion
251
- //#region src/react/queries/listCollectibles.d.ts
252
- interface FetchListCollectiblesParams extends Omit<ListCollectiblesArgs, 'chainId' | 'contractAddress'> {
253
- chainId: number;
254
- collectionAddress: Address;
255
- isLaos721?: boolean;
256
- marketplaceType?: MarketplaceType;
257
- config: SdkConfig;
258
- }
259
- /**
260
- * Fetches a list of collectibles with pagination support from the Marketplace API
261
- */
262
- declare function fetchListCollectibles(params: FetchListCollectiblesParams, marketplaceConfig: MarketplaceConfig, page: Page): Promise<ListCollectiblesReturn>;
263
- type ListCollectiblesQueryOptions = ValuesOptional<FetchListCollectiblesParams> & {
264
- query?: StandardInfiniteQueryOptions;
265
- };
266
- declare function listCollectiblesQueryOptions(params: ListCollectiblesQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseInfiniteQueryOptions<ListCollectiblesReturn, Error, _tanstack_react_query27.InfiniteData<ListCollectiblesReturn, unknown>, ("collectable" | "list" | ListCollectiblesQueryOptions)[], Page>, "queryFn"> & {
267
- queryFn?: _tanstack_react_query27.QueryFunction<ListCollectiblesReturn, ("collectable" | "list" | ListCollectiblesQueryOptions)[], Page> | undefined;
268
- } & {
269
- queryKey: ("collectable" | "list" | ListCollectiblesQueryOptions)[] & {
270
- [dataTagSymbol]: _tanstack_react_query27.InfiniteData<ListCollectiblesReturn, unknown>;
271
- [dataTagErrorSymbol]: Error;
272
- };
273
- };
274
- //#endregion
275
- //#region src/react/queries/listTokenMetadata.d.ts
276
- interface FetchListTokenMetadataParams {
277
- chainId: number;
278
- contractAddress: string;
279
- tokenIds: string[];
280
- config: SdkConfig;
281
- }
282
- /**
283
- * Fetches token metadata from the metadata API
284
- */
285
- declare function fetchListTokenMetadata(params: FetchListTokenMetadataParams): Promise<_0xsequence_metadata32.TokenMetadata[]>;
286
- type ListTokenMetadataQueryOptions = ValuesOptional<FetchListTokenMetadataParams> & {
287
- query?: StandardQueryOptions;
288
- };
289
- declare function listTokenMetadataQueryOptions(params: ListTokenMetadataQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<_0xsequence_metadata32.TokenMetadata[], Error, _0xsequence_metadata32.TokenMetadata[], ("metadata" | "tokenMetadata" | ListTokenMetadataQueryOptions)[]>, "queryFn"> & {
290
- queryFn?: _tanstack_react_query27.QueryFunction<_0xsequence_metadata32.TokenMetadata[], ("metadata" | "tokenMetadata" | ListTokenMetadataQueryOptions)[], never> | undefined;
291
- } & {
292
- queryKey: ("metadata" | "tokenMetadata" | ListTokenMetadataQueryOptions)[] & {
293
- [dataTagSymbol]: _0xsequence_metadata32.TokenMetadata[];
294
- [dataTagErrorSymbol]: Error;
295
- };
296
- };
297
- //#endregion
298
- //#region src/react/queries/lowestListing.d.ts
299
- interface FetchLowestListingParams extends Omit<GetCollectibleLowestListingArgs, 'contractAddress' | 'chainId'> {
300
- collectionAddress: string;
301
- chainId: number;
302
- config: SdkConfig;
303
- }
304
- /**
305
- * Fetches the lowest listing for a collectible from the marketplace API
306
- */
307
- declare function fetchLowestListing(params: FetchLowestListingParams): Promise<GetCollectibleLowestListingReturn['order'] | null>;
308
- type LowestListingQueryOptions = ValuesOptional<FetchLowestListingParams> & {
309
- query?: StandardQueryOptions;
310
- };
311
- declare function lowestListingQueryOptions(params: LowestListingQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<Order | null | undefined, Error, Order | null | undefined, ("collectable" | "details" | "lowestListings" | LowestListingQueryOptions)[]>, "queryFn"> & {
312
- queryFn?: _tanstack_react_query27.QueryFunction<Order | null | undefined, ("collectable" | "details" | "lowestListings" | LowestListingQueryOptions)[], never> | undefined;
313
- } & {
314
- queryKey: ("collectable" | "details" | "lowestListings" | LowestListingQueryOptions)[] & {
315
- [dataTagSymbol]: Order | null | undefined;
316
- [dataTagErrorSymbol]: Error;
317
- };
318
- };
319
- //#endregion
320
- //#region src/react/queries/marketCurrencies.d.ts
321
- interface FetchMarketCurrenciesParams {
322
- chainId: number;
323
- includeNativeCurrency?: boolean;
324
- collectionAddress?: Address;
325
- config: SdkConfig;
326
- }
327
- /**
328
- * Fetches supported currencies for a marketplace
329
- */
330
- declare function fetchMarketCurrencies(params: FetchMarketCurrenciesParams): Promise<{
331
- contractAddress: string;
332
- chainId: number;
333
- status: CurrencyStatus;
334
- name: string;
335
- symbol: string;
336
- decimals: number;
337
- imageUrl: string;
338
- exchangeRate: number;
339
- defaultChainCurrency: boolean;
340
- nativeCurrency: boolean;
341
- createdAt: string;
342
- updatedAt: string;
343
- deletedAt?: string;
344
- }[]>;
345
- type MarketCurrenciesQueryOptions = ValuesOptional<FetchMarketCurrenciesParams> & {
346
- query?: StandardQueryOptions;
347
- };
348
- declare function marketCurrenciesQueryOptions(params: MarketCurrenciesQueryOptions): _tanstack_react_query27.OmitKeyof<_tanstack_react_query27.UseQueryOptions<{
349
- contractAddress: string;
350
- chainId: number;
351
- status: CurrencyStatus;
352
- name: string;
353
- symbol: string;
354
- decimals: number;
355
- imageUrl: string;
356
- exchangeRate: number;
357
- defaultChainCurrency: boolean;
358
- nativeCurrency: boolean;
359
- createdAt: string;
360
- updatedAt: string;
361
- deletedAt?: string;
362
- }[], Error, {
363
- contractAddress: string;
364
- chainId: number;
365
- status: CurrencyStatus;
366
- name: string;
367
- symbol: string;
368
- decimals: number;
369
- imageUrl: string;
370
- exchangeRate: number;
371
- defaultChainCurrency: boolean;
372
- nativeCurrency: boolean;
373
- createdAt: string;
374
- updatedAt: string;
375
- deletedAt?: string;
376
- }[], ("list" | "currencies" | MarketCurrenciesQueryOptions)[]>, "queryFn"> & {
377
- queryFn?: _tanstack_react_query27.QueryFunction<{
378
- contractAddress: string;
379
- chainId: number;
380
- status: CurrencyStatus;
381
- name: string;
382
- symbol: string;
383
- decimals: number;
384
- imageUrl: string;
385
- exchangeRate: number;
386
- defaultChainCurrency: boolean;
387
- nativeCurrency: boolean;
388
- createdAt: string;
389
- updatedAt: string;
390
- deletedAt?: string;
391
- }[], ("list" | "currencies" | MarketCurrenciesQueryOptions)[], never> | undefined;
392
- } & {
393
- queryKey: ("list" | "currencies" | MarketCurrenciesQueryOptions)[] & {
394
- [dataTagSymbol]: {
395
- contractAddress: string;
396
- chainId: number;
397
- status: CurrencyStatus;
398
- name: string;
399
- symbol: string;
400
- decimals: number;
401
- imageUrl: string;
402
- exchangeRate: number;
403
- defaultChainCurrency: boolean;
404
- nativeCurrency: boolean;
405
- createdAt: string;
406
- updatedAt: string;
407
- deletedAt?: string;
408
- }[];
409
- [dataTagErrorSymbol]: Error;
410
- };
411
- };
412
- //#endregion
413
- export { CollectibleQueryOptions, CollectiblesResponse, CollectionDetailsQueryOptions, FetchCollectibleParams, FetchCollectionDetailsParams, FetchFloorOrderParams, FetchHighestOfferParams, FetchListCollectiblesParams, FetchListTokenMetadataParams, FetchLowestListingParams, FetchMarketCurrenciesParams, FloorOrderQueryOptions, HighestOfferQueryOptions, ListCollectiblesQueryOptions, ListTokenMetadataQueryOptions, LowestListingQueryOptions, MarketCurrenciesQueryOptions, StandardInfiniteQueryOptions, StandardQueryOptions, UseBalanceOfCollectibleArgs, UseCountOfPrimarySaleItemsArgs, UseInventoryArgs, UseListBalancesArgs, balanceOfCollectibleOptions, collectibleQueryOptions, collectionDetailsQueryOptions, countOfPrimarySaleItemsOptions, fetchBalanceOfCollectible, fetchBalances, fetchCollectible, fetchCollectionDetails, fetchCountOfPrimarySaleItems, fetchFloorOrder, fetchHighestOffer, fetchInventory, fetchListCollectibles, fetchListTokenMetadata, fetchLowestListing, fetchMarketCurrencies, floorOrderQueryOptions, highestOfferQueryOptions, inventoryOptions, listBalancesOptions, listCollectiblesQueryOptions, listTokenMetadataQueryOptions, lowestListingQueryOptions, marketCurrenciesQueryOptions };
414
- //# sourceMappingURL=index-DPNWNa7t.d.ts.map