Five Bitcoin primitives.
Every idea in this repo leans on one of five primitives. Each runs against Bitcoin testnet4 or Spark REGTEST — free, fast, and verifiable on public explorers.
OP_RETURN on testnet4
The narrowest Bitcoin provenance primitive: a 32-byte SHA-256 anchored in an OP_RETURN output of a testnet4 transaction. Wallet-independent, verifiable on mempool.space, and the exact same script Bitcoin has supported for a decade.
Ordinals inscription
A taproot inscription that writes the artifact's bytes directly into a testnet4 witness, minting an inscription ID owned by the creator's address. Provenance and content in one tx.
IPFS via Pinata
Bitcoin is a bad place to store bytes. Pinata pins the payload to IPFS and returns a CID; OP_RETURN / inscriptions anchor a hash of that CID. Payload and proof, cleanly separated.
Privy Spark sign-in
Privy's `chainType: 'spark'` mints an embedded Bitcoin L2 wallet on Google/email sign-in. No seed phrase, no extension. The wallet exposes a Spark address for instant sats transfers and a testnet4 BTC deposit address for on-chain funding.
Spark sats paywall
User signs a Spark `transfer` for N sats via Privy. Merchant wallet (server-side, holding PRIVY_APP_SECRET) polls `getTransfers` to confirm receipt, then releases the payload. Instant, sub-cent, Bitcoin-native.
Two runtime secrets.
- PRIVY_APP_IDPrivy dashboard → your app. Configure a Spark-enabled app to mint Bitcoin L2 wallets on sign-in. →
- PRIVY_APP_SECRETServer-side. Required for the merchant wallet to observe Spark transfers via the Privy RPC. →
- PINATA_JWTPinata JWT with pin permissions. Used to pin images / JSON / manifests to IPFS. →
Bitcoin testnet4 coins come from mempool.space/testnet4/faucet — no account required.