@b3dotfun/sdk 0.0.7-alpha.8 → 0.0.7
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/cjs/anyspend/constants/index.js +2 -5
- package/dist/cjs/anyspend/index.d.ts +0 -1
- package/dist/cjs/anyspend/index.js +0 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +33 -33
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +43 -75
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +3 -5
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +3 -4
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +1 -4
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -4
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -4
- package/dist/cjs/anyspend/services/anyspend.d.ts +1 -3
- package/dist/cjs/anyspend/services/anyspend.js +1 -1
- package/dist/cjs/anyspend/types/index.d.ts +0 -1
- package/dist/cjs/anyspend/types/index.js +0 -1
- package/dist/cjs/anyspend/types/nft.d.ts +0 -7
- package/dist/cjs/anyspend/types/nft.js +0 -2
- package/dist/cjs/anyspend/types/order.d.ts +0 -10
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +0 -28
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -18
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +0 -14
- package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +0 -11
- package/dist/cjs/anyspend/types/req-res/getQuote.js +1 -4
- package/dist/cjs/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +4 -18
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +2 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +16 -11
- package/dist/cjs/global-account/react/components/StyleRoot.js +1 -0
- package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +4 -1
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +22 -22
- package/dist/cjs/shared/constants/chains/supported.js +0 -3
- package/dist/cjs/shared/constants/index.d.ts +0 -1
- package/dist/cjs/shared/constants/index.js +1 -2
- package/dist/cjs/shared/utils/index.d.ts +0 -9
- package/dist/cjs/shared/utils/index.js +0 -17
- package/dist/esm/anyspend/constants/index.js +2 -5
- package/dist/esm/anyspend/index.d.ts +0 -1
- package/dist/esm/anyspend/index.js +0 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +5 -5
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +20 -52
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +3 -5
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +4 -5
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +1 -4
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +3 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -4
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -4
- package/dist/esm/anyspend/services/anyspend.d.ts +1 -3
- package/dist/esm/anyspend/services/anyspend.js +1 -1
- package/dist/esm/anyspend/types/index.d.ts +0 -1
- package/dist/esm/anyspend/types/index.js +0 -1
- package/dist/esm/anyspend/types/nft.d.ts +0 -7
- package/dist/esm/anyspend/types/nft.js +0 -2
- package/dist/esm/anyspend/types/order.d.ts +0 -10
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +0 -28
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -18
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +0 -14
- package/dist/esm/anyspend/types/req-res/getQuote.d.ts +0 -11
- package/dist/esm/anyspend/types/req-res/getQuote.js +1 -4
- package/dist/esm/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/esm/anyspend/utils/orderPayload.js +5 -19
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +2 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +12 -7
- package/dist/esm/global-account/react/components/StyleRoot.js +1 -0
- package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +4 -1
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +21 -24
- package/dist/esm/shared/constants/chains/supported.js +0 -3
- package/dist/esm/shared/constants/index.d.ts +0 -1
- package/dist/esm/shared/constants/index.js +0 -1
- package/dist/esm/shared/utils/index.d.ts +0 -9
- package/dist/esm/shared/utils/index.js +0 -15
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/index.d.ts +0 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +2 -2
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +2 -3
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -4
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -4
- package/dist/types/anyspend/services/anyspend.d.ts +1 -3
- package/dist/types/anyspend/types/index.d.ts +0 -1
- package/dist/types/anyspend/types/nft.d.ts +0 -7
- package/dist/types/anyspend/types/order.d.ts +0 -10
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +0 -28
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -18
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +0 -14
- package/dist/types/anyspend/types/req-res/getQuote.d.ts +0 -11
- package/dist/types/anyspend/utils/orderPayload.d.ts +3 -3
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +2 -1
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +4 -1
- package/dist/types/shared/constants/index.d.ts +0 -1
- package/dist/types/shared/utils/index.d.ts +0 -9
- package/package.json +3 -22
- package/src/anyspend/constants/index.ts +3 -5
- package/src/anyspend/index.ts +0 -1
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +7 -8
- package/src/anyspend/react/components/AnySpendCustom.tsx +24 -68
- package/src/anyspend/react/components/AnySpendNFT.tsx +4 -9
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +6 -7
- package/src/anyspend/react/components/AnySpendTournament.tsx +1 -4
- package/src/anyspend/react/components/common/OrderDetails.tsx +6 -6
- package/src/anyspend/services/anyspend.ts +2 -2
- package/src/anyspend/types/index.ts +0 -1
- package/src/anyspend/types/nft.ts +0 -3
- package/src/anyspend/types/req-res/getQuote.ts +1 -4
- package/src/anyspend/utils/orderPayload.ts +5 -17
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +3 -2
- package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +27 -15
- package/src/global-account/react/components/StyleRoot.tsx +1 -0
- package/src/global-account/react/hooks/useB3EnsName.ts +32 -26
- package/src/shared/constants/chains/supported.ts +0 -5
- package/src/shared/constants/index.ts +0 -2
- package/src/shared/utils/index.ts +0 -16
- package/dist/cjs/anyspend/types/metadata.d.ts +0 -26
- package/dist/cjs/anyspend/types/metadata.js +0 -16
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +0 -50
- package/dist/cjs/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/cjs/global-account/react/components/custom/Icon.js +0 -52
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +0 -20
- package/dist/cjs/index.d.ts +0 -0
- package/dist/cjs/index.js +0 -2
- package/dist/esm/anyspend/types/metadata.d.ts +0 -26
- package/dist/esm/anyspend/types/metadata.js +0 -11
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +0 -44
- package/dist/esm/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/esm/global-account/react/components/custom/Icon.js +0 -50
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +0 -17
- package/dist/esm/index.d.ts +0 -0
- package/dist/esm/index.js +0 -2
- package/dist/types/anyspend/types/metadata.d.ts +0 -26
- package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +0 -14
- package/dist/types/global-account/react/components/custom/Icon.d.ts +0 -7
- package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +0 -4
- package/dist/types/index.d.ts +0 -0
- package/src/anyspend/types/metadata.ts +0 -41
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +0 -190
- package/src/global-account/react/components/custom/Icon.tsx +0 -102
- package/src/global-account/react/components/custom/ManageAccountButton.tsx +0 -33
- package/src/index.ts +0 -1
|
@@ -223,7 +223,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
223
223
|
};
|
|
224
224
|
// When waitingForDeposit is true, we show a message to the user to wait for the deposit to be processed.
|
|
225
225
|
const setWaitingForDeposit = (0, react_4.useCallback)(() => {
|
|
226
|
-
const params = new URLSearchParams(searchParams
|
|
226
|
+
const params = new URLSearchParams(searchParams);
|
|
227
227
|
params.set("waitingForDeposit", "true");
|
|
228
228
|
router.push(`?${params}`);
|
|
229
229
|
}, [router, searchParams]);
|
|
@@ -344,7 +344,7 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
344
344
|
sonner_1.toast.success("Copied to clipboard");
|
|
345
345
|
}, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsxs)("strong", { className: "border-as-brand text-as-primary border-b-2 pb-1 text-2xl font-semibold sm:text-xl", children: [roundedUpSrcAmount, " ", srcToken.symbol] }), (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "text-as-primary/50 hover:text-as-primary h-5 w-5 cursor-pointer transition-all duration-200" })] }) }), (0, jsx_runtime_1.jsxs)(react_1.Badge, { variant: "outline", className: "flex h-10 items-center gap-2 px-3 py-1 pr-2 text-sm", children: ["on ", (0, anyspend_1.getChainName)(order.srcChain), (0, jsx_runtime_1.jsx)("img", { src: anyspend_1.ALL_CHAINS[order.srcChain].logoUrl, alt: (0, anyspend_1.getChainName)(order.srcChain), className: (0, utils_1.cn)("h-6 rounded-full", order.srcChain === chains_1.b3.id && "h-5 rounded-none") })] })] }), (0, jsx_runtime_1.jsx)("span", { className: "text-as-primary/50 mb-1 mt-2", children: " to the address:" })] }), (0, jsx_runtime_1.jsx)(react_1.CopyToClipboard, { text: order.globalAddress, onCopy: () => {
|
|
346
346
|
sonner_1.toast.success("Copied to clipboard");
|
|
347
|
-
}, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background border-b3-react-border hover:border-as-brand group flex cursor-pointer items-center justify-between gap-4 rounded-lg border p-3 px-4 shadow-md transition-all duration-200", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary overflow-hidden text-ellipsis whitespace-nowrap text-sm", children: order.globalAddress }), (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "group-hover:text-as-brand text-as-primary/50 h-5 w-5 cursor-pointer transition-all duration-200" })] }) }), account?.address && !showQRCode ? ((0, jsx_runtime_1.jsxs)("div", { className: "mb-4 mt-8 flex w-full flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", textColor: "text-white", className: "flex w-5/6 items-center gap-2 sm:px-0", disabled: txLoading || isSwitchingOrExecuting, onClick: handlePayment, children: txLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Transaction Pending", (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "ml-2 h-5 w-5 animate-spin" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4 text-lg md:text-sm", children: "Pay from Connected Wallet" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) }), (0, jsx_runtime_1.jsxs)("span", { className: "label-style text-as-primary/50 text-xs", children: ["Connected to: ", (0, centerTruncate_1.default)(account?.address || "", 6)] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsxs)(react_1.ShinyButton, { accentColor: colorMode === "dark" ? "#ffffff" : "#000000", className: "flex w-5/6 items-center gap-2 sm:px-0", onClick: () => setShowQRCode(true), children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4 text-lg md:text-sm", children: "Pay from a different wallet" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_3.WalletMetamask, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletCoinbase, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletPhantom, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletTrust, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletWalletConnect, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)("span", { className: "label-style text-as-primary/30 text-xs", children: "& more" })] })] })] })) : ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, filter: "blur(10px)" }, animate: { opacity: 1, filter: "blur(0px)" }, transition: { duration: 0.5, ease: "easeInOut" }, className: "flex w-full items-center justify-evenly gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mt-8 flex flex-col items-center rounded-lg bg-white p-6 pb-3", children: [(0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeSVG, { value: (0, anyspend_1.getPaymentUrl)(order.globalAddress, BigInt(order.srcAmount), order.srcTokenAddress === anyspend_1.RELAY_ETH_ADDRESS ? "ETH" : order.srcTokenAddress),
|
|
347
|
+
}, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-b3-react-background border-b3-react-border hover:border-as-brand group flex cursor-pointer items-center justify-between gap-4 rounded-lg border p-3 px-4 shadow-md transition-all duration-200", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-as-primary overflow-hidden text-ellipsis whitespace-nowrap text-sm", children: order.globalAddress }), (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "group-hover:text-as-brand text-as-primary/50 h-5 w-5 cursor-pointer transition-all duration-200" })] }) }), account?.address && !showQRCode ? ((0, jsx_runtime_1.jsxs)("div", { className: "mb-4 mt-8 flex w-full flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative flex w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_1.ShinyButton, { accentColor: "hsl(var(--as-brand))", textColor: "text-white", className: "flex w-5/6 items-center gap-2 sm:px-0", disabled: txLoading || isSwitchingOrExecuting, onClick: handlePayment, children: txLoading ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Transaction Pending", (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "ml-2 h-5 w-5 animate-spin" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4 text-lg md:text-sm", children: "Pay from Connected Wallet" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] })) }), (0, jsx_runtime_1.jsxs)("span", { className: "label-style text-as-primary/50 text-xs", children: ["Connected to: ", (0, centerTruncate_1.default)(account?.address || "", 6)] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full flex-col items-center gap-2", children: [(0, jsx_runtime_1.jsxs)(react_1.ShinyButton, { accentColor: colorMode === "dark" ? "#ffffff" : "#000000", className: "flex w-5/6 items-center gap-2 sm:px-0", onClick: () => setShowQRCode(true), children: [(0, jsx_runtime_1.jsx)("span", { className: "pl-4 text-lg md:text-sm", children: "Pay from a different wallet" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "h-4 w-4" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_3.WalletMetamask, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletCoinbase, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletPhantom, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletTrust, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletWalletConnect, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)("span", { className: "label-style text-as-primary/30 text-xs", children: "& more" })] })] })] })) : ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, filter: "blur(10px)" }, animate: { opacity: 1, filter: "blur(0px)" }, transition: { duration: 0.5, ease: "easeInOut" }, className: "flex w-full items-center justify-evenly gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mt-8 flex flex-col items-center rounded-lg bg-white p-6 pb-3", children: [(0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeSVG, { value: (0, anyspend_1.getPaymentUrl)(order.globalAddress, BigInt(order.srcAmount), order.srcTokenAddress === anyspend_1.RELAY_ETH_ADDRESS ? "ETH" : order.srcTokenAddress), size: 200 }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-3 flex items-center justify-center gap-2 text-sm", children: [(0, jsx_runtime_1.jsx)("span", { className: "label-style text-as-brand/70 text-sm", children: "Scan with" }), (0, jsx_runtime_1.jsxs)(react_1.TextLoop, { interval: 3, children: [(0, jsx_runtime_1.jsx)(react_3.WalletMetamask, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletCoinbase, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletPhantom, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletTrust, { className: "h-5 w-5", variant: "branded" }), (0, jsx_runtime_1.jsx)(react_3.WalletWalletConnect, { className: "h-5 w-5", variant: "branded" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2", children: [account && ((0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "ghost", className: "text-as-primary w-full", onClick: handlePayment, children: ["Send Transaction ", (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "ml-2 h-4 w-4" })] })), anyspend_1.EVM_CHAINS[order.srcChain] ? ((0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "outline", className: "w-full", onClick: handlePayment, children: ["Open Metamask", (0, jsx_runtime_1.jsx)(react_3.WalletMetamask, { className: "ml-2 h-5 w-5", variant: "branded" })] })) : null, (0, jsx_runtime_1.jsx)("a", { href: handleCoinbaseRedirect(), children: (0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "outline", className: "w-full", children: ["Open Coinbase", (0, jsx_runtime_1.jsx)(react_3.WalletCoinbase, { className: "ml-2 h-5 w-5", variant: "branded" })] }) }), (0, jsx_runtime_1.jsx)("a", { href: handlePhantomRedirect(), children: (0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "outline", className: "w-full", children: ["Open Phantom", (0, jsx_runtime_1.jsx)(react_3.WalletPhantom, { className: "ml-2 h-5 w-5", variant: "branded" })] }) })] })] }))] })), (0, jsx_runtime_1.jsxs)("div", { className: "bg-as-light-brand/30 w-full rounded-lg p-4 sm:p-2 sm:px-4", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-as-secondary mb-3 text-sm", children: "Continue on another device?" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsx)(react_1.CopyToClipboard, { text: permalink, onCopy: () => {
|
|
348
348
|
sonner_1.toast.success("Copied to clipboard");
|
|
349
349
|
}, children: (0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "outline", className: "w-full", children: ["Copy Link", (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { className: "ml-2 h-3 w-3" })] }) }), (0, jsx_runtime_1.jsxs)(react_1.Button, { variant: "outline", className: "w-full", onClick: () => {
|
|
350
350
|
if (navigator.share) {
|
|
@@ -130,8 +130,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
130
130
|
} | null;
|
|
131
131
|
payload: {
|
|
132
132
|
contractAddress: string;
|
|
133
|
-
tokenId: number | null;
|
|
134
|
-
contractType: import("../../../anyspend/types").NftType;
|
|
135
133
|
nftPrice: string;
|
|
136
134
|
};
|
|
137
135
|
} | {
|
|
@@ -490,8 +488,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
490
488
|
} | null;
|
|
491
489
|
payload: {
|
|
492
490
|
contractAddress: string;
|
|
493
|
-
tokenId: number | null;
|
|
494
|
-
contractType: import("../../../anyspend/types").NftType;
|
|
495
491
|
nftPrice: string;
|
|
496
492
|
};
|
|
497
493
|
} | {
|
|
@@ -127,8 +127,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
127
127
|
} | null;
|
|
128
128
|
payload: {
|
|
129
129
|
contractAddress: string;
|
|
130
|
-
tokenId: number | null;
|
|
131
|
-
contractType: import("../..").NftType;
|
|
132
130
|
nftPrice: string;
|
|
133
131
|
};
|
|
134
132
|
} | {
|
|
@@ -451,8 +449,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
451
449
|
} | null;
|
|
452
450
|
payload: {
|
|
453
451
|
contractAddress: string;
|
|
454
|
-
tokenId: number | null;
|
|
455
|
-
contractType: import("../..").NftType;
|
|
456
452
|
nftPrice: string;
|
|
457
453
|
};
|
|
458
454
|
} | {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OnrampOptions } from "../../anyspend/react";
|
|
2
1
|
import { GetOrderAndTxsResponse, GetQuoteRequest, GetQuoteResponse, SendPermitDataRequestBody, Token } from "../../anyspend/types";
|
|
2
|
+
import { OnrampOptions } from "../../anyspend/react";
|
|
3
3
|
export declare const anyspendService: {
|
|
4
4
|
getTokenList: (isMainnet: boolean, chainId: number, query: string) => Promise<Token[]>;
|
|
5
5
|
getToken: (isMainnet: boolean, chainId: number, tokenAddress: string) => Promise<Token>;
|
|
@@ -150,8 +150,6 @@ export declare const anyspendService: {
|
|
|
150
150
|
} | null;
|
|
151
151
|
payload: {
|
|
152
152
|
contractAddress: string;
|
|
153
|
-
tokenId: number | null;
|
|
154
|
-
contractType: import("../../anyspend/types").NftType;
|
|
155
153
|
nftPrice: string;
|
|
156
154
|
};
|
|
157
155
|
} | {
|
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.anyspendService = void 0;
|
|
7
|
-
const constants_1 = require("../../anyspend/constants");
|
|
8
7
|
const types_1 = require("../../anyspend/types");
|
|
9
8
|
const utils_1 = require("../../anyspend/utils");
|
|
10
9
|
const invariant_1 = __importDefault(require("invariant"));
|
|
10
|
+
const constants_1 = require("../../anyspend/constants");
|
|
11
11
|
// Service functions
|
|
12
12
|
exports.anyspendService = {
|
|
13
13
|
getTokenList: async (isMainnet, chainId, query) => {
|
|
@@ -18,7 +18,6 @@ __exportStar(require("./req-res"), exports);
|
|
|
18
18
|
__exportStar(require("./chain"), exports);
|
|
19
19
|
__exportStar(require("./custom"), exports);
|
|
20
20
|
__exportStar(require("./globalWallet"), exports);
|
|
21
|
-
__exportStar(require("./metadata"), exports);
|
|
22
21
|
__exportStar(require("./nft"), exports);
|
|
23
22
|
__exportStar(require("./onramp"), exports);
|
|
24
23
|
__exportStar(require("./order"), exports);
|
|
@@ -68,18 +68,12 @@ export declare const zNft: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
68
68
|
export type Nft = z.infer<typeof zNft>;
|
|
69
69
|
export declare const zMintNftPayload: z.ZodObject<{
|
|
70
70
|
contractAddress: z.ZodString;
|
|
71
|
-
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
72
|
-
contractType: z.ZodNativeEnum<typeof NftType>;
|
|
73
71
|
nftPrice: z.ZodString;
|
|
74
72
|
}, "strip", z.ZodTypeAny, {
|
|
75
73
|
contractAddress: string;
|
|
76
|
-
tokenId: number | null;
|
|
77
|
-
contractType: NftType;
|
|
78
74
|
nftPrice: string;
|
|
79
75
|
}, {
|
|
80
76
|
contractAddress: string;
|
|
81
|
-
tokenId: number | null;
|
|
82
|
-
contractType: NftType;
|
|
83
77
|
nftPrice: string;
|
|
84
78
|
}>;
|
|
85
79
|
export declare const zMintNftMetadata: z.ZodObject<{
|
|
@@ -270,5 +264,4 @@ export interface NftContract {
|
|
|
270
264
|
name: string;
|
|
271
265
|
description: string;
|
|
272
266
|
tokenId: number | null;
|
|
273
|
-
type: NftType;
|
|
274
267
|
}
|
|
@@ -27,8 +27,6 @@ exports.zNft = zod_1.z.discriminatedUnion("type", [
|
|
|
27
27
|
]);
|
|
28
28
|
exports.zMintNftPayload = zod_1.z.object({
|
|
29
29
|
contractAddress: zod_1.z.string(),
|
|
30
|
-
tokenId: zod_1.z.number().nullable(),
|
|
31
|
-
contractType: zod_1.z.nativeEnum(NftType),
|
|
32
30
|
nftPrice: zod_1.z.string()
|
|
33
31
|
});
|
|
34
32
|
exports.zMintNftMetadata = zod_1.z.object({
|
|
@@ -487,18 +487,12 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
487
487
|
type: z.ZodLiteral<OrderType.MintNFT>;
|
|
488
488
|
payload: z.ZodObject<{
|
|
489
489
|
contractAddress: z.ZodString;
|
|
490
|
-
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
491
|
-
contractType: z.ZodNativeEnum<typeof import("./nft").NftType>;
|
|
492
490
|
nftPrice: z.ZodString;
|
|
493
491
|
}, "strip", z.ZodTypeAny, {
|
|
494
492
|
contractAddress: string;
|
|
495
|
-
tokenId: number | null;
|
|
496
|
-
contractType: import("./nft").NftType;
|
|
497
493
|
nftPrice: string;
|
|
498
494
|
}, {
|
|
499
495
|
contractAddress: string;
|
|
500
|
-
tokenId: number | null;
|
|
501
|
-
contractType: import("./nft").NftType;
|
|
502
496
|
nftPrice: string;
|
|
503
497
|
}>;
|
|
504
498
|
metadata: z.ZodObject<{
|
|
@@ -749,8 +743,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
749
743
|
} | null;
|
|
750
744
|
payload: {
|
|
751
745
|
contractAddress: string;
|
|
752
|
-
tokenId: number | null;
|
|
753
|
-
contractType: import("./nft").NftType;
|
|
754
746
|
nftPrice: string;
|
|
755
747
|
};
|
|
756
748
|
}, {
|
|
@@ -823,8 +815,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
823
815
|
} | null;
|
|
824
816
|
payload: {
|
|
825
817
|
contractAddress: string;
|
|
826
|
-
tokenId: number | null;
|
|
827
|
-
contractType: import("./nft").NftType;
|
|
828
818
|
nftPrice: string;
|
|
829
819
|
};
|
|
830
820
|
}>, z.ZodObject<{
|
|
@@ -267,18 +267,12 @@ export declare const zCreateOrderRequest: z.ZodObject<{
|
|
|
267
267
|
type: z.ZodLiteral<OrderType.MintNFT>;
|
|
268
268
|
payload: z.ZodObject<{
|
|
269
269
|
contractAddress: z.ZodString;
|
|
270
|
-
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
271
|
-
contractType: z.ZodNativeEnum<typeof import("../nft").NftType>;
|
|
272
270
|
nftPrice: z.ZodString;
|
|
273
271
|
}, "strip", z.ZodTypeAny, {
|
|
274
272
|
contractAddress: string;
|
|
275
|
-
tokenId: number | null;
|
|
276
|
-
contractType: import("../nft").NftType;
|
|
277
273
|
nftPrice: string;
|
|
278
274
|
}, {
|
|
279
275
|
contractAddress: string;
|
|
280
|
-
tokenId: number | null;
|
|
281
|
-
contractType: import("../nft").NftType;
|
|
282
276
|
nftPrice: string;
|
|
283
277
|
}>;
|
|
284
278
|
metadata: z.ZodObject<{
|
|
@@ -505,8 +499,6 @@ export declare const zCreateOrderRequest: z.ZodObject<{
|
|
|
505
499
|
srcAmount: string;
|
|
506
500
|
payload: {
|
|
507
501
|
contractAddress: string;
|
|
508
|
-
tokenId: number | null;
|
|
509
|
-
contractType: import("../nft").NftType;
|
|
510
502
|
nftPrice: string;
|
|
511
503
|
};
|
|
512
504
|
creatorAddress?: string | undefined;
|
|
@@ -564,8 +556,6 @@ export declare const zCreateOrderRequest: z.ZodObject<{
|
|
|
564
556
|
srcAmount: string;
|
|
565
557
|
payload: {
|
|
566
558
|
contractAddress: string;
|
|
567
|
-
tokenId: number | null;
|
|
568
|
-
contractType: import("../nft").NftType;
|
|
569
559
|
nftPrice: string;
|
|
570
560
|
};
|
|
571
561
|
creatorAddress?: string | undefined;
|
|
@@ -1465,8 +1455,6 @@ export declare const zCreateOrderRequest: z.ZodObject<{
|
|
|
1465
1455
|
srcAmount: string;
|
|
1466
1456
|
payload: {
|
|
1467
1457
|
contractAddress: string;
|
|
1468
|
-
tokenId: number | null;
|
|
1469
|
-
contractType: import("../nft").NftType;
|
|
1470
1458
|
nftPrice: string;
|
|
1471
1459
|
};
|
|
1472
1460
|
creatorAddress?: string | undefined;
|
|
@@ -1713,8 +1701,6 @@ export declare const zCreateOrderRequest: z.ZodObject<{
|
|
|
1713
1701
|
srcAmount: string;
|
|
1714
1702
|
payload: {
|
|
1715
1703
|
contractAddress: string;
|
|
1716
|
-
tokenId: number | null;
|
|
1717
|
-
contractType: import("../nft").NftType;
|
|
1718
1704
|
nftPrice: string;
|
|
1719
1705
|
};
|
|
1720
1706
|
creatorAddress?: string | undefined;
|
|
@@ -2226,18 +2212,12 @@ export declare const zCreateOrderResponse: z.ZodObject<{
|
|
|
2226
2212
|
type: z.ZodLiteral<OrderType.MintNFT>;
|
|
2227
2213
|
payload: z.ZodObject<{
|
|
2228
2214
|
contractAddress: z.ZodString;
|
|
2229
|
-
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
2230
|
-
contractType: z.ZodNativeEnum<typeof import("../nft").NftType>;
|
|
2231
2215
|
nftPrice: z.ZodString;
|
|
2232
2216
|
}, "strip", z.ZodTypeAny, {
|
|
2233
2217
|
contractAddress: string;
|
|
2234
|
-
tokenId: number | null;
|
|
2235
|
-
contractType: import("../nft").NftType;
|
|
2236
2218
|
nftPrice: string;
|
|
2237
2219
|
}, {
|
|
2238
2220
|
contractAddress: string;
|
|
2239
|
-
tokenId: number | null;
|
|
2240
|
-
contractType: import("../nft").NftType;
|
|
2241
2221
|
nftPrice: string;
|
|
2242
2222
|
}>;
|
|
2243
2223
|
metadata: z.ZodObject<{
|
|
@@ -2488,8 +2468,6 @@ export declare const zCreateOrderResponse: z.ZodObject<{
|
|
|
2488
2468
|
} | null;
|
|
2489
2469
|
payload: {
|
|
2490
2470
|
contractAddress: string;
|
|
2491
|
-
tokenId: number | null;
|
|
2492
|
-
contractType: import("../nft").NftType;
|
|
2493
2471
|
nftPrice: string;
|
|
2494
2472
|
};
|
|
2495
2473
|
}, {
|
|
@@ -2562,8 +2540,6 @@ export declare const zCreateOrderResponse: z.ZodObject<{
|
|
|
2562
2540
|
} | null;
|
|
2563
2541
|
payload: {
|
|
2564
2542
|
contractAddress: string;
|
|
2565
|
-
tokenId: number | null;
|
|
2566
|
-
contractType: import("../nft").NftType;
|
|
2567
2543
|
nftPrice: string;
|
|
2568
2544
|
};
|
|
2569
2545
|
}>, z.ZodObject<{
|
|
@@ -3666,8 +3642,6 @@ export declare const zCreateOrderResponse: z.ZodObject<{
|
|
|
3666
3642
|
} | null;
|
|
3667
3643
|
payload: {
|
|
3668
3644
|
contractAddress: string;
|
|
3669
|
-
tokenId: number | null;
|
|
3670
|
-
contractType: import("../nft").NftType;
|
|
3671
3645
|
nftPrice: string;
|
|
3672
3646
|
};
|
|
3673
3647
|
} | {
|
|
@@ -3992,8 +3966,6 @@ export declare const zCreateOrderResponse: z.ZodObject<{
|
|
|
3992
3966
|
} | null;
|
|
3993
3967
|
payload: {
|
|
3994
3968
|
contractAddress: string;
|
|
3995
|
-
tokenId: number | null;
|
|
3996
|
-
contractType: import("../nft").NftType;
|
|
3997
3969
|
nftPrice: string;
|
|
3998
3970
|
};
|
|
3999
3971
|
} | {
|
|
@@ -370,18 +370,12 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
|
|
|
370
370
|
type: z.ZodLiteral<import("../order").OrderType.MintNFT>;
|
|
371
371
|
payload: z.ZodObject<{
|
|
372
372
|
contractAddress: z.ZodString;
|
|
373
|
-
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
374
|
-
contractType: z.ZodNativeEnum<typeof import("..").NftType>;
|
|
375
373
|
nftPrice: z.ZodString;
|
|
376
374
|
}, "strip", z.ZodTypeAny, {
|
|
377
375
|
contractAddress: string;
|
|
378
|
-
tokenId: number | null;
|
|
379
|
-
contractType: import("..").NftType;
|
|
380
376
|
nftPrice: string;
|
|
381
377
|
}, {
|
|
382
378
|
contractAddress: string;
|
|
383
|
-
tokenId: number | null;
|
|
384
|
-
contractType: import("..").NftType;
|
|
385
379
|
nftPrice: string;
|
|
386
380
|
}>;
|
|
387
381
|
metadata: z.ZodObject<{
|
|
@@ -632,8 +626,6 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
|
|
|
632
626
|
} | null;
|
|
633
627
|
payload: {
|
|
634
628
|
contractAddress: string;
|
|
635
|
-
tokenId: number | null;
|
|
636
|
-
contractType: import("..").NftType;
|
|
637
629
|
nftPrice: string;
|
|
638
630
|
};
|
|
639
631
|
}, {
|
|
@@ -706,8 +698,6 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
|
|
|
706
698
|
} | null;
|
|
707
699
|
payload: {
|
|
708
700
|
contractAddress: string;
|
|
709
|
-
tokenId: number | null;
|
|
710
|
-
contractType: import("..").NftType;
|
|
711
701
|
nftPrice: string;
|
|
712
702
|
};
|
|
713
703
|
}>, z.ZodObject<{
|
|
@@ -1887,8 +1877,6 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
|
|
|
1887
1877
|
} | null;
|
|
1888
1878
|
payload: {
|
|
1889
1879
|
contractAddress: string;
|
|
1890
|
-
tokenId: number | null;
|
|
1891
|
-
contractType: import("..").NftType;
|
|
1892
1880
|
nftPrice: string;
|
|
1893
1881
|
};
|
|
1894
1882
|
} | {
|
|
@@ -2239,8 +2227,6 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
|
|
|
2239
2227
|
} | null;
|
|
2240
2228
|
payload: {
|
|
2241
2229
|
contractAddress: string;
|
|
2242
|
-
tokenId: number | null;
|
|
2243
|
-
contractType: import("..").NftType;
|
|
2244
2230
|
nftPrice: string;
|
|
2245
2231
|
};
|
|
2246
2232
|
} | {
|
|
@@ -2595,8 +2581,6 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
|
|
|
2595
2581
|
} | null;
|
|
2596
2582
|
payload: {
|
|
2597
2583
|
contractAddress: string;
|
|
2598
|
-
tokenId: number | null;
|
|
2599
|
-
contractType: import("..").NftType;
|
|
2600
2584
|
nftPrice: string;
|
|
2601
2585
|
};
|
|
2602
2586
|
} | {
|
|
@@ -2952,8 +2936,6 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
|
|
|
2952
2936
|
} | null;
|
|
2953
2937
|
payload: {
|
|
2954
2938
|
contractAddress: string;
|
|
2955
|
-
tokenId: number | null;
|
|
2956
|
-
contractType: import("..").NftType;
|
|
2957
2939
|
nftPrice: string;
|
|
2958
2940
|
};
|
|
2959
2941
|
} | {
|
|
@@ -352,18 +352,12 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
|
|
|
352
352
|
type: z.ZodLiteral<import("../order").OrderType.MintNFT>;
|
|
353
353
|
payload: z.ZodObject<{
|
|
354
354
|
contractAddress: z.ZodString;
|
|
355
|
-
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
356
|
-
contractType: z.ZodNativeEnum<typeof import("..").NftType>;
|
|
357
355
|
nftPrice: z.ZodString;
|
|
358
356
|
}, "strip", z.ZodTypeAny, {
|
|
359
357
|
contractAddress: string;
|
|
360
|
-
tokenId: number | null;
|
|
361
|
-
contractType: import("..").NftType;
|
|
362
358
|
nftPrice: string;
|
|
363
359
|
}, {
|
|
364
360
|
contractAddress: string;
|
|
365
|
-
tokenId: number | null;
|
|
366
|
-
contractType: import("..").NftType;
|
|
367
361
|
nftPrice: string;
|
|
368
362
|
}>;
|
|
369
363
|
metadata: z.ZodObject<{
|
|
@@ -614,8 +608,6 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
|
|
|
614
608
|
} | null;
|
|
615
609
|
payload: {
|
|
616
610
|
contractAddress: string;
|
|
617
|
-
tokenId: number | null;
|
|
618
|
-
contractType: import("..").NftType;
|
|
619
611
|
nftPrice: string;
|
|
620
612
|
};
|
|
621
613
|
}, {
|
|
@@ -688,8 +680,6 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
|
|
|
688
680
|
} | null;
|
|
689
681
|
payload: {
|
|
690
682
|
contractAddress: string;
|
|
691
|
-
tokenId: number | null;
|
|
692
|
-
contractType: import("..").NftType;
|
|
693
683
|
nftPrice: string;
|
|
694
684
|
};
|
|
695
685
|
}>, z.ZodObject<{
|
|
@@ -1792,8 +1782,6 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
|
|
|
1792
1782
|
} | null;
|
|
1793
1783
|
payload: {
|
|
1794
1784
|
contractAddress: string;
|
|
1795
|
-
tokenId: number | null;
|
|
1796
|
-
contractType: import("..").NftType;
|
|
1797
1785
|
nftPrice: string;
|
|
1798
1786
|
};
|
|
1799
1787
|
} | {
|
|
@@ -2118,8 +2106,6 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
|
|
|
2118
2106
|
} | null;
|
|
2119
2107
|
payload: {
|
|
2120
2108
|
contractAddress: string;
|
|
2121
|
-
tokenId: number | null;
|
|
2122
|
-
contractType: import("..").NftType;
|
|
2123
2109
|
nftPrice: string;
|
|
2124
2110
|
};
|
|
2125
2111
|
} | {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { QuoteDetails } from "@reservoir0x/relay-sdk";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { NftType } from "../nft";
|
|
4
3
|
import { OrderType } from "../order";
|
|
5
4
|
import { TradeType } from "../relay";
|
|
6
5
|
export declare const zGetQuoteRequest: z.ZodObject<{
|
|
@@ -37,14 +36,10 @@ export declare const zGetQuoteRequest: z.ZodObject<{
|
|
|
37
36
|
} & {
|
|
38
37
|
type: z.ZodLiteral<OrderType.MintNFT>;
|
|
39
38
|
contractAddress: z.ZodString;
|
|
40
|
-
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
41
|
-
contractType: z.ZodNativeEnum<typeof NftType>;
|
|
42
39
|
price: z.ZodString;
|
|
43
40
|
}, "strip", z.ZodTypeAny, {
|
|
44
41
|
type: OrderType.MintNFT;
|
|
45
42
|
contractAddress: string;
|
|
46
|
-
tokenId: number | null;
|
|
47
|
-
contractType: NftType;
|
|
48
43
|
srcChain: number;
|
|
49
44
|
dstChain: number;
|
|
50
45
|
srcTokenAddress: string;
|
|
@@ -53,8 +48,6 @@ export declare const zGetQuoteRequest: z.ZodObject<{
|
|
|
53
48
|
}, {
|
|
54
49
|
type: OrderType.MintNFT;
|
|
55
50
|
contractAddress: string;
|
|
56
|
-
tokenId: number | null;
|
|
57
|
-
contractType: NftType;
|
|
58
51
|
srcChain: number;
|
|
59
52
|
dstChain: number;
|
|
60
53
|
srcTokenAddress: string;
|
|
@@ -170,8 +163,6 @@ export declare const zGetQuoteRequest: z.ZodObject<{
|
|
|
170
163
|
} | {
|
|
171
164
|
type: OrderType.MintNFT;
|
|
172
165
|
contractAddress: string;
|
|
173
|
-
tokenId: number | null;
|
|
174
|
-
contractType: NftType;
|
|
175
166
|
srcChain: number;
|
|
176
167
|
dstChain: number;
|
|
177
168
|
srcTokenAddress: string;
|
|
@@ -218,8 +209,6 @@ export declare const zGetQuoteRequest: z.ZodObject<{
|
|
|
218
209
|
} | {
|
|
219
210
|
type: OrderType.MintNFT;
|
|
220
211
|
contractAddress: string;
|
|
221
|
-
tokenId: number | null;
|
|
222
|
-
contractType: NftType;
|
|
223
212
|
srcChain: number;
|
|
224
213
|
dstChain: number;
|
|
225
214
|
srcTokenAddress: string;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.zGetQuoteRequest = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const custom_1 = require("../custom");
|
|
6
|
-
const nft_1 = require("../nft");
|
|
7
5
|
const order_1 = require("../order");
|
|
8
6
|
const relay_1 = require("../relay");
|
|
7
|
+
const custom_1 = require("../custom");
|
|
9
8
|
const zGetQuoteBody = zod_1.z.object({
|
|
10
9
|
srcChain: zod_1.z.number(),
|
|
11
10
|
dstChain: zod_1.z.number(),
|
|
@@ -20,8 +19,6 @@ const zGetQuoteForSwapOrderBody = zGetQuoteBody.extend({
|
|
|
20
19
|
const zGetQuoteForMintNftOrderBody = zGetQuoteBody.extend({
|
|
21
20
|
type: zod_1.z.literal(order_1.OrderType.MintNFT),
|
|
22
21
|
contractAddress: zod_1.z.string(),
|
|
23
|
-
tokenId: zod_1.z.number().nullable(),
|
|
24
|
-
contractType: zod_1.z.nativeEnum(nft_1.NftType),
|
|
25
22
|
price: zod_1.z.string()
|
|
26
23
|
});
|
|
27
24
|
const zGetQuoteForJoinTournamentOrderBody = zGetQuoteBody.extend({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nft,
|
|
1
|
+
import { Nft, OrderType, Token, Tournament } from "../../anyspend/types";
|
|
2
2
|
export type OrderParams = {
|
|
3
3
|
orderType: OrderType;
|
|
4
4
|
srcToken: Token;
|
|
@@ -38,13 +38,13 @@ export declare const buildMetadata: (orderType: OrderType, params: OrderParams)
|
|
|
38
38
|
} | {
|
|
39
39
|
nft: (({
|
|
40
40
|
name: string;
|
|
41
|
-
type: NftType.ERC721;
|
|
41
|
+
type: import("../../anyspend/types").NftType.ERC721;
|
|
42
42
|
contractAddress: string;
|
|
43
43
|
description: string;
|
|
44
44
|
imageUrl: string;
|
|
45
45
|
} | {
|
|
46
46
|
name: string;
|
|
47
|
-
type: NftType.ERC1155;
|
|
47
|
+
type: import("../../anyspend/types").NftType.ERC1155;
|
|
48
48
|
contractAddress: string;
|
|
49
49
|
description: string;
|
|
50
50
|
imageUrl: string;
|
|
@@ -12,24 +12,10 @@ const buildPayload = (orderType, params) => {
|
|
|
12
12
|
actualDstAmount: null
|
|
13
13
|
};
|
|
14
14
|
case types_1.OrderType.MintNFT:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
tokenId: nft?.tokenId,
|
|
20
|
-
contractType: nft?.type
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
else if (nft?.type === types_1.NftType.ERC721) {
|
|
24
|
-
return {
|
|
25
|
-
contractAddress: (0, utils_1.normalizeAddress)(nft.contractAddress),
|
|
26
|
-
nftPrice: nft?.price || "",
|
|
27
|
-
contractType: nft?.type
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
throw new Error(`Invalid nft payload: ${JSON.stringify(nft)}`);
|
|
32
|
-
}
|
|
15
|
+
return {
|
|
16
|
+
contractAddress: nft ? (0, utils_1.normalizeAddress)(nft.contractAddress) : "",
|
|
17
|
+
nftPrice: nft?.price || ""
|
|
18
|
+
};
|
|
33
19
|
case types_1.OrderType.JoinTournament:
|
|
34
20
|
return {
|
|
35
21
|
contractAddress: tournament?.contractAddress,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PermissionsConfig } from "../../../../global-account/types/permissions";
|
|
2
2
|
import { Account } from "thirdweb/wallets";
|
|
3
|
-
import { B3ContextType } from "./types";
|
|
4
3
|
import "@reservoir0x/relay-kit-ui/styles.css";
|
|
4
|
+
import { B3ContextType } from "./types";
|
|
5
5
|
export declare const wagmiConfig: import("wagmi").Config<readonly [import("viem").Chain, ...import("viem").Chain[]], any, readonly import("wagmi").CreateConnectorFn[]>;
|
|
6
6
|
/**
|
|
7
7
|
* Main B3Provider component
|
|
@@ -12,8 +12,8 @@ const react_2 = require("thirdweb/react");
|
|
|
12
12
|
const wagmi_1 = require("wagmi");
|
|
13
13
|
const RelayKitProviderWrapper_1 = require("../RelayKitProviderWrapper");
|
|
14
14
|
const StyleRoot_1 = require("../StyleRoot");
|
|
15
|
-
const types_1 = require("./types");
|
|
16
15
|
require("@reservoir0x/relay-kit-ui/styles.css");
|
|
16
|
+
const types_1 = require("./types");
|
|
17
17
|
/**
|
|
18
18
|
* Default permissions configuration for B3 provider
|
|
19
19
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SignInWithB3ModalProps } from "../../../../global-account/react";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
|
|
3
|
+
type SignInWithB3Props = Omit<SignInWithB3ModalProps, "type" | "showBackButton"> & {
|
|
4
4
|
buttonText?: string | ReactNode;
|
|
5
5
|
loggedInButtonText?: string | ReactNode;
|
|
6
6
|
loadingButtonText?: string | ReactNode;
|
|
7
7
|
withLogo?: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare function SignInWithB3(props: SignInWithB3Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -3,16 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SignInWithB3 = SignInWithB3;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("../../../../global-account/react");
|
|
6
|
-
const react_2 = require("react");
|
|
7
|
-
const react_3 = require("
|
|
8
|
-
const
|
|
9
|
-
const Loading_1 = require("../ui/Loading");
|
|
6
|
+
const react_2 = require("../../../../global-account/react");
|
|
7
|
+
const react_3 = require("react");
|
|
8
|
+
const react_4 = require("thirdweb/react");
|
|
10
9
|
function SignInWithB3(props) {
|
|
11
|
-
const { setB3ModalOpen, setB3ModalContentType, setEcoSystemAccountAddress } = (0,
|
|
12
|
-
const account = (0,
|
|
10
|
+
const { setB3ModalOpen, setB3ModalContentType, setEcoSystemAccountAddress } = (0, react_2.useModalStore)();
|
|
11
|
+
const account = (0, react_4.useActiveAccount)();
|
|
13
12
|
const { isAuthenticating, isAuthenticated } = (0, react_1.useAuthentication)(props.partnerId, props.loginWithSiwe);
|
|
14
|
-
|
|
15
|
-
(0, react_2.useEffect)(() => {
|
|
13
|
+
(0, react_3.useEffect)(() => {
|
|
16
14
|
if (account) {
|
|
17
15
|
setEcoSystemAccountAddress(account.address);
|
|
18
16
|
}
|
|
@@ -25,11 +23,18 @@ function SignInWithB3(props) {
|
|
|
25
23
|
});
|
|
26
24
|
setB3ModalOpen(true);
|
|
27
25
|
};
|
|
26
|
+
const handleClickManageAccount = () => {
|
|
27
|
+
setB3ModalContentType({
|
|
28
|
+
...props,
|
|
29
|
+
type: "manageAccount"
|
|
30
|
+
});
|
|
31
|
+
setB3ModalOpen(true);
|
|
32
|
+
};
|
|
28
33
|
if (isAuthenticated) {
|
|
29
|
-
return (0, jsx_runtime_1.jsx)(
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(react_2.StyleRoot, { children: (0, jsx_runtime_1.jsxs)(react_2.Button, { onClick: handleClickManageAccount, style: { backgroundColor: "#3368ef" }, className: "flex items-center gap-2 text-white", children: [props.withLogo !== false && ((0, jsx_runtime_1.jsx)("img", { src: "https://cdn.b3.fun/b3_logo_white.svg", alt: "B3 Logo", className: "h-5 w-5" })), props.loggedInButtonText || "Manage Account"] }) }));
|
|
30
35
|
}
|
|
31
36
|
if (isAuthenticating) {
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(react_2.StyleRoot, { children: (0, jsx_runtime_1.jsxs)(react_2.Button, { disabled: true, style: { backgroundColor: "#3368ef" }, className: "flex items-center gap-2 text-white", children: [props.withLogo !== false && ((0, jsx_runtime_1.jsx)("img", { src: "https://cdn.b3.fun/b3_logo_white.svg", alt: "B3 Logo", className: "h-5 w-5" })), props.loadingButtonText || "Signing in..."] }) }));
|
|
33
38
|
}
|
|
34
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(react_2.StyleRoot, { children: (0, jsx_runtime_1.jsx)(react_2.Button, { onClick: handleClick, style: { backgroundColor: "#3368ef" }, className: "flex items-center gap-2 font-medium text-white", children: props.buttonText ? (props.buttonText) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { children: "Sign in with" }), props.withLogo !== false && ((0, jsx_runtime_1.jsx)("img", { src: "https://cdn.b3.fun/b3_logo_white.svg", alt: "B3 Logo", className: "h-5 w-6" }))] })) }) }));
|
|
35
40
|
}
|
|
@@ -5,5 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const useB3_1 = require("./B3Provider/useB3");
|
|
6
6
|
function StyleRoot({ children, id }) {
|
|
7
7
|
const { theme: b3Theme } = (0, useB3_1.useB3)();
|
|
8
|
+
// eslint-disable-next-line tailwindcss/no-custom-classname
|
|
8
9
|
return ((0, jsx_runtime_1.jsx)("div", { className: "b3-root", id: id, "data-theme": b3Theme, children: children }));
|
|
9
10
|
}
|