@0xsequence/marketplace-sdk 0.3.0 → 0.3.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/dist/chunk-22NLQ3AS.js +3078 -0
- package/dist/chunk-22NLQ3AS.js.map +1 -0
- package/dist/chunk-3OHM45R3.js +1294 -0
- package/dist/chunk-3OHM45R3.js.map +1 -0
- package/dist/{chunk-MQR6SHXZ.js → chunk-4YU2UPYH.js} +58 -103
- package/dist/chunk-4YU2UPYH.js.map +1 -0
- package/dist/chunk-7NJETFMF.js +21 -0
- package/dist/chunk-7NJETFMF.js.map +1 -0
- package/dist/{chunk-UYRQ5MJQ.js → chunk-FUM4OGOQ.js} +4 -4
- package/dist/chunk-FUM4OGOQ.js.map +1 -0
- package/dist/{chunk-7OO74L2K.js → chunk-GJAKQ5Q3.js} +40 -1
- package/dist/chunk-GJAKQ5Q3.js.map +1 -0
- package/dist/chunk-MCI3KOSQ.js +2 -0
- package/dist/{chunk-BJE7AG6V.js → chunk-O7UQGT43.js} +698 -23
- package/dist/chunk-O7UQGT43.js.map +1 -0
- package/dist/{chunk-CSN7YD5Q.js → chunk-Q57TEA3Z.js} +20 -2
- package/dist/chunk-Q57TEA3Z.js.map +1 -0
- package/dist/{chunk-VEX7FDL6.js → chunk-SBVLWSRZ.js} +2 -2
- package/dist/{chunk-VEX7FDL6.js.map → chunk-SBVLWSRZ.js.map} +1 -1
- package/dist/{chunk-6S4FYXP6.js → chunk-SPW24Y7I.js} +40 -1
- package/dist/chunk-SPW24Y7I.js.map +1 -0
- package/dist/chunk-UISBTKFF.js +1 -0
- package/dist/{chunk-OUWB3FHZ.js → chunk-WA433WAJ.js} +9 -33
- package/dist/chunk-WA433WAJ.js.map +1 -0
- package/dist/{chunk-O5JXKTWP.js → chunk-WFE6OCYF.js} +4 -4
- package/dist/chunk-WFE6OCYF.js.map +1 -0
- package/dist/chunk-XX4EVWBF.js +1292 -0
- package/dist/chunk-XX4EVWBF.js.map +1 -0
- package/dist/chunk-Y7YO5TLE.js +53 -0
- package/dist/chunk-Y7YO5TLE.js.map +1 -0
- package/dist/index.css +1 -50
- package/dist/index.d.ts +3 -5
- package/dist/index.js +158 -73
- package/dist/index.js.map +1 -1
- package/dist/react/hooks/index.css +82 -0
- package/dist/react/hooks/index.css.map +1 -0
- package/dist/react/hooks/index.d.ts +401 -462
- package/dist/react/hooks/index.js +26 -6
- package/dist/react/index.css +56 -91
- package/dist/react/index.css.map +1 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +32 -13
- package/dist/react/ui/components/index.css +86 -121
- package/dist/react/ui/components/index.css.map +1 -1
- package/dist/react/ui/components/index.d.ts +10 -4
- package/dist/react/ui/components/index.js +12 -11
- package/dist/react/ui/icons/index.js +3 -2
- package/dist/react/ui/icons/index.js.map +1 -1
- package/dist/react/ui/index.css +56 -91
- package/dist/react/ui/index.css.map +1 -1
- package/dist/react/ui/index.d.ts +29 -31
- package/dist/react/ui/index.js +14 -11
- package/dist/react/ui/modals/_internal/components/actionModal/index.js +5 -16
- package/dist/react/ui/modals/_internal/components/actionModal/index.js.map +1 -1
- package/dist/react/ui/styles/index.d.ts +1 -1
- package/dist/styles/index.css +1 -50
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/index.d.ts +1 -5
- package/dist/styles/index.js +8 -10
- package/dist/utils/abi/index.d.ts +2 -0
- package/dist/utils/abi/index.js +21 -0
- package/dist/utils/abi/marketplace/index.d.ts +805 -0
- package/dist/utils/abi/marketplace/index.js +12 -0
- package/dist/utils/abi/{abi/token → token}/index.js +1 -2
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.js +12 -14
- package/package.json +17 -15
- package/src/react/_internal/transaction-machine/execute-transaction.ts +592 -0
- package/src/react/_internal/transaction-machine/useTransactionMachine.ts +66 -0
- package/src/react/hooks/index.ts +4 -0
- package/src/react/hooks/useBuyCollectable.tsx +38 -0
- package/src/react/hooks/useCancelOrder.tsx +38 -0
- package/src/react/hooks/useCheckoutOptions.tsx +9 -6
- package/src/react/hooks/useCreateListing.tsx +65 -0
- package/src/react/hooks/useGenerateBuyTransaction.tsx +71 -0
- package/src/react/hooks/useListListingsForCollectible.tsx +1 -1
- package/src/react/hooks/useMakeOffer.tsx +62 -0
- package/src/react/hooks/useRoyaltyPercentage.tsx +1 -1
- package/src/react/hooks/useSell.tsx +62 -0
- package/src/react/ui/components/_internals/action-button/ActionButton.tsx +107 -115
- package/src/react/ui/components/_internals/custom-select/CustomSelect.tsx +63 -0
- package/src/react/ui/components/_internals/custom-select/styles.css.ts +64 -0
- package/src/react/ui/components/collectible-card/CollectibleCard.tsx +127 -130
- package/src/react/ui/components/collectible-card/Footer.tsx +65 -58
- package/src/react/ui/icons/Bell.tsx +2 -2
- package/src/react/ui/index.ts +1 -0
- package/src/react/ui/modals/BuyModal/_store.ts +53 -0
- package/src/react/ui/modals/BuyModal/index.tsx +119 -0
- package/src/react/ui/modals/CreateListingModal/_store.ts +35 -312
- package/src/react/ui/modals/CreateListingModal/index.tsx +185 -126
- package/src/react/ui/modals/MakeOfferModal/_store.ts +34 -276
- package/src/react/ui/modals/MakeOfferModal/index.tsx +195 -136
- package/src/react/ui/modals/SellModal/_store.ts +29 -262
- package/src/react/ui/modals/SellModal/index.tsx +156 -121
- package/src/react/ui/modals/SuccessfulPurchaseModal/_store.ts +17 -3
- package/src/react/ui/modals/SuccessfulPurchaseModal/index.tsx +3 -2
- package/src/react/ui/modals/TransferModal/index.tsx +9 -16
- package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +1 -0
- package/src/react/ui/modals/_internal/components/actionModal/ErrorModal.tsx +18 -0
- package/src/react/ui/modals/_internal/components/actionModal/LoadingModal.tsx +18 -0
- package/src/react/ui/modals/_internal/components/calendarPopover/index.tsx +1 -0
- package/src/react/ui/modals/_internal/components/calendarPopover/overrides.css +8 -0
- package/src/react/ui/modals/_internal/components/calendarPopover/styles.css.ts +10 -4
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +10 -13
- package/src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx +23 -9
- package/src/react/ui/modals/_internal/components/priceInput/index.tsx +7 -18
- package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +17 -44
- package/src/react/ui/modals/_internal/components/switchChainModal/store.ts +10 -8
- package/src/react/ui/modals/_internal/components/tokenPreview/index.tsx +14 -3
- package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +4 -2
- package/src/react/ui/modals/_internal/components/transactionHeader/index.tsx +4 -4
- package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +4 -2
- package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +13 -10
- package/src/react/ui/modals/_internal/types.ts +13 -0
- package/src/react/ui/modals/modal-provider.tsx +4 -2
- package/src/styles/index.ts +0 -2
- package/src/utils/abi/index.ts +2 -0
- package/src/utils/abi/marketplace/index.ts +3 -0
- package/src/utils/abi/marketplace/sequence-marketplace-v1.ts +463 -0
- package/src/utils/abi/marketplace/sequence-marketplace-v2.ts +802 -0
- package/src/utils/index.ts +2 -3
- package/src/utils/network.ts +4 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/chunk-6JWGELXL.js +0 -214
- package/dist/chunk-6JWGELXL.js.map +0 -1
- package/dist/chunk-6S4FYXP6.js.map +0 -1
- package/dist/chunk-7OO74L2K.js.map +0 -1
- package/dist/chunk-BCNFYVAL.js +0 -1
- package/dist/chunk-BJE7AG6V.js.map +0 -1
- package/dist/chunk-CSN7YD5Q.js.map +0 -1
- package/dist/chunk-D7QQP6MS.js +0 -2
- package/dist/chunk-DBFOPEV6.js +0 -23
- package/dist/chunk-DBFOPEV6.js.map +0 -1
- package/dist/chunk-MQR6SHXZ.js.map +0 -1
- package/dist/chunk-O5JXKTWP.js.map +0 -1
- package/dist/chunk-OUWB3FHZ.js.map +0 -1
- package/dist/chunk-PE2LLUTJ.js +0 -213
- package/dist/chunk-PE2LLUTJ.js.map +0 -1
- package/dist/chunk-QVFMD6S2.js +0 -21
- package/dist/chunk-QVFMD6S2.js.map +0 -1
- package/dist/chunk-QXLZPSSR.js +0 -3316
- package/dist/chunk-QXLZPSSR.js.map +0 -1
- package/dist/chunk-UYRQ5MJQ.js.map +0 -1
- package/dist/utils/abi/abi/standard/index.d.ts +0 -25
- package/dist/utils/abi/abi/standard/index.js +0 -8
- package/dist/utils/abi/clients/index.d.ts +0 -27
- package/dist/utils/abi/clients/index.js +0 -13
- package/src/react/ui/modals/_internal/components/currencyOptionsSelect/styles.css.ts +0 -33
- package/src/react/ui/modals/_internal/components/expirationDateSelect/styles.css.ts +0 -25
- package/src/utils/abi/abi/standard/index.ts +0 -1
- package/src/utils/abi/clients/ERC1155.ts +0 -82
- package/src/utils/abi/clients/ERC20.ts +0 -101
- package/src/utils/abi/clients/ERC721.ts +0 -97
- package/src/utils/abi/clients/index.ts +0 -3
- /package/dist/{chunk-BCNFYVAL.js.map → chunk-MCI3KOSQ.js.map} +0 -0
- /package/dist/{chunk-D7QQP6MS.js.map → chunk-UISBTKFF.js.map} +0 -0
- /package/dist/utils/abi/{abi/standard/index.js.map → index.js.map} +0 -0
- /package/dist/utils/abi/{abi/token → marketplace}/index.js.map +0 -0
- /package/dist/utils/abi/{abi/token → token}/index.d.ts +0 -0
- /package/dist/utils/abi/{clients → token}/index.js.map +0 -0
- /package/src/react/hooks/{useGenerateCancleTransaction.tsx → useGenerateCancelTransaction.tsx} +0 -0
- /package/src/utils/abi/{abi/standard → marketplace}/EIP2981.ts +0 -0
- /package/src/utils/abi/{abi/token → token}/ERC1155.ts +0 -0
- /package/src/utils/abi/{abi/token → token}/ERC20.ts +0 -0
- /package/src/utils/abi/{abi/token → token}/ERC721.ts +0 -0
- /package/src/utils/abi/{abi/token → token}/index.ts +0 -0
package/src/utils/index.ts
CHANGED
package/src/utils/network.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { type ChainId
|
|
1
|
+
import { networks, type ChainId as sequenceChainId } from '@0xsequence/network';
|
|
2
|
+
import type { ChainId } from '../react/_internal';
|
|
2
3
|
|
|
3
4
|
export const getPresentableChainName = (chainId: ChainId) => {
|
|
4
|
-
|
|
5
|
+
const id = Number(chainId) as sequenceChainId;
|
|
6
|
+
return networks[id]?.name;
|
|
5
7
|
};
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/consts.ts","./src/index.ts","./src/react/index.ts","./src/react/provider.tsx","./src/react/_internal/consts.ts","./src/react/_internal/get-provider.ts","./src/react/_internal/index.ts","./src/react/_internal/types.ts","./src/react/_internal/api/get-query-client.ts","./src/react/_internal/api/index.ts","./src/react/_internal/api/marketplace-api.ts","./src/react/_internal/api/marketplace.gen.ts","./src/react/_internal/api/query-keys.ts","./src/react/_internal/api/services.ts","./src/react/_internal/api/zod-schema.ts","./src/react/_internal/wagmi/create-config.ts","./src/react/_internal/wagmi/embedded.ts","./src/react/_internal/wagmi/index.ts","./src/react/_internal/wagmi/universal.ts","./src/react/hooks/index.ts","./src/react/hooks/usebalanceofcollectible.tsx","./src/react/hooks/usecheckoutoptions.tsx","./src/react/hooks/usecollectible.tsx","./src/react/hooks/usecollection.tsx","./src/react/hooks/useconfig.tsx","./src/react/hooks/usecountofcollectables.tsx","./src/react/hooks/usecurrencies.tsx","./src/react/hooks/usecurrency.tsx","./src/react/hooks/usefilters.tsx","./src/react/hooks/usefloororder.tsx","./src/react/hooks/
|
|
1
|
+
{"root":["./src/consts.ts","./src/index.ts","./src/react/index.ts","./src/react/provider.tsx","./src/react/_internal/consts.ts","./src/react/_internal/get-provider.ts","./src/react/_internal/index.ts","./src/react/_internal/types.ts","./src/react/_internal/api/get-query-client.ts","./src/react/_internal/api/index.ts","./src/react/_internal/api/marketplace-api.ts","./src/react/_internal/api/marketplace.gen.ts","./src/react/_internal/api/query-keys.ts","./src/react/_internal/api/services.ts","./src/react/_internal/api/zod-schema.ts","./src/react/_internal/transaction-machine/execute-transaction.ts","./src/react/_internal/transaction-machine/usetransactionmachine.ts","./src/react/_internal/wagmi/create-config.ts","./src/react/_internal/wagmi/embedded.ts","./src/react/_internal/wagmi/index.ts","./src/react/_internal/wagmi/universal.ts","./src/react/hooks/index.ts","./src/react/hooks/usebalanceofcollectible.tsx","./src/react/hooks/usebuycollectable.tsx","./src/react/hooks/usecancelorder.tsx","./src/react/hooks/usecheckoutoptions.tsx","./src/react/hooks/usecollectible.tsx","./src/react/hooks/usecollection.tsx","./src/react/hooks/useconfig.tsx","./src/react/hooks/usecountofcollectables.tsx","./src/react/hooks/usecreatelisting.tsx","./src/react/hooks/usecurrencies.tsx","./src/react/hooks/usecurrency.tsx","./src/react/hooks/usefilters.tsx","./src/react/hooks/usefloororder.tsx","./src/react/hooks/usegeneratebuytransaction.tsx","./src/react/hooks/usegeneratecanceltransaction.tsx","./src/react/hooks/usegeneratelistingtransaction.tsx","./src/react/hooks/usegenerateoffertransaction.tsx","./src/react/hooks/usegenerateselltransaction.tsx","./src/react/hooks/usehighestoffer.tsx","./src/react/hooks/uselistbalances.tsx","./src/react/hooks/uselistcollectibles.tsx","./src/react/hooks/uselistcollections.tsx","./src/react/hooks/uselistlistingsforcollectible.tsx","./src/react/hooks/uselistoffersforcollectible.tsx","./src/react/hooks/uselowestlisting.tsx","./src/react/hooks/usemakeoffer.tsx","./src/react/hooks/usemarketplaceconfig.tsx","./src/react/hooks/useroyaltypercentage.tsx","./src/react/hooks/usesell.tsx","./src/react/hooks/usetransfertokens.tsx","./src/react/hooks/options/marketplaceconfigoptions.ts","./src/react/ssr/create-ssr-client.ts","./src/react/ssr/index.ts","./src/react/ui/index.ts","./src/react/ui/components/index.ts","./src/react/ui/components/_internals/action-button/actionbutton.tsx","./src/react/ui/components/_internals/custom-network-image/customnetworkimage.tsx","./src/react/ui/components/_internals/custom-network-image/styles.css.ts","./src/react/ui/components/_internals/custom-select/customselect.tsx","./src/react/ui/components/_internals/custom-select/styles.css.ts","./src/react/ui/components/_internals/pill/pill.tsx","./src/react/ui/components/collectible-card/collectiblecard.tsx","./src/react/ui/components/collectible-card/footer.tsx","./src/react/ui/components/collectible-card/styles.css.ts","./src/react/ui/icons/arrowup.tsx","./src/react/ui/icons/bell.tsx","./src/react/ui/icons/calendaricon.tsx","./src/react/ui/icons/diamondeye.tsx","./src/react/ui/icons/infoicon.tsx","./src/react/ui/icons/inventoryicon.tsx","./src/react/ui/icons/minusicon.tsx","./src/react/ui/icons/plusicon.tsx","./src/react/ui/icons/positivecircleicon.tsx","./src/react/ui/icons/index.ts","./src/react/ui/icons/styles.css.ts","./src/react/ui/modals/modal-provider.tsx","./src/react/ui/modals/account/index.tsx","./src/react/ui/modals/buymodal/_store.ts","./src/react/ui/modals/buymodal/index.tsx","./src/react/ui/modals/createlistingmodal/_store.ts","./src/react/ui/modals/createlistingmodal/index.tsx","./src/react/ui/modals/createlistingmodal/_utils/getcreatelistingtransactiontitlemessage.ts","./src/react/ui/modals/makeoffermodal/_store.ts","./src/react/ui/modals/makeoffermodal/index.tsx","./src/react/ui/modals/makeoffermodal/_utils/getmakeoffertransactiontitlemessage.ts","./src/react/ui/modals/sellmodal/_store.ts","./src/react/ui/modals/sellmodal/index.tsx","./src/react/ui/modals/sellmodal/utils.ts","./src/react/ui/modals/sellmodal/_utils/getselltransactiontitlemessage.ts","./src/react/ui/modals/successfulpurchasemodal/_store.ts","./src/react/ui/modals/successfulpurchasemodal/index.tsx","./src/react/ui/modals/successfulpurchasemodal/styles.css.ts","./src/react/ui/modals/transfermodal/_store.ts","./src/react/ui/modals/transfermodal/index.tsx","./src/react/ui/modals/transfermodal/messages.ts","./src/react/ui/modals/transfermodal/styles.css.ts","./src/react/ui/modals/transfermodal/_utils/gettransfertransactiontitlemessage.ts","./src/react/ui/modals/transfermodal/_views/enterwalletaddress/index.tsx","./src/react/ui/modals/transfermodal/_views/enterwalletaddress/usehandletransfer.tsx","./src/react/ui/modals/transfermodal/_views/followwalletinstructions/index.tsx","./src/react/ui/modals/_internal/types.ts","./src/react/ui/modals/_internal/components/actionmodal/actionmodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/errormodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/loadingmodal.tsx","./src/react/ui/modals/_internal/components/actionmodal/index.ts","./src/react/ui/modals/_internal/components/actionmodal/store.ts","./src/react/ui/modals/_internal/components/actionmodal/styles.css.ts","./src/react/ui/modals/_internal/components/alertmessage/index.tsx","./src/react/ui/modals/_internal/components/alertmessage/styles.css.ts","./src/react/ui/modals/_internal/components/calendar/index.tsx","./src/react/ui/modals/_internal/components/calendarpopover/index.tsx","./src/react/ui/modals/_internal/components/calendarpopover/styles.css.ts","./src/react/ui/modals/_internal/components/currencyoptionsselect/index.tsx","./src/react/ui/modals/_internal/components/expirationdateselect/index.tsx","./src/react/ui/modals/_internal/components/floorpricetext/index.tsx","./src/react/ui/modals/_internal/components/priceinput/index.tsx","./src/react/ui/modals/_internal/components/priceinput/styles.css.ts","./src/react/ui/modals/_internal/components/priceinput/types.ts","./src/react/ui/modals/_internal/components/quantityinput/index.tsx","./src/react/ui/modals/_internal/components/quantityinput/styles.css.ts","./src/react/ui/modals/_internal/components/switchchainmodal/index.tsx","./src/react/ui/modals/_internal/components/switchchainmodal/store.ts","./src/react/ui/modals/_internal/components/switchchainmodal/styles.css.ts","./src/react/ui/modals/_internal/components/timeago/index.tsx","./src/react/ui/modals/_internal/components/tokenpreview/index.tsx","./src/react/ui/modals/_internal/components/tokenpreview/styles.css.ts","./src/react/ui/modals/_internal/components/transaction-footer/index.tsx","./src/react/ui/modals/_internal/components/transactiondetails/index.tsx","./src/react/ui/modals/_internal/components/transactionheader/index.tsx","./src/react/ui/modals/_internal/components/transactionpreview/consts.ts","./src/react/ui/modals/_internal/components/transactionpreview/index.tsx","./src/react/ui/modals/_internal/components/transactionpreview/usetransactionpreviewtitle.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/index.tsx","./src/react/ui/modals/_internal/components/transactionstatusmodal/store.ts","./src/react/ui/modals/_internal/components/transactionstatusmodal/styles.css.ts","./src/react/ui/modals/_internal/stores/accountmodal.ts","./src/react/ui/styles/index.ts","./src/react/ui/styles/modal.css.ts","./src/styles/index.ts","./src/types/api-types.ts","./src/types/callbacks.ts","./src/types/custom.d.ts","./src/types/index.ts","./src/types/marketplace-config.ts","./src/types/messages.ts","./src/types/sdk-config.ts","./src/types/types.ts","./src/utils/address.ts","./src/utils/get-public-rpc-client.ts","./src/utils/index.ts","./src/utils/network.ts","./src/utils/price.ts","./src/utils/abi/index.ts","./src/utils/abi/marketplace/eip2981.ts","./src/utils/abi/marketplace/index.ts","./src/utils/abi/marketplace/sequence-marketplace-v1.ts","./src/utils/abi/marketplace/sequence-marketplace-v2.ts","./src/utils/abi/token/erc1155.ts","./src/utils/abi/token/erc20.ts","./src/utils/abi/token/erc721.ts","./src/utils/abi/token/index.ts","./tsup.config.ts"],"version":"5.7.2"}
|
package/dist/chunk-6JWGELXL.js
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import {
|
|
3
|
-
ERC1155_ABI,
|
|
4
|
-
ERC20_ABI,
|
|
5
|
-
ERC721_ABI
|
|
6
|
-
} from "./chunk-O5JXKTWP.js";
|
|
7
|
-
|
|
8
|
-
// src/utils/abi/clients/ERC1155.ts
|
|
9
|
-
import { encodeFunctionData, getContract } from "viem";
|
|
10
|
-
|
|
11
|
-
// src/utils/get-public-rpc-client.ts
|
|
12
|
-
import { allNetworks, findNetworkConfig } from "@0xsequence/network";
|
|
13
|
-
import { http, createPublicClient } from "viem";
|
|
14
|
-
var getPublicRpcClient = (chainId) => {
|
|
15
|
-
const network = findNetworkConfig(allNetworks, chainId);
|
|
16
|
-
if (!network) {
|
|
17
|
-
throw new Error(`Unsupported chainId: ${chainId}`);
|
|
18
|
-
}
|
|
19
|
-
return createPublicClient({
|
|
20
|
-
chain: {
|
|
21
|
-
...network,
|
|
22
|
-
id: Number(chainId),
|
|
23
|
-
name: network.name,
|
|
24
|
-
nativeCurrency: { ...network.nativeToken },
|
|
25
|
-
rpcUrls: {
|
|
26
|
-
default: {
|
|
27
|
-
http: [network.rpcUrl]
|
|
28
|
-
},
|
|
29
|
-
public: {
|
|
30
|
-
http: [network.rpcUrl]
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
batch: {
|
|
35
|
-
multicall: true
|
|
36
|
-
},
|
|
37
|
-
transport: http()
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// src/utils/abi/clients/ERC1155.ts
|
|
42
|
-
var ERC1155 = class {
|
|
43
|
-
static setApprovalForAll = async (erc1155Address, operator, approved, signer) => {
|
|
44
|
-
const txHash = await signer.writeContract({
|
|
45
|
-
chain: signer.chain,
|
|
46
|
-
address: erc1155Address,
|
|
47
|
-
abi: ERC1155_ABI,
|
|
48
|
-
functionName: "setApprovalForAll",
|
|
49
|
-
args: [operator, approved]
|
|
50
|
-
});
|
|
51
|
-
return txHash;
|
|
52
|
-
};
|
|
53
|
-
static setApprovalForAll_data = (operator, approved) => {
|
|
54
|
-
return encodeFunctionData({
|
|
55
|
-
abi: ERC1155_ABI,
|
|
56
|
-
functionName: "setApprovalForAll",
|
|
57
|
-
args: [operator, approved]
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
static isApprovedForAll = async (erc1155Address, owner, operator, chainId) => {
|
|
61
|
-
const contract = getERC1155Contract({
|
|
62
|
-
contractAddress: erc1155Address,
|
|
63
|
-
chainId
|
|
64
|
-
});
|
|
65
|
-
return contract.read.isApprovedForAll([owner, operator]);
|
|
66
|
-
};
|
|
67
|
-
static balanceOf = async (erc1155Address, owner, tokenId, chainId) => {
|
|
68
|
-
const contract = getERC1155Contract({
|
|
69
|
-
contractAddress: erc1155Address,
|
|
70
|
-
chainId
|
|
71
|
-
});
|
|
72
|
-
return contract.read.balanceOf([owner, BigInt(tokenId)]);
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
var getERC1155Contract = (args) => {
|
|
76
|
-
const publicClient = getPublicRpcClient(args.chainId);
|
|
77
|
-
return getContract({
|
|
78
|
-
address: args.contractAddress,
|
|
79
|
-
abi: ERC1155_ABI,
|
|
80
|
-
client: {
|
|
81
|
-
public: publicClient,
|
|
82
|
-
wallet: args.signer
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
// src/utils/abi/clients/ERC20.ts
|
|
88
|
-
import { encodeFunctionData as encodeFunctionData2, getContract as getContract2, maxUint256 } from "viem";
|
|
89
|
-
var ERC20 = class {
|
|
90
|
-
static approve = async (erc20Address, spender, amount, signer) => {
|
|
91
|
-
const txHash = await signer.writeContract({
|
|
92
|
-
chain: signer.chain,
|
|
93
|
-
address: erc20Address,
|
|
94
|
-
abi: ERC20_ABI,
|
|
95
|
-
functionName: "approve",
|
|
96
|
-
args: [spender, amount]
|
|
97
|
-
});
|
|
98
|
-
return txHash;
|
|
99
|
-
};
|
|
100
|
-
static approve_data = (spender, amount) => {
|
|
101
|
-
return encodeFunctionData2({
|
|
102
|
-
abi: ERC20_ABI,
|
|
103
|
-
functionName: "approve",
|
|
104
|
-
args: [spender, amount]
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
static approveInfinite = async (erc20Address, spender, signer) => {
|
|
108
|
-
const txHash = await signer.writeContract({
|
|
109
|
-
chain: signer.chain,
|
|
110
|
-
address: erc20Address,
|
|
111
|
-
abi: ERC20_ABI,
|
|
112
|
-
functionName: "approve",
|
|
113
|
-
args: [spender, maxUint256]
|
|
114
|
-
});
|
|
115
|
-
return txHash;
|
|
116
|
-
};
|
|
117
|
-
static approveInfinite_data = (spender) => {
|
|
118
|
-
return encodeFunctionData2({
|
|
119
|
-
abi: ERC20_ABI,
|
|
120
|
-
functionName: "approve",
|
|
121
|
-
args: [spender, maxUint256]
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
static getAllowance = async (erc20Address, owner, spender, chainId) => {
|
|
125
|
-
const contract = getERC20Contract({
|
|
126
|
-
contractAddress: erc20Address,
|
|
127
|
-
chainId
|
|
128
|
-
});
|
|
129
|
-
return contract.read.allowance([owner, spender]);
|
|
130
|
-
};
|
|
131
|
-
static balanceOf = async (erc20Address, owner, chainId) => {
|
|
132
|
-
const contract = getERC20Contract({
|
|
133
|
-
contractAddress: erc20Address,
|
|
134
|
-
chainId
|
|
135
|
-
});
|
|
136
|
-
return contract.read.balanceOf([owner]);
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
var getERC20Contract = (args) => {
|
|
140
|
-
const publicClient = getPublicRpcClient(args.chainId);
|
|
141
|
-
return getContract2({
|
|
142
|
-
address: args.contractAddress,
|
|
143
|
-
abi: ERC20_ABI,
|
|
144
|
-
client: {
|
|
145
|
-
public: publicClient,
|
|
146
|
-
wallet: args.signer
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
// src/utils/abi/clients/ERC721.ts
|
|
152
|
-
import { encodeFunctionData as encodeFunctionData3, getContract as getContract3 } from "viem";
|
|
153
|
-
var ERC721 = class {
|
|
154
|
-
static setApprovalForAll = async (ERC721Address, operator, approved, signer) => {
|
|
155
|
-
const txHash = await signer.writeContract({
|
|
156
|
-
chain: signer.chain,
|
|
157
|
-
address: ERC721Address,
|
|
158
|
-
abi: ERC721_ABI,
|
|
159
|
-
functionName: "setApprovalForAll",
|
|
160
|
-
args: [operator, approved]
|
|
161
|
-
});
|
|
162
|
-
return txHash;
|
|
163
|
-
};
|
|
164
|
-
static setApprovalForAll_data = (operator, approved) => {
|
|
165
|
-
return encodeFunctionData3({
|
|
166
|
-
abi: ERC721_ABI,
|
|
167
|
-
functionName: "setApprovalForAll",
|
|
168
|
-
args: [operator, approved]
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
static approve = async (ERC721Address, to, tokenId, signer) => {
|
|
172
|
-
const txHash = await signer.writeContract({
|
|
173
|
-
chain: signer.chain,
|
|
174
|
-
address: ERC721Address,
|
|
175
|
-
abi: ERC721_ABI,
|
|
176
|
-
functionName: "approve",
|
|
177
|
-
args: [to, BigInt(tokenId)]
|
|
178
|
-
});
|
|
179
|
-
return txHash;
|
|
180
|
-
};
|
|
181
|
-
static isApprovedForAll = async (ERC721Address, owner, operator, chainId) => {
|
|
182
|
-
const contract = getERC721Contract({
|
|
183
|
-
contractAddress: ERC721Address,
|
|
184
|
-
chainId
|
|
185
|
-
});
|
|
186
|
-
return contract.read.isApprovedForAll([owner, operator]);
|
|
187
|
-
};
|
|
188
|
-
static balanceOf = async (ERC721Address, owner, chainId) => {
|
|
189
|
-
const contract = getERC721Contract({
|
|
190
|
-
contractAddress: ERC721Address,
|
|
191
|
-
chainId
|
|
192
|
-
});
|
|
193
|
-
return contract.read.balanceOf([owner]);
|
|
194
|
-
};
|
|
195
|
-
};
|
|
196
|
-
var getERC721Contract = (args) => {
|
|
197
|
-
const publicClient = getPublicRpcClient(args.chainId);
|
|
198
|
-
return getContract3({
|
|
199
|
-
address: args.contractAddress,
|
|
200
|
-
abi: ERC721_ABI,
|
|
201
|
-
client: {
|
|
202
|
-
public: publicClient,
|
|
203
|
-
wallet: args.signer
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
export {
|
|
209
|
-
getPublicRpcClient,
|
|
210
|
-
ERC1155,
|
|
211
|
-
ERC20,
|
|
212
|
-
ERC721
|
|
213
|
-
};
|
|
214
|
-
//# sourceMappingURL=chunk-6JWGELXL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/abi/clients/ERC1155.ts","../src/utils/get-public-rpc-client.ts","../src/utils/abi/clients/ERC20.ts","../src/utils/abi/clients/ERC721.ts"],"sourcesContent":["import type { Hex, WalletClient } from 'viem';\nimport { encodeFunctionData, getContract } from 'viem';\nimport type { GetWalletClientData } from 'wagmi/query';\n\nimport { getPublicRpcClient } from '../../get-public-rpc-client';\nimport { ERC1155_ABI } from '../abi/token/ERC1155';\n\n// biome-ignore lint/complexity/noStaticOnlyClass: In this case, this provide a pretty nice API\nexport class ERC1155 {\n\tstatic setApprovalForAll = async (\n\t\terc1155Address: string,\n\t\toperator: string,\n\t\tapproved: boolean,\n\t\tsigner: GetWalletClientData<any, any>,\n\t): Promise<string> => {\n\t\tconst txHash = await signer.writeContract({\n\t\t\tchain: signer.chain,\n\t\t\taddress: erc1155Address as Hex,\n\t\t\tabi: ERC1155_ABI,\n\t\t\tfunctionName: 'setApprovalForAll',\n\t\t\targs: [operator as Hex, approved],\n\t\t});\n\n\t\treturn txHash;\n\t};\n\n\tstatic setApprovalForAll_data = (\n\t\toperator: string,\n\t\tapproved: boolean,\n\t): string => {\n\t\treturn encodeFunctionData({\n\t\t\tabi: ERC1155_ABI,\n\t\t\tfunctionName: 'setApprovalForAll',\n\t\t\targs: [operator as Hex, approved],\n\t\t});\n\t};\n\n\tstatic isApprovedForAll = async (\n\t\terc1155Address: string,\n\t\towner: string,\n\t\toperator: string,\n\t\tchainId: number,\n\t) => {\n\t\tconst contract = getERC1155Contract({\n\t\t\tcontractAddress: erc1155Address,\n\t\t\tchainId,\n\t\t});\n\t\treturn contract.read.isApprovedForAll([owner as Hex, operator as Hex]);\n\t};\n\n\tstatic balanceOf = async (\n\t\terc1155Address: string,\n\t\towner: string,\n\t\ttokenId: string,\n\t\tchainId: number,\n\t): Promise<bigint> => {\n\t\tconst contract = getERC1155Contract({\n\t\t\tcontractAddress: erc1155Address,\n\t\t\tchainId,\n\t\t});\n\t\treturn contract.read.balanceOf([owner as Hex, BigInt(tokenId)]);\n\t};\n}\n\ninterface ContractInstanceParams {\n\tcontractAddress: string;\n\tchainId: number;\n\tsigner?: WalletClient;\n}\n\nconst getERC1155Contract = (args: ContractInstanceParams) => {\n\tconst publicClient = getPublicRpcClient(args.chainId);\n\n\treturn getContract({\n\t\taddress: args.contractAddress as Hex,\n\t\tabi: ERC1155_ABI,\n\t\tclient: {\n\t\t\tpublic: publicClient,\n\t\t\twallet: args.signer,\n\t\t},\n\t});\n};\n","import { allNetworks, findNetworkConfig } from '@0xsequence/network';\nimport { http, type PublicClient, createPublicClient } from 'viem';\nimport type { ChainId } from '../react/_internal';\n\nexport const getPublicRpcClient = (chainId: ChainId): PublicClient => {\n\tconst network = findNetworkConfig(allNetworks, chainId);\n\n\tif (!network) {\n\t\tthrow new Error(`Unsupported chainId: ${chainId}`);\n\t}\n\n\treturn createPublicClient({\n\t\tchain: {\n\t\t\t...network,\n\t\t\tid: Number(chainId),\n\t\t\tname: network.name,\n\t\t\tnativeCurrency: { ...network.nativeToken },\n\t\t\trpcUrls: {\n\t\t\t\tdefault: {\n\t\t\t\t\thttp: [network.rpcUrl],\n\t\t\t\t},\n\t\t\t\tpublic: {\n\t\t\t\t\thttp: [network.rpcUrl],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tbatch: {\n\t\t\tmulticall: true,\n\t\t},\n\t\ttransport: http(),\n\t});\n};\n","import type { Hex, WalletClient } from 'viem';\nimport { encodeFunctionData, getContract, maxUint256 } from 'viem';\nimport type { GetWalletClientData } from 'wagmi/query';\n\nimport { getPublicRpcClient } from '../../get-public-rpc-client';\nimport { ERC20_ABI } from '../abi/token/ERC20';\n\nexport class ERC20 {\n\tstatic approve = async (\n\t\terc20Address: string,\n\t\tspender: string,\n\t\tamount: bigint,\n\t\tsigner: GetWalletClientData<any, any>,\n\t): Promise<string> => {\n\t\tconst txHash = await signer.writeContract({\n\t\t\tchain: signer.chain,\n\t\t\taddress: erc20Address as Hex,\n\t\t\tabi: ERC20_ABI,\n\t\t\tfunctionName: 'approve',\n\t\t\targs: [spender as Hex, amount],\n\t\t});\n\n\t\treturn txHash;\n\t};\n\n\tstatic approve_data = (spender: string, amount: bigint): string => {\n\t\treturn encodeFunctionData({\n\t\t\tabi: ERC20_ABI,\n\t\t\tfunctionName: 'approve',\n\t\t\targs: [spender as Hex, amount],\n\t\t});\n\t};\n\n\tstatic approveInfinite = async (\n\t\terc20Address: string,\n\t\tspender: string,\n\t\tsigner: GetWalletClientData<any, any>,\n\t): Promise<string> => {\n\t\tconst txHash = await signer.writeContract({\n\t\t\tchain: signer.chain,\n\t\t\taddress: erc20Address as Hex,\n\t\t\tabi: ERC20_ABI,\n\t\t\tfunctionName: 'approve',\n\t\t\targs: [spender as Hex, maxUint256],\n\t\t});\n\n\t\treturn txHash;\n\t};\n\n\tstatic approveInfinite_data = (spender: string): string => {\n\t\treturn encodeFunctionData({\n\t\t\tabi: ERC20_ABI,\n\t\t\tfunctionName: 'approve',\n\t\t\targs: [spender as Hex, maxUint256],\n\t\t});\n\t};\n\n\tstatic getAllowance = async (\n\t\terc20Address: string,\n\t\towner: string,\n\t\tspender: string,\n\t\tchainId: number,\n\t): Promise<bigint> => {\n\t\tconst contract = getERC20Contract({\n\t\t\tcontractAddress: erc20Address,\n\t\t\tchainId,\n\t\t});\n\t\treturn contract.read.allowance([owner as Hex, spender as Hex]);\n\t};\n\n\tstatic balanceOf = async (\n\t\terc20Address: string,\n\t\towner: string,\n\t\tchainId: number,\n\t): Promise<bigint> => {\n\t\tconst contract = getERC20Contract({\n\t\t\tcontractAddress: erc20Address,\n\t\t\tchainId,\n\t\t});\n\t\treturn contract.read.balanceOf([owner as Hex]);\n\t};\n}\n\ninterface ContractInstanceParams {\n\tcontractAddress: string;\n\tchainId: number;\n\tsigner?: WalletClient;\n}\n\nconst getERC20Contract = (args: ContractInstanceParams) => {\n\tconst publicClient = getPublicRpcClient(args.chainId);\n\n\treturn getContract({\n\t\taddress: args.contractAddress as Hex,\n\t\tabi: ERC20_ABI,\n\t\tclient: {\n\t\t\tpublic: publicClient,\n\t\t\twallet: args.signer,\n\t\t},\n\t});\n};\n","import type { Hex, WalletClient } from 'viem';\nimport { encodeFunctionData, getContract } from 'viem';\nimport type { GetWalletClientData } from 'wagmi/query';\n\nimport { getPublicRpcClient } from '../../get-public-rpc-client';\nimport { ERC721_ABI } from '../abi/token/ERC721';\n\nexport class ERC721 {\n\tstatic setApprovalForAll = async (\n\t\tERC721Address: string,\n\t\toperator: string,\n\t\tapproved: boolean,\n\t\tsigner: GetWalletClientData<any, any>,\n\t): Promise<string> => {\n\t\tconst txHash = await signer.writeContract({\n\t\t\tchain: signer.chain,\n\t\t\taddress: ERC721Address as Hex,\n\t\t\tabi: ERC721_ABI,\n\t\t\tfunctionName: 'setApprovalForAll',\n\t\t\targs: [operator as Hex, approved],\n\t\t});\n\n\t\treturn txHash;\n\t};\n\n\tstatic setApprovalForAll_data = (\n\t\toperator: string,\n\t\tapproved: boolean,\n\t): string => {\n\t\treturn encodeFunctionData({\n\t\t\tabi: ERC721_ABI,\n\t\t\tfunctionName: 'setApprovalForAll',\n\t\t\targs: [operator as Hex, approved],\n\t\t});\n\t};\n\n\tstatic approve = async (\n\t\tERC721Address: string,\n\t\tto: string,\n\t\ttokenId: string,\n\t\tsigner: GetWalletClientData<any, any>,\n\t): Promise<string> => {\n\t\tconst txHash = await signer.writeContract({\n\t\t\tchain: signer.chain,\n\t\t\taddress: ERC721Address as Hex,\n\t\t\tabi: ERC721_ABI,\n\t\t\tfunctionName: 'approve',\n\t\t\targs: [to as Hex, BigInt(tokenId)],\n\t\t});\n\n\t\treturn txHash;\n\t};\n\n\tstatic isApprovedForAll = async (\n\t\tERC721Address: string,\n\t\towner: string,\n\t\toperator: string,\n\t\tchainId: number,\n\t) => {\n\t\tconst contract = getERC721Contract({\n\t\t\tcontractAddress: ERC721Address,\n\t\t\tchainId,\n\t\t});\n\t\treturn contract.read.isApprovedForAll([owner as Hex, operator as Hex]);\n\t};\n\n\tstatic balanceOf = async (\n\t\tERC721Address: string,\n\t\towner: string,\n\t\tchainId: number,\n\t): Promise<bigint> => {\n\t\tconst contract = getERC721Contract({\n\t\t\tcontractAddress: ERC721Address,\n\t\t\tchainId,\n\t\t});\n\t\treturn contract.read.balanceOf([owner as Hex]);\n\t};\n}\n\ninterface ContractInstanceParams {\n\tcontractAddress: string;\n\tchainId: number;\n\tsigner?: WalletClient;\n}\n\nconst getERC721Contract = (args: ContractInstanceParams) => {\n\tconst publicClient = getPublicRpcClient(args.chainId);\n\n\treturn getContract({\n\t\taddress: args.contractAddress as Hex,\n\t\tabi: ERC721_ABI,\n\t\tclient: {\n\t\t\tpublic: publicClient,\n\t\t\twallet: args.signer,\n\t\t},\n\t});\n};\n"],"mappings":";;;;;;;;AACA,SAAS,oBAAoB,mBAAmB;;;ACDhD,SAAS,aAAa,yBAAyB;AAC/C,SAAS,MAAyB,0BAA0B;AAGrD,IAAM,qBAAqB,CAAC,YAAmC;AACrE,QAAM,UAAU,kBAAkB,aAAa,OAAO;AAEtD,MAAI,CAAC,SAAS;AACb,UAAM,IAAI,MAAM,wBAAwB,OAAO,EAAE;AAAA,EAClD;AAEA,SAAO,mBAAmB;AAAA,IACzB,OAAO;AAAA,MACN,GAAG;AAAA,MACH,IAAI,OAAO,OAAO;AAAA,MAClB,MAAM,QAAQ;AAAA,MACd,gBAAgB,EAAE,GAAG,QAAQ,YAAY;AAAA,MACzC,SAAS;AAAA,QACR,SAAS;AAAA,UACR,MAAM,CAAC,QAAQ,MAAM;AAAA,QACtB;AAAA,QACA,QAAQ;AAAA,UACP,MAAM,CAAC,QAAQ,MAAM;AAAA,QACtB;AAAA,MACD;AAAA,IACD;AAAA,IACA,OAAO;AAAA,MACN,WAAW;AAAA,IACZ;AAAA,IACA,WAAW,KAAK;AAAA,EACjB,CAAC;AACF;;;ADvBO,IAAM,UAAN,MAAc;AAAA,EACpB,OAAO,oBAAoB,OAC1B,gBACA,UACA,UACA,WACqB;AACrB,UAAM,SAAS,MAAM,OAAO,cAAc;AAAA,MACzC,OAAO,OAAO;AAAA,MACd,SAAS;AAAA,MACT,KAAK;AAAA,MACL,cAAc;AAAA,MACd,MAAM,CAAC,UAAiB,QAAQ;AAAA,IACjC,CAAC;AAED,WAAO;AAAA,EACR;AAAA,EAEA,OAAO,yBAAyB,CAC/B,UACA,aACY;AACZ,WAAO,mBAAmB;AA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MACd,MAAM,CAAC,UAAiB,QAAQ;AAAA,IACjC,CAAC;AAED,WAAO;AAAA,EACR;AAAA,EAEA,OAAO,yBAAyB,CAC/B,UACA,aACY;AACZ,WAAOC,oBAAmB;AAAA,MACzB,KAAK;AAAA,MACL,cAAc;AAAA,MACd,MAAM,CAAC,UAAiB,QAAQ;AAAA,IACjC,CAAC;AAAA,EACF;AAAA,EAEA,OAAO,UAAU,OAChB,eACA,IACA,SACA,WACqB;AACrB,UAAM,SAAS,MAAM,OAAO,cAAc;AAAA,MACzC,OAAO,OAAO;AAAA,MACd,SAAS;AAAA,MACT,KAAK;AAAA,MACL,cAAc;AAAA,MACd,MAAM,CAAC,IAAW,OAAO,OAAO,CAAC;AAAA,IAClC,CAAC;AAED,WAAO;AAAA,EACR;AAAA,EAEA,OAAO,mBAAmB,OACzB,eACA,OACA,UACA,YACI;AACJ,UAAM,WAAW,kBAAkB;AAAA,MAClC,iBAAiB;AAAA,MACjB;AAAA,IACD,CAAC;AACD,WAAO,SAAS,KAAK,iBAAiB,CAAC,OAAc,QAAe,CAAC;AAAA,EACtE;AAAA,EAEA,OAAO,YAAY,OAClB,eACA,OACA,YACqB;AACrB,UAAM,WAAW,kBAAkB;AAAA,MAClC,iBAAiB;AAAA,MACjB;AAAA,IACD,CAAC;AACD,WAAO,SAAS,KAAK,UAAU,CAAC,KAAY,CAAC;AAAA,EAC9C;AACD;AAQA,IAAM,oBAAoB,CAAC,SAAiC;AAC3D,QAAM,eAAe,mBAAmB,KAAK,OAAO;AAEpD,SAAOC,aAAY;AAAA,IAClB,SAAS,KAAK;AAAA,IACd,KAAK;AAAA,IACL,QAAQ;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ,KAAK;AAAA,IACd;AAAA,EACD,CAAC;AACF;","names":["encodeFunctionData","getContract","encodeFunctionData","getContract","encodeFunctionData","getContract","encodeFunctionData","getContract"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/address.ts","../src/utils/price.ts"],"sourcesContent":["export const truncateMiddle = (\n\taddress: string,\n\tminPrefix = 20,\n\tminSuffix = 3,\n): string => {\n\tif (minPrefix + minSuffix >= 40) {\n\t\treturn address;\n\t}\n\treturn `${address.substring(0, 2 + minPrefix)}…${address.substring(address.length - minSuffix)}`;\n};\n\nexport const truncateEnd = (text: string | undefined, truncateAt: number) => {\n\tif (!text) return '';\n\n\tlet finalText = text;\n\n\tif (text.length >= truncateAt) {\n\t\tfinalText = `${text.slice(0, truncateAt)}...`;\n\t}\n\n\treturn finalText;\n};\n\nexport const compareAddress = (a = '', b = '') => {\n\treturn a.toLowerCase() === b.toLowerCase();\n};\n","import { formatUnits } from 'viem';\n\ntype CalculatePriceDifferencePercentageArgs = {\n\tinputPriceRaw: bigint;\n\tbasePriceRaw: bigint;\n\tdecimals: number;\n};\n\nexport const calculatePriceDifferencePercentage = ({\n\tinputPriceRaw,\n\tbasePriceRaw,\n\tdecimals,\n}: CalculatePriceDifferencePercentageArgs) => {\n\tconst difference = Number(\n\t\tformatUnits(inputPriceRaw - basePriceRaw, decimals),\n\t);\n\tconst basePrice = Number(formatUnits(basePriceRaw, decimals));\n\tconst percentageDifference = (difference / basePrice) * 100;\n\n\treturn Math.abs(percentageDifference).toFixed(2);\n};\n"],"mappings":";;;AAAO,IAAM,iBAAiB,CAC7B,SACA,YAAY,IACZ,YAAY,MACA;AACZ,MAAI,YAAY,aAAa,IAAI;AAChC,WAAO;AAAA,EACR;AACA,SAAO,GAAG,QAAQ,UAAU,GAAG,IAAI,SAAS,CAAC,SAAI,QAAQ,UAAU,QAAQ,SAAS,SAAS,CAAC;AAC/F;AAEO,IAAM,cAAc,CAAC,MAA0B,eAAuB;AAC5E,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI,YAAY;AAEhB,MAAI,KAAK,UAAU,YAAY;AAC9B,gBAAY,GAAG,KAAK,MAAM,GAAG,UAAU,CAAC;AAAA,EACzC;AAEA,SAAO;AACR;AAEO,IAAM,iBAAiB,CAAC,IAAI,IAAI,IAAI,OAAO;AACjD,SAAO,EAAE,YAAY,MAAM,EAAE,YAAY;AAC1C;;;ACzBA,SAAS,mBAAmB;AAQrB,IAAM,qCAAqC,CAAC;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AACD,MAA8C;AAC7C,QAAM,aAAa;AAAA,IAClB,YAAY,gBAAgB,cAAc,QAAQ;AAAA,EACnD;AACA,QAAM,YAAY,OAAO,YAAY,cAAc,QAAQ,CAAC;AAC5D,QAAM,uBAAwB,aAAa,YAAa;AAExD,SAAO,KAAK,IAAI,oBAAoB,EAAE,QAAQ,CAAC;AAChD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/address.ts","../src/utils/price.ts"],"sourcesContent":["export const truncateMiddle = (\n\taddress: string,\n\tminPrefix = 20,\n\tminSuffix = 3,\n): string => {\n\tif (minPrefix + minSuffix >= 40) {\n\t\treturn address;\n\t}\n\treturn `${address.substring(0, 2 + minPrefix)}…${address.substring(address.length - minSuffix)}`;\n};\n\nexport const truncateEnd = (text: string | undefined, truncateAt: number) => {\n\tif (!text) return '';\n\n\tlet finalText = text;\n\n\tif (text.length >= truncateAt) {\n\t\tfinalText = `${text.slice(0, truncateAt)}...`;\n\t}\n\n\treturn finalText;\n};\n\nexport const compareAddress = (a = '', b = '') => {\n\treturn a.toLowerCase() === b.toLowerCase();\n};\n","import { formatUnits } from 'viem';\n\ntype CalculatePriceDifferencePercentageArgs = {\n\tinputPriceRaw: bigint;\n\tbasePriceRaw: bigint;\n\tdecimals: number;\n};\n\nexport const calculatePriceDifferencePercentage = ({\n\tinputPriceRaw,\n\tbasePriceRaw,\n\tdecimals,\n}: CalculatePriceDifferencePercentageArgs) => {\n\tconst difference = Number(\n\t\tformatUnits(inputPriceRaw - basePriceRaw, decimals),\n\t);\n\tconst basePrice = Number(formatUnits(basePriceRaw, decimals));\n\tconst percentageDifference = (difference / basePrice) * 100;\n\n\treturn Math.abs(percentageDifference).toFixed(2);\n};\n"],"mappings":";AAAO,IAAM,iBAAiB,CAC7B,SACA,YAAY,IACZ,YAAY,MACA;AACZ,MAAI,YAAY,aAAa,IAAI;AAChC,WAAO;AAAA,EACR;AACA,SAAO,GAAG,QAAQ,UAAU,GAAG,IAAI,SAAS,CAAC,SAAI,QAAQ,UAAU,QAAQ,SAAS,SAAS,CAAC;AAC/F;AAEO,IAAM,cAAc,CAAC,MAA0B,eAAuB;AAC5E,MAAI,CAAC,KAAM,QAAO;AAElB,MAAI,YAAY;AAEhB,MAAI,KAAK,UAAU,YAAY;AAC9B,gBAAY,GAAG,KAAK,MAAM,GAAG,UAAU,CAAC;AAAA,EACzC;AAEA,SAAO;AACR;AAEO,IAAM,iBAAiB,CAAC,IAAI,IAAI,IAAI,OAAO;AACjD,SAAO,EAAE,YAAY,MAAM,EAAE,YAAY;AAC1C;;;ACzBA,SAAS,mBAAmB;AAQrB,IAAM,qCAAqC,CAAC;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AACD,MAA8C;AAC7C,QAAM,aAAa;AAAA,IAClB,YAAY,gBAAgB,cAAc,QAAQ;AAAA,EACnD;AACA,QAAM,YAAY,OAAO,YAAY,cAAc,QAAQ,CAAC;AAC5D,QAAM,uBAAwB,aAAa,YAAa;AAExD,SAAO,KAAK,IAAI,oBAAoB,EAAE,QAAQ,CAAC;AAChD;","names":[]}
|
package/dist/chunk-BCNFYVAL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-BCNFYVAL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/hooks/useBalanceOfCollectible.tsx","../src/react/hooks/useConfig.tsx","../src/react/provider.tsx","../src/react/hooks/useCountOfCollectables.tsx","../src/react/_internal/api/zod-schema.ts","../src/react/hooks/useCollectible.tsx","../src/react/hooks/useCollection.tsx","../src/react/hooks/useCurrencies.tsx","../src/react/hooks/useCurrency.tsx","../src/react/hooks/useFilters.tsx","../src/react/hooks/useFloorOrder.tsx","../src/react/hooks/useHighestOffer.tsx","../src/react/hooks/useListBalances.tsx","../src/react/hooks/useListCollectibles.tsx","../src/react/hooks/useListOffersForCollectible.tsx","../src/react/hooks/useListListingsForCollectible.tsx","../src/react/hooks/useLowestListing.tsx","../src/react/hooks/useMarketplaceConfig.tsx","../src/react/hooks/options/marketplaceConfigOptions.ts","../src/react/hooks/useRoyaltyPercentage.tsx","../src/react/hooks/useGenerateListingTransaction.tsx","../src/react/hooks/useGenerateOfferTransaction.tsx","../src/react/hooks/useGenerateSellTransaction.tsx","../src/react/hooks/useTransferTokens.tsx","../src/react/hooks/useCheckoutOptions.tsx","../src/react/hooks/useListCollections.tsx"],"sourcesContent":["import { queryOptions, skipToken, useQuery } from '@tanstack/react-query';\nimport type { Hex } from 'viem';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tCollectableIdSchema,\n\ttype QueryArgSchema,\n\tcollectableKeys,\n\tgetIndexerClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nconst fetchBalanceOfCollectibleSchema = z.object({\n\tcollectionAddress: AddressSchema,\n\tcollectableId: CollectableIdSchema.pipe(z.coerce.string()),\n\tuserAddress: AddressSchema,\n\tchainId: ChainIdSchema.pipe(z.coerce.number()),\n});\n\ntype FetchBalanceOfCollectibleArgs = z.input<\n\ttypeof fetchBalanceOfCollectibleSchema\n>;\n\nconst fetchBalanceOfCollectible = async (\n\targs: FetchBalanceOfCollectibleArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst parsedArgs = fetchBalanceOfCollectibleSchema.parse(args);\n\tconst indexerClient = getIndexerClient(parsedArgs.chainId, config);\n\treturn indexerClient\n\t\t.getTokenBalances({\n\t\t\taccountAddress: parsedArgs.userAddress,\n\t\t\tcontractAddress: parsedArgs.collectionAddress,\n\t\t\ttokenID: parsedArgs.collectableId,\n\t\t\tincludeMetadata: false,\n\t\t\tmetadataOptions: {\n\t\t\t\tverifiedOnly: true,\n\t\t\t\tincludeContracts: [parsedArgs.collectionAddress],\n\t\t\t},\n\t\t})\n\t\t.then((res) => res.balances[0] || null);\n};\n\ninterface BalanceOfCollectibleOptions\n\textends Omit<FetchBalanceOfCollectibleArgs, 'userAddress'> {\n\tuserAddress: Hex | undefined;\n\tquery?: z.infer<typeof QueryArgSchema>;\n}\nexport const balanceOfCollectibleOptions = (\n\targs: BalanceOfCollectibleOptions,\n\tconfig: SdkConfig,\n) => {\n\tconst enabled = !!args.userAddress && (args.query?.enabled ?? true);\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectableKeys.userBalances, args],\n\t\tqueryFn: enabled\n\t\t\t? () =>\n\t\t\t\t\tfetchBalanceOfCollectible(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...args,\n\t\t\t\t\t\t\t// biome-ignore lint/style/noNonNullAssertion: this is guaranteed by the userAddress check above\n\t\t\t\t\t\t\tuserAddress: args.userAddress!,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tconfig,\n\t\t\t\t\t)\n\t\t\t: skipToken,\n\t\tenabled,\n\t});\n};\n\nexport const useBalanceOfCollectible = (args: BalanceOfCollectibleOptions) => {\n\tconst config = useConfig();\n\treturn useQuery(balanceOfCollectibleOptions(args, config));\n};\n","'use client';\n\nimport { useContext } from 'react';\n\nimport { MarketplaceSdkContext } from '../provider';\n\nexport function useConfig() {\n\tconst context = useContext(MarketplaceSdkContext);\n\tif (!context) {\n\t\tthrow new Error(\n\t\t\t'Marketplace SDK must be used within a MarketplaceSdkProvider',\n\t\t);\n\t}\n\treturn context;\n}\n","'use client';\n\nimport { createContext } from 'react';\nimport '@0xsequence/design-system/styles.css';\nimport type { SdkConfig } from '../types';\nimport { PROVIDER_ID } from './_internal/get-provider';\n\nexport const MarketplaceSdkContext = createContext({} as SdkConfig);\n\nexport type MarketplaceSdkProviderProps = {\n\tconfig: SdkConfig;\n\tchildren: React.ReactNode;\n};\n\nexport function MarketplaceProvider({\n\tconfig,\n\tchildren,\n}: MarketplaceSdkProviderProps) {\n\treturn (\n\t\t<MarketplaceSdkContext.Provider value={config}>\n\t\t\t<div id={PROVIDER_ID}>{children}</div>\n\t\t</MarketplaceSdkContext.Provider>\n\t);\n}\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tOrderSide,\n\tQueryArgSchema,\n\tcollectableKeys,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { collectiblesFilterSchema } from '../_internal/api/zod-schema';\nimport { useConfig } from './useConfig';\n\nconst BaseSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\tcollectionAddress: AddressSchema,\n\tquery: QueryArgSchema,\n});\n\nconst UseCountOfCollectableSchema = BaseSchema.extend({\n\tfilter: collectiblesFilterSchema,\n\tside: z.nativeEnum(OrderSide),\n}).or(\n\tBaseSchema.extend({\n\t\tfilter: z.undefined(),\n\t\tside: z.undefined(),\n\t}),\n);\n\nexport type UseCountOfCollectablesArgs = z.infer<\n\ttypeof UseCountOfCollectableSchema\n>;\n\nexport type UseContOfCollectableReturn = Awaited<\n\tReturnType<typeof fetchCountOfCollectables>\n>;\n\nconst fetchCountOfCollectables = async (\n\targs: UseCountOfCollectablesArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst parsedArgs = UseCountOfCollectableSchema.parse(args);\n\tconst marketplaceClient = getMarketplaceClient(parsedArgs.chainId, config);\n\tif (parsedArgs.filter) {\n\t\treturn marketplaceClient\n\t\t\t.getCountOfFilteredCollectibles({\n\t\t\t\t...parsedArgs,\n\t\t\t\tcontractAddress: parsedArgs.collectionAddress,\n\t\t\t\t// biome-ignore lint/style/noNonNullAssertion: safe to assert here, as it's validated\n\t\t\t\tside: parsedArgs.side!,\n\t\t\t})\n\t\t\t.then((resp) => resp.count);\n\t}\n\treturn marketplaceClient\n\t\t.getCountOfAllCollectibles({\n\t\t\t...parsedArgs,\n\t\t\tcontractAddress: parsedArgs.collectionAddress,\n\t\t})\n\t\t.then((resp) => resp.count);\n};\n\nexport const countOfCollectablesOptions = (\n\targs: UseCountOfCollectablesArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectableKeys.counts, args],\n\t\tqueryFn: () => fetchCountOfCollectables(args, config),\n\t});\n};\n\nexport const useCountOfCollectables = (args: UseCountOfCollectablesArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(countOfCollectablesOptions(args, config));\n};\n","// generated with https://transform.tools/typescript-to-zod\n//\n//\nimport { z } from 'zod';\nimport {\n\tCollectibleStatus,\n\tCollectionStatus,\n\tContractType,\n\tExecuteType,\n\tMarketplaceKind,\n\tOrderSide,\n\tOrderStatus,\n\tOrderbookKind,\n\tProjectStatus,\n\tPropertyType,\n\tSortOrder,\n\tSourceKind,\n\tStepType,\n\tTransactionCrypto,\n\tTransactionNFTCheckoutProvider,\n\tTransactionOnRampProvider,\n\tTransactionSwapProvider,\n\tWalletKind,\n} from './marketplace.gen';\n\nexport const assetSchema = z.object({\n\tid: z.number(),\n\tcollectionId: z.number(),\n\ttokenId: z.string(),\n\turl: z.string().optional(),\n\tmetadataField: z.string(),\n\tname: z.string().optional(),\n\tfilesize: z.number().optional(),\n\tmimeType: z.string().optional(),\n\twidth: z.number().optional(),\n\theight: z.number().optional(),\n\tupdatedAt: z.string().optional(),\n});\n\nexport const sortOrderSchema = z.nativeEnum(SortOrder);\n\nexport const propertyTypeSchema = z.nativeEnum(PropertyType);\n\nexport const marketplaceKindSchema = z.nativeEnum(MarketplaceKind);\n\nexport const orderbookKindSchema = z.nativeEnum(OrderbookKind);\n\nexport const sourceKindSchema = z.nativeEnum(SourceKind);\n\nexport const orderSideSchema = z.nativeEnum(OrderSide);\n\nexport const orderStatusSchema = z.nativeEnum(OrderStatus);\n\nexport const contractTypeSchema = z.nativeEnum(ContractType);\n\nexport const collectionStatusSchema = z.nativeEnum(CollectionStatus);\n\nexport const projectStatusSchema = z.nativeEnum(ProjectStatus);\n\nexport const collectibleStatusSchema = z.nativeEnum(CollectibleStatus);\n\nexport const walletKindSchema = z.nativeEnum(WalletKind);\n\nexport const stepTypeSchema = z.nativeEnum(StepType);\n\nexport const transactionCryptoSchema = z.nativeEnum(TransactionCrypto);\n\nexport const transactionNFTCheckoutProviderSchema = z.nativeEnum(\n\tTransactionNFTCheckoutProvider,\n);\n\nexport const transactionOnRampProviderSchema = z.nativeEnum(\n\tTransactionOnRampProvider,\n);\n\nexport const transactionSwapProviderSchema = z.nativeEnum(\n\tTransactionSwapProvider,\n);\n\nexport const executeTypeSchema = z.nativeEnum(ExecuteType);\n\nexport const sortBySchema = z.object({\n\tcolumn: z.string(),\n\torder: sortOrderSchema,\n});\n\nexport const propertyFilterSchema = z.object({\n\tname: z.string(),\n\ttype: propertyTypeSchema,\n\tmin: z.number().optional(),\n\tmax: z.number().optional(),\n\tvalues: z.array(z.any()).optional(),\n});\n\nexport const collectiblesFilterSchema = z.object({\n\tincludeEmpty: z.boolean(),\n\tsearchText: z.string().optional(),\n\tproperties: z.array(propertyFilterSchema).optional(),\n\tmarketplaces: z.array(marketplaceKindSchema).optional(),\n\tinAccounts: z.array(z.string()).optional(),\n\tnotInAccounts: z.array(z.string()).optional(),\n\tordersCreatedBy: z.array(z.string()).optional(),\n\tordersNotCreatedBy: z.array(z.string()).optional(),\n});\n\nexport const feeBreakdownSchema = z.object({\n\tkind: z.string(),\n\trecipientAddress: z.string(),\n\tbps: z.number(),\n});\n\nexport const orderFilterSchema = z.object({\n\tcreatedBy: z.array(z.string()).optional(),\n\tmarketplace: z.array(marketplaceKindSchema).optional(),\n\tcurrencies: z.array(z.string()).optional(),\n});\n\nexport const collectionLastSyncedSchema = z.object({\n\tallOrders: z.string(),\n\tnewOrders: z.string(),\n});\n\nexport const projectSchema = z.object({\n\tprojectId: z.number(),\n\tchainId: z.number(),\n\tcontractAddress: z.string(),\n\tstatus: projectStatusSchema,\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().optional(),\n});\n\nexport const collectibleSchema = z.object({\n\tchainId: z.number(),\n\tcontractAddress: z.string(),\n\tstatus: collectibleStatusSchema,\n\ttokenId: z.string(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().optional(),\n});\n\nexport const currencySchema = z.object({\n\tchainId: z.number(),\n\tcontractAddress: z.string(),\n\tname: z.string(),\n\tsymbol: z.string(),\n\tdecimals: z.number(),\n\timageUrl: z.string(),\n\texchangeRate: z.number(),\n\tdefaultChainCurrency: z.boolean(),\n\tnativeCurrency: z.boolean(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().optional(),\n});\n\nexport const orderDataSchema = z.object({\n\torderId: z.string(),\n\tquantity: z.string(),\n});\n\nexport const additionalFeeSchema = z.object({\n\tamount: z.string(),\n\treceiver: z.string(),\n});\n\nexport const postRequestSchema = z.object({\n\tendpoint: z.string(),\n\tmethod: z.string(),\n\tbody: z.any(),\n});\n\nexport const createReqSchema = z.object({\n\ttokenId: z.string(),\n\tquantity: z.string(),\n\texpiry: z.string(),\n\tcurrencyAddress: z.string(),\n\tpricePerToken: z.string(),\n});\n\nexport const getOrdersInputSchema = z.object({\n\tcontractAddress: z.string(),\n\torderId: z.string(),\n\tmarketplace: marketplaceKindSchema,\n});\n\nexport const domainSchema = z.object({\n\tname: z.string(),\n\tversion: z.string(),\n\tchainId: z.number(),\n\tverifyingContract: z.string(),\n});\n\nexport const checkoutOptionsMarketplaceOrderSchema = z.object({\n\tcontractAddress: z.string(),\n\torderId: z.string(),\n\tmarketplace: marketplaceKindSchema,\n});\n\nexport const checkoutOptionsItemSchema = z.object({\n\ttokenId: z.string(),\n\tquantity: z.string(),\n});\n\nexport const checkoutOptionsSchema = z.object({\n\tcrypto: transactionCryptoSchema,\n\tswap: z.array(transactionSwapProviderSchema),\n\tnftCheckout: z.array(transactionNFTCheckoutProviderSchema),\n\tonRamp: z.array(transactionOnRampProviderSchema),\n});\n\nexport const listCurrenciesArgsSchema = z.object({});\n\nexport const listCurrenciesReturnSchema = z.object({\n\tcurrencies: z.array(currencySchema),\n});\n\nexport const getCollectibleArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n});\n\nexport const getLowestPriceOfferForCollectibleArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n});\n\nexport const getHighestPriceOfferForCollectibleArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n});\n\nexport const getLowestPriceListingForCollectibleArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n});\n\nexport const getHighestPriceListingForCollectibleArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n});\n\nexport const getCollectibleLowestOfferArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n});\n\nexport const getCollectibleHighestOfferArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n});\n\nexport const getCollectibleLowestListingArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilters: orderFilterSchema.optional(),\n});\n\nexport const getCollectibleHighestListingArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n});\n\nexport const generateBuyTransactionArgsSchema = z.object({\n\tcollectionAddress: z.string(),\n\tbuyer: z.string(),\n\tmarketplace: marketplaceKindSchema,\n\tordersData: z.array(orderDataSchema),\n\tadditionalFees: z.array(additionalFeeSchema),\n\twalletType: walletKindSchema.optional(),\n});\n\nexport const generateSellTransactionArgsSchema = z.object({\n\tcollectionAddress: z.string(),\n\tseller: z.string(),\n\tmarketplace: marketplaceKindSchema,\n\tordersData: z.array(orderDataSchema),\n\tadditionalFees: z.array(additionalFeeSchema),\n\twalletType: walletKindSchema.optional(),\n});\n\nexport const generateListingTransactionArgsSchema = z.object({\n\tcollectionAddress: z.string(),\n\towner: z.string(),\n\tcontractType: contractTypeSchema,\n\torderbook: orderbookKindSchema,\n\tlisting: createReqSchema,\n\twalletType: walletKindSchema.optional(),\n});\n\nexport const generateOfferTransactionArgsSchema = z.object({\n\tcollectionAddress: z.string(),\n\tmaker: z.string(),\n\tcontractType: contractTypeSchema,\n\torderbook: orderbookKindSchema,\n\toffer: createReqSchema,\n\twalletType: walletKindSchema.optional(),\n});\n\nexport const executeArgsSchema = z.object({\n\tsignature: z.string(),\n\texecuteType: executeTypeSchema,\n\tbody: z.any(),\n});\n\nexport const executeReturnSchema = z.object({\n\torderId: z.string(),\n});\n\nexport const getCountOfAllCollectiblesArgsSchema = z.object({\n\tcontractAddress: z.string(),\n});\n\nexport const getCountOfAllCollectiblesReturnSchema = z.object({\n\tcount: z.number(),\n});\n\nexport const getCountOfFilteredCollectiblesArgsSchema = z.object({\n\tside: orderSideSchema,\n\tcontractAddress: z.string(),\n\tfilter: collectiblesFilterSchema.optional(),\n});\n\nexport const getCountOfFilteredCollectiblesReturnSchema = z.object({\n\tcount: z.number(),\n});\n\nexport const getFloorOrderArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\tfilter: collectiblesFilterSchema.optional(),\n});\n\nexport const syncOrderReturnSchema = z.object({});\n\nexport const syncOrdersReturnSchema = z.object({});\n\nexport const checkoutOptionsMarketplaceArgsSchema = z.object({\n\twallet: z.string(),\n\torders: z.array(checkoutOptionsMarketplaceOrderSchema),\n\tadditionalFee: z.number(),\n});\n\nexport const checkoutOptionsMarketplaceReturnSchema = z.object({\n\toptions: checkoutOptionsSchema,\n});\n\nexport const checkoutOptionsSalesContractArgsSchema = z.object({\n\twallet: z.string(),\n\tcontractAddress: z.string(),\n\tcollectionAddress: z.string(),\n\titems: z.array(checkoutOptionsItemSchema),\n});\n\nexport const checkoutOptionsSalesContractReturnSchema = z.object({\n\toptions: checkoutOptionsSchema,\n});\n\nexport const tokenMetadataSchema = z.object({\n\ttokenId: z.string(),\n\tname: z.string(),\n\tdescription: z.string().optional(),\n\timage: z.string().optional(),\n\tvideo: z.string().optional(),\n\taudio: z.string().optional(),\n\tproperties: z.record(z.any()).optional(),\n\tattributes: z.array(z.record(z.any())),\n\timage_data: z.string().optional(),\n\texternal_url: z.string().optional(),\n\tbackground_color: z.string().optional(),\n\tanimation_url: z.string().optional(),\n\tdecimals: z.number().optional(),\n\tupdatedAt: z.string().optional(),\n\tassets: z.array(assetSchema).optional(),\n});\n\nexport const pageSchema = z.object({\n\tpage: z.number(),\n\tpageSize: z.number(),\n\tmore: z.boolean().optional(),\n\tsort: z.array(sortBySchema).optional(),\n});\n\nexport const filterSchema = z.object({\n\ttext: z.string().optional(),\n\tproperties: z.array(propertyFilterSchema).optional(),\n});\n\nexport const orderSchema = z.object({\n\torderId: z.string(),\n\tmarketplace: marketplaceKindSchema,\n\tside: orderSideSchema,\n\tstatus: orderStatusSchema,\n\tchainId: z.number(),\n\tcollectionContractAddress: z.string(),\n\ttokenId: z.string(),\n\tcreatedBy: z.string(),\n\tpriceAmount: z.string(),\n\tpriceAmountFormatted: z.string(),\n\tpriceAmountNet: z.string(),\n\tpriceAmountNetFormatted: z.string(),\n\tpriceCurrencyAddress: z.string(),\n\tpriceDecimals: z.number(),\n\tpriceUSD: z.number(),\n\tquantityInitial: z.string(),\n\tquantityInitialFormatted: z.string(),\n\tquantityRemaining: z.string(),\n\tquantityRemainingFormatted: z.string(),\n\tquantityAvailable: z.string(),\n\tquantityAvailableFormatted: z.string(),\n\tquantityDecimals: z.number(),\n\tfeeBps: z.number(),\n\tfeeBreakdown: z.array(feeBreakdownSchema),\n\tvalidFrom: z.string(),\n\tvalidUntil: z.string(),\n\tblockNumber: z.number(),\n\torderCreatedAt: z.string().optional(),\n\torderUpdatedAt: z.string().optional(),\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().optional(),\n});\n\nexport const collectibleOrderSchema = z.object({\n\tmetadata: tokenMetadataSchema,\n\torder: orderSchema.optional(),\n});\n\nexport const activitySchema = z.object({\n\ttype: z.string(),\n\tfromAddress: z.string(),\n\ttoAddress: z.string(),\n\ttxHash: z.string(),\n\ttimestamp: z.number(),\n\ttokenId: z.string(),\n\ttokenImage: z.string(),\n\ttokenName: z.string(),\n\tcurrency: currencySchema.optional(),\n});\n\nexport const collectionConfigSchema = z.object({\n\tlastSynced: z.record(collectionLastSyncedSchema),\n\tcollectiblesSynced: z.string(),\n});\n\nexport const signatureSchema = z.object({\n\tdomain: domainSchema,\n\ttypes: z.any(),\n\tprimaryType: z.string(),\n\tvalue: z.any(),\n});\n\nexport const getCollectibleReturnSchema = z.object({\n\tmetadata: tokenMetadataSchema,\n});\n\nexport const getLowestPriceOfferForCollectibleReturnSchema = z.object({\n\torder: orderSchema,\n});\n\nexport const getHighestPriceOfferForCollectibleReturnSchema = z.object({\n\torder: orderSchema,\n});\n\nexport const getLowestPriceListingForCollectibleReturnSchema = z.object({\n\torder: orderSchema,\n});\n\nexport const getHighestPriceListingForCollectibleReturnSchema = z.object({\n\torder: orderSchema,\n});\n\nexport const listListingsForCollectibleArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n\tpage: pageSchema.optional(),\n});\n\nexport const listListingsForCollectibleReturnSchema = z.object({\n\tlistings: z.array(orderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const listOffersForCollectibleArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n\tpage: pageSchema.optional(),\n});\n\nexport const listOffersForCollectibleReturnSchema = z.object({\n\toffers: z.array(orderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const getCollectibleLowestOfferReturnSchema = z.object({\n\torder: orderSchema.optional(),\n});\n\nexport const getCollectibleHighestOfferReturnSchema = z.object({\n\torder: orderSchema.optional(),\n});\n\nexport const getCollectibleLowestListingReturnSchema = z.object({\n\torder: orderSchema.optional(),\n});\n\nexport const getCollectibleHighestListingReturnSchema = z.object({\n\torder: orderSchema.optional(),\n});\n\nexport const listCollectibleListingsArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectibleListingsReturnSchema = z.object({\n\tlistings: z.array(orderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectibleOffersArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\ttokenId: z.string(),\n\tfilter: orderFilterSchema.optional(),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectibleOffersReturnSchema = z.object({\n\toffers: z.array(orderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectiblesArgsSchema = z.object({\n\tside: orderSideSchema,\n\tcontractAddress: z.string(),\n\tfilter: collectiblesFilterSchema.optional(),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectiblesReturnSchema = z.object({\n\tcollectibles: z.array(collectibleOrderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const getFloorOrderReturnSchema = z.object({\n\tcollectible: collectibleOrderSchema,\n});\n\nexport const listCollectiblesWithLowestListingArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\tfilter: collectiblesFilterSchema.optional(),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectiblesWithLowestListingReturnSchema = z.object({\n\tcollectibles: z.array(collectibleOrderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectiblesWithHighestOfferArgsSchema = z.object({\n\tcontractAddress: z.string(),\n\tfilter: collectiblesFilterSchema.optional(),\n\tpage: pageSchema.optional(),\n});\n\nexport const listCollectiblesWithHighestOfferReturnSchema = z.object({\n\tcollectibles: z.array(collectibleOrderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const syncOrderArgsSchema = z.object({\n\torder: orderSchema,\n});\n\nexport const syncOrdersArgsSchema = z.object({\n\torders: z.array(orderSchema),\n});\n\nexport const getOrdersArgsSchema = z.object({\n\tinput: z.array(getOrdersInputSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const getOrdersReturnSchema = z.object({\n\torders: z.array(orderSchema),\n\tpage: pageSchema.optional(),\n});\n\nexport const collectionSchema = z.object({\n\tstatus: collectionStatusSchema,\n\tchainId: z.number(),\n\tcontractAddress: z.string(),\n\tcontractType: contractTypeSchema,\n\ttokenQuantityDecimals: z.number(),\n\tconfig: collectionConfigSchema,\n\tcreatedAt: z.string(),\n\tupdatedAt: z.string(),\n\tdeletedAt: z.string().optional(),\n});\n\nexport const stepSchema = z.object({\n\tid: stepTypeSchema,\n\tdata: z.string(),\n\tto: z.string(),\n\tvalue: z.string(),\n\tsignature: signatureSchema.optional(),\n\tpost: postRequestSchema.optional(),\n\texecuteType: executeTypeSchema.optional(),\n});\n\nexport const generateBuyTransactionReturnSchema = z.object({\n\tsteps: z.array(stepSchema),\n});\n\nexport const generateSellTransactionReturnSchema = z.object({\n\tsteps: z.array(stepSchema),\n});\n\nexport const generateListingTransactionReturnSchema = z.object({\n\tsteps: z.array(stepSchema),\n});\n\nexport const generateOfferTransactionReturnSchema = z.object({\n\tsteps: z.array(stepSchema),\n});\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tcollectableKeys,\n\tgetMetadataClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nconst UseCollectibleSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\tcollectionAddress: AddressSchema,\n\tcollectibleId: z.string(),\n\tquery: QueryArgSchema,\n});\n\nexport type UseCollectibleArgs = z.infer<typeof UseCollectibleSchema>;\n\nexport type UseCollectibleReturn = Awaited<ReturnType<typeof fetchCollectible>>;\n\nconst fetchCollectible = async (\n\targs: UseCollectibleArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst parsedArgs = UseCollectibleSchema.parse(args);\n\tconst metadataClient = getMetadataClient(config);\n\treturn metadataClient\n\t\t.getTokenMetadata({\n\t\t\tchainID: parsedArgs.chainId,\n\t\t\tcontractAddress: parsedArgs.collectionAddress,\n\t\t\ttokenIDs: [parsedArgs.collectibleId],\n\t\t})\n\t\t.then((resp) => resp.tokenMetadata[0]);\n};\n\nexport const collectibleOptions = (\n\targs: UseCollectibleArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectableKeys.details, args, config],\n\t\tqueryFn: () => fetchCollectible(args, config),\n\t});\n};\n\nexport const useCollectible = (args: UseCollectibleArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(collectibleOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tcollectionKeys,\n\tgetMetadataClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nconst UseCollectionSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\tcollectionAddress: AddressSchema,\n\tquery: QueryArgSchema,\n});\n\nexport type UseCollectionArgs = z.input<typeof UseCollectionSchema>;\n\nexport type UseCollectionReturn = Awaited<ReturnType<typeof fetchCollection>>;\n\nconst fetchCollection = async (args: UseCollectionArgs, config: SdkConfig) => {\n\tconst parsedArgs = UseCollectionSchema.parse(args);\n\tconst metadataClient = getMetadataClient(config);\n\treturn metadataClient\n\t\t.getContractInfo({\n\t\t\tchainID: parsedArgs.chainId,\n\t\t\tcontractAddress: parsedArgs.collectionAddress,\n\t\t})\n\t\t.then((resp) => resp.contractInfo);\n};\n\nexport const collectionOptions = (\n\targs: UseCollectionArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectionKeys.detail, args, config],\n\t\tqueryFn: () => fetchCollection(args, config),\n\t});\n};\n\nexport const useCollection = (args: UseCollectionArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(collectionOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport { useConfig } from './useConfig';\nimport {\n\tChainIdSchema,\n\tAddressSchema,\n\tQueryArgSchema,\n\tgetMarketplaceClient,\n\ttype Currency,\n\tgetQueryClient,\n\tconfigKeys,\n\tcurrencyKeys,\n\ttype ChainId,\n} from '../_internal';\nimport type { SdkConfig, MarketplaceConfig } from '../../types';\n\nconst ChainIdCoerce = ChainIdSchema.transform((val) => val.toString());\n\nconst UseCurrenciesArgsSchema = z.object({\n\tchainId: ChainIdCoerce,\n\tcollectionAddress: AddressSchema.optional(),\n\tincludeNativeCurrency: z.boolean().optional(),\n\tquery: QueryArgSchema,\n});\n\ntype UseCurrenciesArgs = z.input<typeof UseCurrenciesArgsSchema>;\n\nexport type UseCurrenciesReturn = Awaited<ReturnType<typeof fetchCurrencies>>;\n\nconst fetchCurrencies = async (chainId: ChainId, config: SdkConfig) => {\n\tconst parsedChainId = ChainIdCoerce.parse(chainId);\n\tconst marketplaceClient = getMarketplaceClient(parsedChainId, config);\n\treturn marketplaceClient.listCurrencies().then((resp) => resp.currencies);\n};\n\nconst selectCurrencies = (data: Currency[], args: UseCurrenciesArgs) => {\n\tconst argsParsed = UseCurrenciesArgsSchema.parse(args);\n\t// if collectionAddress is passed, filter currencies based on collection currency options\n\tif (argsParsed.collectionAddress) {\n\t\tconst queryClient = getQueryClient();\n\t\tconst marketplaceConfigCache = queryClient.getQueriesData({\n\t\t\tqueryKey: configKeys.marketplace,\n\t\t})[0][1] as MarketplaceConfig;\n\n\t\tconst collection = marketplaceConfigCache?.collections.find(\n\t\t\t(collection) =>\n\t\t\t\tcollection.collectionAddress === argsParsed.collectionAddress,\n\t\t);\n\n\t\tif (!collection) {\n\t\t\tthrow new Error(\"Collection doesn't exist\");\n\t\t}\n\n\t\treturn data.filter(\n\t\t\t(currency) =>\n\t\t\t\tcollection.currencyOptions?.includes(currency.contractAddress) ||\n\t\t\t\t// biome-ignore lint/suspicious/noDoubleEquals: <explanation>\n\t\t\t\tcurrency.nativeCurrency == argsParsed.includeNativeCurrency ||\n\t\t\t\tcurrency.defaultChainCurrency,\n\t\t);\n\t}\n\t// if includeNativeCurrency is true, return all currencies\n\tif (argsParsed.includeNativeCurrency) {\n\t\treturn data;\n\t}\n\n\t// if includeNativeCurrency is false or undefined, filter out native currencies\n\treturn data.filter((currency) => !currency.nativeCurrency);\n};\n\nexport const currenciesOptions = (\n\targs: UseCurrenciesArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...currencyKeys.lists, args.chainId],\n\t\tqueryFn: () => fetchCurrencies(args.chainId, config),\n\t\tselect: (data) => selectCurrencies(data, args),\n\t\tenabled: args.query?.enabled,\n\t});\n};\n\nexport const useCurrencies = (args: UseCurrenciesArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(currenciesOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport { useConfig } from './useConfig';\nimport {\n\tChainIdSchema,\n\tAddressSchema,\n\tQueryArgSchema,\n\tgetMarketplaceClient,\n\ttype Currency,\n\tcurrencyKeys,\n\ttype ChainId,\n\tgetQueryClient,\n} from '../_internal';\nimport type { SdkConfig } from '../../types';\n\nconst ChainIdCoerce = ChainIdSchema.transform((val) => val.toString());\n\nconst UseCurrencyArgsSchema = z.object({\n\tchainId: ChainIdCoerce,\n\tcurrencyAddress: AddressSchema,\n\tquery: QueryArgSchema,\n});\n\ntype UseCurrencyArgs = z.input<typeof UseCurrencyArgsSchema>;\n\nexport type UseCurrencyReturn = Currency | undefined;\n\nconst fetchCurrency = async (\n\tchainId: ChainId,\n\tcurrencyAddress: string,\n\tconfig: SdkConfig,\n): Promise<Currency | undefined> => {\n\tconst parsedChainId = ChainIdCoerce.parse(chainId);\n\n\tconst queryClient = getQueryClient();\n\tlet currencies = queryClient.getQueryData([...currencyKeys.lists, chainId]) as\n\t\t| Currency[]\n\t\t| undefined;\n\n\tif (!currencies) {\n\t\tconst marketplaceClient = getMarketplaceClient(parsedChainId, config);\n\t\tcurrencies = await marketplaceClient\n\t\t\t.listCurrencies()\n\t\t\t.then((resp) => resp.currencies);\n\t}\n\n\treturn currencies?.find(\n\t\t(currency) =>\n\t\t\tcurrency.contractAddress.toLowerCase() === currencyAddress.toLowerCase(),\n\t);\n};\n\nexport const currencyOptions = (args: UseCurrencyArgs, config: SdkConfig) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...currencyKeys.details, args.chainId, args.currencyAddress],\n\t\tqueryFn: () => fetchCurrency(args.chainId, args.currencyAddress, config),\n\t});\n};\n\nexport const useCurrency = (args: UseCurrencyArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(currencyOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tcollectableKeys,\n\tgetMetadataClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nconst UseFiltersSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\tcollectionAddress: AddressSchema,\n\tquery: QueryArgSchema,\n});\n\nexport type UseFiltersArgs = z.infer<typeof UseFiltersSchema>;\n\nexport type UseFilterReturn = Awaited<ReturnType<typeof fetchFilters>>;\n\nexport const fetchFilters = async (args: UseFiltersArgs, config: SdkConfig) => {\n\tconst parsedArgs = UseFiltersSchema.parse(args);\n\tconst metadataClient = getMetadataClient(config);\n\treturn metadataClient\n\t\t.tokenCollectionFilters({\n\t\t\tchainID: parsedArgs.chainId,\n\t\t\tcontractAddress: parsedArgs.collectionAddress,\n\t\t})\n\t\t.then((resp) => resp.filters);\n};\n\nexport const filtersOptions = (args: UseFiltersArgs, config: SdkConfig) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectableKeys.filter, args, config],\n\t\tqueryFn: () => fetchFilters(args, config),\n\t});\n};\n\nexport const useFilters = (args: UseFiltersArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(filtersOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tcollectableKeys,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nconst UseFloorOrderSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\tcollectionAddress: AddressSchema,\n\tquery: QueryArgSchema,\n});\n\nexport type UseFloorOrderArgs = z.infer<typeof UseFloorOrderSchema>;\n\nexport type UseFloorOrderReturn = Awaited<ReturnType<typeof fetchFloorOrder>>;\n\nconst fetchFloorOrder = async (args: UseFloorOrderArgs, config: SdkConfig) => {\n\tconst marketplaceClient = getMarketplaceClient(args.chainId, config);\n\treturn marketplaceClient\n\t\t.getFloorOrder({ contractAddress: args.collectionAddress })\n\t\t.then((data) => data.collectible);\n};\n\nexport const floorOrderOptions = (\n\targs: UseFloorOrderArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\tqueryKey: [...collectableKeys.floorOrders, args, config],\n\t\tqueryFn: () => fetchFloorOrder(args, config),\n\t});\n};\n\nexport const useFloorOrder = (args: UseFloorOrderArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(floorOrderOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tcollectableKeys,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { getCollectibleHighestOfferArgsSchema } from '../_internal/api/zod-schema';\nimport { useConfig } from './useConfig';\n\nconst UseHighestOfferArgsSchema = getCollectibleHighestOfferArgsSchema\n\t.omit({\n\t\tcontractAddress: true,\n\t})\n\t.extend({\n\t\tcollectionAddress: AddressSchema,\n\t\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\t\tquery: QueryArgSchema,\n\t});\n\nexport type UseHighestOfferArgs = z.infer<typeof UseHighestOfferArgsSchema>;\n\nexport type UseHighestOfferReturn = Awaited<\n\tReturnType<typeof fetchHighestOffer>\n>;\n\nconst fetchHighestOffer = async (\n\targs: UseHighestOfferArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst parsedArgs = UseHighestOfferArgsSchema.parse(args);\n\tconst marketplaceClient = getMarketplaceClient(parsedArgs.chainId, config);\n\treturn marketplaceClient.getCollectibleHighestOffer({\n\t\t...parsedArgs,\n\t\tcontractAddress: parsedArgs.collectionAddress,\n\t});\n};\n\nexport const highestOfferOptions = (\n\targs: UseHighestOfferArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectableKeys.highestOffers, args, config],\n\t\tqueryFn: () => fetchHighestOffer(args, config),\n\t});\n};\n\nexport const useHighestOffer = (args: UseHighestOfferArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(highestOfferOptions(args, config));\n};\n","import { type Page, SortOrder } from '@0xsequence/indexer';\nimport { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tbalanceQueries,\n\tgetIndexerClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nexport const metadataOptionsSchema = z.object({\n\tverifiedOnly: z.boolean().optional(),\n\tunverifiedOnly: z.boolean().optional(),\n\tincludeContracts: z.array(z.string()).optional(),\n});\n\nconst sortOrderSchema = z.nativeEnum(SortOrder);\n\nconst sortBySchema = z.object({\n\tcolumn: z.string(),\n\torder: sortOrderSchema,\n});\n\nconst pageSchema = z.object({\n\tpage: z.number().optional(),\n\tcolumn: z.string().optional(),\n\tbefore: z.any().optional(),\n\tafter: z.any().optional(),\n\tsort: z.array(sortBySchema).optional(),\n\tpageSize: z.number().optional(),\n\tmore: z.boolean().optional(),\n});\n\nconst useListBalancesArgsSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.number()),\n\taccountAddress: AddressSchema.optional(),\n\tcontractAddress: AddressSchema.optional(),\n\ttokenId: z.string().optional(),\n\tincludeMetadata: z.boolean().optional(),\n\tmetadataOptions: metadataOptionsSchema.optional(),\n\tincludeCollectionTokens: z.boolean().optional(),\n\tpage: pageSchema.optional(),\n\tquery: QueryArgSchema,\n});\n\nexport type UseFetchTokenBalancesReturn = Awaited<\n\tReturnType<typeof fetchBalances>\n>;\n\nexport type UseListBalancesArgs = z.input<typeof useListBalancesArgsSchema>;\n\nconst fetchBalances = async (\n\targs: UseListBalancesArgs,\n\tconfig: SdkConfig,\n\tpage: Page,\n) => {\n\tconst parsedArgs = useListBalancesArgsSchema.parse(args);\n\tconst indexerClient = getIndexerClient(parsedArgs.chainId, config);\n\n\treturn indexerClient.getTokenBalances({\n\t\t...parsedArgs,\n\t\ttokenID: parsedArgs.tokenId,\n\t\tpage: page,\n\t});\n};\n\nexport const listBalancesOptions = (\n\targs: UseListBalancesArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn infiniteQueryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...balanceQueries.lists, args, config],\n\t\tqueryFn: ({ pageParam }) => fetchBalances(args, config, pageParam),\n\t\tinitialPageParam: { page: 1, pageSize: 30 } as Page,\n\t\tgetNextPageParam: (lastPage) => lastPage.page.after,\n\t});\n};\n\nexport const useListBalances = (args: UseListBalancesArgs) => {\n\tconst config = useConfig();\n\treturn useInfiniteQuery(listBalancesOptions(args, config));\n};\n","import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { Page, SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\ttype ListCollectiblesArgs,\n\tQueryArgSchema,\n\tcollectableKeys,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { listCollectiblesArgsSchema } from '../_internal/api/zod-schema';\nimport { useConfig } from './useConfig';\n\nconst UseListCollectiblesArgsSchema = listCollectiblesArgsSchema\n\t.omit({\n\t\tcontractAddress: true,\n\t})\n\t.extend({\n\t\tcollectionAddress: AddressSchema,\n\t\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\t\tquery: QueryArgSchema,\n\t});\n\nexport type UseListCollectiblesArgs = z.infer<\n\ttypeof UseListCollectiblesArgsSchema\n>;\n\nexport type UseListCollectiblesReturn = Awaited<\n\tReturnType<typeof fetchCollectibles>\n>;\n\nconst fetchCollectibles = async (\n\targs: UseListCollectiblesArgs,\n\tmarketplaceClient: Awaited<ReturnType<typeof getMarketplaceClient>>,\n\tpage: Page,\n) => {\n\tconst parsedArgs = UseListCollectiblesArgsSchema.parse(args);\n\tconst arg = {\n\t\t...parsedArgs,\n\t\tcontractAddress: parsedArgs.collectionAddress,\n\t\tpage: page,\n\t} satisfies ListCollectiblesArgs;\n\n\treturn marketplaceClient.listCollectibles(arg);\n};\n\nexport const listCollectiblesOptions = (\n\targs: UseListCollectiblesArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst marketplaceClient = getMarketplaceClient(args.chainId, config);\n\treturn infiniteQueryOptions({\n\t\tqueryKey: [...collectableKeys.lists, args],\n\t\tqueryFn: ({ pageParam }) =>\n\t\t\tfetchCollectibles(args, marketplaceClient, pageParam),\n\t\tinitialPageParam: { page: 1, pageSize: 30 },\n\t\tgetNextPageParam: (lastPage) =>\n\t\t\tlastPage.page?.more ? lastPage.page : undefined,\n\t});\n};\n\nexport const useListCollectibles = (args: UseListCollectiblesArgs) => {\n\tconst config = useConfig();\n\treturn useInfiniteQuery(listCollectiblesOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tChainIdSchema,\n\ttype ListOffersForCollectibleArgs,\n\tcollectableKeys,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { listOffersForCollectibleArgsSchema } from '../_internal/api/zod-schema';\nimport { useConfig } from './useConfig';\n\nconst UseListOffersForCollectibleArgsSchema = listOffersForCollectibleArgsSchema\n\t.extend({\n\t\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\t\tcollectionAddress: z.string(),\n\t\tcollectibleId: z.string(),\n\t})\n\t.omit({ contractAddress: true, tokenId: true });\n\ntype UseListOffersForCollectibleArgs = z.infer<\n\ttypeof UseListOffersForCollectibleArgsSchema\n>;\n\nexport type UseListOffersForCollectibleReturn = Awaited<\n\tReturnType<typeof fetchListOffersForCollectible>\n>;\n\nconst fetchListOffersForCollectible = async (\n\tconfig: SdkConfig,\n\targs: UseListOffersForCollectibleArgs,\n) => {\n\tconst arg = {\n\t\tcontractAddress: args.collectionAddress,\n\t\ttokenId: args.collectibleId,\n\t\tfilter: args.filter,\n\t\tpage: args.page,\n\t} satisfies ListOffersForCollectibleArgs;\n\n\tconst marketplaceClient = getMarketplaceClient(args.chainId, config);\n\treturn marketplaceClient.listCollectibleOffers(arg);\n};\n\nexport const listOffersForCollectibleOptions = (\n\targs: UseListOffersForCollectibleArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\tqueryKey: [...collectableKeys.offers, args, config],\n\t\tqueryFn: () => fetchListOffersForCollectible(config, args),\n\t});\n};\n\nexport const useListOffersForCollectible = (\n\targs: UseListOffersForCollectibleArgs,\n) => {\n\tconst config = useConfig();\n\n\treturn useQuery(listOffersForCollectibleOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tChainIdSchema,\n\ttype ListListingsForCollectibleArgs,\n\tcollectableKeys,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { listListingsForCollectibleArgsSchema } from '../_internal/api/zod-schema';\nimport { useConfig } from './useConfig';\n\nconst UseListListingsForCollectibleArgsSchema =\n\tlistListingsForCollectibleArgsSchema\n\t\t.extend({\n\t\t\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\t\t\tcollectionAddress: z.string(),\n\t\t\tcollectibleId: z.string(),\n\t\t})\n\t\t.omit({ contractAddress: true, tokenId: true });\n\ntype UseListListingsForCollectibleArgs = z.infer<\n\ttypeof UseListListingsForCollectibleArgsSchema\n>;\n\nexport type UseListListingsForCollectibleReturn = Awaited<\n\tReturnType<typeof fetchListListingsForCollectible>\n>;\n\nconst fetchListListingsForCollectible = async (\n\tconfig: SdkConfig,\n\targs: UseListListingsForCollectibleArgs,\n) => {\n\tconst arg = {\n\t\tcontractAddress: args.collectionAddress,\n\t\ttokenId: args.collectibleId,\n\t\tfilter: args.filter,\n\t\tpage: args.page,\n\t} satisfies ListListingsForCollectibleArgs;\n\n\tconst marketplaceClient = getMarketplaceClient(args.chainId, config);\n\treturn marketplaceClient.listCollectibleListings(arg);\n};\n\nexport const listListingsForCollectibleOptions = (\n\targs: UseListListingsForCollectibleArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\tqueryKey: [...collectableKeys.offers, args, config],\n\t\tqueryFn: () => fetchListListingsForCollectible(config, args),\n\t});\n};\n\nexport const useListListingsForCollectible = (\n\targs: UseListListingsForCollectibleArgs,\n) => {\n\tconst config = useConfig();\n\n\treturn useQuery(listListingsForCollectibleOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tcollectableKeys,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { getCollectibleLowestListingArgsSchema } from '../_internal/api/zod-schema';\nimport { useConfig } from './useConfig';\n\nconst UseLowestListingSchema = getCollectibleLowestListingArgsSchema\n\t.omit({\n\t\tcontractAddress: true,\n\t})\n\t.extend({\n\t\tcollectionAddress: AddressSchema,\n\t\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\t\tquery: QueryArgSchema,\n\t});\n\nexport type UseLowestListingArgs = z.infer<typeof UseLowestListingSchema>;\n\nexport type UseLowestListingReturn = Awaited<\n\tReturnType<typeof fetchLowestListing>\n>;\n\nconst fetchLowestListing = async (\n\targs: UseLowestListingArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst parsedArgs = UseLowestListingSchema.parse(args);\n\tconst marketplaceClient = getMarketplaceClient(parsedArgs.chainId, config);\n\treturn marketplaceClient.getCollectibleLowestListing({\n\t\t...parsedArgs,\n\t\tcontractAddress: parsedArgs.collectionAddress,\n\t});\n};\n\nexport const lowestListingOptions = (\n\targs: UseLowestListingArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectableKeys.lowestListings, args, config],\n\t\tqueryFn: () => fetchLowestListing(args, config),\n\t});\n};\n\nexport const useLowestListing = (args: UseLowestListingArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(lowestListingOptions(args, config));\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { marketplaceConfigOptions } from './options/marketplaceConfigOptions';\nimport { useConfig } from './useConfig';\n\nexport * from './options/marketplaceConfigOptions';\n\nexport const useMarketplaceConfig = () => {\n\tconst config = useConfig();\n\treturn useQuery(marketplaceConfigOptions(config));\n};\n","import { queryOptions } from '@tanstack/react-query';\nimport type { Env, MarketplaceConfig, SdkConfig } from '../../../types';\nimport { builderMarketplaceApi, configKeys } from '../../_internal';\n\nconst fetchBuilderConfig = async (projectId: string, env: Env) => {\n\tconst url = `${builderMarketplaceApi(projectId, env)}`;\n\tconst response = await fetch(`${url}/config.json`);\n\n\tconst json = await response.json();\n\tif (!response.ok) {\n\t\tconsole.error('Failed to fetch marketplace config:', response.status, json);\n\t\t//@ts-ignore\n\t\tswitch (json.code) {\n\t\t\tcase 3000: // Throws 3000 if the project is not found\n\t\t\t\tthrow new Error(`Project id: ${projectId} not found, ${url}`);\n\t\t\tdefault:\n\t\t\t\t//@ts-ignore\n\t\t\t\tthrow new Error(`Failed to fetch marketplace config: ${json.msg}`);\n\t\t}\n\t}\n\treturn json as MarketplaceConfig;\n};\n\nconst fetchStyles = async (projectId: string, env: Env) => {\n\tconst response = await fetch(\n\t\t`${builderMarketplaceApi(projectId, env)}/styles.css`,\n\t);\n\tconst styles = await response.text();\n\t// React sanitizes this string, so we need to remove all quotes, they are not needed anyway\n\treturn styles.replaceAll(/['\"]/g, '');\n};\n\nconst fetchMarketplaceConfig = async (\n\tenv: Env,\n\tprojectId: string,\n): Promise<MarketplaceConfig> => {\n\tconst [marketplaceConfig, cssString] = await Promise.all([\n\t\tfetchBuilderConfig(projectId, env),\n\t\tfetchStyles(projectId, env),\n\t]);\n\n\treturn {\n\t\t...marketplaceConfig,\n\t\tcssString,\n\t\tmanifestUrl: `${builderMarketplaceApi(projectId, env)}/manifest.json`,\n\t};\n};\n\nexport const marketplaceConfigOptions = (\n\tconfig: Pick<SdkConfig, 'projectId'> | SdkConfig,\n) => {\n\tlet env: Env = 'production';\n\tif ('_internal' in config && config._internal !== undefined) {\n\t\tenv = config._internal.builderEnv ?? env;\n\t}\n\n\tconst projectId = config.projectId;\n\treturn queryOptions({\n\t\tqueryKey: [...configKeys.marketplace, env, projectId],\n\t\tqueryFn: () => fetchMarketplaceConfig(env, projectId),\n\t});\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport type { Hex } from 'viem';\nimport { getContract } from 'viem';\nimport { z } from 'zod';\nimport { EIP2981_ABI } from '../../utils/abi/abi/standard/EIP2981';\nimport { getPublicRpcClient } from '../../utils/get-public-rpc-client';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tQueryArgSchema,\n\tcollectableKeys,\n} from '../_internal';\n\nconst UseRoyaletyPercentageSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\tcollectionAddress: AddressSchema,\n\tcollectibleId: z.string(),\n\tquery: QueryArgSchema,\n});\n\ntype UseRoyaletyPercentageArgs = z.infer<typeof UseRoyaletyPercentageSchema>;\n\nconst fetchRoyaletyPercentage = async (args: UseRoyaletyPercentageArgs) => {\n\tconst parsedArgs = UseRoyaletyPercentageSchema.parse(args);\n\tconst publicClient = getPublicRpcClient(parsedArgs.chainId);\n\n\tconst contract = getContract({\n\t\taddress: parsedArgs.collectionAddress as Hex,\n\t\tabi: EIP2981_ABI,\n\t\tclient: publicClient,\n\t});\n\n\ttry {\n\t\tconst [_, royaltyPercentage] = await contract.read.royaltyInfo([\n\t\t\tBigInt(args.collectibleId),\n\t\t\t100n,\n\t\t]);\n\n\t\treturn royaltyPercentage;\n\t} catch {\n\t\t//TODO: dont swallow errors\n\t\treturn 0n;\n\t}\n};\n\nexport const royaletyPercentageOptions = (args: UseRoyaletyPercentageArgs) =>\n\tqueryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectableKeys.royaltyPercentage, args],\n\t\tqueryFn: () => fetchRoyaletyPercentage(args),\n\t});\n\nexport const useRoyaltyPercentage = (args: UseRoyaletyPercentageArgs) => {\n\treturn useQuery(royaletyPercentageOptions(args));\n};\n","import { useMutation } from '@tanstack/react-query';\nimport { useConfig } from './useConfig';\n\nexport type UseGenerateListingTransactionArgs = {\n\tchainId: ChainId;\n\tonSuccess?: (data?: Step[]) => void;\n};\n\nimport type { SdkConfig } from '../../types';\nimport {\n\ttype ChainId,\n\ttype CreateReq,\n\ttype GenerateListingTransactionArgs,\n\ttype Step,\n\tgetMarketplaceClient,\n} from '../_internal';\n\nexport type CreateReqWithDateExpiry = Omit<CreateReq, 'expiry'> & {\n\texpiry: Date;\n};\n\nexport type GenerateListingTransactionProps = Omit<\n\tGenerateListingTransactionArgs,\n\t'listing'\n> & {\n\tlisting: CreateReqWithDateExpiry;\n};\n\nconst dateToUnixTime = (date: Date) =>\n\tMath.floor(date.getTime() / 1000).toString();\n\nexport const generateListingTransaction = async (\n\tparams: GenerateListingTransactionProps,\n\tconfig: SdkConfig,\n\tchainId: ChainId,\n) => {\n\tconst args = {\n\t\t...params,\n\t\tlisting: {\n\t\t\t...params.listing,\n\t\t\texpiry: dateToUnixTime(params.listing.expiry),\n\t\t},\n\t} satisfies GenerateListingTransactionArgs;\n\tconst marketplaceClient = getMarketplaceClient(chainId, config);\n\treturn (await marketplaceClient.generateListingTransaction(args)).steps;\n};\n\nexport const useGenerateListingTransaction = (\n\tparams: UseGenerateListingTransactionArgs,\n) => {\n\tconst config = useConfig();\n\n\tconst { mutate, mutateAsync, ...result } = useMutation({\n\t\tonSuccess: params.onSuccess,\n\t\tmutationFn: (args: GenerateListingTransactionProps) =>\n\t\t\tgenerateListingTransaction(args, config, params.chainId),\n\t});\n\n\treturn {\n\t\t...result,\n\t\tgenerateListingTransaction: mutate,\n\t\tgenerateListingTransactionAsync: mutateAsync,\n\t};\n};\n","import { useMutation } from '@tanstack/react-query';\nimport type { SdkConfig } from '../../types';\nimport {\n\ttype ChainId,\n\ttype CreateReq,\n\ttype GenerateOfferTransactionArgs,\n\ttype Step,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nexport type UseGenerateOfferTransactionArgs = {\n\tchainId: ChainId;\n\tonSuccess?: (data?: Step[]) => void;\n};\n\ntype CreateReqWithDateExpiry = Omit<CreateReq, 'expiry'> & {\n\texpiry: Date;\n};\n\nexport type GenerateOfferTransactionProps = Omit<\n\tGenerateOfferTransactionArgs,\n\t'offer'\n> & {\n\toffer: CreateReqWithDateExpiry;\n};\n\nconst dateToUnixTime = (date: Date) =>\n\tMath.floor(date.getTime() / 1000).toString();\n\nexport const generateOfferTransaction = async (\n\tparams: GenerateOfferTransactionProps,\n\tconfig: SdkConfig,\n\tchainId: ChainId,\n) => {\n\tconst args = {\n\t\t...params,\n\t\toffer: { ...params.offer, expiry: dateToUnixTime(params.offer.expiry) },\n\t} satisfies GenerateOfferTransactionArgs;\n\tconst marketplaceClient = getMarketplaceClient(chainId, config);\n\treturn (await marketplaceClient.generateOfferTransaction(args)).steps;\n};\n\nexport const useGenerateOfferTransaction = (\n\tparams: UseGenerateOfferTransactionArgs,\n) => {\n\tconst config = useConfig();\n\n\tconst { mutate, mutateAsync, ...result } = useMutation({\n\t\tonSuccess: params.onSuccess,\n\t\tmutationFn: (args: GenerateOfferTransactionProps) =>\n\t\t\tgenerateOfferTransaction(args, config, params.chainId),\n\t});\n\n\treturn {\n\t\t...result,\n\t\tgenerateOfferTransaction: mutate,\n\t\tgenerateOfferTransactionAsync: mutateAsync,\n\t};\n};\n","import { useMutation } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\ttype ChainId,\n\tChainIdSchema,\n\ttype GenerateSellTransactionArgs,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { stepSchema } from '../_internal/api/zod-schema';\nimport { useConfig } from './useConfig';\n\nconst UserGeneratSellTransactionArgsSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\tonSuccess: z.function().args(stepSchema.array().optional()).optional(),\n});\n\ntype UseGenerateSellTransactionArgs = z.infer<\n\ttypeof UserGeneratSellTransactionArgsSchema\n>;\n\nexport const generateSellTransaction = async (\n\targs: GenerateSellTransactionArgs,\n\tconfig: SdkConfig,\n\tchainId: ChainId,\n) => {\n\tconst parsedChainId = ChainIdSchema.pipe(z.coerce.string()).parse(chainId);\n\tconst marketplaceClient = getMarketplaceClient(parsedChainId, config);\n\treturn marketplaceClient\n\t\t.generateSellTransaction(args)\n\t\t.then((data) => data.steps);\n};\n\nexport const useGenerateSellTransaction = (\n\tparams: UseGenerateSellTransactionArgs,\n) => {\n\tconst config = useConfig();\n\n\tconst { mutate, mutateAsync, ...result } = useMutation({\n\t\tonSuccess: params.onSuccess,\n\t\tmutationFn: (args: GenerateSellTransactionArgs) =>\n\t\t\tgenerateSellTransaction(args, config, params.chainId),\n\t});\n\n\treturn {\n\t\t...result,\n\t\tgenerateSellTransaction: mutate,\n\t\tgenerateSellTransactionAsync: mutateAsync,\n\t};\n};\n","import { type Abi, type Address, type Hex, erc721Abi } from 'viem';\nimport { useAccount, useWriteContract } from 'wagmi';\nimport { ERC1155_ABI } from '../../utils';\nimport type { ChainId, ContractType } from '../_internal';\n\ninterface BaseTransferParams {\n\tchainId: ChainId;\n\tcollectionAddress: Hex;\n\ttokenId: string;\n\treceiverAddress: Address;\n}\n\ninterface ERC721TransferParams extends BaseTransferParams {\n\tcontractType: ContractType.ERC721;\n}\n\ninterface ERC1155TransferParams extends BaseTransferParams {\n\tcontractType: ContractType.ERC1155;\n\tquantity: string;\n}\n\nexport type TransferTokensParams = ERC721TransferParams | ERC1155TransferParams;\n\nconst prepareTransferConfig = (\n\tparams: TransferTokensParams,\n\taccountAddress: Address,\n) => {\n\tif (params.contractType === 'ERC721') {\n\t\treturn {\n\t\t\tabi: erc721Abi as Abi,\n\t\t\taddress: params.collectionAddress,\n\t\t\tfunctionName: 'safeTransferFrom',\n\t\t\targs: [\n\t\t\t\taccountAddress,\n\t\t\t\tparams.receiverAddress,\n\t\t\t\tBigInt(params.tokenId),\n\t\t\t] as const,\n\t\t} as const;\n\t}\n\n\treturn {\n\t\tabi: ERC1155_ABI as Abi,\n\t\taddress: params.collectionAddress,\n\t\tfunctionName: 'safeTransferFrom',\n\t\targs: [\n\t\t\taccountAddress,\n\t\t\tparams.receiverAddress,\n\t\t\tBigInt(params.tokenId),\n\t\t\tparams.quantity,\n\t\t\t'0x', // data\n\t\t] as const,\n\t};\n};\n\nexport const useTransferTokens = () => {\n\tconst { address: accountAddress } = useAccount();\n\tconst {\n\t\twriteContractAsync,\n\t\tdata: hash,\n\t\tisPending,\n\t\tisError,\n\t\tisSuccess,\n\t} = useWriteContract();\n\n\tconst transferTokensAsync = async (params: TransferTokensParams) => {\n\t\tif (!accountAddress) {\n\t\t\tthrow new Error('No wallet connected');\n\t\t}\n\n\t\tconst config = prepareTransferConfig(params, accountAddress);\n\t\treturn await writeContractAsync(config);\n\t};\n\n\treturn {\n\t\ttransferTokensAsync,\n\t\thash,\n\t\ttransferring: isPending,\n\t\ttransferFailed: isError,\n\t\ttransferSuccess: isSuccess,\n\t};\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { SdkConfig } from '../../types';\nimport {\n\tAddressSchema,\n\tChainIdSchema,\n\tMarketplaceKind,\n\tQueryArgSchema,\n\tgetMarketplaceClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\n\nconst UseCheckoutOptionsSchema = z.object({\n\tchainId: ChainIdSchema.pipe(z.coerce.string()),\n\twalletAddress: AddressSchema,\n\torders: z.array(\n\t\tz.object({\n\t\t\tcollectionAddress: AddressSchema,\n\t\t\torderId: z.string(),\n\t\t\tquantity: z.number(),\n\t\t\tmarketplace: z.nativeEnum(MarketplaceKind),\n\t\t}),\n\t),\n\tquery: QueryArgSchema,\n});\n\nexport type UseCheckoutOptionsArgs = z.infer<typeof UseCheckoutOptionsSchema>;\n\nexport type UseCheckoutOptionsReturn = Awaited<\n\tReturnType<typeof fetchCheckoutOptions>\n>;\n\nconst fetchCheckoutOptions = async (\n\targs: UseCheckoutOptionsArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst marketplaceClient = getMarketplaceClient(args.chainId, config);\n\treturn marketplaceClient.checkoutOptionsMarketplace({\n\t\twallet: args.walletAddress,\n\t\torders: args.orders.map((order) => ({\n\t\t\tcontractAddress: order.collectionAddress,\n\t\t\torderId: order.orderId,\n\t\t\tmarketplace: order.marketplace,\n\t\t\tquantity: order.quantity,\n\t\t})),\n\t\tadditionalFee: 0, //TODO: add additional fee\n\t});\n};\n\nexport const checkoutOptionsOptions = (\n\targs: UseCheckoutOptionsArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\tqueryKey: ['checkoutOptions', args],\n\t\tqueryFn: () => fetchCheckoutOptions(args, config),\n\t});\n};\n\nexport const useCheckoutOptions = (args: UseCheckoutOptionsArgs) => {\n\tconst config = useConfig();\n\treturn useQuery(checkoutOptionsOptions(args, config));\n};\n","import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { z } from 'zod';\nimport type { MarketplaceConfig, SdkConfig } from '../../types';\nimport {\n\tQueryArgSchema,\n\tcollectionKeys,\n\tgetMetadataClient,\n} from '../_internal';\nimport { useConfig } from './useConfig';\nimport { useMarketplaceConfig } from './useMarketplaceConfig';\n\nconst UseListCollectionsSchema = z.object({\n\tquery: QueryArgSchema.optional().default({}),\n});\n\nexport type UseListCollectionsArgs = z.input<typeof UseListCollectionsSchema>;\n\nexport type UseListCollectionsReturn = Awaited<\n\tReturnType<typeof fetchListCollections>\n>;\n\ntype FetchListCollectionsArgs = {\n\tmarketplaceConfig: MarketplaceConfig;\n\tquery?: z.infer<typeof QueryArgSchema>;\n};\n\nconst fetchListCollections = async (\n\t{ marketplaceConfig }: FetchListCollectionsArgs,\n\tconfig: SdkConfig,\n) => {\n\tconst metadataClient = getMetadataClient(config);\n\n\tif (!marketplaceConfig?.collections?.length) {\n\t\treturn [];\n\t}\n\n\t// Group collections by chainId\n\tconst collectionsByChain = marketplaceConfig.collections.reduce<\n\t\tRecord<string, string[]>\n\t>((acc, curr) => {\n\t\tconst { chainId, collectionAddress } = curr;\n\t\tif (!acc[chainId]) {\n\t\t\tacc[chainId] = [];\n\t\t}\n\t\tacc[chainId].push(collectionAddress);\n\t\treturn acc;\n\t}, {});\n\n\t// Fetch collections for each chain\n\tconst promises = Object.entries(collectionsByChain).map(\n\t\t([chainId, addresses]) =>\n\t\t\tmetadataClient\n\t\t\t\t.getContractInfoBatch({\n\t\t\t\t\tchainID: chainId,\n\t\t\t\t\tcontractAddresses: addresses,\n\t\t\t\t})\n\t\t\t\t.then((resp) => Object.values(resp.contractInfoMap)),\n\t);\n\n\tconst results = await Promise.all(promises);\n\treturn results.flat();\n};\n\nexport const listCollectionsOptions = (\n\targs: FetchListCollectionsArgs,\n\tconfig: SdkConfig,\n) => {\n\treturn queryOptions({\n\t\t...args.query,\n\t\tqueryKey: [...collectionKeys.list],\n\t\tqueryFn: () => fetchListCollections(args, config),\n\t});\n};\n\nexport const useListCollections = (args: UseListCollectionsArgs = {}) => {\n\tconst config = useConfig();\n\tconst { data: marketplaceConfig, isLoading: isLoadingConfig } =\n\t\tuseMarketplaceConfig();\n\n\treturn useQuery({\n\t\t...listCollectionsOptions(\n\t\t\t// biome-ignore lint/style/noNonNullAssertion: <explanation>\n\t\t\t{ marketplaceConfig: marketplaceConfig!, query: args.query },\n\t\t\tconfig,\n\t\t),\n\t\tenabled: !isLoadingConfig && !!marketplaceConfig,\n\t});\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,cAAc,WAAW,gBAAgB;AAElD,SAAS,SAAS;;;ACAlB,SAAS,kBAAkB;;;ACA3B,SAAS,qBAAqB;AAC9B,OAAO;AAiBJ;AAbI,IAAM,wBAAwB,cAAc,CAAC,CAAc;AAO3D,SAAS,oBAAoB;AAAA,EACnC;AAAA,EACA;AACD,GAAgC;AAC/B,SACC,oBAAC,sBAAsB,UAAtB,EAA+B,OAAO,QACtC,8BAAC,SAAI,IAAI,aAAc,UAAS,GACjC;AAEF;;;ADjBO,SAAS,YAAY;AAC3B,QAAM,UAAU,WAAW,qBAAqB;AAChD,MAAI,CAAC,SAAS;AACb,UAAM,IAAI;AAAA,MACT;AAAA,IACD;AAAA,EACD;AACA,SAAO;AACR;;;ADAA,IAAM,kCAAkC,EAAE,OAAO;AAAA,EAChD,mBAAmB;AAAA,EACnB,eAAe,oBAAoB,K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AAC;AAAA,EACT;AAGA,QAAM,qBAAqB,kBAAkB,YAAY,OAEvD,CAAC,KAAK,SAAS;AAChB,UAAM,EAAE,SAAS,kBAAkB,IAAI;AACvC,QAAI,CAAC,IAAI,OAAO,GAAG;AAClB,UAAI,OAAO,IAAI,CAAC;AAAA,IACjB;AACA,QAAI,OAAO,EAAE,KAAK,iBAAiB;AACnC,WAAO;AAAA,EACR,GAAG,CAAC,CAAC;AAGL,QAAM,WAAW,OAAO,QAAQ,kBAAkB,EAAE;AAAA,IACnD,CAAC,CAAC,SAAS,SAAS,MACnB,eACE,qBAAqB;AAAA,MACrB,SAAS;AAAA,MACT,mBAAmB;AAAA,IACpB,CAAC,EACA,KAAK,CAAC,SAAS,OAAO,OAAO,KAAK,eAAe,CAAC;AAAA,EACtD;AAEA,QAAM,UAAU,MAAM,QAAQ,IAAI,QAAQ;AAC1C,SAAO,QAAQ,KAAK;AACrB;AAEO,IAAM,yBAAyB,CACrC,MACA,WACI;AACJ,SAAOC,eAAa;AAAA,IACnB,GAAG,KAAK;AAAA,IACR,UAAU,CAAC,GAAG,eAAe,IAAI;AAAA,IACjC,SAAS,MAAM,qBAAqB,MAAM,MAAM;AAAA,EACjD,CAAC;AACF;AAEO,IAAM,qBAAqB,CAAC,OAA+B,CAAC,MAAM;AACxE,QAAM,SAAS,UAAU;AACzB,QAAM,EAAE,MAAM,mBAAmB,WAAW,gBAAgB,IAC3D,qBAAqB;AAEtB,SAAOC,WAAS;AAAA,IACf,GAAG;AAAA;AAAA,MAEF,EAAE,mBAAuC,OAAO,KAAK,MAAM;AAAA,MAC3D;AAAA,IACD;AAAA,IACA,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAAA,EAChC,CAAC;AACF;","names":["queryOptions","useQuery","z","z","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","collection","queryOptions","useQuery","queryOptions","useQuery","z","ChainIdCoerce","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","SortOrder","z","z","sortOrderSchema","SortOrder","sortBySchema","pageSchema","infiniteQueryOptions","useInfiniteQuery","z","z","infiniteQueryOptions","useInfiniteQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","useQuery","queryOptions","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery","useMutation","dateToUnixTime","useMutation","useMutation","z","z","useMutation","queryOptions","useQuery","z","z","queryOptions","useQuery","queryOptions","useQuery","z","z","queryOptions","useQuery"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx"],"sourcesContent":["'use client';\n\nimport type React from 'react';\nimport type { ComponentProps } from 'react';\n\nimport {\n\tBox,\n\tButton,\n\tCloseIcon,\n\tIconButton,\n\tText,\n} from '@0xsequence/design-system';\nimport type { Observable } from '@legendapp/state';\nimport { observer } from '@legendapp/state/react';\nimport { Close, Content, Overlay, Portal, Root } from '@radix-ui/react-dialog';\nimport { getProviderEl } from '../../../../../_internal';\nimport type { ActionModalState } from './store';\nimport {\n\tcloseButton,\n\tcta as ctaStyle,\n\tdialogContent,\n\tdialogOverlay,\n} from './styles.css';\n\nexport interface ActionModalProps {\n\tstore: Observable<ActionModalState>;\n\tonClose: () => void;\n\ttitle: string;\n\tchildren: React.ReactNode;\n\tctas: {\n\t\tlabel: string;\n\t\tonClick: () => void;\n\t\tpending?: boolean;\n\t\tdisabled?: boolean;\n\t\thidden?: boolean;\n\t\tvariant?: ComponentProps<typeof Button>['variant'];\n\t}[];\n}\n\nexport const ActionModal = observer(\n\t({ store, onClose, title, children, ctas }: ActionModalProps) => {\n\t\treturn (\n\t\t\t<Root open={store.isOpen.get()}>\n\t\t\t\t<Portal container={getProviderEl()}>\n\t\t\t\t\t<Overlay className={dialogOverlay} />\n\t\t\t\t\t<Content className={dialogContent.narrow}>\n\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\tdisplay=\"flex\"\n\t\t\t\t\t\t\tflexGrow={'1'}\n\t\t\t\t\t\t\talignItems=\"center\"\n\t\t\t\t\t\t\tflexDirection=\"column\"\n\t\t\t\t\t\t\tgap=\"4\"\n\t\t\t\t\t\t\tposition={'relative'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tfontSize=\"medium\"\n\t\t\t\t\t\t\t\tfontWeight=\"bold\"\n\t\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\t\twidth=\"full\"\n\t\t\t\t\t\t\t\tcolor=\"text100\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t</Text>\n\n\t\t\t\t\t\t\t{children}\n\n\t\t\t\t\t\t\t<Box width=\"full\" display=\"flex\" flexDirection=\"column\" gap=\"2\">\n\t\t\t\t\t\t\t\t{ctas.map(\n\t\t\t\t\t\t\t\t\t(cta) =>\n\t\t\t\t\t\t\t\t\t\t!cta.hidden && (\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tkey={cta.label}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={ctaStyle}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={cta.onClick}\n\t\t\t\t\t\t\t\t\t\t\t\tvariant={cta.variant || 'primary'}\n\t\t\t\t\t\t\t\t\t\t\t\tpending={cta.pending}\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={cta.disabled}\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"lg\"\n\t\t\t\t\t\t\t\t\t\t\t\twidth=\"full\"\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={cta.label}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t<Close className={closeButton} asChild onClick={onClose}>\n\t\t\t\t\t\t\t<IconButton size=\"xs\" aria-label=\"Close modal\" icon={CloseIcon} />\n\t\t\t\t\t\t</Close>\n\t\t\t\t\t</Content>\n\t\t\t\t</Portal>\n\t\t\t</Root>\n\t\t);\n\t},\n);\n"],"mappings":";;;;;;;;;;;;AAKA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEP,SAAS,gBAAgB;AACzB,SAAS,OAAO,SAAS,SAAS,QAAQ,YAAY;AA8BjD,cAEC,YAFD;AALE,IAAM,cAAc;AAAA,EAC1B,CAAC,EAAE,OAAO,SAAS,OAAO,UAAU,KAAK,MAAwB;AAChE,WACC,oBAAC,QAAK,MAAM,MAAM,OAAO,IAAI,GAC5B,+BAAC,UAAO,WAAW,cAAc,GAChC;AAAA,0BAAC,WAAQ,WAAW,eAAe;AAAA,MACnC,qBAAC,WAAQ,WAAW,cAAc,QACjC;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,SAAQ;AAAA,YACR,UAAU;AAAA,YACV,YAAW;AAAA,YACX,eAAc;AAAA,YACd,KAAI;AAAA,YACJ,UAAU;AAAA,YAEV;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACA,UAAS;AAAA,kBACT,YAAW;AAAA,kBACX,WAAU;AAAA,kBACV,OAAM;AAAA,kBACN,OAAM;AAAA,kBAEL;AAAA;AAAA,cACF;AAAA,cAEC;AAAA,cAED,oBAAC,OAAI,OAAM,QAAO,SAAQ,QAAO,eAAc,UAAS,KAAI,KAC1D,eAAK;AAAA,gBACL,CAACA,SACA,CAACA,KAAI,UACJ;AAAA,kBAAC;AAAA;AAAA,oBAEA,WAAW;AAAA,oBACX,SAASA,KAAI;AAAA,oBACb,SAASA,KAAI,WAAW;AAAA,oBACxB,SAASA,KAAI;AAAA,oBACb,UAAUA,KAAI;AAAA,oBACd,MAAK;AAAA,oBACL,OAAM;AAAA,oBACN,OAAOA,KAAI;AAAA;AAAA,kBARNA,KAAI;AAAA,gBASV;AAAA,cAEH,GACD;AAAA;AAAA;AAAA,QACD;AAAA,QACA,oBAAC,SAAM,WAAW,aAAa,SAAO,MAAC,SAAS,SAC/C,8BAAC,cAAW,MAAK,MAAK,cAAW,eAAc,MAAM,WAAW,GACjE;AAAA,SACD;AAAA,OACD,GACD;AAAA,EAEF;AACD;","names":["cta"]}
|
package/dist/chunk-D7QQP6MS.js
DELETED
package/dist/chunk-DBFOPEV6.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
// src/utils/abi/abi/standard/EIP2981.ts
|
|
4
|
-
var EIP2981_ABI = [
|
|
5
|
-
{
|
|
6
|
-
inputs: [
|
|
7
|
-
{ internalType: "uint256", name: "", type: "uint256" },
|
|
8
|
-
{ internalType: "uint256", name: "_saleCost", type: "uint256" }
|
|
9
|
-
],
|
|
10
|
-
name: "royaltyInfo",
|
|
11
|
-
outputs: [
|
|
12
|
-
{ internalType: "address", name: "receiver", type: "address" },
|
|
13
|
-
{ internalType: "uint256", name: "royaltyAmount", type: "uint256" }
|
|
14
|
-
],
|
|
15
|
-
stateMutability: "view",
|
|
16
|
-
type: "function"
|
|
17
|
-
}
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
EIP2981_ABI
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=chunk-DBFOPEV6.js.map
|