@0xsequence/marketplace-sdk 0.8.11 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +236 -2
- package/dist/CalendarIcon-DbQ7Vxcw.js +141 -0
- package/dist/CalendarIcon-DbQ7Vxcw.js.map +1 -0
- package/dist/CollectibleCard-C8Ae64Ab.d.ts +71 -0
- package/dist/_internal-BgWcRIak.js +22 -0
- package/dist/_internal-BgWcRIak.js.map +1 -0
- package/dist/abi-BKyRjVcZ.js +0 -0
- package/dist/{alien_swap-2B65TDGT.js → alien_swap-B_76IMma.js} +5 -5
- package/dist/alien_swap-B_76IMma.js.map +1 -0
- package/dist/api-DTIan01C.js +241 -0
- package/dist/api-DTIan01C.js.map +1 -0
- package/dist/{aqua-xyz-WMYQLAIS.js → aqua-xyz-CMN_TFY5.js} +5 -5
- package/dist/aqua-xyz-CMN_TFY5.js.map +1 -0
- package/dist/{aura-V22RV5OG.js → aura-Cye_TuHj.js} +5 -5
- package/dist/aura-Cye_TuHj.js.map +1 -0
- package/dist/{blur-GE5QOMCM.js → blur-DWDMyMpK.js} +5 -5
- package/dist/blur-DWDMyMpK.js.map +1 -0
- package/dist/builder-api-BFuZNOaN.js +28 -0
- package/dist/builder-api-BFuZNOaN.js.map +1 -0
- package/dist/builder-api-C_zj5mr3.d.ts +12 -0
- package/dist/builder.gen-B9wR2nvF.js +303 -0
- package/dist/builder.gen-B9wR2nvF.js.map +1 -0
- package/dist/{coinbase-NLHJMGAP.js → coinbase-ByA_XRB0.js} +5 -5
- package/dist/coinbase-ByA_XRB0.js.map +1 -0
- package/dist/{element-2LGTYYSP.js → element-b77CyXIZ.js} +5 -5
- package/dist/element-b77CyXIZ.js.map +1 -0
- package/dist/{foundation-BPN66ZTN.js → foundation-DbOrKP9Y.js} +5 -5
- package/dist/foundation-DbOrKP9Y.js.map +1 -0
- package/dist/index-21LE7OhL.d.ts +102 -0
- package/dist/index-BL9RUSEK.d.ts +1803 -0
- package/dist/index-BQsgAvtX.d.ts +2938 -0
- package/dist/index-BUVWziLP.d.ts +60 -0
- package/dist/index-ByznONYE.d.ts +187 -0
- package/dist/index-C39K_8SG.d.ts +1 -0
- package/dist/index-CLy8y5hm.d.ts +1057 -0
- package/dist/index-COt10OgI.d.ts +24 -0
- package/dist/index-D5v5iluA.d.ts +809 -0
- package/dist/index-DPNWNa7t.d.ts +414 -0
- package/dist/index-DXMfTZ1F.d.ts +7 -0
- package/dist/index-DaE5ZNHb.d.ts +24 -0
- package/dist/index-DsfCs3-x.d.ts +122 -0
- package/dist/index-DvpBZgor.d.ts +1 -0
- package/dist/index-dUb6wb4Y.d.ts +22 -0
- package/dist/index.css +397 -371
- package/dist/index.d.ts +10 -29
- package/dist/index.js +13 -104
- package/dist/{looks-rare-MZRSOPT4.js → looks-rare-C1VqNcSM.js} +5 -5
- package/dist/looks-rare-C1VqNcSM.js.map +1 -0
- package/dist/{magic-eden-PUBL6KWW.js → magic-eden-ea_AGCZr.js} +5 -5
- package/dist/magic-eden-ea_AGCZr.js.map +1 -0
- package/dist/{manifold-GA445YJ6.js → manifold-8y8J2sjT.js} +5 -5
- package/dist/manifold-8y8J2sjT.js.map +1 -0
- package/dist/marketplace-logos-CSeGcPW4.js +50 -0
- package/dist/marketplace-logos-CSeGcPW4.js.map +1 -0
- package/dist/marketplace-nwnZv9Cb.js +1913 -0
- package/dist/marketplace-nwnZv9Cb.js.map +1 -0
- package/dist/marketplace.gen-BSDIX7NZ.js +1077 -0
- package/dist/marketplace.gen-BSDIX7NZ.js.map +1 -0
- package/dist/marketplaceConfig-C6X1SUik.js +71 -0
- package/dist/marketplaceConfig-C6X1SUik.js.map +1 -0
- package/dist/{mintify-UMC5PTKC.js → mintify-LA68TzWg.js} +5 -5
- package/dist/mintify-LA68TzWg.js.map +1 -0
- package/dist/new-marketplace-types-Bfis0U4J.d.ts +1546 -0
- package/dist/{nftx-AX3CY3IE.js → nftx-D3Tc8nzd.js} +5 -5
- package/dist/nftx-D3Tc8nzd.js.map +1 -0
- package/dist/{okx-GNVLAE2R.js → okx-hbqg6oIJ.js} +5 -5
- package/dist/okx-hbqg6oIJ.js.map +1 -0
- package/dist/{open-sea-KI43GVEB.js → open-sea-BccuK8-t.js} +5 -5
- package/dist/open-sea-BccuK8-t.js.map +1 -0
- package/dist/options-B4QN7Xou.js +0 -0
- package/dist/primary-sale-C55ALnfQ.js +1264 -0
- package/dist/primary-sale-C55ALnfQ.js.map +1 -0
- package/dist/queries-CUU65uYZ.js +599 -0
- package/dist/queries-CUU65uYZ.js.map +1 -0
- package/dist/{rarible-2J3MMZJ7.js → rarible-BgTwwj9g.js} +5 -5
- package/dist/rarible-BgTwwj9g.js.map +1 -0
- package/dist/react/_internal/api/index.d.ts +4 -86
- package/dist/react/_internal/api/index.js +7 -150
- package/dist/react/_internal/databeat/index.d.ts +45 -41
- package/dist/react/_internal/databeat/index.js +23 -27
- package/dist/react/_internal/index.d.ts +7 -76
- package/dist/react/_internal/index.js +9 -176
- package/dist/react/_internal/wagmi/index.d.ts +4 -17
- package/dist/react/_internal/wagmi/index.js +5 -14
- package/dist/react/hooks/index.d.ts +18 -3652
- package/dist/react/hooks/index.js +23 -153
- package/dist/react/hooks/options/index.d.ts +4 -8
- package/dist/react/hooks/options/index.js +11 -21
- package/dist/react/index.d.ts +18 -36
- package/dist/react/index.js +23 -193
- package/dist/react/queries/index.d.ts +8 -26
- package/dist/react/queries/index.js +18 -51
- package/dist/react/ssr/index.d.ts +19 -13
- package/dist/react/ssr/index.js +29 -28
- package/dist/react/ssr/index.js.map +1 -1
- package/dist/react/ui/components/marketplace-collectible-card/index.d.ts +9 -0
- package/dist/react/ui/components/marketplace-collectible-card/index.js +23 -0
- package/dist/react/ui/components/marketplace-collectible-card/utils/index.d.ts +8 -0
- package/dist/react/ui/components/marketplace-collectible-card/utils/index.js +10 -0
- package/dist/react/ui/components/marketplace-logos/index.d.ts +26 -24
- package/dist/react/ui/components/marketplace-logos/index.js +3 -45
- package/dist/react/ui/icons/index.d.ts +1 -2
- package/dist/react/ui/icons/index.js +10 -14
- package/dist/react/ui/index.d.ts +9 -116
- package/dist/react/ui/index.js +23 -41
- package/dist/react/ui/modals/_internal/components/actionModal/index.d.ts +59 -33
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +23 -31
- package/dist/react-BbHBl6gg.css +80 -0
- package/dist/react-BbHBl6gg.css.map +1 -0
- package/dist/react-DAIicQPT.js +8938 -0
- package/dist/react-DAIicQPT.js.map +1 -0
- package/dist/{sequence-TGLUFEPQ.js → sequence-Do3kzb4J.js} +5 -5
- package/dist/sequence-Do3kzb4J.js.map +1 -0
- package/dist/src-Dz2CfBL0.js +8 -0
- package/dist/src-Dz2CfBL0.js.map +1 -0
- package/dist/{sudo-swap-M2O6E3TE.js → sudo-swap-B6vPKxBz.js} +5 -5
- package/dist/sudo-swap-B6vPKxBz.js.map +1 -0
- package/dist/{super-rare-UU2U4LIN.js → super-rare-eCm1SE6O.js} +5 -5
- package/dist/super-rare-eCm1SE6O.js.map +1 -0
- package/dist/token-Da4TdyUk.js +2091 -0
- package/dist/token-Da4TdyUk.js.map +1 -0
- package/dist/transaction-CcVViHEL.js +97 -0
- package/dist/transaction-CcVViHEL.js.map +1 -0
- package/dist/types/index.d.ts +3 -13
- package/dist/types/index.js +5 -44
- package/dist/types-DwWE6xOF.js +13 -0
- package/dist/types-DwWE6xOF.js.map +1 -0
- package/dist/utils/abi/index.d.ts +5 -3
- package/dist/utils/abi/index.js +6 -26
- package/dist/utils/abi/marketplace/index.d.ts +2 -805
- package/dist/utils/abi/marketplace/index.js +3 -11
- package/dist/utils/abi/primary-sale/index.d.ts +2 -1054
- package/dist/utils/abi/primary-sale/index.js +3 -9
- package/dist/utils/abi/token/index.d.ts +2 -1125
- package/dist/utils/abi/token/index.js +3 -11
- package/dist/utils/index.d.ts +8 -91
- package/dist/utils/index.js +11 -57
- package/dist/utils-BPYfgDSL.js +44 -0
- package/dist/utils-BPYfgDSL.js.map +1 -0
- package/dist/utils-CW2NA5KG.js +216 -0
- package/dist/utils-CW2NA5KG.js.map +1 -0
- package/dist/wagmi-CDzEQbfk.js +166 -0
- package/dist/wagmi-CDzEQbfk.js.map +1 -0
- package/dist/{x2y2-3W5BBMZC.js → x2y2-DD17tT91.js} +5 -5
- package/dist/x2y2-DD17tT91.js.map +1 -0
- package/dist/{zora-6EY6FUH6.js → zora-BpSG9UzS.js} +5 -5
- package/dist/zora-BpSG9UzS.js.map +1 -0
- package/eslint/use-client.js +0 -6
- package/package.json +36 -35
- package/src/index.ts +1 -2
- package/src/react/_internal/api/__mocks__/builder.msw.ts +5 -3
- package/src/react/_internal/api/__mocks__/indexer.msw.ts +9 -8
- package/src/react/_internal/api/__mocks__/marketplace.msw.ts +4 -6
- package/src/react/_internal/api/__mocks__/metadata.msw.ts +1 -1
- package/src/react/_internal/api/builder.gen.ts +6 -7
- package/src/react/_internal/api/get-query-client.ts +2 -2
- package/src/react/_internal/api/index.ts +2 -2
- package/src/react/_internal/api/marketplace.gen.ts +505 -26
- package/src/react/_internal/api/query-keys.ts +13 -6
- package/src/react/_internal/api/services.ts +42 -52
- package/src/react/_internal/index.ts +1 -1
- package/src/react/_internal/types.ts +10 -23
- package/src/react/_internal/utils.ts +1 -2
- package/src/react/_internal/wagmi/__tests__/create-config.test.ts +5 -5
- package/src/react/_internal/wagmi/create-config.ts +23 -9
- package/src/react/_internal/wagmi/get-connectors.ts +10 -5
- package/src/react/_internal/wallet/__tests__/wallet.test.ts +1 -1
- package/src/react/_internal/wallet/wallet.ts +18 -18
- package/src/react/hooks/__tests__/__snapshots__/useListCollections.test.tsx.snap +181 -2
- package/src/react/hooks/__tests__/__snapshots__/useMarketplaceConfig.test.tsx.snap +54 -6
- package/src/react/hooks/__tests__/useAutoSelectFeeOption.test.tsx +8 -5
- package/src/react/hooks/__tests__/useBalanceOfCollectible.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCancelOrder.test.tsx +4 -4
- package/src/react/hooks/__tests__/useCancelTransactionSteps.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCheckoutOptionsSalesContract.test.tsx +225 -0
- package/src/react/hooks/__tests__/useCollectible.test.tsx +14 -16
- package/src/react/hooks/__tests__/useCollection.test.tsx +4 -4
- package/src/react/hooks/__tests__/useCollectionBalanceDetails.test.tsx +1 -27
- package/src/react/hooks/__tests__/useCollectionDetails.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCollectionDetailsPolling.test.tsx +4 -4
- package/src/react/hooks/__tests__/useComparePrices.test.tsx +7 -6
- package/src/react/hooks/__tests__/useConvertPriceToUSD.test.tsx +1 -1
- package/src/react/hooks/__tests__/useCountListingsForCollectible.test.tsx +2 -2
- package/src/react/hooks/__tests__/useCountOfCollectables.test.tsx +5 -5
- package/src/react/hooks/__tests__/useCountOffersForCollectible.test.tsx +2 -2
- package/src/react/hooks/__tests__/useCurrency.test.tsx +5 -3
- package/src/react/hooks/__tests__/useFilters.test.tsx +1 -1
- package/src/react/hooks/__tests__/useFloorOrder.test.tsx +4 -4
- package/src/react/hooks/__tests__/useGenerateCancelTransaction.test.tsx +5 -6
- package/src/react/hooks/__tests__/useGenerateListingTransaction.test.tsx +1 -1
- package/src/react/hooks/__tests__/useGenerateOfferTransaction.test.tsx +1 -1
- package/src/react/hooks/__tests__/useGenerateSellTransaction.test.tsx +1 -1
- package/src/react/hooks/__tests__/useGetTokenSuppliesMap.test.tsx +104 -0
- package/src/react/hooks/__tests__/useHighestOffer.test.tsx +4 -20
- package/src/react/hooks/__tests__/useInventory.test.tsx +1 -37
- package/src/react/hooks/__tests__/useListCollectibleActivities.test.tsx +11 -13
- package/src/react/hooks/__tests__/useListCollectibles.test.tsx +5 -5
- package/src/react/hooks/__tests__/useListCollectiblesPaginated.test.tsx +10 -15
- package/src/react/hooks/__tests__/useListCollectionActivities.test.tsx +13 -15
- package/src/react/hooks/__tests__/useListCollections.test.tsx +4 -4
- package/src/react/hooks/__tests__/useListListingsForCollectible.test.tsx +3 -2
- package/src/react/hooks/__tests__/useListMarketCardData.test.tsx +301 -0
- package/src/react/hooks/__tests__/useListOffersForCollectible.test.tsx +1 -1
- package/src/react/hooks/__tests__/useListTokenMetadata.test.tsx +111 -0
- package/src/react/hooks/__tests__/useLowestListing.test.tsx +1 -1
- package/src/react/hooks/__tests__/useMarketCurrencies.test.tsx +1 -1
- package/src/react/hooks/__tests__/useRoyalty.test.tsx +0 -23
- package/src/react/hooks/index.ts +27 -17
- package/src/react/hooks/options/index.ts +0 -1
- package/src/react/hooks/useAutoSelectFeeOption.tsx +1 -1
- package/src/react/hooks/useBalanceOfCollectible.tsx +14 -10
- package/src/react/hooks/useCancelTransactionSteps.tsx +7 -3
- package/src/react/hooks/useCheckoutOptionsSalesContract.tsx +67 -0
- package/src/react/hooks/useCollectible.tsx +64 -49
- package/src/react/hooks/useCollection.tsx +60 -11
- package/src/react/hooks/useCollectionBalanceDetails.tsx +20 -27
- package/src/react/hooks/useCollectionDetails.ts +69 -0
- package/src/react/hooks/useCollectionDetailsPolling.tsx +10 -2
- package/src/react/hooks/useComparePrices.tsx +18 -21
- package/src/react/hooks/useConvertPriceToUSD.tsx +20 -37
- package/src/react/hooks/useCountListingsForCollectible.tsx +64 -52
- package/src/react/hooks/useCountOfCollectables.tsx +61 -67
- package/src/react/hooks/useCountOfPrimarySaleItems.tsx +13 -0
- package/src/react/hooks/useCountOffersForCollectible.tsx +64 -52
- package/src/react/hooks/useCurrency.tsx +56 -64
- package/src/react/hooks/useERC721SaleMintedTokens.tsx +67 -0
- package/src/react/hooks/useFilterState.tsx +1 -2
- package/src/react/hooks/useFloorOrder.tsx +65 -37
- package/src/react/hooks/useGenerateCancelTransaction.tsx +17 -15
- package/src/react/hooks/useGenerateListingTransaction.tsx +16 -6
- package/src/react/hooks/useGenerateOfferTransaction.tsx +16 -7
- package/src/react/hooks/useGenerateSellTransaction.tsx +19 -15
- package/src/react/hooks/useGetReceiptFromHash.tsx +32 -3
- package/src/react/hooks/useGetTokenRanges.tsx +31 -0
- package/src/react/hooks/useGetTokenSuppliesMap.tsx +73 -0
- package/src/react/hooks/useHighestOffer.tsx +68 -4
- package/src/react/hooks/useInventory.tsx +8 -6
- package/src/react/hooks/useList1155ShopCardData.tsx +103 -0
- package/src/react/hooks/useList721ShopCardData.tsx +160 -0
- package/src/react/hooks/useListBalances.tsx +7 -10
- package/src/react/hooks/useListCollectibleActivities.tsx +89 -49
- package/src/react/hooks/useListCollectibles.tsx +78 -26
- package/src/react/hooks/useListCollectiblesPaginated.tsx +96 -63
- package/src/react/hooks/useListCollectionActivities.tsx +84 -49
- package/src/react/hooks/useListCollections.tsx +72 -18
- package/src/react/hooks/useListListingsForCollectible.tsx +90 -49
- package/src/react/hooks/useListMarketCardData.tsx +157 -0
- package/src/react/hooks/useListOffersForCollectible.tsx +11 -15
- package/src/react/hooks/useListPrimarySaleItems.ts +102 -0
- package/src/react/hooks/useListShopCardData.tsx +70 -0
- package/src/react/hooks/useListTokenMetadata.tsx +73 -0
- package/src/react/hooks/useLowestListing.tsx +68 -4
- package/src/react/hooks/useMarketCurrencies.tsx +62 -5
- package/src/react/hooks/useRoyalty.tsx +57 -13
- package/src/react/hooks/useShopCollectibleSaleData.tsx +349 -0
- package/src/react/hooks/useTokenSaleDetailsBatch.tsx +134 -0
- package/src/react/hooks/useTransferTokens.tsx +1 -1
- package/src/react/hooks/util/optimisticCancelUpdates.ts +5 -7
- package/src/react/index.ts +5 -3
- package/src/react/queries/balanceOfCollectible.ts +1 -1
- package/src/react/queries/collectible.ts +66 -0
- package/src/react/queries/collection.ts +55 -0
- package/src/react/queries/collectionDetails.ts +64 -0
- package/src/react/queries/countListingsForCollectible.ts +73 -0
- package/src/react/queries/countOfCollectables.ts +83 -0
- package/src/react/queries/countOfPrimarySaleItems.ts +48 -0
- package/src/react/queries/countOffersForCollectible.ts +73 -0
- package/src/react/queries/currency.ts +83 -0
- package/src/react/queries/floorOrder.ts +63 -0
- package/src/react/queries/getTokenSuppliesMap.ts +77 -0
- package/src/react/queries/highestOffer.ts +48 -40
- package/src/react/queries/index.ts +7 -4
- package/src/react/queries/inventory.ts +38 -4
- package/src/react/queries/listBalances.ts +14 -30
- package/src/react/queries/listCollectibleActivities.ts +97 -0
- package/src/react/queries/listCollectibles.ts +117 -47
- package/src/react/queries/listCollectiblesPaginated.ts +87 -0
- package/src/react/queries/listCollectionActivities.ts +95 -0
- package/src/react/queries/listCollections.ts +55 -10
- package/src/react/queries/listListingsForCollectible.ts +82 -0
- package/src/react/queries/listTokenMetadata.ts +47 -18
- package/src/react/queries/lowestListing.ts +48 -31
- package/src/react/queries/marketCurrencies.ts +52 -35
- package/src/react/queries/marketplaceConfig.ts +56 -81
- package/src/react/ssr/__tests__/__snapshots__/create-ssr-client.test.ts.snap +54 -6
- package/src/react/ssr/__tests__/create-ssr-client.test.ts +0 -3
- package/src/react/ssr/create-ssr-client.ts +6 -11
- package/src/react/types/query.ts +34 -0
- package/src/react/ui/components/ModelViewer.tsx +1 -1
- package/src/react/ui/components/_internals/action-button/ActionButton.tsx +47 -13
- package/src/react/ui/components/_internals/action-button/__tests__/ActionButtonBody.test.tsx +1 -1
- package/src/react/ui/components/_internals/action-button/__tests__/NonOwnerActions.test.tsx +28 -15
- package/src/react/ui/components/_internals/action-button/__tests__/OwnerActions.test.tsx +1 -1
- package/src/react/ui/components/_internals/action-button/__tests__/useActionButtonLogic.test.tsx +15 -9
- package/src/react/ui/components/_internals/action-button/components/ActionButtonBody.tsx +1 -1
- package/src/react/ui/components/_internals/action-button/components/NonOwnerActions.tsx +78 -15
- package/src/react/ui/components/_internals/action-button/components/OwnerActions.tsx +1 -1
- package/src/react/ui/components/_internals/action-button/hooks/useActionButtonLogic.ts +13 -16
- package/src/react/ui/components/_internals/action-button/store.ts +46 -18
- package/src/react/ui/components/marketplace-collectible-card/CollectibleCard.tsx +17 -0
- package/src/react/ui/components/marketplace-collectible-card/CollectibleCardSkeleton.tsx +24 -0
- package/src/react/ui/components/marketplace-collectible-card/Footer.tsx +231 -0
- package/src/react/ui/components/marketplace-collectible-card/components/ActionButtonWrapper.tsx +76 -0
- package/src/react/ui/components/marketplace-collectible-card/components/BaseCard.tsx +58 -0
- package/src/react/ui/components/marketplace-collectible-card/index.ts +3 -0
- package/src/react/ui/components/marketplace-collectible-card/types.ts +98 -0
- package/src/react/ui/components/marketplace-collectible-card/utils/formatPrice.ts +45 -0
- package/src/react/ui/components/marketplace-collectible-card/utils/index.ts +2 -0
- package/src/react/ui/components/marketplace-collectible-card/utils/supplyStatus.ts +39 -0
- package/src/react/ui/components/marketplace-collectible-card/variants/MarketCard.tsx +125 -0
- package/src/react/ui/components/marketplace-collectible-card/variants/ShopCard.tsx +102 -0
- package/src/react/ui/components/marketplace-logos/marketplace-logos.tsx +1 -1
- package/src/react/ui/components/{collectible-card/media → media}/Media.tsx +47 -26
- package/src/react/ui/components/{collectible-card/media → media}/types.ts +3 -1
- package/src/react/ui/index.ts +8 -7
- package/src/react/ui/modals/BuyModal/__tests__/BuyModalRouter.test.tsx +554 -0
- package/src/react/ui/modals/BuyModal/__tests__/ERC1155ShopModal.test.tsx +392 -0
- package/src/react/ui/modals/BuyModal/__tests__/ERC721ShopModal.test.tsx +272 -0
- package/src/react/ui/modals/BuyModal/__tests__/Modal.test.tsx.bak +112 -0
- package/src/react/ui/modals/BuyModal/__tests__/Modal1155.test.tsx +117 -13
- package/src/react/ui/modals/BuyModal/__tests__/store.test.ts +10 -7
- package/src/react/ui/modals/BuyModal/components/BuyModalRouter.tsx +157 -0
- package/src/react/ui/modals/BuyModal/components/ERC1155BuyModal.tsx +136 -0
- package/src/react/ui/modals/BuyModal/components/ERC1155QuantityModal.tsx +183 -0
- package/src/react/ui/modals/BuyModal/components/ERC1155ShopModal.tsx +121 -0
- package/src/react/ui/modals/BuyModal/components/ERC721BuyModal.tsx +85 -0
- package/src/react/ui/modals/BuyModal/components/ERC721ShopModal.tsx +86 -0
- package/src/react/ui/modals/BuyModal/components/Modal.tsx +14 -0
- package/src/react/ui/modals/BuyModal/components/types.ts +8 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useCheckoutOptions.test.tsx +5 -5
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC1155Checkout.test.tsx +379 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/useERC721SalePaymentParams.test.tsx +253 -0
- package/src/react/ui/modals/BuyModal/hooks/__tests__/{useFees.test.tsx → useMarketPlatformFee.test.tsx} +10 -11
- package/src/react/ui/modals/BuyModal/hooks/useCheckoutOptions.ts +63 -45
- package/src/react/ui/modals/BuyModal/hooks/useERC1155Checkout.ts +73 -0
- package/src/react/ui/modals/BuyModal/hooks/useERC721SalePaymentParams.ts +196 -0
- package/src/react/ui/modals/BuyModal/hooks/useLoadData.ts +74 -18
- package/src/react/ui/modals/BuyModal/hooks/useMarketPlatformFee.ts +53 -0
- package/src/react/ui/modals/BuyModal/hooks/usePaymentModalParams.ts +30 -15
- package/src/react/ui/modals/BuyModal/store.ts +147 -13
- package/src/react/ui/modals/CreateListingModal/Modal.tsx +1 -1
- package/src/react/ui/modals/CreateListingModal/__tests__/Modal.test.tsx +2 -2
- package/src/react/ui/modals/CreateListingModal/hooks/useCreateListing.tsx +0 -1
- package/src/react/ui/modals/CreateListingModal/hooks/useGetTokenApproval.ts +4 -3
- package/src/react/ui/modals/CreateListingModal/hooks/useTransactionSteps.tsx +12 -9
- package/src/react/ui/modals/CreateListingModal/index.tsx +1 -1
- package/src/react/ui/modals/MakeOfferModal/Modal.tsx +2 -2
- package/src/react/ui/modals/MakeOfferModal/__tests__/Modal.test.tsx +1 -1
- package/src/react/ui/modals/MakeOfferModal/hooks/useGetTokenApproval.tsx +3 -2
- package/src/react/ui/modals/MakeOfferModal/hooks/useMakeOffer.tsx +0 -1
- package/src/react/ui/modals/MakeOfferModal/hooks/useTransactionSteps.tsx +12 -10
- package/src/react/ui/modals/MakeOfferModal/index.tsx +1 -1
- package/src/react/ui/modals/SellModal/Modal.tsx +3 -3
- package/src/react/ui/modals/SellModal/__tests__/Modal.test.tsx +6 -4
- package/src/react/ui/modals/SellModal/hooks/useGetTokenApproval.tsx +5 -4
- package/src/react/ui/modals/SellModal/hooks/useSell.tsx +0 -1
- package/src/react/ui/modals/SellModal/hooks/useTransactionSteps.tsx +11 -8
- package/src/react/ui/modals/SuccessfulPurchaseModal/__tests__/Modal.test.tsx +12 -8
- package/src/react/ui/modals/SuccessfulPurchaseModal/index.tsx +34 -28
- package/src/react/ui/modals/SuccessfulPurchaseModal/store.ts +71 -0
- package/src/react/ui/modals/TransferModal/_store.ts +1 -7
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/_components/TokenQuantityInput.tsx +2 -3
- package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +2 -2
- package/src/react/ui/modals/_internal/components/actionModal/ActionModal.test.tsx +1 -2
- package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +107 -112
- package/src/react/ui/modals/_internal/components/actionModal/store.ts +45 -12
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/__tests__/index.test.tsx +1 -1
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +0 -1
- package/src/react/ui/modals/_internal/components/floorPriceText/index.tsx +4 -4
- package/src/react/ui/modals/_internal/components/quantityInput/QuantityInputBase.tsx +166 -0
- package/src/react/ui/modals/_internal/components/quantityInput/index.tsx +12 -141
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/__tests__/SelectWaasFeeOptions.test.tsx +1 -1
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/_components/BalanceIndicator.tsx +1 -2
- package/src/react/ui/modals/_internal/components/selectWaasFeeOptions/useWaasFeeOptionManager.tsx +0 -1
- package/src/react/ui/modals/_internal/components/switchChainModal/__tests__/SwitchChainModal.test.tsx +12 -8
- package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +35 -33
- package/src/react/ui/modals/_internal/components/switchChainModal/store.ts +61 -32
- package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +1 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/__tests__/TransactionStatusModal.test.tsx +1 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/hooks/useTransactionStatus.ts +0 -1
- package/src/react/ui/modals/_internal/components/transactionStatusModal/store.ts +1 -1
- package/src/react/ui/modals/_internal/components/waasFeeOptionsSelect/WaasFeeOptionsSelect.tsx +1 -1
- package/src/react/ui/modals/modal-provider.tsx +3 -4
- package/src/types/api-types.ts +36 -36
- package/src/types/buyModalErrors.ts +438 -0
- package/src/types/index.ts +5 -2
- package/src/types/new-marketplace-types.ts +6 -21
- package/src/types/sdk-config.ts +19 -24
- package/src/types/types.ts +17 -0
- package/src/types/waas-types.ts +1 -1
- package/src/utils/_internal/error/transaction.ts +36 -1
- package/src/utils/abi/index.ts +1 -1
- package/src/utils/abi/primary-sale/index.ts +1 -1
- package/src/utils/abi/token/index.ts +2 -1
- package/src/utils/decode/erc20.ts +1 -1
- package/src/utils/index.ts +3 -3
- package/test/const.ts +3 -1
- package/test/mocks/wallet.ts +1 -1
- package/test/test-utils.tsx +3 -4
- package/tsconfig.json +1 -1
- package/tsdown.config.ts +25 -0
- package/.changeset/fluffy-jokes-lay.md +0 -5
- package/.changeset/wise-bugs-boil.md +0 -8
- package/.ctirc +0 -32
- package/dist/alien_swap-2B65TDGT.js.map +0 -1
- package/dist/aqua-xyz-WMYQLAIS.js.map +0 -1
- package/dist/aura-V22RV5OG.js.map +0 -1
- package/dist/blur-GE5QOMCM.js.map +0 -1
- package/dist/chunk-2PSNAIAT.js +0 -1
- package/dist/chunk-2PSNAIAT.js.map +0 -1
- package/dist/chunk-5C6ZZ6WX.js +0 -130
- package/dist/chunk-5C6ZZ6WX.js.map +0 -1
- package/dist/chunk-5O44EPXZ.js +0 -207
- package/dist/chunk-5O44EPXZ.js.map +0 -1
- package/dist/chunk-6CTFVBKU.js +0 -1
- package/dist/chunk-6CTFVBKU.js.map +0 -1
- package/dist/chunk-6OPMUCGX.js +0 -42
- package/dist/chunk-6OPMUCGX.js.map +0 -1
- package/dist/chunk-FUM4OGOQ.js +0 -1027
- package/dist/chunk-FUM4OGOQ.js.map +0 -1
- package/dist/chunk-L6KWLCER.js +0 -32
- package/dist/chunk-L6KWLCER.js.map +0 -1
- package/dist/chunk-LAP2CKLN.js +0 -485
- package/dist/chunk-LAP2CKLN.js.map +0 -1
- package/dist/chunk-LECCEZAO.js +0 -11
- package/dist/chunk-LECCEZAO.js.map +0 -1
- package/dist/chunk-N7SQWS2R.js +0 -38
- package/dist/chunk-N7SQWS2R.js.map +0 -1
- package/dist/chunk-NX52D7NX.js +0 -135
- package/dist/chunk-NX52D7NX.js.map +0 -1
- package/dist/chunk-OAOONM4S.js +0 -1787
- package/dist/chunk-OAOONM4S.js.map +0 -1
- package/dist/chunk-Q3ECVC4F.js +0 -811
- package/dist/chunk-Q3ECVC4F.js.map +0 -1
- package/dist/chunk-QY52UADF.js +0 -107
- package/dist/chunk-QY52UADF.js.map +0 -1
- package/dist/chunk-TNAR3XEF.js +0 -8729
- package/dist/chunk-TNAR3XEF.js.map +0 -1
- package/dist/chunk-XABYNWXO.js +0 -549
- package/dist/chunk-XABYNWXO.js.map +0 -1
- package/dist/chunk-XX4EVWBF.js +0 -1292
- package/dist/chunk-XX4EVWBF.js.map +0 -1
- package/dist/chunk-YB5UUF2G.js +0 -11
- package/dist/chunk-YB5UUF2G.js.map +0 -1
- package/dist/chunk-YWGFI4PN.js +0 -217
- package/dist/chunk-YWGFI4PN.js.map +0 -1
- package/dist/coinbase-NLHJMGAP.js.map +0 -1
- package/dist/create-config-DLMvMTkZ.d.ts +0 -8
- package/dist/element-2LGTYYSP.js.map +0 -1
- package/dist/foundation-BPN66ZTN.js.map +0 -1
- package/dist/get-query-client-D46hbjk6.d.ts +0 -5
- package/dist/index.css.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/looks-rare-MZRSOPT4.js.map +0 -1
- package/dist/magic-eden-PUBL6KWW.js.map +0 -1
- package/dist/manifold-GA445YJ6.js.map +0 -1
- package/dist/marketCurrencies-enNVYwBk.d.ts +0 -277
- package/dist/marketplace.gen-D24veUQs.d.ts +0 -1073
- package/dist/marketplaceConfig-BwNAbLPw.d.ts +0 -21
- package/dist/mintify-UMC5PTKC.js.map +0 -1
- package/dist/new-marketplace-types-BCw19X9S.d.ts +0 -102
- package/dist/nftx-AX3CY3IE.js.map +0 -1
- package/dist/okx-GNVLAE2R.js.map +0 -1
- package/dist/open-sea-KI43GVEB.js.map +0 -1
- package/dist/rarible-2J3MMZJ7.js.map +0 -1
- package/dist/react/_internal/api/index.js.map +0 -1
- package/dist/react/_internal/databeat/index.css +0 -2764
- package/dist/react/_internal/databeat/index.css.map +0 -1
- package/dist/react/_internal/databeat/index.js.map +0 -1
- package/dist/react/_internal/index.js.map +0 -1
- package/dist/react/_internal/wagmi/index.js.map +0 -1
- package/dist/react/hooks/index.css +0 -2764
- package/dist/react/hooks/index.css.map +0 -1
- package/dist/react/hooks/index.js.map +0 -1
- package/dist/react/hooks/options/index.js.map +0 -1
- package/dist/react/index.css +0 -2764
- package/dist/react/index.css.map +0 -1
- package/dist/react/index.js.map +0 -1
- package/dist/react/queries/index.js.map +0 -1
- package/dist/react/ui/components/collectible-card/index.css +0 -2764
- package/dist/react/ui/components/collectible-card/index.css.map +0 -1
- package/dist/react/ui/components/collectible-card/index.d.ts +0 -71
- package/dist/react/ui/components/collectible-card/index.js +0 -27
- package/dist/react/ui/components/collectible-card/index.js.map +0 -1
- package/dist/react/ui/components/marketplace-logos/index.js.map +0 -1
- package/dist/react/ui/icons/index.js.map +0 -1
- package/dist/react/ui/index.css +0 -2764
- package/dist/react/ui/index.css.map +0 -1
- package/dist/react/ui/index.js.map +0 -1
- package/dist/react/ui/modals/_internal/components/actionModal/index.css +0 -2764
- package/dist/react/ui/modals/_internal/components/actionModal/index.css.map +0 -1
- package/dist/react/ui/modals/_internal/components/actionModal/index.js.map +0 -1
- package/dist/sdk-config-qorA0TgF.d.ts +0 -165
- package/dist/sequence-TGLUFEPQ.js.map +0 -1
- package/dist/services-WrshxCqc.d.ts +0 -23
- package/dist/sudo-swap-M2O6E3TE.js.map +0 -1
- package/dist/super-rare-UU2U4LIN.js.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/useCollection-YAdXfVO7.d.ts +0 -61
- package/dist/utils/abi/index.js.map +0 -1
- package/dist/utils/abi/marketplace/index.js.map +0 -1
- package/dist/utils/abi/primary-sale/index.js.map +0 -1
- package/dist/utils/abi/token/index.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/x2y2-3W5BBMZC.js.map +0 -1
- package/dist/zora-6EY6FUH6.js.map +0 -1
- package/postcss.config.mjs +0 -5
- package/src/react/_internal/api/zod-schema.ts +0 -678
- package/src/react/hooks/__tests__/__snapshots__/useRoyaltyPercentage.test.tsx.snap +0 -8
- package/src/react/hooks/options/collectionOptions.ts +0 -41
- package/src/react/hooks/useCheckoutOptions.tsx +0 -65
- package/src/react/hooks/useCollectionDetails.tsx +0 -35
- package/src/react/hooks/useGetTokenSuppliesMap.ts +0 -28
- package/src/react/hooks/useListTokenMetadata.ts +0 -19
- package/src/react/queries/getTokenSupplies.ts +0 -38
- package/src/react/ui/components/collectible-card/CollectibleCard.tsx +0 -170
- package/src/react/ui/components/collectible-card/Footer.tsx +0 -157
- package/src/react/ui/components/collectible-card/__tests__/CollectibleCard.test.tsx +0 -94
- package/src/react/ui/components/collectible-card/__tests__/Footer.test.tsx +0 -136
- package/src/react/ui/components/collectible-card/__tests__/Media.test.tsx +0 -264
- package/src/react/ui/components/collectible-card/index.ts +0 -2
- package/src/react/ui/modals/BuyModal/ERC1155QuantityModal.tsx +0 -130
- package/src/react/ui/modals/BuyModal/Modal.tsx +0 -124
- package/src/react/ui/modals/BuyModal/__tests__/Modal.test.tsx +0 -104
- package/src/react/ui/modals/BuyModal/hooks/useFees.ts +0 -39
- package/src/react/ui/modals/SuccessfulPurchaseModal/_store.ts +0 -72
- package/tsconfig.tsbuildinfo +0 -1
- package/tsup.config.ts +0 -23
- /package/src/react/ui/components/{collectible-card/media → media}/MediaSkeleton.tsx +0 -0
- /package/src/react/ui/components/{collectible-card/media → media}/utils.ts +0 -0
package/dist/chunk-XABYNWXO.js
DELETED
|
@@ -1,549 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MissingConfigError
|
|
3
|
-
} from "./chunk-NX52D7NX.js";
|
|
4
|
-
|
|
5
|
-
// src/react/_internal/wagmi/create-config.ts
|
|
6
|
-
import { getDefaultChains } from "@0xsequence/connect";
|
|
7
|
-
import { allNetworks, findNetworkConfig } from "@0xsequence/network";
|
|
8
|
-
import { http, cookieStorage, createConfig, createStorage } from "wagmi";
|
|
9
|
-
|
|
10
|
-
// src/react/_internal/consts.ts
|
|
11
|
-
var DEFAULT_NETWORK = 137;
|
|
12
|
-
|
|
13
|
-
// src/react/_internal/wagmi/get-connectors.ts
|
|
14
|
-
import {
|
|
15
|
-
apple,
|
|
16
|
-
appleWaas,
|
|
17
|
-
coinbaseWallet,
|
|
18
|
-
ecosystemWallet,
|
|
19
|
-
email,
|
|
20
|
-
emailWaas,
|
|
21
|
-
facebook,
|
|
22
|
-
getConnectWallets,
|
|
23
|
-
google,
|
|
24
|
-
googleWaas,
|
|
25
|
-
sequence,
|
|
26
|
-
twitch,
|
|
27
|
-
walletConnect
|
|
28
|
-
} from "@0xsequence/connect";
|
|
29
|
-
import React from "react";
|
|
30
|
-
|
|
31
|
-
// src/react/_internal/api/builder.gen.ts
|
|
32
|
-
var WebrpcHeader = "Webrpc";
|
|
33
|
-
var WebrpcHeaderValue = "webrpc@v0.26.0;gen-typescript@v0.17.0;sequence-builder@v0.1.0";
|
|
34
|
-
var FilterCondition = /* @__PURE__ */ ((FilterCondition2) => {
|
|
35
|
-
FilterCondition2["ENTIRE_KEY"] = "ENTIRE_KEY";
|
|
36
|
-
FilterCondition2["SPECIFIC_VALUE"] = "SPECIFIC_VALUE";
|
|
37
|
-
return FilterCondition2;
|
|
38
|
-
})(FilterCondition || {});
|
|
39
|
-
var WebrpcError = class _WebrpcError extends Error {
|
|
40
|
-
name;
|
|
41
|
-
code;
|
|
42
|
-
message;
|
|
43
|
-
status;
|
|
44
|
-
cause;
|
|
45
|
-
/** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */
|
|
46
|
-
msg;
|
|
47
|
-
constructor(name, code, message, status, cause) {
|
|
48
|
-
super(message);
|
|
49
|
-
this.name = name || "WebrpcError";
|
|
50
|
-
this.code = typeof code === "number" ? code : 0;
|
|
51
|
-
this.message = message || `endpoint error ${this.code}`;
|
|
52
|
-
this.msg = this.message;
|
|
53
|
-
this.status = typeof status === "number" ? status : 0;
|
|
54
|
-
this.cause = cause;
|
|
55
|
-
Object.setPrototypeOf(this, _WebrpcError.prototype);
|
|
56
|
-
}
|
|
57
|
-
static new(payload) {
|
|
58
|
-
return new this(
|
|
59
|
-
payload.error,
|
|
60
|
-
payload.code,
|
|
61
|
-
payload.message || payload.msg,
|
|
62
|
-
payload.status,
|
|
63
|
-
payload.cause
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
var WebrpcEndpointError = class _WebrpcEndpointError extends WebrpcError {
|
|
68
|
-
constructor(name = "WebrpcEndpoint", code = 0, message = `endpoint error`, status = 0, cause) {
|
|
69
|
-
super(name, code, message, status, cause);
|
|
70
|
-
Object.setPrototypeOf(this, _WebrpcEndpointError.prototype);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var WebrpcRequestFailedError = class _WebrpcRequestFailedError extends WebrpcError {
|
|
74
|
-
constructor(name = "WebrpcRequestFailed", code = -1, message = `request failed`, status = 0, cause) {
|
|
75
|
-
super(name, code, message, status, cause);
|
|
76
|
-
Object.setPrototypeOf(this, _WebrpcRequestFailedError.prototype);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
var WebrpcBadRouteError = class _WebrpcBadRouteError extends WebrpcError {
|
|
80
|
-
constructor(name = "WebrpcBadRoute", code = -2, message = `bad route`, status = 0, cause) {
|
|
81
|
-
super(name, code, message, status, cause);
|
|
82
|
-
Object.setPrototypeOf(this, _WebrpcBadRouteError.prototype);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
var WebrpcBadMethodError = class _WebrpcBadMethodError extends WebrpcError {
|
|
86
|
-
constructor(name = "WebrpcBadMethod", code = -3, message = `bad method`, status = 0, cause) {
|
|
87
|
-
super(name, code, message, status, cause);
|
|
88
|
-
Object.setPrototypeOf(this, _WebrpcBadMethodError.prototype);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
var WebrpcBadRequestError = class _WebrpcBadRequestError extends WebrpcError {
|
|
92
|
-
constructor(name = "WebrpcBadRequest", code = -4, message = `bad request`, status = 0, cause) {
|
|
93
|
-
super(name, code, message, status, cause);
|
|
94
|
-
Object.setPrototypeOf(this, _WebrpcBadRequestError.prototype);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
var WebrpcBadResponseError = class _WebrpcBadResponseError extends WebrpcError {
|
|
98
|
-
constructor(name = "WebrpcBadResponse", code = -5, message = `bad response`, status = 0, cause) {
|
|
99
|
-
super(name, code, message, status, cause);
|
|
100
|
-
Object.setPrototypeOf(this, _WebrpcBadResponseError.prototype);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
var WebrpcServerPanicError = class _WebrpcServerPanicError extends WebrpcError {
|
|
104
|
-
constructor(name = "WebrpcServerPanic", code = -6, message = `server panic`, status = 0, cause) {
|
|
105
|
-
super(name, code, message, status, cause);
|
|
106
|
-
Object.setPrototypeOf(this, _WebrpcServerPanicError.prototype);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
var WebrpcInternalErrorError = class _WebrpcInternalErrorError extends WebrpcError {
|
|
110
|
-
// Name as per original
|
|
111
|
-
constructor(name = "WebrpcInternalError", code = -7, message = `internal error`, status = 0, cause) {
|
|
112
|
-
super(name, code, message, status, cause);
|
|
113
|
-
Object.setPrototypeOf(this, _WebrpcInternalErrorError.prototype);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
var WebrpcClientDisconnectedError = class _WebrpcClientDisconnectedError extends WebrpcError {
|
|
117
|
-
constructor(name = "WebrpcClientDisconnected", code = -8, message = `client disconnected`, status = 0, cause) {
|
|
118
|
-
super(name, code, message, status, cause);
|
|
119
|
-
Object.setPrototypeOf(this, _WebrpcClientDisconnectedError.prototype);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
var WebrpcStreamLostError = class _WebrpcStreamLostError extends WebrpcError {
|
|
123
|
-
constructor(name = "WebrpcStreamLost", code = -9, message = `stream lost`, status = 0, cause) {
|
|
124
|
-
super(name, code, message, status, cause);
|
|
125
|
-
Object.setPrototypeOf(this, _WebrpcStreamLostError.prototype);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
var WebrpcStreamFinishedError = class _WebrpcStreamFinishedError extends WebrpcError {
|
|
129
|
-
constructor(name = "WebrpcStreamFinished", code = -10, message = `stream finished`, status = 0, cause) {
|
|
130
|
-
super(name, code, message, status, cause);
|
|
131
|
-
Object.setPrototypeOf(this, _WebrpcStreamFinishedError.prototype);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
var UnauthorizedError = class _UnauthorizedError extends WebrpcError {
|
|
135
|
-
constructor(name = "Unauthorized", code = 1e3, message = `Unauthorized access`, status = 0, cause) {
|
|
136
|
-
super(name, code, message, status, cause);
|
|
137
|
-
Object.setPrototypeOf(this, _UnauthorizedError.prototype);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
var PermissionDeniedError = class _PermissionDeniedError extends WebrpcError {
|
|
141
|
-
constructor(name = "PermissionDenied", code = 1001, message = `Permission denied`, status = 0, cause) {
|
|
142
|
-
super(name, code, message, status, cause);
|
|
143
|
-
Object.setPrototypeOf(this, _PermissionDeniedError.prototype);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
var SessionExpiredError = class _SessionExpiredError extends WebrpcError {
|
|
147
|
-
constructor(name = "SessionExpired", code = 1002, message = `Session expired`, status = 0, cause) {
|
|
148
|
-
super(name, code, message, status, cause);
|
|
149
|
-
Object.setPrototypeOf(this, _SessionExpiredError.prototype);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
var MethodNotFoundError = class _MethodNotFoundError extends WebrpcError {
|
|
153
|
-
constructor(name = "MethodNotFound", code = 1003, message = `Method not found`, status = 0, cause) {
|
|
154
|
-
super(name, code, message, status, cause);
|
|
155
|
-
Object.setPrototypeOf(this, _MethodNotFoundError.prototype);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
var RequestConflictError = class _RequestConflictError extends WebrpcError {
|
|
159
|
-
constructor(name = "RequestConflict", code = 1004, message = `Conflict with target resource`, status = 0, cause) {
|
|
160
|
-
super(name, code, message, status, cause);
|
|
161
|
-
Object.setPrototypeOf(this, _RequestConflictError.prototype);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
var ServiceDisabledError = class _ServiceDisabledError extends WebrpcError {
|
|
165
|
-
constructor(name = "ServiceDisabled", code = 1005, message = `Service disabled`, status = 0, cause) {
|
|
166
|
-
super(name, code, message, status, cause);
|
|
167
|
-
Object.setPrototypeOf(this, _ServiceDisabledError.prototype);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
var TimeoutError = class _TimeoutError extends WebrpcError {
|
|
171
|
-
constructor(name = "Timeout", code = 2e3, message = `Request timed out`, status = 0, cause) {
|
|
172
|
-
super(name, code, message, status, cause);
|
|
173
|
-
Object.setPrototypeOf(this, _TimeoutError.prototype);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
var InvalidArgumentError = class _InvalidArgumentError extends WebrpcError {
|
|
177
|
-
constructor(name = "InvalidArgument", code = 2001, message = `Invalid argument`, status = 0, cause) {
|
|
178
|
-
super(name, code, message, status, cause);
|
|
179
|
-
Object.setPrototypeOf(this, _InvalidArgumentError.prototype);
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
var NotFoundError = class _NotFoundError extends WebrpcError {
|
|
183
|
-
constructor(name = "NotFound", code = 3e3, message = `Resource not found`, status = 0, cause) {
|
|
184
|
-
super(name, code, message, status, cause);
|
|
185
|
-
Object.setPrototypeOf(this, _NotFoundError.prototype);
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
var UserNotFoundError = class _UserNotFoundError extends WebrpcError {
|
|
189
|
-
constructor(name = "UserNotFound", code = 3001, message = `User not found`, status = 0, cause) {
|
|
190
|
-
super(name, code, message, status, cause);
|
|
191
|
-
Object.setPrototypeOf(this, _UserNotFoundError.prototype);
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
var ProjectNotFoundError = class _ProjectNotFoundError extends WebrpcError {
|
|
195
|
-
constructor(name = "ProjectNotFound", code = 3002, message = `Project not found`, status = 0, cause) {
|
|
196
|
-
super(name, code, message, status, cause);
|
|
197
|
-
Object.setPrototypeOf(this, _ProjectNotFoundError.prototype);
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
var InvalidTierError = class _InvalidTierError extends WebrpcError {
|
|
201
|
-
constructor(name = "InvalidTier", code = 3003, message = `Invalid subscription tier`, status = 0, cause) {
|
|
202
|
-
super(name, code, message, status, cause);
|
|
203
|
-
Object.setPrototypeOf(this, _InvalidTierError.prototype);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
var EmailTemplateExistsError = class _EmailTemplateExistsError extends WebrpcError {
|
|
207
|
-
constructor(name = "EmailTemplateExists", code = 3004, message = `Email Template exists`, status = 0, cause) {
|
|
208
|
-
super(name, code, message, status, cause);
|
|
209
|
-
Object.setPrototypeOf(this, _EmailTemplateExistsError.prototype);
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
var SubscriptionLimitError = class _SubscriptionLimitError extends WebrpcError {
|
|
213
|
-
constructor(name = "SubscriptionLimit", code = 3005, message = `Subscription limit reached`, status = 0, cause) {
|
|
214
|
-
super(name, code, message, status, cause);
|
|
215
|
-
Object.setPrototypeOf(this, _SubscriptionLimitError.prototype);
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
var FeatureNotIncludedError = class _FeatureNotIncludedError extends WebrpcError {
|
|
219
|
-
constructor(name = "FeatureNotIncluded", code = 3006, message = `Feature not included`, status = 0, cause) {
|
|
220
|
-
super(name, code, message, status, cause);
|
|
221
|
-
Object.setPrototypeOf(this, _FeatureNotIncludedError.prototype);
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
var InvalidNetworkError = class _InvalidNetworkError extends WebrpcError {
|
|
225
|
-
constructor(name = "InvalidNetwork", code = 3007, message = `Invalid network`, status = 0, cause) {
|
|
226
|
-
super(name, code, message, status, cause);
|
|
227
|
-
Object.setPrototypeOf(this, _InvalidNetworkError.prototype);
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
var InvitationExpiredError = class _InvitationExpiredError extends WebrpcError {
|
|
231
|
-
constructor(name = "InvitationExpired", code = 4e3, message = `Invitation code is expired`, status = 0, cause) {
|
|
232
|
-
super(name, code, message, status, cause);
|
|
233
|
-
Object.setPrototypeOf(this, _InvitationExpiredError.prototype);
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
var AlreadyCollaboratorError = class _AlreadyCollaboratorError extends WebrpcError {
|
|
237
|
-
constructor(name = "AlreadyCollaborator", code = 4001, message = `Already a collaborator`, status = 0, cause) {
|
|
238
|
-
super(name, code, message, status, cause);
|
|
239
|
-
Object.setPrototypeOf(this, _AlreadyCollaboratorError.prototype);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
var webrpcErrorByCode = {
|
|
243
|
-
[0]: WebrpcEndpointError,
|
|
244
|
-
[-1]: WebrpcRequestFailedError,
|
|
245
|
-
[-2]: WebrpcBadRouteError,
|
|
246
|
-
[-3]: WebrpcBadMethodError,
|
|
247
|
-
[-4]: WebrpcBadRequestError,
|
|
248
|
-
[-5]: WebrpcBadResponseError,
|
|
249
|
-
[-6]: WebrpcServerPanicError,
|
|
250
|
-
[-7]: WebrpcInternalErrorError,
|
|
251
|
-
// Name as per original
|
|
252
|
-
[-8]: WebrpcClientDisconnectedError,
|
|
253
|
-
[-9]: WebrpcStreamLostError,
|
|
254
|
-
[-10]: WebrpcStreamFinishedError,
|
|
255
|
-
[1e3]: UnauthorizedError,
|
|
256
|
-
[1001]: PermissionDeniedError,
|
|
257
|
-
[1002]: SessionExpiredError,
|
|
258
|
-
[1003]: MethodNotFoundError,
|
|
259
|
-
[1004]: RequestConflictError,
|
|
260
|
-
[1005]: ServiceDisabledError,
|
|
261
|
-
[2e3]: TimeoutError,
|
|
262
|
-
[2001]: InvalidArgumentError,
|
|
263
|
-
[3e3]: NotFoundError,
|
|
264
|
-
[3001]: UserNotFoundError,
|
|
265
|
-
[3002]: ProjectNotFoundError,
|
|
266
|
-
[3003]: InvalidTierError,
|
|
267
|
-
[3004]: EmailTemplateExistsError,
|
|
268
|
-
[3005]: SubscriptionLimitError,
|
|
269
|
-
[3006]: FeatureNotIncludedError,
|
|
270
|
-
[3007]: InvalidNetworkError,
|
|
271
|
-
[4e3]: InvitationExpiredError,
|
|
272
|
-
[4001]: AlreadyCollaboratorError
|
|
273
|
-
};
|
|
274
|
-
var MarketplaceService = class {
|
|
275
|
-
hostname;
|
|
276
|
-
fetch;
|
|
277
|
-
path = "/rpc/MarketplaceService/";
|
|
278
|
-
constructor(hostname, fetch) {
|
|
279
|
-
this.hostname = hostname.replace(/\/*$/, "");
|
|
280
|
-
this.fetch = (input, init) => fetch(input, init);
|
|
281
|
-
}
|
|
282
|
-
url(name) {
|
|
283
|
-
return this.hostname + this.path + name;
|
|
284
|
-
}
|
|
285
|
-
lookupMarketplace = (args, headers, signal) => {
|
|
286
|
-
return this.fetch(
|
|
287
|
-
this.url("LookupMarketplace"),
|
|
288
|
-
createHTTPRequest(args, headers, signal)
|
|
289
|
-
).then(
|
|
290
|
-
(res) => {
|
|
291
|
-
return buildResponse(res).then((_data) => {
|
|
292
|
-
return {
|
|
293
|
-
marketplace: _data.marketplace,
|
|
294
|
-
marketCollections: _data.marketCollections,
|
|
295
|
-
shopCollections: _data.shopCollections
|
|
296
|
-
};
|
|
297
|
-
});
|
|
298
|
-
},
|
|
299
|
-
(error) => {
|
|
300
|
-
throw WebrpcRequestFailedError.new({
|
|
301
|
-
cause: `lookupMarketplace(): ${error.message || ""}`
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
);
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
var createHTTPRequest = (body = {}, headers = {}, signal = null) => {
|
|
308
|
-
const reqHeaders = {
|
|
309
|
-
...headers,
|
|
310
|
-
"Content-Type": "application/json"
|
|
311
|
-
};
|
|
312
|
-
reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
|
|
313
|
-
return {
|
|
314
|
-
method: "POST",
|
|
315
|
-
headers: reqHeaders,
|
|
316
|
-
body: JSON.stringify(body || {}),
|
|
317
|
-
signal
|
|
318
|
-
};
|
|
319
|
-
};
|
|
320
|
-
var buildResponse = (res) => {
|
|
321
|
-
return res.text().then((text) => {
|
|
322
|
-
let data;
|
|
323
|
-
try {
|
|
324
|
-
data = JSON.parse(text);
|
|
325
|
-
} catch (error) {
|
|
326
|
-
let message = "";
|
|
327
|
-
if (error instanceof Error) {
|
|
328
|
-
message = error.message;
|
|
329
|
-
}
|
|
330
|
-
throw WebrpcBadResponseError.new({
|
|
331
|
-
status: res.status,
|
|
332
|
-
cause: `JSON.parse(): ${message}: response text: ${text}`
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
if (!res.ok) {
|
|
336
|
-
const code = typeof data.code === "number" ? data.code : 0;
|
|
337
|
-
throw (webrpcErrorByCode[code] || WebrpcError).new(data);
|
|
338
|
-
}
|
|
339
|
-
return data;
|
|
340
|
-
});
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
// src/react/_internal/wagmi/get-connectors.ts
|
|
344
|
-
function getConnectors({
|
|
345
|
-
marketplaceConfig,
|
|
346
|
-
sdkConfig,
|
|
347
|
-
walletType
|
|
348
|
-
}) {
|
|
349
|
-
const connectors = commonConnectors(marketplaceConfig, sdkConfig);
|
|
350
|
-
if (walletType === "UNIVERSAL" /* UNIVERSAL */) {
|
|
351
|
-
connectors.push(...getUniversalWalletConfigs(sdkConfig, marketplaceConfig));
|
|
352
|
-
} else if (walletType === "EMBEDDED" /* EMBEDDED */) {
|
|
353
|
-
connectors.push(...getWaasConnectors(sdkConfig, marketplaceConfig));
|
|
354
|
-
} else if (walletType === "ECOSYSTEM" /* ECOSYSTEM */) {
|
|
355
|
-
connectors.push(getEcosystemConnector(marketplaceConfig, sdkConfig));
|
|
356
|
-
} else {
|
|
357
|
-
throw new Error("Invalid wallet type");
|
|
358
|
-
}
|
|
359
|
-
return getConnectWallets(sdkConfig.projectAccessKey, connectors);
|
|
360
|
-
}
|
|
361
|
-
function commonConnectors(marketplaceConfig, sdkConfig) {
|
|
362
|
-
const wallets = [];
|
|
363
|
-
const { title: appName } = marketplaceConfig.settings;
|
|
364
|
-
const walletOptions = marketplaceConfig.settings.walletOptions;
|
|
365
|
-
const walletConnectProjectId = sdkConfig.walletConnectProjectId;
|
|
366
|
-
if (walletOptions.connectors.includes("coinbase")) {
|
|
367
|
-
wallets.push(
|
|
368
|
-
coinbaseWallet({
|
|
369
|
-
appName
|
|
370
|
-
})
|
|
371
|
-
);
|
|
372
|
-
}
|
|
373
|
-
if (walletConnectProjectId && walletOptions.connectors.includes("walletconnect")) {
|
|
374
|
-
wallets.push(
|
|
375
|
-
walletConnect({
|
|
376
|
-
projectId: walletConnectProjectId
|
|
377
|
-
})
|
|
378
|
-
);
|
|
379
|
-
}
|
|
380
|
-
return wallets;
|
|
381
|
-
}
|
|
382
|
-
function getUniversalWalletConfigs(config, marketplaceConfig) {
|
|
383
|
-
const { projectAccessKey } = config;
|
|
384
|
-
const sequenceWalletEnv = config._internal?.sequenceWalletEnv || "production";
|
|
385
|
-
const sequenceWalletOptions = {
|
|
386
|
-
walletAppURL: getSequenceWalletURL(sequenceWalletEnv),
|
|
387
|
-
defaultNetwork: DEFAULT_NETWORK,
|
|
388
|
-
connect: {
|
|
389
|
-
projectAccessKey,
|
|
390
|
-
app: marketplaceConfig.settings.title,
|
|
391
|
-
settings: {
|
|
392
|
-
// TODO: make a separate config for this?
|
|
393
|
-
bannerUrl: marketplaceConfig.market.ogImage
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
};
|
|
397
|
-
return [
|
|
398
|
-
sequence(sequenceWalletOptions),
|
|
399
|
-
email(sequenceWalletOptions),
|
|
400
|
-
facebook(sequenceWalletOptions),
|
|
401
|
-
google(sequenceWalletOptions),
|
|
402
|
-
apple(sequenceWalletOptions),
|
|
403
|
-
twitch(sequenceWalletOptions)
|
|
404
|
-
];
|
|
405
|
-
}
|
|
406
|
-
function getWaasConnectors(config, marketplaceConfig) {
|
|
407
|
-
const { projectAccessKey } = config;
|
|
408
|
-
const waasConfigKey = marketplaceConfig.settings.walletOptions.embedded?.tenantKey;
|
|
409
|
-
if (!waasConfigKey)
|
|
410
|
-
throw new MissingConfigError(
|
|
411
|
-
"Embedded wallet config is missing, please check your access key"
|
|
412
|
-
);
|
|
413
|
-
const waasOptions = marketplaceConfig.settings.walletOptions.oidcIssuers;
|
|
414
|
-
const googleClientId = waasOptions.google;
|
|
415
|
-
const appleClientId = waasOptions.apple;
|
|
416
|
-
const appleRedirectURI = typeof window !== "undefined" ? `${window.location.origin}${window.location.pathname}` : void 0;
|
|
417
|
-
const wallets = [];
|
|
418
|
-
if (marketplaceConfig.settings.walletOptions.embedded?.emailEnabled) {
|
|
419
|
-
wallets.push(
|
|
420
|
-
emailWaas({
|
|
421
|
-
projectAccessKey,
|
|
422
|
-
waasConfigKey
|
|
423
|
-
})
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
if (googleClientId) {
|
|
427
|
-
wallets.push(
|
|
428
|
-
googleWaas({
|
|
429
|
-
projectAccessKey,
|
|
430
|
-
googleClientId,
|
|
431
|
-
waasConfigKey,
|
|
432
|
-
network: DEFAULT_NETWORK
|
|
433
|
-
})
|
|
434
|
-
);
|
|
435
|
-
}
|
|
436
|
-
if (appleClientId) {
|
|
437
|
-
wallets.push(
|
|
438
|
-
appleWaas({
|
|
439
|
-
projectAccessKey,
|
|
440
|
-
appleClientId,
|
|
441
|
-
appleRedirectURI,
|
|
442
|
-
waasConfigKey,
|
|
443
|
-
network: DEFAULT_NETWORK
|
|
444
|
-
})
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
return wallets;
|
|
448
|
-
}
|
|
449
|
-
function getEcosystemConnector(marketplaceConfig, sdkConfig) {
|
|
450
|
-
const ecosystemOptions = marketplaceConfig.settings.walletOptions.ecosystem;
|
|
451
|
-
if (!ecosystemOptions) throw new MissingConfigError("ecosystem");
|
|
452
|
-
const { walletAppName, walletUrl, logoDarkUrl, logoLightUrl } = ecosystemOptions;
|
|
453
|
-
return ecosystemWallet({
|
|
454
|
-
projectAccessKey: sdkConfig.projectAccessKey,
|
|
455
|
-
walletUrl,
|
|
456
|
-
name: walletAppName,
|
|
457
|
-
defaultNetwork: DEFAULT_NETWORK,
|
|
458
|
-
logoDark: getEcosystemLogo(logoDarkUrl, walletAppName),
|
|
459
|
-
logoLight: getEcosystemLogo(logoLightUrl, walletAppName)
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
function getEcosystemLogo(url, name) {
|
|
463
|
-
if (!url) return () => null;
|
|
464
|
-
const Logo = () => React.createElement("img", { src: url, alt: name, width: 32, height: 32 });
|
|
465
|
-
Logo.displayName = "EcosystemLogo";
|
|
466
|
-
return Logo;
|
|
467
|
-
}
|
|
468
|
-
function getSequenceWalletURL(env) {
|
|
469
|
-
switch (env) {
|
|
470
|
-
case "development":
|
|
471
|
-
return "https://dev.sequence.app";
|
|
472
|
-
case "next":
|
|
473
|
-
return "https://next.sequence.app";
|
|
474
|
-
// biome-ignore lint/complexity/noUselessSwitchCase: Production case kept for readability alongside other environments
|
|
475
|
-
case "production":
|
|
476
|
-
default:
|
|
477
|
-
return "https://sequence.app";
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// src/react/_internal/wagmi/create-config.ts
|
|
482
|
-
var createWagmiConfig = (marketplaceConfig, sdkConfig, ssr) => {
|
|
483
|
-
const chains = getChainConfigs(marketplaceConfig);
|
|
484
|
-
const nodeGatewayEnv = sdkConfig._internal?.nodeGatewayEnv ?? "production";
|
|
485
|
-
const transports = getTransportConfigs(
|
|
486
|
-
chains,
|
|
487
|
-
sdkConfig.projectAccessKey,
|
|
488
|
-
nodeGatewayEnv
|
|
489
|
-
);
|
|
490
|
-
const walletType = marketplaceConfig.settings.walletOptions.walletType;
|
|
491
|
-
const connectors = getConnectors({
|
|
492
|
-
marketplaceConfig,
|
|
493
|
-
sdkConfig,
|
|
494
|
-
walletType
|
|
495
|
-
});
|
|
496
|
-
const multiInjectedProviderDiscovery = marketplaceConfig.settings.walletOptions.includeEIP6963Wallets;
|
|
497
|
-
return createConfig({
|
|
498
|
-
connectors,
|
|
499
|
-
chains,
|
|
500
|
-
ssr,
|
|
501
|
-
multiInjectedProviderDiscovery,
|
|
502
|
-
storage: ssr ? createStorage({
|
|
503
|
-
storage: cookieStorage
|
|
504
|
-
}) : void 0,
|
|
505
|
-
transports
|
|
506
|
-
});
|
|
507
|
-
};
|
|
508
|
-
function getAllCollections(marketConfig) {
|
|
509
|
-
return [...marketConfig.market.collections, ...marketConfig.shop.collections];
|
|
510
|
-
}
|
|
511
|
-
function getChainConfigs(marketConfig) {
|
|
512
|
-
const supportedChainIds = new Set(
|
|
513
|
-
getAllCollections(marketConfig).map((c) => c.chainId)
|
|
514
|
-
);
|
|
515
|
-
if (supportedChainIds.size === 0) {
|
|
516
|
-
supportedChainIds.add(DEFAULT_NETWORK);
|
|
517
|
-
}
|
|
518
|
-
const chains = getDefaultChains([...supportedChainIds]);
|
|
519
|
-
return chains;
|
|
520
|
-
}
|
|
521
|
-
function getTransportConfigs(chains, projectAccessKey, nodeGatewayEnv) {
|
|
522
|
-
return chains.reduce(
|
|
523
|
-
(acc, chain) => {
|
|
524
|
-
const network = findNetworkConfig(allNetworks, chain.id);
|
|
525
|
-
if (network) {
|
|
526
|
-
let rpcUrl = network.rpcUrl;
|
|
527
|
-
if (nodeGatewayEnv === "development") {
|
|
528
|
-
rpcUrl = rpcUrl.replace("nodes.", "dev-nodes.");
|
|
529
|
-
}
|
|
530
|
-
if (!network.rpcUrl.endsWith(projectAccessKey))
|
|
531
|
-
rpcUrl = `${rpcUrl}/${projectAccessKey}`;
|
|
532
|
-
acc[chain.id] = http(rpcUrl);
|
|
533
|
-
}
|
|
534
|
-
return acc;
|
|
535
|
-
},
|
|
536
|
-
{}
|
|
537
|
-
);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
export {
|
|
541
|
-
DEFAULT_NETWORK,
|
|
542
|
-
FilterCondition,
|
|
543
|
-
MarketplaceService,
|
|
544
|
-
getConnectors,
|
|
545
|
-
getWaasConnectors,
|
|
546
|
-
getEcosystemConnector,
|
|
547
|
-
createWagmiConfig
|
|
548
|
-
};
|
|
549
|
-
//# sourceMappingURL=chunk-XABYNWXO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/_internal/wagmi/create-config.ts","../src/react/_internal/consts.ts","../src/react/_internal/wagmi/get-connectors.ts","../src/react/_internal/api/builder.gen.ts"],"sourcesContent":["import { getDefaultChains } from '@0xsequence/connect';\nimport { allNetworks, findNetworkConfig } from '@0xsequence/network';\nimport type { Chain, Transport } from 'viem';\nimport { http, cookieStorage, createConfig, createStorage } from 'wagmi';\nimport type { Env, SdkConfig } from '../../../types';\nimport type { MarketplaceConfig } from '../../../types/new-marketplace-types';\nimport { DEFAULT_NETWORK } from '../consts';\nimport { getConnectors } from './get-connectors';\n\nexport const createWagmiConfig = (\n\tmarketplaceConfig: MarketplaceConfig,\n\tsdkConfig: SdkConfig,\n\tssr?: boolean,\n) => {\n\tconst chains = getChainConfigs(marketplaceConfig);\n\tconst nodeGatewayEnv = sdkConfig._internal?.nodeGatewayEnv ?? 'production';\n\tconst transports = getTransportConfigs(\n\t\tchains,\n\t\tsdkConfig.projectAccessKey,\n\t\tnodeGatewayEnv,\n\t);\n\n\tconst walletType = marketplaceConfig.settings.walletOptions.walletType;\n\n\tconst connectors = getConnectors({\n\t\tmarketplaceConfig,\n\t\tsdkConfig,\n\t\twalletType,\n\t});\n\n\tconst multiInjectedProviderDiscovery =\n\t\tmarketplaceConfig.settings.walletOptions.includeEIP6963Wallets;\n\n\treturn createConfig({\n\t\tconnectors,\n\t\tchains,\n\t\tssr,\n\t\tmultiInjectedProviderDiscovery,\n\t\tstorage: ssr\n\t\t\t? createStorage({\n\t\t\t\t\tstorage: cookieStorage,\n\t\t\t\t})\n\t\t\t: undefined,\n\t\ttransports,\n\t});\n};\n\nfunction getAllCollections(marketConfig: MarketplaceConfig) {\n\treturn [...marketConfig.market.collections, ...marketConfig.shop.collections];\n}\n\nfunction getChainConfigs(marketConfig: MarketplaceConfig): [Chain, ...Chain[]] {\n\tconst supportedChainIds = new Set(\n\t\tgetAllCollections(marketConfig).map((c) => c.chainId),\n\t);\n\n\tif (supportedChainIds.size === 0) {\n\t\tsupportedChainIds.add(DEFAULT_NETWORK);\n\t}\n\n\tconst chains = getDefaultChains([...supportedChainIds]);\n\n\treturn chains;\n}\n\nfunction getTransportConfigs(\n\tchains: [Chain, ...Chain[]],\n\tprojectAccessKey: string,\n\tnodeGatewayEnv: Env,\n): Record<number, Transport> {\n\treturn chains.reduce(\n\t\t(acc, chain) => {\n\t\t\tconst network = findNetworkConfig(allNetworks, chain.id);\n\t\t\tif (network) {\n\t\t\t\tlet rpcUrl = network.rpcUrl;\n\t\t\t\tif (nodeGatewayEnv === 'development') {\n\t\t\t\t\trpcUrl = rpcUrl.replace('nodes.', 'dev-nodes.');\n\t\t\t\t}\n\t\t\t\tif (!network.rpcUrl.endsWith(projectAccessKey))\n\t\t\t\t\trpcUrl = `${rpcUrl}/${projectAccessKey}`;\n\t\t\t\tacc[chain.id] = http(rpcUrl);\n\t\t\t}\n\t\t\treturn acc;\n\t\t},\n\t\t{} as Record<number, Transport>,\n\t);\n}\n","export const DEFAULT_NETWORK = 137;\n","import {\n\ttype SequenceOptions,\n\ttype Wallet,\n\tapple,\n\tappleWaas,\n\tcoinbaseWallet,\n\tecosystemWallet,\n\temail,\n\temailWaas,\n\tfacebook,\n\tgetConnectWallets,\n\tgoogle,\n\tgoogleWaas,\n\tsequence,\n\ttwitch,\n\twalletConnect,\n} from '@0xsequence/connect';\nimport React, { type FunctionComponent } from 'react';\nimport type { CreateConnectorFn } from 'wagmi';\nimport type { Env, SdkConfig } from '../../../types';\nimport type { MarketplaceConfig } from '../../../types/new-marketplace-types';\nimport { MissingConfigError } from '../../../utils/_internal/error/transaction';\nimport { MarketplaceWalletType } from '../api/builder.gen';\nimport { DEFAULT_NETWORK } from '../consts';\n\nexport function getConnectors({\n\tmarketplaceConfig,\n\tsdkConfig,\n\twalletType,\n}: {\n\tmarketplaceConfig: MarketplaceConfig;\n\tsdkConfig: SdkConfig;\n\twalletType: MarketplaceWalletType;\n}): CreateConnectorFn[] {\n\tconst connectors = commonConnectors(marketplaceConfig, sdkConfig);\n\n\tif (walletType === MarketplaceWalletType.UNIVERSAL) {\n\t\tconnectors.push(...getUniversalWalletConfigs(sdkConfig, marketplaceConfig));\n\t} else if (walletType === MarketplaceWalletType.EMBEDDED) {\n\t\tconnectors.push(...getWaasConnectors(sdkConfig, marketplaceConfig));\n\t} else if (walletType === MarketplaceWalletType.ECOSYSTEM) {\n\t\tconnectors.push(getEcosystemConnector(marketplaceConfig, sdkConfig));\n\t} else {\n\t\tthrow new Error('Invalid wallet type');\n\t}\n\n\treturn getConnectWallets(sdkConfig.projectAccessKey, connectors);\n}\n\nfunction commonConnectors(\n\tmarketplaceConfig: MarketplaceConfig,\n\tsdkConfig: SdkConfig,\n) {\n\tconst wallets = [];\n\tconst { title: appName } = marketplaceConfig.settings;\n\tconst walletOptions = marketplaceConfig.settings.walletOptions;\n\tconst walletConnectProjectId = sdkConfig.walletConnectProjectId;\n\n\tif (walletOptions.connectors.includes('coinbase')) {\n\t\twallets.push(\n\t\t\tcoinbaseWallet({\n\t\t\t\tappName,\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (\n\t\twalletConnectProjectId &&\n\t\twalletOptions.connectors.includes('walletconnect')\n\t) {\n\t\twallets.push(\n\t\t\twalletConnect({\n\t\t\t\tprojectId: walletConnectProjectId,\n\t\t\t}),\n\t\t);\n\t}\n\n\treturn wallets;\n}\n\nfunction getUniversalWalletConfigs(\n\tconfig: SdkConfig,\n\tmarketplaceConfig: MarketplaceConfig,\n): Wallet[] {\n\tconst { projectAccessKey } = config;\n\tconst sequenceWalletEnv = config._internal?.sequenceWalletEnv || 'production';\n\n\tconst sequenceWalletOptions = {\n\t\twalletAppURL: getSequenceWalletURL(sequenceWalletEnv),\n\t\tdefaultNetwork: DEFAULT_NETWORK,\n\t\tconnect: {\n\t\t\tprojectAccessKey,\n\t\t\tapp: marketplaceConfig.settings.title,\n\t\t\tsettings: {\n\t\t\t\t// TODO: make a separate config for this?\n\t\t\t\tbannerUrl: marketplaceConfig.market.ogImage,\n\t\t\t},\n\t\t},\n\t} satisfies SequenceOptions;\n\n\treturn [\n\t\tsequence(sequenceWalletOptions),\n\t\temail(sequenceWalletOptions),\n\t\tfacebook(sequenceWalletOptions),\n\t\tgoogle(sequenceWalletOptions),\n\t\tapple(sequenceWalletOptions),\n\t\ttwitch(sequenceWalletOptions),\n\t] as const;\n}\n\nexport function getWaasConnectors(\n\tconfig: SdkConfig,\n\tmarketplaceConfig: MarketplaceConfig,\n): Wallet[] {\n\tconst { projectAccessKey } = config;\n\n\tconst waasConfigKey =\n\t\tmarketplaceConfig.settings.walletOptions.embedded?.tenantKey;\n\n\tif (!waasConfigKey)\n\t\tthrow new MissingConfigError(\n\t\t\t'Embedded wallet config is missing, please check your access key',\n\t\t);\n\n\tconst waasOptions = marketplaceConfig.settings.walletOptions.oidcIssuers;\n\tconst googleClientId = waasOptions.google;\n\tconst appleClientId = waasOptions.apple;\n\tconst appleRedirectURI =\n\t\ttypeof window !== 'undefined'\n\t\t\t? `${window.location.origin}${window.location.pathname}`\n\t\t\t: undefined;\n\n\tconst wallets: Wallet[] = [];\n\n\tif (marketplaceConfig.settings.walletOptions.embedded?.emailEnabled) {\n\t\twallets.push(\n\t\t\temailWaas({\n\t\t\t\tprojectAccessKey,\n\t\t\t\twaasConfigKey,\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (googleClientId) {\n\t\twallets.push(\n\t\t\tgoogleWaas({\n\t\t\t\tprojectAccessKey,\n\t\t\t\tgoogleClientId,\n\t\t\t\twaasConfigKey,\n\t\t\t\tnetwork: DEFAULT_NETWORK,\n\t\t\t}),\n\t\t);\n\t}\n\n\tif (appleClientId) {\n\t\twallets.push(\n\t\t\tappleWaas({\n\t\t\t\tprojectAccessKey,\n\t\t\t\tappleClientId,\n\t\t\t\tappleRedirectURI,\n\t\t\t\twaasConfigKey,\n\t\t\t\tnetwork: DEFAULT_NETWORK,\n\t\t\t}),\n\t\t);\n\t}\n\n\treturn wallets;\n}\n\nexport function getEcosystemConnector(\n\tmarketplaceConfig: MarketplaceConfig,\n\tsdkConfig: SdkConfig,\n): Wallet {\n\tconst ecosystemOptions = marketplaceConfig.settings.walletOptions.ecosystem;\n\tif (!ecosystemOptions) throw new MissingConfigError('ecosystem');\n\tconst { walletAppName, walletUrl, logoDarkUrl, logoLightUrl } =\n\t\tecosystemOptions;\n\n\treturn ecosystemWallet({\n\t\tprojectAccessKey: sdkConfig.projectAccessKey,\n\t\twalletUrl,\n\t\tname: walletAppName,\n\t\tdefaultNetwork: DEFAULT_NETWORK,\n\t\tlogoDark: getEcosystemLogo(logoDarkUrl, walletAppName),\n\t\tlogoLight: getEcosystemLogo(logoLightUrl, walletAppName),\n\t});\n}\n\nfunction getEcosystemLogo(\n\turl: string | undefined,\n\tname: string,\n): FunctionComponent {\n\tif (!url) return () => null;\n\tconst Logo = () =>\n\t\tReact.createElement('img', { src: url, alt: name, width: 32, height: 32 });\n\tLogo.displayName = 'EcosystemLogo';\n\treturn Logo;\n}\n\nfunction getSequenceWalletURL(env: Env) {\n\tswitch (env) {\n\t\tcase 'development':\n\t\t\treturn 'https://dev.sequence.app';\n\t\tcase 'next':\n\t\t\treturn 'https://next.sequence.app';\n\t\t// biome-ignore lint/complexity/noUselessSwitchCase: Production case kept for readability alongside other environments\n\t\tcase 'production':\n\t\tdefault:\n\t\t\treturn 'https://sequence.app';\n\t}\n}\n","/* eslint-disable */\n// Relevant parts for lookupMarketplace & common Webrpc utilities\n// sequence-builder v0.1.0 52bd730f3b821fe99051d69ced824442369efe4a\n// --\n// Code generated by webrpc-gen@v0.26.0 with typescript generator. DO NOT EDIT.\n//\n// webrpc-gen -schema=builder.main.ridl -target=typescript -client -out=../../webapp/src/rpc/proto/builder.gen.ts\n\nimport { OrderbookKind } from \"./marketplace.gen\";\n\nexport const WebrpcHeader = \"Webrpc\";\nexport const WebrpcHeaderValue =\n \"webrpc@v0.26.0;gen-typescript@v0.17.0;sequence-builder@v0.1.0\";\n\n//\n// Types for lookupMarketplace\n//\n\nexport enum MarketplaceWalletType {\n UNIVERSAL = \"UNIVERSAL\",\n EMBEDDED = \"EMBEDDED\",\n ECOSYSTEM = \"ECOSYSTEM\",\n}\n\nexport enum FilterCondition {\n ENTIRE_KEY = \"ENTIRE_KEY\",\n SPECIFIC_VALUE = \"SPECIFIC_VALUE\",\n}\n\nexport interface LookupMarketplaceArgs {\n projectId?: number;\n domain?: string;\n}\n\nexport interface LookupMarketplaceReturn {\n marketplace: Marketplace;\n marketCollections: Array<MarketCollection>;\n shopCollections: Array<ShopCollection>;\n}\n\nexport interface Marketplace {\n projectId: number;\n settings: MarketplaceSettings;\n market: MarketplacePage;\n shop: MarketplacePage;\n createdAt?: string;\n updatedAt?: string;\n}\n\nexport interface MarketplaceSettings {\n style: { [key: string]: any };\n publisherId: string;\n title: string;\n socials: MarketplaceSocials;\n faviconUrl: string;\n walletOptions: MarketplaceWallet;\n logoUrl: string;\n fontUrl: string;\n accessKey?: string;\n}\n\nexport interface MarketplacePage {\n enabled: boolean;\n title: string;\n bannerUrl: string;\n ogImage: string;\n}\n\nexport interface MarketplaceSocials {\n twitter: string;\n discord: string;\n website: string;\n tiktok: string;\n instagram: string;\n youtube: string;\n}\n\nexport interface MarketplaceWallet {\n walletType: MarketplaceWalletType;\n oidcIssuers: { [key: string]: string };\n connectors: Array<string>;\n includeEIP6963Wallets: boolean;\n ecosystem?: MarketplaceWalletEcosystem;\n embedded?: MarketplaceWalletEmbedded;\n}\n\nexport interface MarketplaceWalletEcosystem {\n walletUrl: string;\n walletAppName: string;\n logoLightUrl?: string;\n logoDarkUrl?: string;\n}\n\nexport interface MarketplaceWalletEmbedded {\n tenantKey: string;\n emailEnabled: boolean;\n providers: Array<OpenIdProvider>;\n}\n\nexport interface OpenIdProvider {\n iss: string;\n aud: Array<string>;\n}\n\nexport interface MarketCollection {\n id: number;\n projectId: number;\n chainId: number;\n itemsAddress: string;\n contractType: string;\n bannerUrl: string;\n feePercentage: number;\n currencyOptions: Array<string>;\n destinationMarketplace: OrderbookKind;\n filterSettings?: CollectionFilterSettings;\n createdAt?: string;\n updatedAt?: string;\n}\n\nexport interface CollectionFilterSettings {\n filterOrder: Array<string>;\n exclusions: Array<MetadataFilterRule>;\n}\n\nexport interface MetadataFilterRule {\n key: string;\n condition: FilterCondition;\n value?: string;\n}\n\nexport interface ShopCollection {\n id: number;\n projectId: number;\n chainId: number;\n itemsAddress: string;\n saleAddress: string;\n name: string;\n bannerUrl: string;\n saleBannerUrl: string;\n createdAt?: string;\n updatedAt?: string;\n}\n\n//\n// Service Interface Definition for MarketplaceService (relevant part)\n//\nexport interface MarketplaceService {\n /**\n * Public Methods\n */\n lookupMarketplace(\n args: LookupMarketplaceArgs,\n headers?: object,\n signal?: AbortSignal\n ): Promise<LookupMarketplaceReturn>;\n}\n\n//\n// Errors (Complete set from original)\n//\n\nexport class WebrpcError extends Error {\n name: string;\n code: number;\n message: string;\n status: number;\n cause?: string;\n\n /** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */\n msg: string;\n\n constructor(\n name: string,\n code: number,\n message: string,\n status: number,\n cause?: string\n ) {\n super(message);\n this.name = name || \"WebrpcError\";\n this.code = typeof code === \"number\" ? code : 0;\n this.message = message || `endpoint error ${this.code}`;\n this.msg = this.message;\n this.status = typeof status === \"number\" ? status : 0;\n this.cause = cause;\n Object.setPrototypeOf(this, WebrpcError.prototype);\n }\n\n static new(payload: any): WebrpcError {\n return new this(\n payload.error,\n payload.code,\n payload.message || payload.msg,\n payload.status,\n payload.cause\n );\n }\n}\n\n// Webrpc errors\n\nexport class WebrpcEndpointError extends WebrpcError {\n constructor(\n name: string = \"WebrpcEndpoint\",\n code: number = 0,\n message: string = `endpoint error`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcEndpointError.prototype);\n }\n}\n\nexport class WebrpcRequestFailedError extends WebrpcError {\n constructor(\n name: string = \"WebrpcRequestFailed\",\n code: number = -1,\n message: string = `request failed`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);\n }\n}\n\nexport class WebrpcBadRouteError extends WebrpcError {\n constructor(\n name: string = \"WebrpcBadRoute\",\n code: number = -2,\n message: string = `bad route`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);\n }\n}\n\nexport class WebrpcBadMethodError extends WebrpcError {\n constructor(\n name: string = \"WebrpcBadMethod\",\n code: number = -3,\n message: string = `bad method`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);\n }\n}\n\nexport class WebrpcBadRequestError extends WebrpcError {\n constructor(\n name: string = \"WebrpcBadRequest\",\n code: number = -4,\n message: string = `bad request`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);\n }\n}\n\nexport class WebrpcBadResponseError extends WebrpcError {\n constructor(\n name: string = \"WebrpcBadResponse\",\n code: number = -5,\n message: string = `bad response`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);\n }\n}\n\nexport class WebrpcServerPanicError extends WebrpcError {\n constructor(\n name: string = \"WebrpcServerPanic\",\n code: number = -6,\n message: string = `server panic`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);\n }\n}\n\nexport class WebrpcInternalErrorError extends WebrpcError {\n // Name as per original\n constructor(\n name: string = \"WebrpcInternalError\",\n code: number = -7,\n message: string = `internal error`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);\n }\n}\n\nexport class WebrpcClientDisconnectedError extends WebrpcError {\n constructor(\n name: string = \"WebrpcClientDisconnected\",\n code: number = -8,\n message: string = `client disconnected`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype);\n }\n}\n\nexport class WebrpcStreamLostError extends WebrpcError {\n constructor(\n name: string = \"WebrpcStreamLost\",\n code: number = -9,\n message: string = `stream lost`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);\n }\n}\n\nexport class WebrpcStreamFinishedError extends WebrpcError {\n constructor(\n name: string = \"WebrpcStreamFinished\",\n code: number = -10,\n message: string = `stream finished`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);\n }\n}\n\n// Schema errors\n\nexport class UnauthorizedError extends WebrpcError {\n constructor(\n name: string = \"Unauthorized\",\n code: number = 1000,\n message: string = `Unauthorized access`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n\nexport class PermissionDeniedError extends WebrpcError {\n constructor(\n name: string = \"PermissionDenied\",\n code: number = 1001,\n message: string = `Permission denied`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, PermissionDeniedError.prototype);\n }\n}\n\nexport class SessionExpiredError extends WebrpcError {\n constructor(\n name: string = \"SessionExpired\",\n code: number = 1002,\n message: string = `Session expired`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, SessionExpiredError.prototype);\n }\n}\n\nexport class MethodNotFoundError extends WebrpcError {\n constructor(\n name: string = \"MethodNotFound\",\n code: number = 1003,\n message: string = `Method not found`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, MethodNotFoundError.prototype);\n }\n}\n\nexport class RequestConflictError extends WebrpcError {\n constructor(\n name: string = \"RequestConflict\",\n code: number = 1004,\n message: string = `Conflict with target resource`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, RequestConflictError.prototype);\n }\n}\n\nexport class ServiceDisabledError extends WebrpcError {\n constructor(\n name: string = \"ServiceDisabled\",\n code: number = 1005,\n message: string = `Service disabled`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, ServiceDisabledError.prototype);\n }\n}\n\nexport class TimeoutError extends WebrpcError {\n constructor(\n name: string = \"Timeout\",\n code: number = 2000,\n message: string = `Request timed out`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\nexport class InvalidArgumentError extends WebrpcError {\n constructor(\n name: string = \"InvalidArgument\",\n code: number = 2001,\n message: string = `Invalid argument`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, InvalidArgumentError.prototype);\n }\n}\n\nexport class NotFoundError extends WebrpcError {\n constructor(\n name: string = \"NotFound\",\n code: number = 3000,\n message: string = `Resource not found`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n\nexport class UserNotFoundError extends WebrpcError {\n constructor(\n name: string = \"UserNotFound\",\n code: number = 3001,\n message: string = `User not found`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, UserNotFoundError.prototype);\n }\n}\n\nexport class ProjectNotFoundError extends WebrpcError {\n constructor(\n name: string = \"ProjectNotFound\",\n code: number = 3002,\n message: string = `Project not found`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, ProjectNotFoundError.prototype);\n }\n}\n\nexport class InvalidTierError extends WebrpcError {\n constructor(\n name: string = \"InvalidTier\",\n code: number = 3003,\n message: string = `Invalid subscription tier`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, InvalidTierError.prototype);\n }\n}\n\nexport class EmailTemplateExistsError extends WebrpcError {\n constructor(\n name: string = \"EmailTemplateExists\",\n code: number = 3004,\n message: string = `Email Template exists`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, EmailTemplateExistsError.prototype);\n }\n}\n\nexport class SubscriptionLimitError extends WebrpcError {\n constructor(\n name: string = \"SubscriptionLimit\",\n code: number = 3005,\n message: string = `Subscription limit reached`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, SubscriptionLimitError.prototype);\n }\n}\n\nexport class FeatureNotIncludedError extends WebrpcError {\n constructor(\n name: string = \"FeatureNotIncluded\",\n code: number = 3006,\n message: string = `Feature not included`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, FeatureNotIncludedError.prototype);\n }\n}\n\nexport class InvalidNetworkError extends WebrpcError {\n constructor(\n name: string = \"InvalidNetwork\",\n code: number = 3007,\n message: string = `Invalid network`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, InvalidNetworkError.prototype);\n }\n}\n\nexport class InvitationExpiredError extends WebrpcError {\n constructor(\n name: string = \"InvitationExpired\",\n code: number = 4000,\n message: string = `Invitation code is expired`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, InvitationExpiredError.prototype);\n }\n}\n\nexport class AlreadyCollaboratorError extends WebrpcError {\n constructor(\n name: string = \"AlreadyCollaborator\",\n code: number = 4001,\n message: string = `Already a collaborator`,\n status: number = 0,\n cause?: string\n ) {\n super(name, code, message, status, cause);\n Object.setPrototypeOf(this, AlreadyCollaboratorError.prototype);\n }\n}\n\nexport enum errors {\n WebrpcEndpoint = \"WebrpcEndpoint\",\n WebrpcRequestFailed = \"WebrpcRequestFailed\",\n WebrpcBadRoute = \"WebrpcBadRoute\",\n WebrpcBadMethod = \"WebrpcBadMethod\",\n WebrpcBadRequest = \"WebrpcBadRequest\",\n WebrpcBadResponse = \"WebrpcBadResponse\",\n WebrpcServerPanic = \"WebrpcServerPanic\",\n WebrpcInternalError = \"WebrpcInternalError\",\n WebrpcClientDisconnected = \"WebrpcClientDisconnected\",\n WebrpcStreamLost = \"WebrpcStreamLost\",\n WebrpcStreamFinished = \"WebrpcStreamFinished\",\n Unauthorized = \"Unauthorized\",\n PermissionDenied = \"PermissionDenied\",\n SessionExpired = \"SessionExpired\",\n MethodNotFound = \"MethodNotFound\",\n RequestConflict = \"RequestConflict\",\n ServiceDisabled = \"ServiceDisabled\",\n Timeout = \"Timeout\",\n InvalidArgument = \"InvalidArgument\",\n NotFound = \"NotFound\",\n UserNotFound = \"UserNotFound\",\n ProjectNotFound = \"ProjectNotFound\",\n InvalidTier = \"InvalidTier\",\n EmailTemplateExists = \"EmailTemplateExists\",\n SubscriptionLimit = \"SubscriptionLimit\",\n FeatureNotIncluded = \"FeatureNotIncluded\",\n InvalidNetwork = \"InvalidNetwork\",\n InvitationExpired = \"InvitationExpired\",\n AlreadyCollaborator = \"AlreadyCollaborator\",\n}\n\nexport enum WebrpcErrorCodes {\n WebrpcEndpoint = 0,\n WebrpcRequestFailed = -1,\n WebrpcBadRoute = -2,\n WebrpcBadMethod = -3,\n WebrpcBadRequest = -4,\n WebrpcBadResponse = -5,\n WebrpcServerPanic = -6,\n WebrpcInternalError = -7,\n WebrpcClientDisconnected = -8,\n WebrpcStreamLost = -9,\n WebrpcStreamFinished = -10,\n Unauthorized = 1000,\n PermissionDenied = 1001,\n SessionExpired = 1002,\n MethodNotFound = 1003,\n RequestConflict = 1004,\n ServiceDisabled = 1005,\n Timeout = 2000,\n InvalidArgument = 2001,\n NotFound = 3000,\n UserNotFound = 3001,\n ProjectNotFound = 3002,\n InvalidTier = 3003,\n EmailTemplateExists = 3004,\n SubscriptionLimit = 3005,\n FeatureNotIncluded = 3006,\n InvalidNetwork = 3007,\n InvitationExpired = 4000,\n AlreadyCollaborator = 4001,\n}\n\nexport const webrpcErrorByCode: { [code: number]: any } = {\n [0]: WebrpcEndpointError,\n [-1]: WebrpcRequestFailedError,\n [-2]: WebrpcBadRouteError,\n [-3]: WebrpcBadMethodError,\n [-4]: WebrpcBadRequestError,\n [-5]: WebrpcBadResponseError,\n [-6]: WebrpcServerPanicError,\n [-7]: WebrpcInternalErrorError, // Name as per original\n [-8]: WebrpcClientDisconnectedError,\n [-9]: WebrpcStreamLostError,\n [-10]: WebrpcStreamFinishedError,\n [1000]: UnauthorizedError,\n [1001]: PermissionDeniedError,\n [1002]: SessionExpiredError,\n [1003]: MethodNotFoundError,\n [1004]: RequestConflictError,\n [1005]: ServiceDisabledError,\n [2000]: TimeoutError,\n [2001]: InvalidArgumentError,\n [3000]: NotFoundError,\n [3001]: UserNotFoundError,\n [3002]: ProjectNotFoundError,\n [3003]: InvalidTierError,\n [3004]: EmailTemplateExistsError,\n [3005]: SubscriptionLimitError,\n [3006]: FeatureNotIncludedError,\n [3007]: InvalidNetworkError,\n [4000]: InvitationExpiredError,\n [4001]: AlreadyCollaboratorError,\n};\n\n//\n// Client Implementation for MarketplaceService (relevant part)\n//\nexport type Fetch = (\n input: RequestInfo,\n init?: RequestInit\n) => Promise<Response>;\n\nexport class MarketplaceService {\n protected hostname: string;\n protected fetch: Fetch;\n protected path = \"/rpc/MarketplaceService/\";\n\n constructor(hostname: string, fetch: Fetch) {\n this.hostname = hostname.replace(/\\/*$/, \"\");\n this.fetch = (input: RequestInfo, init?: RequestInit) => fetch(input, init);\n }\n\n private url(name: string): string {\n return this.hostname + this.path + name;\n }\n\n lookupMarketplace = (\n args: LookupMarketplaceArgs,\n headers?: object,\n signal?: AbortSignal\n ): Promise<LookupMarketplaceReturn> => {\n return this.fetch(\n this.url(\"LookupMarketplace\"),\n createHTTPRequest(args, headers, signal)\n ).then(\n (res) => {\n return buildResponse(res).then((_data) => {\n return {\n marketplace: <Marketplace>_data.marketplace,\n marketCollections: <Array<MarketCollection>>_data.marketCollections,\n shopCollections: <Array<ShopCollection>>_data.shopCollections,\n };\n });\n },\n (error) => {\n throw WebrpcRequestFailedError.new({\n cause: `lookupMarketplace(): ${error.message || \"\"}`,\n });\n }\n );\n };\n}\n\n//\n// Helper Functions\n//\nconst createHTTPRequest = (\n body: object = {},\n headers: object = {},\n signal: AbortSignal | null = null\n): object => {\n const reqHeaders: { [key: string]: string } = {\n ...headers,\n \"Content-Type\": \"application/json\",\n };\n reqHeaders[WebrpcHeader] = WebrpcHeaderValue;\n\n return {\n method: \"POST\",\n headers: reqHeaders,\n body: JSON.stringify(body || {}),\n signal,\n };\n};\n\nconst buildResponse = (res: Response): Promise<any> => {\n return res.text().then((text) => {\n let data;\n try {\n data = JSON.parse(text);\n } catch (error) {\n let message = \"\";\n if (error instanceof Error) {\n message = error.message;\n }\n throw WebrpcBadResponseError.new({\n status: res.status,\n cause: `JSON.parse(): ${message}: response text: ${text}`,\n });\n }\n if (!res.ok) {\n const code: number = typeof data.code === \"number\" ? data.code : 0;\n throw (webrpcErrorByCode[code] || WebrpcError).new(data);\n }\n return data;\n });\n};\n"],"mappings":";;;;;AAAA,SAAS,wBAAwB;AACjC,SAAS,aAAa,yBAAyB;AAE/C,SAAS,MAAM,eAAe,cAAc,qBAAqB;;;ACH1D,IAAM,kBAAkB;;;ACA/B;AAAA,EAGC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,WAAuC;;;ACPvC,IAAM,eAAe;AACrB,IAAM,oBACX;AAYK,IAAK,kBAAL,kBAAKA,qBAAL;AACL,EAAAA,iBAAA,gBAAa;AACb,EAAAA,iBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;AAyIL,IAAM,cAAN,MAAM,qBAAoB,MAAM;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAGA;AAAA,EAEA,YACE,MACA,MACA,SACA,QACA,OACA;AACA,UAAM,OAAO;AACb,SAAK,OAAO,QAAQ;AACpB,SAAK,OAAO,OAAO,SAAS,WAAW,OAAO;AAC9C,SAAK,UAAU,WAAW,kBAAkB,KAAK,IAAI;AACrD,SAAK,MAAM,KAAK;AAChB,SAAK,SAAS,OAAO,WAAW,WAAW,SAAS;AACpD,SAAK,QAAQ;AACb,WAAO,eAAe,MAAM,aAAY,SAAS;AAAA,EACnD;AAAA,EAEA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