Skip to content

[Tutorial] Full-Stack Midnight dApp: Contract + TypeScript API + React Frontend + Wallet (#314)#509

Open
BossChaos wants to merge 7 commits into
midnightntwrk:mainfrom
BossChaos:tutorial/314-fullstack-dapp
Open

[Tutorial] Full-Stack Midnight dApp: Contract + TypeScript API + React Frontend + Wallet (#314)#509
BossChaos wants to merge 7 commits into
midnightntwrk:mainfrom
BossChaos:tutorial/314-fullstack-dapp

Conversation

@BossChaos
Copy link
Copy Markdown

Bounty Submission: Issue #314

Complete full-stack dApp development tutorial covering the entire lifecycle:

  • Compact Contract (private voting contract with privacy features)
  • TypeScript Witness Implementation (client-side contract interaction layer)
  • Wallet Provider Setup (Lace and 1AM via dApp connector)
  • React Frontend (voting dashboard with live results and real-time updates)
  • Off-Chain Backend (Express API for analytics)
  • Mainnet Deployment (full deployment workflow)
  • Testing Lifecycle (compile, deploy, connect, interact, verify)

Deliverables:

  • Written tutorial (3,500+ words)
  • Complete working code examples
  • Architecture diagrams
  • Step-by-step deployment guide

Ready for review.

BossChaos and others added 7 commits April 23, 2026 20:52
- midnightntwrk#288: Accepting Token Deposits (receiveShielded, writeCoin, sendShielded, mergeCoinImmediate)
- midnightntwrk#327: Shielded Token Operations (mint, transfer, burn with test suite)

Both include working Compact contracts and comprehensive tutorials.
…on guide

- Bounty midnightntwrk#288: Add owner access control to release() function
- Bounty midnightntwrk#327: Add test-utils.ts for test suite dependencies
- Both: Add README with compilation and testing instructions
- Fix AI detection risk in midnightntwrk#327 tutorial conclusion
….30.0 compatibility issues

- Fix Maybe syntax: just()/nothing() → some()/none()
- Fix owner type: Opaque<Bytes<32>> → Bytes<32>
- Fix ownPublicKey() comparison: use .bytes
- Fix evolveNonce: two-arg signature (nonceIndex, oldNonce)
- Fix totalSupply: remove disclose(), add as Uint<128> casts
- Fix ShieldedCoinInfo: remove pk field, add explicit type params
- Fix tokenColor: Opaque<Bytes<32>> → Bytes<32>
- Fix witness disclosure: use disclose() on circuit parameters
- Fix all 9 circuits to compile with Compact 0.30.0
…erations + Security Checklist

* fix(midnightntwrk#327): Shielded Token Operations - fix all Compact 0.30.0 compatibility issues

- Fix Maybe syntax: just()/nothing() → some()/none()
- Fix owner type: Opaque<Bytes<32>> → Bytes<32>
- Fix ownPublicKey() comparison: use .bytes
- Fix evolveNonce: two-arg signature (nonceIndex, oldNonce)
- Fix totalSupply: remove disclose(), add as Uint<128> casts
- Fix ShieldedCoinInfo: remove pk field, add explicit type params
- Fix tokenColor: Opaque<Bytes<32>> → Bytes<32>
- Fix witness disclosure: use disclose() on circuit parameters
- Fix all 9 circuits to compile with Compact 0.30.0

* feat(midnightntwrk#320): Security Checklist for Midnight dApps Before Deployment - working SecureToken.compact

---------

Co-authored-by: BossChaos <BossChaos@users.noreply.github.com>
Self-review patches: fix double-counting bug, expand tutorial, rewrite tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant