"use client"; import { FormEvent, useEffect, useState } from "react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import Navbar from "@/components/Navbar"; import { useAccount } from "@/contexts/AccountContext"; import { useWallet } from "@/contexts/WalletContext"; import { getMerchantBtcAddress, isMerchantBtcConfigured } from "@/lib/merchantBtc"; export default function AddFundsPage() { const router = useRouter(); const { user, hydrated } = useAccount(); const { usdStoreCredit, verifyBtcDeposit } = useWallet(); const [txid, setTxid] = useState(""); const [busy, setBusy] = useState(false); const [msg, setMsg] = useState<{ kind: "ok" | "err"; text: string } | null>(null); const processorUrl = (process.env.NEXT_PUBLIC_BITCOIN_CHECKOUT_URL || "").trim(); useEffect(() => { if (hydrated && !user) router.replace("/sign-in?next=/account/add-funds"); }, [hydrated, user, router]); if (!hydrated || !user) { return (
account
One CyberLux handle — same USD balance on hub, market, forum, exchange, and checkout. Send Bitcoin to
your configured receiving address, wait for at least one confirmation, then paste the transaction id
here. We verify on-chain pays to{" "}
MERCHANT_BTC_ADDRESS and credit USD at spot (see{" "}
/api/btc/verify).
Current balance
${usdStoreCredit.toFixed(2)} USD
Open your hosted payment / BTCPay / processor page (set{" "}
NEXT_PUBLIC_BITCOIN_CHECKOUT_URL).
Set NEXT_PUBLIC_MERCHANT_BTC_ADDRESS and{" "}
MERCHANT_BTC_ADDRESS in{" "}
.env.local, restart Next, then reload this page.
Send from any wallet. After one confirmation, paste the 64-character txid. Credit is computed from outputs paying this address only.
Dashboard {" · "} Cross-onion identity {" · "} Hub