primer · onchain

Four onchain primitives, demystified.

Every idea in this repo leans on one of four Tron primitives. Each one runs against Tron Shasta (a free public testnet) so you can ship a verifiable demo with zero hosting and zero TRX spent by your users.

The six secrets

Add these in your Lovable project (Settings → Secrets) before pasting any mega-prompt:

  • TRON_PRIVATE_KEY64-hex Shasta deployer key. Fund at the Shasta faucet.open ↗
  • TRONGRID_API_KEYSent as the TRON-PRO-API-KEY header on every read. Free tier.open ↗
  • TRONSCAN_API_KEYOptional — only for automated source verification.open ↗
  • PRIVY_APP_IDGoogle sign-in + embedded Tron wallet via Privy.open ↗
  • TRANSATRON_SPENDER_KEYMainnet only — reserved for a future mainnet swap. Unused on Shasta.open ↗
  • PINATA_JWTPin to IPFS.open ↗
wallet UX

Privy Tron social sign-in

249 ideas use this
kernel
Privy embedded Tron wallet bootstrapped with PRIVY_APP_ID — Google sign-in so users never install TronLink; the app builds the tx with TronGrid Shasta, the user signs the txID with Privy's raw signer, and the server broadcasts via TronGrid (free Shasta bandwidth covers small transactions).
how it drives the UI
a one-click 'Sign in with Google' that drops the user straight into the app with a base58 Tron identity and a working wallet