Skip to content

KodeSage/starkzappypay

Repository files navigation

starkzappypay ⚑

Starknet Mainnet Gasless License Version

Gasless crypto tip links on Starknet. No wallet setup. No gas fees. Just a link.

starkzappypay lets anyone create a shareable payment link and receive STRK, USDC, or ETH from anyone β€” using only a social login (Email, Farcaster). Built on Starknet using the Starkzap SDK.


Live Demo

πŸ”— **starkzappypay.vercel.app


How It Works

For creators

  1. Enter an optional username (e.g. @alice) and your Starknet address
  2. Add an optional message β€” "Buy me a coffee β˜•"
  3. Optionally set a preferred receive token, a tip goal label, and target amount
  4. Hit Generate β€” your link is saved and ready: /pay/@alice
  5. Share it in your bio, Linktree, or anywhere

For tippers

  1. Open the creator's link β€” starkzappypay.vercel.app/pay/@alice
  2. The username resolves to the creator's address automatically
  3. Sign in with Email or Farcaster β€” no seed phrase, no wallet extension
  4. Pick a token (STRK, USDC, ETH), enter an amount, hit Send
  5. If your token differs from the creator's preferred token, it's auto-swapped via AVNU
  6. Done β€” zero gas paid

Features

Feature Details
Username links /pay/@alice β€” clean, human-readable, globally resolvable
Persistent usernames Username β†’ address stored in Supabase, works on any device
Gasless transactions AVNU Paymaster sponsors all fees β€” tippers never pay gas
Social login Privy embedded wallet β€” email, Google, Apple, Twitter, Discord
No seed phrase EVM embedded wallet derives a Starknet key via grindKey
Auto account deploy Argent account deployed on first use, fee sponsored
Multi-token STRK, USDC, ETH β€” tipper picks at send time
Token auto-swap Tipper sends any token; creator receives their preferred token via AVNU swap
Wall of Tips Live feed of supporters β€” name, message, amount, and Voyager link per tip
Top Supporters leaderboard Tab on the tip page ranking tippers by cumulative count; drives repeat behaviour
Tipping streaks Returning tippers see "You've supported @alice N times!" β€” gamification with no extra infra
QR code generation One-click QR modal for any /pay/@username link β€” downloadable PNG, violet-themed
Auto-tweet after tipping Post-success share prompt: pre-filled tweet with creator handle and tip link
Tip goals Creator sets a goal label + target amount; progress bar fills live
Goal reached UX Goal card goes green with "tips still welcome" β€” form stays open, no hard cap
On-chain proof Every supporter entry links to Voyager for transaction verification
Mainnet Deployed and running on Starknet Mainnet

Starkzap SDK Integration

starkzappypay is built on three Starkzap modules:

1. Wallets

Privy handles social login. After authentication, the EVM embedded wallet signs a fixed derivation message. We use ec.starkCurve.grindKey to produce a deterministic Starknet private key β€” no seed phrase ever exposed.

const signature = await evmProvider.request({
  method: 'personal_sign',
  params: ['starkzappypay: authorize my Starknet wallet', address],
})
const starkPrivKey = ec.starkCurve.grindKey(signature)
const signer = new StarkSigner(starkPrivKey)

2. Paymaster

AVNU Paymaster is configured at SDK init. Every transaction is executed with feeMode: "sponsored" β€” users never need gas tokens.

const sdk = new StarkZap({
  network: 'mainnet',
  paymaster: {
    nodeUrl: 'https://starknet.paymaster.avnu.fi',
    headers: { 'x-paymaster-api-key': AVNU_API_KEY },
  },
})

const wallet = await sdk.connectWallet({
  account: { signer, accountClass: ArgentXV050Preset },
  feeMode: 'sponsored',
})
await wallet.ensureReady({ deploy: 'if_needed', feeMode: 'sponsored' })

3. Token Transfer

Direct ERC-20 transfer executed gaslessly when no swap is needed.

const tx = await wallet.execute([{
  contractAddress: token.address,
  entrypoint: 'transfer',
  calldata: CallData.compile({ recipient, amount: uint256.bnToUint256(amount) }),
}], { feeMode: 'sponsored' })

4. Token Swap via AVNU (v0.2.0)

When the tipper's selected token differs from the creator's preferred token, the flow runs as two sequential sponsored transactions to stay within AVNU paymaster simulation constraints.

Step 1 β€” Swap: fetch a fresh quote from AVNU v3, build calldata with includeApprove: true, execute approve + swap. USDC lands in the sender's wallet. Wait for confirmation.

Step 2 β€” Transfer: send the received USDC to the creator's address.

// Step 1: approve + swap (USDC β†’ sender wallet)
const swapCalls = await buildSwapCalls(quote.quoteId, wallet.address)
const swapTx = await wallet.execute(swapCalls, { feeMode: 'sponsored' })
await provider.waitForTransaction(swapTx.hash)

// Step 2: transfer USDC to creator
const minReceived = (BigInt(quote.buyAmount) * BigInt(995)) / BigInt(1000)
await wallet.execute([{
  contractAddress: USDC_ADDRESS,
  entrypoint: 'transfer',
  calldata: CallData.compile({ recipient: creatorAddress, amount: uint256.bnToUint256(minReceived) }),
}], { feeMode: 'sponsored' })

Supported Tokens

Token Decimals Mainnet Address
STRK 18 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d
USDC 6 0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8
ETH 18 0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7

Important Notes

  • The Starknet wallet address shown in the app is derived from your Privy EVM signature β€” it is a fresh address separate from your existing Argent or Braavos wallet
  • Fund this address from your main Starknet wallet before tipping
  • Usernames are stored in Supabase and resolve globally β€” any device, any browser
  • The AVNU API key is included in the frontend bundle β€” for production, proxy paymaster requests through a backend endpoint
  • Tip goal progress is calculated from the tips table using the creator's preferred token β€” tips logged after a swap correctly record the received token, not the sent token

Built With

  • Starkzap SDK β€” wallet + paymaster + DeFi modules for Starknet
  • Privy β€” embedded wallets and social auth
  • AVNU β€” DEX aggregator (swap v3 API) and paymaster on Starknet
  • Supabase β€” username β†’ address storage and tips feed
  • starknet.js β€” Starknet JavaScript library
  • Voyager β€” Starknet block explorer (linked per tip)

Changelog

v0.2.0

  • Wall of Tips β€” live supporter feed with names, messages, amounts
  • Top Supporters leaderboard β€” tab ranking tippers by cumulative tip count
  • Tipping streaks β€” returning tippers see personalised "N times" banner
  • QR code generation β€” one-click modal with violet-themed PNG download
  • Auto-tweet after tipping β€” pre-filled tweet prompting followers to tip the same creator
  • Tip goals β€” creator-set targets with live progress bar
  • Goal reached UX β€” green card, "tips still welcome" message, no hard cap
  • Token auto-swap β€” AVNU v3 two-step sponsored swap flow
  • On-chain proof β€” every supporter links to Voyager transaction
  • Fixed USDC contract address to canonical Circle USDC on Starknet mainnet
  • Fixed AVNU swap to use v3 API with correct { calls } response shape

v0.1.0

  • Username links (/pay/@username)
  • Social login via Privy (Email, Google, Apple, Twitter, Farcaster)
  • Gasless STRK / USDC / ETH transfers via AVNU Paymaster
  • Auto Argent account deploy on first use

License

MIT β€” free to use, fork, and build on.


Built for the Starkzap Builder Program Β· Starknet Mainnet Β· March 2026

About

starkzappypay lets anyone create a shareable payment link and receive STRK, USDC, or ETH from anyone , using only a social login (Google, Email & Farcaster). Built on Starknet using the Stark Zap SDK.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages