DEV Community

Cover image for Bring Bitcoin to your app now in minutes
Akashneelesh
Akashneelesh

Posted on

Bring Bitcoin to your app now in minutes

You've thought about adding Bitcoin. Here's why you haven't done it yet.

Every time you look into adding Bitcoin to your app, you hit the same wall: wallets, private keys, gas fees, node infrastructure, security audits. Suddenly it's a 6-month project that requires hiring specialists.

It doesn't have to be.


We built this so you don't have to

Starkzap is an open-source TypeScript SDK that lets any application (web app, mobile app, backend service) integrate Bitcoin with no blockchain experience required.

npm install starkzap
Enter fullscreen mode Exit fullscreen mode

That's your starting point. From there, you get:

  • Gasless transactions. Built-in paymaster means your users never pay network fees.
  • Social login. Google, Apple, email, passkeys. No seed phrases, no "write down these 12 words."
  • Token transfers. BTC, USDC, ETH, and 50+ tokens. Single recipient or batch.
  • Bitcoin staking. Real yield for your users, one line of code.
  • Works everywhere. Web, React Native, Node.js. Same API across all platforms.

Your users never see anything unfamiliar. No wallet popups. No confirmation dialogs with hex strings. No gas tokens. They just see your app, and it works.


What does this actually look like?

Here's what "15 minutes" means. Not in theory. In code.

1. Set up the SDK (30 seconds)

import { StarkSDK } from "starkzap";

const sdk = new StarkSDK({
  network: "mainnet",
  paymaster: { nodeUrl: "/api/paymaster" },
});
Enter fullscreen mode Exit fullscreen mode

Done. Your app now has a payment backend.

2. Let users sign in with email (2 minutes)

No new login flow for your users to learn. They enter their email, get a one-time code, and they're in. Behind the scenes, they now have a wallet, but they don't need to know that.

const { wallet } = await sdk.onboard({
  strategy: OnboardStrategy.Privy,
  feeMode: "sponsored",
  privy: {
    resolve: async () => ({
      walletId: user.walletId,
      publicKey: user.publicKey,
      serverUrl: "/api/wallet/sign",
    }),
  },
});
Enter fullscreen mode Exit fullscreen mode

Or if you prefer social login (Google, Apple, passkeys):

const { wallet } = await sdk.onboard({
  strategy: OnboardStrategy.Cartridge,
  feeMode: "user_pays",
});
Enter fullscreen mode Exit fullscreen mode

Either way, wallet is the same object. Your downstream code doesn't change.

3. Send Bitcoin (1 minute)

import { Amount, fromAddress, mainnetTokens } from "starkzap";

const tx = await wallet.transfer(mainnetTokens.WBTC, [
  { to: fromAddress(recipientAddress), amount: Amount.parse("0.01", mainnetTokens.WBTC) },
]);

await tx.wait();
Enter fullscreen mode Exit fullscreen mode

That's a confirmed Bitcoin transfer. Three lines. The user clicked "Send," saw a success message, and moved on with their day.

4. Let users earn yield on their Bitcoin (2 minutes)

Your users are holding Bitcoin in your app. Instead of it sitting there, they can earn yield on it, and you can offer this with almost no code:

// Find available staking pools
const pools = await sdk.getStakerPools(validatorAddress);

// Stake Bitcoin into a pool
const tx = await wallet.enterPool(pools[0].poolContract, Amount.parse("0.05", WBTC));
await tx.wait();

// Check how much they've earned
const position = await wallet.getPoolPosition(pools[0].poolContract);
console.log(`Earning: ${position.rewards.toFormatted()}`);

// Claim rewards whenever they want
await wallet.claimPoolRewards(pools[0].poolContract);
Enter fullscreen mode Exit fullscreen mode

Your app now has a savings product. Users deposit, earn yield, withdraw whenever they want. A traditional fintech team would spend months building this with banking partners.

5. Batch payments (1 minute)

Need to send payments to multiple people at once? Payroll, splits, rewards distribution. One call:

const tx = await wallet.transfer(mainnetTokens.USDC, [
  { to: fromAddress(alice), amount: Amount.parse("500", mainnetTokens.USDC) },
  { to: fromAddress(bob), amount: Amount.parse("300", mainnetTokens.USDC) },
  { to: fromAddress(carol), amount: Amount.parse("200", mainnetTokens.USDC) },
]);
Enter fullscreen mode Exit fullscreen mode

Three payments, one transaction, sub-cent fees. Compare that to three separate bank transfers with ACH delays and $25 wire fees.


What your users see vs. what actually happens

Here's the user experience:

What the user sees What's actually happening
"Enter your email" A secure wallet is created server-side
"Send $50 to Sarah" An on-chain token transfer executes in ~500 ms
"Earn 5% on your balance" Delegation staking on a validator with audited contracts
"Withdraw anytime" Unstaking + transfer back to user's wallet
"No fees" A paymaster sponsors the transaction cost

There is no moment where your user thinks "this is crypto." They think "this is a really good app."


4+ tokens, ready to go

Starkzap ships with presets for every major token. No contract addresses to look up, no ABI files to import:

import { mainnetTokens } from "Starkzap";

mainnetTokens.WBTC    // Bitcoin
mainnetTokens.ETH     // Ether
mainnetTokens.USDC    // USD Coin
mainnetTokens.STRK    // Starknet token
Enter fullscreen mode Exit fullscreen mode

Each token comes with its name, symbol, decimal precision, and logo. Balance queries are one line:

const balance = await wallet.balanceOf(mainnetTokens.WBTC);
console.log(balance.toFormatted()); // "0.5 WBTC"
Enter fullscreen mode Exit fullscreen mode

The Amount class handles all the decimal math so you never accidentally send 100x the intended amount. (This has actually cost real companies real money.)


Why this beats traditional payment rails

If you're building a product that moves money, here's what you're probably dealing with today:

Traditional rails With Starkzap
3-5 business days for ACH ~2 seconds to confirmation
$25+ wire fees Sub-cent (or zero with paymaster)
US-only or region-locked Global by default
Bank partnerships and compliance vendors npm install starkzap
Separate savings/yield requires banking license Built-in staking, no license needed
Hours to integrate Stripe/Plaid/etc 15 minutes to first transaction

You don't have to replace your entire payment stack. This gives you an option that's faster, cheaper, and global, and you can add it in an afternoon.


Who is this for?

Fintech apps that want Bitcoin savings, cross-border payments, or multi-currency wallets without building from scratch.

Marketplaces that need escrow, instant settlement, and multi-party payment splits in a single transaction.

Creator platforms where fans tip, subscribe, or pay creators directly. Batch payouts to multiple creators at once.

Rewards and loyalty apps that issue tokens, let users trade or stake their rewards, or offer yield on accumulated points.

Remittance products that send USDC across borders for fractions of a cent. Recipients cash out locally.

Gaming and entertainment apps with in-app currency that has real value, instant transfers between players, and yield on idle balances.

Any app with a "wallet" or "balance" feature. If your users hold any form of value in your app, Starkzap lets that value do more.


The stack under the hood (you don't need to touch it)

Everything runs on production infrastructure, fully abstracted:

  • Privy handles wallet infrastructure. Creates and manages wallets server-side. Users authenticate with email or social login. No private keys in the browser.
  • AVNU is the paymaster service. Sponsors transaction fees so your users pay nothing. Covered by default.
  • Cartridge provides session-based wallets with social login. Pre-approved transaction types mean zero popups during normal usage.

You don't configure any of this manually. The SDK handles it. You call functions, your users see results.


Growth funding up to $1,000,000

For apps that ship and show traction, there's a path to grants and investment:

  • Early-stage builders get access to technical support and ecosystem resources
  • Apps that demonstrate real users and growth can apply for grants up to $1,000,000
  • The funding covers infrastructure costs, marketing, and development to help you go from prototype to product

If you build something real on Starkzap and users love it, there's funding to help you grow it.


$3,000 bounty, open for the next 2 weeks

Want to get started right now? There's money on the table.

Build a prototype using Starkzap and submit it:

  • $1,500 for the best overall build
  • $1,000 for the runner up
  • $500 for the most creative integration

To enter: Build your app, then submit a PR at github.com/keep-starknet-strange/awesome-Starkzap

The quickstart takes about 15 minutes. There are working example apps for web, mobile, and server in the repo. Fork one and make it yours.


Get started now

The SDK is open-source and MIT-licensed.

Source code and quickstart: github.com/keep-starknet-strange/x

Projects built with Starkzap: github.com/keep-starknet-strange/awesome-Starkzap

npm install starkzap
Enter fullscreen mode Exit fullscreen mode

Fifteen minutes from now, your app could support Bitcoin.

Top comments (0)