A UX‑first Solana frontend and API for sending native SOL or SPL‑token payments, minting a memorable 3‑emoji wallet identity, and eventually enabling private (confidential) transfers via MagicBlock’s epoch‑olymp rollups.
- Public payments – stake or wallet‑to‑wallet SOL/SPL transfers via a connected Privy wallet.
- Emoji identity – mint a 3‑emoji NFT that registers on the Solana Name Service (SNS) and instantly resolves to your wallet address.
- MagicBlock private transfers – (planned) Ephemeral rollup‑enabled confidential transfers that keep amounts hidden from the public ledger.
- Developer friendly – well‑documented server‑route handlers (
/api/mint,/api/resolve), easy‑to‑extend payment helpers, and a thin Next.js UI.
npm install
npm run dev// Next.js handler (app/api/mint/route.ts) automatically handles the mint.
// Client example
const { emojis, solName } = usePaymojiStore();
const response = await fetch("/api/mint", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
owner: walletAddr,
emojis, // 3‑emoji array
solName, // short .sol name
wallet: walletAddr,
}),
});
const result = await response.json();const res = await fetch("/api/resolve", {
method: "POST",
body: JSON.stringify({ identifier: "👻🦊🦚" }),
});
const { wallet, emoji_combo, sol_name } = await res.json();import { publicPayment } from "@/lib/payments";
const tx = await publicPayment(
{
mode: "public",
amount: 0.1,
recipient: resolvedAddress,
network: "devnet",
chain: "solana",
token: "SOL",
publicKey: walletAddr,
},
wallet,
);MagicBlock provides a zero‑knowledge API for private transfers. Once hooked, the flow becomes:
- Create a transfer intent (JSON body with
from,to,amount,token). - Sign the intent off‑chain with the user’s private key.
- POST signed intent to MagicBlock private‑transfer endpoint.
- MagicBlock rolls the transfer, writes a commitment on‑chain, and returns a transaction ID and explorer URL.
⚠️ The private‑transfer route is not yet implemented; this section serves as a roadmap.
# Install dependencies
npm ci
# Run tests (to be added)
npm test
# Run lint & format checks
npm run lint
npm run formatPull requests are welcome. Run the full test suite before submitting:
npm testMIT