@0xsequence/marketplace-sdk 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -3
- package/dist/{BellIcon-ByhygxBO.js → BellIcon.js} +4 -4
- package/dist/BellIcon.js.map +1 -0
- package/dist/{CartIcon-Bt3rQYGk.js → CartIcon.js} +7 -7
- package/dist/CartIcon.js.map +1 -0
- package/dist/CollectibleCard.d.ts +8 -0
- package/dist/{_internal-DkS2VUn5.js → _internal.js} +2 -2
- package/dist/_internal.js.map +1 -0
- package/dist/{abi-fa-o9gH3.js → abi.js} +2 -2
- package/dist/abi.js.map +1 -0
- package/dist/{alien_swap-DoY6XfMA.js → alien_swap.js} +1 -1
- package/dist/alien_swap.js.map +1 -0
- package/dist/{api-BoO0V5aJ.js → api.js} +13 -64
- package/dist/api.js.map +1 -0
- package/dist/{aqua-xyz-BBDxnG14.js → aqua-xyz.js} +1 -1
- package/dist/aqua-xyz.js.map +1 -0
- package/dist/{aura-DGx2zwvF.js → aura.js} +1 -1
- package/dist/aura.js.map +1 -0
- package/dist/{blur-D8GKrRrq.js → blur.js} +1 -1
- package/dist/blur.js.map +1 -0
- package/dist/{builder-api-BFuZNOaN.js → builder-api.js} +3 -3
- package/dist/builder-api.js.map +1 -0
- package/dist/{builder.gen-B9wR2nvF.js → builder.gen.js} +3 -6
- package/dist/builder.gen.js.map +1 -0
- package/dist/{coinbase-DOry4PXY.js → coinbase.js} +1 -1
- package/dist/coinbase.js.map +1 -0
- package/dist/{collectibles-C_H8jMGH.js → collectibles.js} +9 -48
- package/dist/collectibles.js.map +1 -0
- package/dist/{collections-CKummc-R.js → collections.js} +79 -8
- package/dist/collections.js.map +1 -0
- package/dist/{components-CosnX7F9.js → components.js} +12 -14
- package/dist/components.js.map +1 -0
- package/dist/{contracts-BP_0vX48.js → contracts.js} +4 -4
- package/dist/contracts.js.map +1 -0
- package/dist/{create-config-ZOB7i4ZJ.d.ts → create-config.d.ts} +47 -60
- package/dist/{create-config-CIfejoCk.js → create-config.js} +10 -13
- package/dist/create-config.js.map +1 -0
- package/dist/{element-ciybd_VF.js → element.js} +1 -1
- package/dist/element.js.map +1 -0
- package/dist/{filters-V-V8Dn8f.d.ts → filters.d.ts} +7 -7
- package/dist/{foundation-Bq4lRz4x.js → foundation.js} +1 -1
- package/dist/foundation.js.map +1 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +16 -16
- package/dist/{index-DUXfvhxs.d.ts → index10.d.ts} +14 -29
- package/dist/{index-CxA34wP1.d.ts → index11.d.ts} +101 -23
- package/dist/{index-BtWMBHeP.d.ts → index12.d.ts} +11 -9
- package/dist/{index-DmudgrsN.d.ts → index13.d.ts} +16 -16
- package/dist/{index-U-zp70of.d.ts → index14.d.ts} +9 -13
- package/dist/{index-Stm5u0I0.d.ts → index16.d.ts} +7 -10
- package/dist/{index-BZIJTQT0.d.ts → index17.d.ts} +9 -9
- package/dist/{index-CnEbXm_t.d.ts → index19.d.ts} +50 -12
- package/dist/{index-C-745li7.d.ts → index2.d.ts} +2 -2
- package/dist/{index-BOiHR01C.d.ts → index21.d.ts} +9 -9
- package/dist/{index-Bsx6XsC2.d.ts → index23.d.ts} +100 -59
- package/dist/{index-CPzvNmq9.d.ts → index24.d.ts} +36 -36
- package/dist/{index-DFEnA6Wa.d.ts → index25.d.ts} +18 -18
- package/dist/{index-DqXd1EeB.d.ts → index26.d.ts} +14 -7
- package/dist/{index-NlPMNcqh.d.ts → index27.d.ts} +102 -114
- package/dist/{index-DWt6yrIG.d.ts → index28.d.ts} +8 -8
- package/dist/{index-C4MUKshG.d.ts → index29.d.ts} +3 -3
- package/dist/{index-BeRV-7AX.d.ts → index3.d.ts} +2 -2
- package/dist/{index-Bxzjy0d1.d.ts → index4.d.ts} +2 -2
- package/dist/{index-DwKr18CI.d.ts → index5.d.ts} +2 -2
- package/dist/{index-D9LPlmbC.d.ts → index6.d.ts} +2 -2
- package/dist/{index-CS65jqOq.d.ts → index7.d.ts} +19 -3
- package/dist/index8.d.ts +18 -0
- package/dist/{index-CxpFwGvR.d.ts → index9.d.ts} +4 -4
- package/dist/{inventory-Dd7TazvZ.js → inventory.js} +11 -15
- package/dist/inventory.js.map +1 -0
- package/dist/{listCollectiblesPaginated-Cy2_qEZA.d.ts → listCollectiblesPaginated.d.ts} +24 -29
- package/dist/{listCollections-BB9FxKj2.d.ts → listCollections.d.ts} +170 -100
- package/dist/{looks-rare-6H--x3AM.js → looks-rare.js} +1 -1
- package/dist/looks-rare.js.map +1 -0
- package/dist/{lowestListing-Cbsi6M1K.d.ts → lowestListing.d.ts} +28 -28
- package/dist/{magic-eden-BoxEQ1Li.js → magic-eden.js} +1 -1
- package/dist/magic-eden.js.map +1 -0
- package/dist/{manifold-DycKsljb.js → manifold.js} +1 -1
- package/dist/manifold.js.map +1 -0
- package/dist/{market-C3HV-awQ.js → market.js} +7 -9
- package/dist/market.js.map +1 -0
- package/dist/{marketCurrencies-Bpw1bIO0.d.ts → marketCurrencies.d.ts} +19 -9
- package/dist/{marketCurrencies-sKrTX0og.js → marketCurrencies.js} +10 -7
- package/dist/marketCurrencies.js.map +1 -0
- package/dist/{marketplace-logos-D4dS1Foy.js → marketplace-logos.js} +23 -23
- package/dist/marketplace-logos.js.map +1 -0
- package/dist/{marketplace.gen-ksUafDqS.js → marketplace.gen.js} +25 -9
- package/dist/marketplace.gen.js.map +1 -0
- package/dist/{marketplace-NQB-sEQL.js → marketplace.js} +2 -2
- package/dist/marketplace.js.map +1 -0
- package/dist/{marketplaceConfig-UHQMM9fq.js → marketplaceConfig.js} +3 -3
- package/dist/marketplaceConfig.js.map +1 -0
- package/dist/{mintify-Dyqyo8jQ.js → mintify.js} +1 -1
- package/dist/mintify.js.map +1 -0
- package/dist/{network-DtmiMhcg.js → network.js} +3 -3
- package/dist/network.js.map +1 -0
- package/dist/{networkconfigToWagmiChain-DbUf6HiO.js → networkconfigToWagmiChain.js} +4 -3
- package/dist/networkconfigToWagmiChain.js.map +1 -0
- package/dist/{nftx-2LbFjj9Q.js → nftx.js} +1 -1
- package/dist/nftx.js.map +1 -0
- package/dist/{okx-CBEWJNsR.js → okx.js} +1 -1
- package/dist/okx.js.map +1 -0
- package/dist/{open-sea-Dxntz_PA.js → open-sea.js} +1 -1
- package/dist/open-sea.js.map +1 -0
- package/dist/{orders-DnFfZAXV.js → orders.js} +10 -10
- package/dist/orders.js.map +1 -0
- package/dist/{primary-sale-1u4QlPdA.js → primary-sale.js} +2 -2
- package/dist/primary-sale.js.map +1 -0
- package/dist/{primary-sales-Dmsi6bqj.js → primary-sales.js} +41 -3
- package/dist/primary-sales.js.map +1 -0
- package/dist/{query-BWbCsXLY.d.ts → query.d.ts} +2 -2
- package/dist/{rarible-CS0SupHr.js → rarible.js} +1 -1
- package/dist/rarible.js.map +1 -0
- package/dist/react/_internal/api/index.d.ts +2 -2
- package/dist/react/_internal/api/index.js +7 -7
- package/dist/react/_internal/databeat/index.d.ts +1 -1
- package/dist/react/_internal/databeat/index.js +37 -38
- package/dist/react/_internal/index.d.ts +2 -2
- package/dist/react/_internal/index.js +11 -11
- package/dist/react/_internal/wagmi/index.d.ts +1 -1
- package/dist/react/_internal/wagmi/index.js +5 -5
- package/dist/react/hooks/config/index.d.ts +8 -8
- package/dist/react/hooks/config/index.js +37 -38
- package/dist/react/hooks/contracts/index.d.ts +6 -6
- package/dist/react/hooks/contracts/index.js +15 -15
- package/dist/react/hooks/data/collectibles/index.d.ts +4 -10
- package/dist/react/hooks/data/collectibles/index.js +37 -38
- package/dist/react/hooks/data/collections/index.d.ts +11 -11
- package/dist/react/hooks/data/collections/index.js +38 -39
- package/dist/react/hooks/data/index.d.ts +37 -37
- package/dist/react/hooks/data/index.js +38 -39
- package/dist/react/hooks/data/inventory/index.d.ts +36 -36
- package/dist/react/hooks/data/inventory/index.js +37 -38
- package/dist/react/hooks/data/market/index.d.ts +5 -11
- package/dist/react/hooks/data/market/index.js +37 -38
- package/dist/react/hooks/data/orders/index.d.ts +4 -10
- package/dist/react/hooks/data/orders/index.js +37 -38
- package/dist/react/hooks/data/primary-sales/index.d.ts +37 -37
- package/dist/react/hooks/data/primary-sales/index.js +38 -39
- package/dist/react/hooks/data/tokens/index.d.ts +4 -4
- package/dist/react/hooks/data/tokens/index.js +37 -38
- package/dist/react/hooks/index.d.ts +37 -37
- package/dist/react/hooks/index.js +38 -39
- package/dist/react/hooks/transactions/index.d.ts +2 -2
- package/dist/react/hooks/transactions/index.js +37 -38
- package/dist/react/hooks/ui/index.d.ts +4 -4
- package/dist/react/hooks/ui/index.js +37 -38
- package/dist/react/hooks/utils/index.d.ts +36 -36
- package/dist/react/hooks/utils/index.js +37 -38
- package/dist/react/index.d.ts +37 -37
- package/dist/react/index.js +38 -39
- package/dist/react/queries/collectibles/index.d.ts +4 -10
- package/dist/react/queries/collectibles/index.js +20 -21
- package/dist/react/queries/collections/index.d.ts +11 -11
- package/dist/react/queries/collections/index.js +19 -19
- package/dist/react/queries/index.d.ts +24 -24
- package/dist/react/queries/index.js +30 -31
- package/dist/react/queries/inventory/index.d.ts +2 -2
- package/dist/react/queries/inventory/index.js +20 -20
- package/dist/react/queries/market/index.d.ts +5 -5
- package/dist/react/queries/market/index.js +20 -20
- package/dist/react/queries/orders/index.d.ts +4 -10
- package/dist/react/queries/orders/index.js +11 -11
- package/dist/react/queries/primary-sales/index.d.ts +4 -4
- package/dist/react/queries/primary-sales/index.js +12 -12
- package/dist/react/queries/tokens/index.d.ts +4 -4
- package/dist/react/queries/tokens/index.js +11 -12
- package/dist/react/queries/utils/index.d.ts +3 -3
- package/dist/react/queries/utils/index.js +20 -20
- package/dist/react/ssr/index.d.ts +7 -7
- package/dist/react/ssr/index.js +13 -16
- package/dist/react/ssr/index.js.map +1 -1
- package/dist/react/ui/components/marketplace-collectible-card/components/footer/components/index.d.ts +2 -2
- package/dist/react/ui/components/marketplace-collectible-card/components/footer/components/index.js +20 -20
- package/dist/react/ui/components/marketplace-collectible-card/components/footer/index.d.ts +7 -10
- package/dist/react/ui/components/marketplace-collectible-card/components/footer/index.js +37 -38
- package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +4 -4
- package/dist/react/ui/components/marketplace-collectible-card/index.js +37 -38
- package/dist/react/ui/components/marketplace-collectible-card/utils/index.d.ts +2 -2
- package/dist/react/ui/components/marketplace-collectible-card/utils/index.js +11 -11
- package/dist/react/ui/components/marketplace-logos/index.d.ts +21 -21
- package/dist/react/ui/components/marketplace-logos/index.js +1 -1
- package/dist/react/ui/icons/index.js +14 -14
- package/dist/react/ui/index.d.ts +4 -4
- package/dist/react/ui/index.js +37 -38
- package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +2 -2
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +37 -38
- package/dist/react/utils/index.d.ts +1 -1
- package/dist/react/utils/index.js +7 -7
- package/dist/{react-DE852KeT.js → react.js} +720 -926
- package/dist/react.js.map +1 -0
- package/dist/{sequence-paCCener.js → sequence.js} +1 -1
- package/dist/sequence.js.map +1 -0
- package/dist/{src-Dz2CfBL0.js → src.js} +2 -2
- package/dist/src.js.map +1 -0
- package/dist/styles/index.css +1 -1
- package/dist/{sudo-swap-9rH2EgfT.js → sudo-swap.js} +1 -1
- package/dist/sudo-swap.js.map +1 -0
- package/dist/{super-rare-DHIuWtRw.js → super-rare.js} +1 -1
- package/dist/super-rare.js.map +1 -0
- package/dist/{token-Cv7l2ZaL.js → token.js} +2 -2
- package/dist/token.js.map +1 -0
- package/dist/{tokenBalances-ibDerNmM.js → tokenBalances.js} +4 -11
- package/dist/tokenBalances.js.map +1 -0
- package/dist/{tokenSupplies-Bfe8RHzI.d.ts → tokenSupplies.d.ts} +19 -30
- package/dist/{tokens-cGxMadd8.js → tokens.js} +47 -22
- package/dist/tokens.js.map +1 -0
- package/dist/{transaction-DZUW5RHu.js → transaction.js} +2 -2
- package/dist/transaction.js.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +3 -3
- package/dist/{types-D2TJ1dwv.d.ts → types.d.ts} +3 -3
- package/dist/{types-B_-cnkcP.js → types.js} +2 -2
- package/dist/types.js.map +1 -0
- package/dist/utils/abi/index.d.ts +4 -4
- package/dist/utils/abi/index.js +4 -4
- package/dist/utils/abi/marketplace/index.d.ts +1 -1
- package/dist/utils/abi/marketplace/index.js +1 -1
- package/dist/utils/abi/primary-sale/index.d.ts +1 -1
- package/dist/utils/abi/primary-sale/index.js +1 -1
- package/dist/utils/abi/token/index.d.ts +1 -1
- package/dist/utils/abi/token/index.js +1 -1
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.js +13 -13
- package/dist/{utils-BfpDVibN.js → utils.js} +42 -4
- package/dist/utils.js.map +1 -0
- package/dist/{utils-BCgNhBFR.js → utils2.js} +11 -5
- package/dist/utils2.js.map +1 -0
- package/dist/{utils-BqxcalL2.js → utils3.js} +3 -3
- package/dist/utils3.js.map +1 -0
- package/dist/{waitForTransactionReceipt-DieAnV52.js → waitForTransactionReceipt.js} +3 -3
- package/dist/waitForTransactionReceipt.js.map +1 -0
- package/dist/{x2y2-45WDooeh.js → x2y2.js} +1 -1
- package/dist/x2y2.js.map +1 -0
- package/dist/{zora-CbeBoLvQ.js → zora.js} +1 -1
- package/dist/zora.js.map +1 -0
- package/package.json +42 -42
- package/src/react/_internal/api/__mocks__/marketplace.msw.ts +13 -0
- package/src/react/_internal/api/index.ts +0 -1
- package/src/react/_internal/api/marketplace.gen.ts +70 -26
- package/src/react/_internal/api/query-keys.ts +9 -0
- package/src/react/_internal/wagmi/get-connectors.ts +12 -1
- package/src/react/hooks/data/collectibles/useBalanceOfCollectible.tsx +0 -9
- package/src/react/hooks/data/collectibles/useListCollectibles.tsx +1 -16
- package/src/react/hooks/data/collectibles/useTokenBalances.tsx +0 -9
- package/src/react/hooks/data/collections/index.ts +2 -0
- package/src/react/hooks/data/collections/useCollectionActiveListingsCurrencies.test.tsx +112 -0
- package/src/react/hooks/data/collections/useCollectionActiveListingsCurrencies.tsx +74 -0
- package/src/react/hooks/data/collections/useCollectionActiveOffersCurrencies.test.tsx +110 -0
- package/src/react/hooks/data/collections/useCollectionActiveOffersCurrencies.tsx +74 -0
- package/src/react/hooks/data/inventory/useInventory.tsx +1 -10
- package/src/react/hooks/data/market/useMarketCurrencies.test.tsx +31 -2
- package/src/react/hooks/data/primary-sales/index.ts +1 -0
- package/src/react/hooks/data/primary-sales/usePrimarySaleItem.tsx +71 -0
- package/src/react/hooks/data/tokens/useListBalances.tsx +1 -10
- package/src/react/hooks/data/tokens/useTokenSupplies.ts +1 -13
- package/src/react/hooks/transactions/useGenerateOfferTransaction.test.tsx +2 -0
- package/src/react/hooks/transactions/useProcessStep.test.tsx +8 -6
- package/src/react/hooks/transactions/useProcessStep.ts +8 -6
- package/src/react/hooks/utils/useComparePrices.test.tsx +1 -1
- package/src/react/providers/modal-provider.tsx +2 -1
- package/src/react/queries/collectibles/balanceOfCollectible.ts +1 -15
- package/src/react/queries/collectibles/listCollectibles.ts +1 -54
- package/src/react/queries/collectibles/tokenBalances.ts +1 -15
- package/src/react/queries/collections/activeListingsCurrencies.ts +84 -0
- package/src/react/queries/collections/activeOffersCurrencies.ts +84 -0
- package/src/react/queries/collections/index.ts +2 -0
- package/src/react/queries/inventory/inventory.ts +2 -9
- package/src/react/queries/market/marketCurrencies.ts +8 -1
- package/src/react/queries/primary-sales/index.ts +1 -0
- package/src/react/queries/primary-sales/primarySaleItem.ts +80 -0
- package/src/react/queries/tokens/listBalances.ts +1 -21
- package/src/react/queries/tokens/tokenSupplies.ts +2 -31
- package/src/react/queries/utils/comparePrices.ts +13 -1
- package/src/react/ui/components/_internals/action-button/ActionButton.stories.tsx +2 -0
- package/src/react/ui/components/marketplace-collectible-card/components/footer/Footer.tsx +4 -18
- package/src/react/ui/components/marketplace-collectible-card/variants/MarketCard.tsx +2 -2
- package/src/react/ui/components/marketplace-collectible-card/variants/ShopCard.tsx +0 -2
- package/src/react/ui/modals/BuyModal/__tests__/BuyModalRouter.test.tsx +3 -0
- package/src/react/ui/modals/BuyModal/__tests__/ERC1155ShopModal.test.tsx +152 -141
- package/src/react/ui/modals/BuyModal/__tests__/Modal1155.test.tsx +1 -0
- package/src/react/ui/modals/BuyModal/components/ERC1155ShopModal.tsx +44 -60
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC1155SalePaymentParams.test.tsx +381 -0
- package/src/react/ui/modals/BuyModal/hooks/useERC1155SalePaymentParams.ts +257 -0
- package/src/react/ui/modals/BuyModal/hooks/usePaymentModalParams.ts +0 -23
- package/src/react/ui/modals/MakeOfferModal/Modal.tsx +22 -2
- package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +2 -0
- package/src/react/ui/modals/MakeOfferModal/hooks/useGetTokenApproval.tsx +2 -0
- package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +2 -0
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +1 -1
- package/src/react/ui/modals/TransferModal/index.tsx +24 -2
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +15 -12
- package/src/react/ui/modals/_internal/components/floorPriceText/__tests__/FloorPriceText.test.tsx +2 -0
- package/src/react/ui/modals/_internal/components/floorPriceText/index.tsx +1 -1
- package/src/react/ui/modals/_internal/components/priceInput/index.tsx +148 -11
- package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +1 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/utils.test.ts +2 -0
- package/src/styles/styles.ts +2 -2
- package/src/utils/networkconfigToWagmiChain.ts +7 -0
- package/src/utils/price.ts +58 -0
- package/test/const.ts +2 -0
- package/test/server-setup.ts +0 -2
- package/tsdown.config.ts +1 -0
- package/.changeset/honest-peas-arrive.md +0 -5
- package/.changeset/real-tips-stick.md +0 -8
- package/.changeset/tall-pandas-wear.md +0 -8
- package/dist/BellIcon-ByhygxBO.js.map +0 -1
- package/dist/CartIcon-Bt3rQYGk.js.map +0 -1
- package/dist/CollectibleCard-CVpdgXA8.d.ts +0 -8
- package/dist/_internal-DkS2VUn5.js.map +0 -1
- package/dist/abi-fa-o9gH3.js.map +0 -1
- package/dist/alien_swap-DoY6XfMA.js.map +0 -1
- package/dist/api-BoO0V5aJ.js.map +0 -1
- package/dist/aqua-xyz-BBDxnG14.js.map +0 -1
- package/dist/aura-DGx2zwvF.js.map +0 -1
- package/dist/blur-D8GKrRrq.js.map +0 -1
- package/dist/builder-api-BFuZNOaN.js.map +0 -1
- package/dist/builder.gen-B9wR2nvF.js.map +0 -1
- package/dist/coinbase-DOry4PXY.js.map +0 -1
- package/dist/collectibles-C_H8jMGH.js.map +0 -1
- package/dist/collections-CKummc-R.js.map +0 -1
- package/dist/components-CosnX7F9.js.map +0 -1
- package/dist/contracts-BP_0vX48.js.map +0 -1
- package/dist/create-config-CIfejoCk.js.map +0 -1
- package/dist/element-ciybd_VF.js.map +0 -1
- package/dist/foundation-Bq4lRz4x.js.map +0 -1
- package/dist/index-DNNUeZEq.d.ts +0 -18
- package/dist/inventory-Dd7TazvZ.js.map +0 -1
- package/dist/listBalances-BxpxBCvn.js +0 -57
- package/dist/listBalances-BxpxBCvn.js.map +0 -1
- package/dist/looks-rare-6H--x3AM.js.map +0 -1
- package/dist/magic-eden-BoxEQ1Li.js.map +0 -1
- package/dist/manifold-DycKsljb.js.map +0 -1
- package/dist/market-C3HV-awQ.js.map +0 -1
- package/dist/marketCurrencies-sKrTX0og.js.map +0 -1
- package/dist/marketplace-NQB-sEQL.js.map +0 -1
- package/dist/marketplace-logos-D4dS1Foy.js.map +0 -1
- package/dist/marketplace.gen-ksUafDqS.js.map +0 -1
- package/dist/marketplaceConfig-UHQMM9fq.js.map +0 -1
- package/dist/mintify-Dyqyo8jQ.js.map +0 -1
- package/dist/network-DtmiMhcg.js.map +0 -1
- package/dist/networkconfigToWagmiChain-DbUf6HiO.js.map +0 -1
- package/dist/nftx-2LbFjj9Q.js.map +0 -1
- package/dist/okx-CBEWJNsR.js.map +0 -1
- package/dist/open-sea-Dxntz_PA.js.map +0 -1
- package/dist/orders-DnFfZAXV.js.map +0 -1
- package/dist/primary-sale-1u4QlPdA.js.map +0 -1
- package/dist/primary-sales-Dmsi6bqj.js.map +0 -1
- package/dist/rarible-CS0SupHr.js.map +0 -1
- package/dist/react-DE852KeT.js.map +0 -1
- package/dist/sequence-paCCener.js.map +0 -1
- package/dist/src-Dz2CfBL0.js.map +0 -1
- package/dist/sudo-swap-9rH2EgfT.js.map +0 -1
- package/dist/super-rare-DHIuWtRw.js.map +0 -1
- package/dist/token-Cv7l2ZaL.js.map +0 -1
- package/dist/tokenBalances-ibDerNmM.js.map +0 -1
- package/dist/tokens-cGxMadd8.js.map +0 -1
- package/dist/transaction-DZUW5RHu.js.map +0 -1
- package/dist/types-B_-cnkcP.js.map +0 -1
- package/dist/utils-BCgNhBFR.js.map +0 -1
- package/dist/utils-BfpDVibN.js.map +0 -1
- package/dist/utils-BqxcalL2.js.map +0 -1
- package/dist/waitForTransactionReceipt-DieAnV52.js.map +0 -1
- package/dist/x2y2-45WDooeh.js.map +0 -1
- package/dist/zora-CbeBoLvQ.js.map +0 -1
- package/src/react/_internal/api/__mocks__/laos.msw.ts +0 -387
- package/src/react/_internal/api/__tests__/laos-api.test.ts +0 -756
- package/src/react/_internal/api/laos-api.ts +0 -106
- package/src/react/hooks/data/collectibles/useBalanceOfCollectible.laos.test.tsx +0 -367
- package/src/react/queries/collectibles/__tests__/balanceOfCollectible.laos.test.ts +0 -123
- package/src/react/queries/collectibles/__tests__/tokenBalances.laos.test.ts +0 -123
- package/src/react/queries/inventory/__tests__/inventory.laos.test.ts +0 -499
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC1155Checkout.test.tsx +0 -395
- package/src/react/ui/modals/BuyModal/hooks/useERC1155Checkout.ts +0 -103
- package/src/react/ui/modals/_internal/constants/opensea-currencies.ts +0 -481
- /package/dist/{index-6wsMChsg.d.ts → index15.d.ts} +0 -0
- /package/dist/{index-CZUtOTjh.d.ts → index18.d.ts} +0 -0
- /package/dist/{index-DW3njUfb.d.ts → index20.d.ts} +0 -0
- /package/dist/{index-DewGsFz5.d.ts → index22.d.ts} +0 -0
- /package/dist/{queries-KOcILNJO.js → queries.js} +0 -0
- /package/dist/{wagmi-Bseovd6Q.js → wagmi.js} +0 -0
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
GetTokenBalancesReturn,
|
|
3
|
-
GetTokenSuppliesReturn,
|
|
4
|
-
} from '@0xsequence/indexer';
|
|
5
|
-
import { ResourceStatus } from '@0xsequence/metadata';
|
|
6
|
-
import { HttpResponse, http } from 'msw';
|
|
7
|
-
|
|
8
|
-
const mockTokenSuppliesResponse: GetTokenSuppliesReturn = {
|
|
9
|
-
page: {
|
|
10
|
-
pageSize: 50,
|
|
11
|
-
more: false,
|
|
12
|
-
sort: [
|
|
13
|
-
{
|
|
14
|
-
column: 'CREATED_AT',
|
|
15
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
16
|
-
order: 'DESC' as any,
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
21
|
-
contractType: 'LAOS-ERC-721' as any,
|
|
22
|
-
tokenIDs: [
|
|
23
|
-
{
|
|
24
|
-
tokenID: '1',
|
|
25
|
-
supply: '1000',
|
|
26
|
-
chainId: 11155111,
|
|
27
|
-
contractInfo: {
|
|
28
|
-
chainId: 11155111,
|
|
29
|
-
address: '0x1234567890123456789012345678901234567890',
|
|
30
|
-
name: 'Test LAOS Collection',
|
|
31
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
32
|
-
type: 'LAOS-ERC-721' as any,
|
|
33
|
-
symbol: 'TLC',
|
|
34
|
-
decimals: 0,
|
|
35
|
-
logoURI: 'https://example.com/logo.png',
|
|
36
|
-
deployed: true,
|
|
37
|
-
bytecodeHash: '0xhash123',
|
|
38
|
-
source: 'laos',
|
|
39
|
-
updatedAt: '2023-01-01T00:00:00.000Z',
|
|
40
|
-
status: ResourceStatus.AVAILABLE,
|
|
41
|
-
// @ts-expect-error - LAOS extensions
|
|
42
|
-
extensions: {
|
|
43
|
-
link: 'https://example.com',
|
|
44
|
-
description: 'Test LAOS collection for testing',
|
|
45
|
-
ogImage: 'https://example.com/og.png',
|
|
46
|
-
originChainId: 11155111,
|
|
47
|
-
originAddress: '0x1234567890123456789012345678901234567890',
|
|
48
|
-
categories: [],
|
|
49
|
-
ogName: 'LAOS Test',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
tokenMetadata: {
|
|
54
|
-
tokenId: '1',
|
|
55
|
-
contractAddress: '0x1234567890123456789012345678901234567890',
|
|
56
|
-
name: 'Test Token 1',
|
|
57
|
-
description: 'A test token for LAOS testing',
|
|
58
|
-
image: 'https://example.com/token1.png',
|
|
59
|
-
decimals: 0,
|
|
60
|
-
properties: {},
|
|
61
|
-
attributes: [
|
|
62
|
-
{
|
|
63
|
-
trait_type: 'Rarity',
|
|
64
|
-
value: 'Common',
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
source: '',
|
|
68
|
-
status: ResourceStatus.NOT_AVAILABLE,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
tokenID: '2',
|
|
73
|
-
supply: '500',
|
|
74
|
-
chainId: 11155111,
|
|
75
|
-
contractInfo: {
|
|
76
|
-
chainId: 11155111,
|
|
77
|
-
address: '0x1234567890123456789012345678901234567890',
|
|
78
|
-
name: 'Test LAOS Collection',
|
|
79
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
80
|
-
type: 'LAOS-ERC-721' as any,
|
|
81
|
-
symbol: 'TLC',
|
|
82
|
-
decimals: 0,
|
|
83
|
-
logoURI: 'https://example.com/logo.png',
|
|
84
|
-
deployed: true,
|
|
85
|
-
bytecodeHash: '0xhash123',
|
|
86
|
-
source: 'laos',
|
|
87
|
-
updatedAt: '2023-01-01T00:00:00.000Z',
|
|
88
|
-
status: ResourceStatus.AVAILABLE,
|
|
89
|
-
extensions: {
|
|
90
|
-
link: 'https://example.com',
|
|
91
|
-
description: 'Test LAOS collection for testing',
|
|
92
|
-
ogImage: 'https://example.com/og.png',
|
|
93
|
-
originChainId: 11155111,
|
|
94
|
-
originAddress: '0x1234567890123456789012345678901234567890',
|
|
95
|
-
categories: [],
|
|
96
|
-
ogName: 'LAOS Test',
|
|
97
|
-
blacklist: false,
|
|
98
|
-
verified: true,
|
|
99
|
-
verifiedBy: 'system',
|
|
100
|
-
featured: false,
|
|
101
|
-
featureIndex: 0,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
tokenMetadata: {
|
|
105
|
-
tokenId: '2',
|
|
106
|
-
contractAddress: '0x1234567890123456789012345678901234567890',
|
|
107
|
-
name: 'Test Token 2',
|
|
108
|
-
description: 'Another test token for LAOS testing',
|
|
109
|
-
image: 'https://example.com/token2.png',
|
|
110
|
-
decimals: 0,
|
|
111
|
-
properties: {},
|
|
112
|
-
attributes: [
|
|
113
|
-
{
|
|
114
|
-
trait_type: 'Rarity',
|
|
115
|
-
value: 'Rare',
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
source: '',
|
|
119
|
-
status: ResourceStatus.NOT_AVAILABLE,
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
const mockTokenBalancesResponse: GetTokenBalancesReturn = {
|
|
126
|
-
page: {
|
|
127
|
-
pageSize: 50,
|
|
128
|
-
more: false,
|
|
129
|
-
sort: [
|
|
130
|
-
{
|
|
131
|
-
column: 'CREATED_AT',
|
|
132
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
133
|
-
order: 'DESC' as any,
|
|
134
|
-
},
|
|
135
|
-
],
|
|
136
|
-
},
|
|
137
|
-
balances: [
|
|
138
|
-
{
|
|
139
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
140
|
-
contractType: 'LAOS-ERC-721' as any,
|
|
141
|
-
contractAddress: '0x1234567890123456789012345678901234567890',
|
|
142
|
-
accountAddress: '0xuser1234567890123456789012345678901234567890',
|
|
143
|
-
tokenID: '1',
|
|
144
|
-
balance: '5',
|
|
145
|
-
blockHash: '0xblock123',
|
|
146
|
-
blockNumber: 12345,
|
|
147
|
-
chainId: 11155111,
|
|
148
|
-
uniqueCollectibles: '1',
|
|
149
|
-
isSummary: false,
|
|
150
|
-
contractInfo: {
|
|
151
|
-
chainId: 11155111,
|
|
152
|
-
address: '0x1234567890123456789012345678901234567890',
|
|
153
|
-
name: 'Test LAOS Collection',
|
|
154
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
155
|
-
type: 'LAOS-ERC-721' as any,
|
|
156
|
-
symbol: 'TLC',
|
|
157
|
-
decimals: 0,
|
|
158
|
-
logoURI: 'https://example.com/logo.png',
|
|
159
|
-
deployed: true,
|
|
160
|
-
bytecodeHash: '0xhash123',
|
|
161
|
-
source: 'laos',
|
|
162
|
-
updatedAt: '2023-01-01T00:00:00.000Z',
|
|
163
|
-
status: ResourceStatus.AVAILABLE,
|
|
164
|
-
extensions: {
|
|
165
|
-
link: 'https://example.com',
|
|
166
|
-
description: 'Test LAOS collection for testing',
|
|
167
|
-
ogImage: 'https://example.com/og.png',
|
|
168
|
-
originChainId: 11155111,
|
|
169
|
-
originAddress: '0x1234567890123456789012345678901234567890',
|
|
170
|
-
categories: [],
|
|
171
|
-
ogName: 'LAOS Test',
|
|
172
|
-
blacklist: false,
|
|
173
|
-
verified: true,
|
|
174
|
-
verifiedBy: 'system',
|
|
175
|
-
featured: false,
|
|
176
|
-
featureIndex: 0,
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
tokenMetadata: {
|
|
180
|
-
tokenId: '1',
|
|
181
|
-
contractAddress: '0x1234567890123456789012345678901234567890',
|
|
182
|
-
name: 'Test Token 1',
|
|
183
|
-
description: 'A test token for LAOS testing',
|
|
184
|
-
image: 'https://example.com/token1.png',
|
|
185
|
-
decimals: 0,
|
|
186
|
-
properties: {},
|
|
187
|
-
source: 'onchain',
|
|
188
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
189
|
-
status: 'verified' as any,
|
|
190
|
-
attributes: [
|
|
191
|
-
{
|
|
192
|
-
trait_type: 'Rarity',
|
|
193
|
-
value: 'Common',
|
|
194
|
-
},
|
|
195
|
-
],
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
200
|
-
contractType: 'LAOS-ERC-721' as any,
|
|
201
|
-
contractAddress: '0x1234567890123456789012345678901234567890',
|
|
202
|
-
accountAddress: '0xuser1234567890123456789012345678901234567890',
|
|
203
|
-
tokenID: '2',
|
|
204
|
-
balance: '2',
|
|
205
|
-
blockHash: '0xblock124',
|
|
206
|
-
blockNumber: 12346,
|
|
207
|
-
chainId: 11155111,
|
|
208
|
-
uniqueCollectibles: '1',
|
|
209
|
-
isSummary: false,
|
|
210
|
-
contractInfo: {
|
|
211
|
-
chainId: 11155111,
|
|
212
|
-
address: '0x1234567890123456789012345678901234567890',
|
|
213
|
-
name: 'Test LAOS Collection',
|
|
214
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
215
|
-
type: 'LAOS-ERC-721' as any,
|
|
216
|
-
symbol: 'TLC',
|
|
217
|
-
decimals: 0,
|
|
218
|
-
logoURI: 'https://example.com/logo.png',
|
|
219
|
-
deployed: true,
|
|
220
|
-
bytecodeHash: '0xhash123',
|
|
221
|
-
source: 'laos',
|
|
222
|
-
updatedAt: '2023-01-01T00:00:00.000Z',
|
|
223
|
-
status: ResourceStatus.AVAILABLE,
|
|
224
|
-
extensions: {
|
|
225
|
-
link: 'https://example.com',
|
|
226
|
-
description: 'Test LAOS collection for testing',
|
|
227
|
-
ogImage: 'https://example.com/og.png',
|
|
228
|
-
originChainId: 11155111,
|
|
229
|
-
originAddress: '0x1234567890123456789012345678901234567890',
|
|
230
|
-
categories: [],
|
|
231
|
-
ogName: 'LAOS Test',
|
|
232
|
-
blacklist: false,
|
|
233
|
-
verified: true,
|
|
234
|
-
verifiedBy: 'system',
|
|
235
|
-
featured: false,
|
|
236
|
-
featureIndex: 0,
|
|
237
|
-
},
|
|
238
|
-
},
|
|
239
|
-
tokenMetadata: {
|
|
240
|
-
tokenId: '2',
|
|
241
|
-
contractAddress: '0x1234567890123456789012345678901234567890',
|
|
242
|
-
name: 'Test Token 2',
|
|
243
|
-
description: 'Another test token for LAOS testing',
|
|
244
|
-
image: 'https://example.com/token2.png',
|
|
245
|
-
decimals: 0,
|
|
246
|
-
properties: {},
|
|
247
|
-
attributes: [
|
|
248
|
-
{
|
|
249
|
-
trait_type: 'Rarity',
|
|
250
|
-
value: 'Rare',
|
|
251
|
-
},
|
|
252
|
-
],
|
|
253
|
-
source: '',
|
|
254
|
-
status: ResourceStatus.NOT_AVAILABLE,
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
export const laosHandlers = [
|
|
261
|
-
// Mock GetTokenSupplies endpoint
|
|
262
|
-
http.post(
|
|
263
|
-
'https://extensions.api.laosnetwork.io/token/GetTokenSupplies',
|
|
264
|
-
async ({ request }) => {
|
|
265
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
266
|
-
const body = (await request.json()) as Record<string, any>;
|
|
267
|
-
|
|
268
|
-
// Handle error scenarios for testing
|
|
269
|
-
if (
|
|
270
|
-
body.contractAddress === '0x0000000000000000000000000000000000000000'
|
|
271
|
-
) {
|
|
272
|
-
return new HttpResponse(null, { status: 404 });
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
if (
|
|
276
|
-
body.contractAddress === '0x0000000000000000000000000000000000000001'
|
|
277
|
-
) {
|
|
278
|
-
return new HttpResponse('Internal Server Error', { status: 500 });
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
if (
|
|
282
|
-
body.contractAddress === '0x0000000000000000000000000000000000000002'
|
|
283
|
-
) {
|
|
284
|
-
return new HttpResponse('Bad Request', { status: 400 });
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// Handle empty results for testing
|
|
288
|
-
if (
|
|
289
|
-
body.contractAddress === '0x0000000000000000000000000000000000000003'
|
|
290
|
-
) {
|
|
291
|
-
return HttpResponse.json({
|
|
292
|
-
...mockTokenSuppliesResponse,
|
|
293
|
-
tokenIDs: [],
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// Handle pagination testing
|
|
298
|
-
if (body.page?.sort?.[0]?.order === 'ASC') {
|
|
299
|
-
const reversedSupplies = [
|
|
300
|
-
...mockTokenSuppliesResponse.tokenIDs,
|
|
301
|
-
].reverse();
|
|
302
|
-
return HttpResponse.json({
|
|
303
|
-
...mockTokenSuppliesResponse,
|
|
304
|
-
tokenIDs: reversedSupplies,
|
|
305
|
-
page: {
|
|
306
|
-
...mockTokenSuppliesResponse.page,
|
|
307
|
-
sort: [
|
|
308
|
-
{
|
|
309
|
-
column: 'CREATED_AT',
|
|
310
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
311
|
-
order: 'ASC' as any,
|
|
312
|
-
},
|
|
313
|
-
],
|
|
314
|
-
},
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Default successful response
|
|
319
|
-
return HttpResponse.json(mockTokenSuppliesResponse);
|
|
320
|
-
},
|
|
321
|
-
),
|
|
322
|
-
|
|
323
|
-
// Mock GetTokenBalances endpoint
|
|
324
|
-
http.post(
|
|
325
|
-
'https://extensions.api.laosnetwork.io/token/GetTokenBalances',
|
|
326
|
-
async ({ request }) => {
|
|
327
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
328
|
-
const body = (await request.json()) as Record<string, any>;
|
|
329
|
-
|
|
330
|
-
// Handle error scenarios for testing
|
|
331
|
-
if (
|
|
332
|
-
body.accountAddress === '0x0000000000000000000000000000000000000000'
|
|
333
|
-
) {
|
|
334
|
-
return new HttpResponse(null, { status: 404 });
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
if (
|
|
338
|
-
body.accountAddress === '0x0000000000000000000000000000000000000001'
|
|
339
|
-
) {
|
|
340
|
-
return new HttpResponse('Internal Server Error', { status: 500 });
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
if (
|
|
344
|
-
body.accountAddress === '0x0000000000000000000000000000000000000002'
|
|
345
|
-
) {
|
|
346
|
-
return new HttpResponse('Bad Request', { status: 400 });
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// Handle empty balances for testing
|
|
350
|
-
if (
|
|
351
|
-
body.accountAddress === '0x0000000000000000000000000000000000000003'
|
|
352
|
-
) {
|
|
353
|
-
return HttpResponse.json({
|
|
354
|
-
...mockTokenBalancesResponse,
|
|
355
|
-
balances: [],
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// Handle pagination testing
|
|
360
|
-
if (body.page?.sort?.[0]?.order === 'ASC') {
|
|
361
|
-
const reversedBalances = [
|
|
362
|
-
...mockTokenBalancesResponse.balances,
|
|
363
|
-
].reverse();
|
|
364
|
-
return HttpResponse.json({
|
|
365
|
-
...mockTokenBalancesResponse,
|
|
366
|
-
balances: reversedBalances,
|
|
367
|
-
page: {
|
|
368
|
-
...mockTokenBalancesResponse.page,
|
|
369
|
-
sort: [
|
|
370
|
-
{
|
|
371
|
-
column: 'CREATED_AT',
|
|
372
|
-
// biome-ignore lint/suspicious/noExplicitAny: Mock data requires any type for LAOS extensions
|
|
373
|
-
order: 'ASC' as any,
|
|
374
|
-
},
|
|
375
|
-
],
|
|
376
|
-
},
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// Default successful response
|
|
381
|
-
return HttpResponse.json(mockTokenBalancesResponse);
|
|
382
|
-
},
|
|
383
|
-
),
|
|
384
|
-
];
|
|
385
|
-
|
|
386
|
-
// Export mock data for use in tests
|
|
387
|
-
export { mockTokenSuppliesResponse, mockTokenBalancesResponse };
|