<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Martin Rivero</title>
    <description>The latest articles on DEV Community by Martin Rivero (@martinrivero15).</description>
    <link>https://dev.to/martinrivero15</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3637628%2F75abf2d3-35a2-42c7-b270-834786b6c186.jpeg</url>
      <title>DEV Community: Martin Rivero</title>
      <link>https://dev.to/martinrivero15</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/martinrivero15"/>
    <language>en</language>
    <item>
      <title>Build Your First Privacy-Preserving App on Midnight Network</title>
      <dc:creator>Martin Rivero</dc:creator>
      <pubDate>Sun, 14 Dec 2025 22:34:53 +0000</pubDate>
      <link>https://dev.to/martinrivero15/build-your-first-privacy-preserving-app-on-midnight-network-1l4c</link>
      <guid>https://dev.to/martinrivero15/build-your-first-privacy-preserving-app-on-midnight-network-1l4c</guid>
      <description>&lt;p&gt;If you’ve been curious about &lt;strong&gt;privacy-first blockchain applications&lt;/strong&gt;, the &lt;strong&gt;Midnight Network (MN)&lt;/strong&gt; is an exciting playground. With MN, you can build &lt;strong&gt;DApps&lt;/strong&gt; that use &lt;strong&gt;Zero-Knowledge Proofs (ZKPs)&lt;/strong&gt; to protect sensitive data while still interacting with the blockchain in a verifiable way. The magic? &lt;strong&gt;Selective disclosure&lt;/strong&gt;—users can prove specific information without exposing everything.&lt;/p&gt;

&lt;p&gt;Here’s a practical guide to get started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quick Start with &lt;code&gt;create-mn-app&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;create-mn-app&lt;/code&gt; CLI scaffolds Midnight Network applications with zero configuration. It comes preconfigured with TypeScript, hot reloading, and wallet generation. Dependencies for Node.js, Docker, and the Compact compiler are managed automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
npx create-mn-app my-app
cd my-app
npm run setup

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Available templates include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hello World&lt;/strong&gt;: Message storage with ZKPs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Counter DApp&lt;/strong&gt;: Increment/decrement with ZKPs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other templates like Bulletin Board, DEX, and Midnight Kitties are in development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Manual Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Prerequisites&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js&lt;/strong&gt; &amp;gt;= 20.x (install via NVM)&lt;/li&gt;
&lt;li&gt;Basic &lt;strong&gt;command-line knowledge&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Code editor (e.g., Visual Studio Code)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
nvm install 20

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Create Your Project&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-mn-app
&lt;span class="nb"&gt;cd &lt;/span&gt;my-mn-app
npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;src contracts
&lt;span class="nb"&gt;touch &lt;/span&gt;contracts/hello-world.compact
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Define the Smart Contract&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Add the pragma version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;pragma&lt;/span&gt; &lt;span class="nx"&gt;language_version&lt;/span&gt; &lt;span class="mf"&gt;0.17&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a ledger to store your data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="nx"&gt;ledger&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Opaque&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Define a circuit to update your ledger:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="nx"&gt;circuit&lt;/span&gt; &lt;span class="nf"&gt;storeMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;customMessage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Opaque&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;disclose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;customMessage&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;disclose&lt;/code&gt; is required to intentionally make the data public. Compact enforces privacy by default.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Compile the Smart Contract&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;compact compile contracts/hello-world.compact contracts/managed/hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This generates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;contract/&lt;/code&gt;: Compiled contract artifacts&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;keys/&lt;/code&gt;: Cryptographic keys for ZKPs&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;zkir/&lt;/code&gt;: Zero-Knowledge Intermediate Representation&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;compiler/&lt;/code&gt;: Intermediate files for building&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this setup, you can start building &lt;strong&gt;privacy-preserving DApps&lt;/strong&gt; on Midnight Network. Users can interact securely while sensitive data stays private. The combination of &lt;strong&gt;Compact contracts + ZKPs&lt;/strong&gt; ensures scalable, secure, and verifiable privacy on-chain.&lt;/p&gt;

&lt;p&gt;Happy coding! 🛠️&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;🚀 Next Steps&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the upcoming parts of this series, we’ll dive into how to deploy an MN app and then explore how to interact with an MN app. Stay tuned to continue building privacy-preserving DApps on the Midnight Network! 🌌&lt;/p&gt;




</description>
      <category>privacy</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>web3</category>
    </item>
    <item>
      <title>Getting Started with Midnight: Full Privacy dApp Setup (Lace, Compact, Docker &amp; More)</title>
      <dc:creator>Martin Rivero</dc:creator>
      <pubDate>Sun, 30 Nov 2025 17:18:43 +0000</pubDate>
      <link>https://dev.to/martinrivero15/getting-started-with-midnight-full-privacy-dapp-setup-lace-compact-docker-more-1jle</link>
      <guid>https://dev.to/martinrivero15/getting-started-with-midnight-full-privacy-dapp-setup-lace-compact-docker-more-1jle</guid>
      <description>&lt;p&gt;Midnight is a new blockchain for building privacy-focused decentralized applications using zero-knowledge (ZK) technology. This tutorial covers everything you need to set up your dev environment for Midnight and start building private dApps using the Compact smart contract language.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧰 Prerequisites
&lt;/h2&gt;

&lt;p&gt;Make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Chrome browser&lt;/li&gt;
&lt;li&gt;Terminal/CLI knowledge&lt;/li&gt;
&lt;li&gt;Admin privileges to install Docker &amp;amp; Compact&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔐 Step 1: Install the Lace Midnight Wallet
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhvl2qucnp3t7oz7ple9e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhvl2qucnp3t7oz7ple9e.jpg" alt="Lace wallet" width="295" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lace is the official wallet for the Midnight testnet.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install from &lt;a href="https://chromewebstore.google.com/detail/lace-beta/hgeekaiplokcnmakghbdfbgnlfheichg" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Pin it to your toolbar&lt;/li&gt;
&lt;li&gt;Click it → Create Wallet → Write down your &lt;strong&gt;seed phrase&lt;/strong&gt; safely!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✅ &lt;strong&gt;Verification:&lt;/strong&gt; Wallet dashboard shows &lt;code&gt;0 tDUST&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💸 Step 2: Get Test Tokens (tDUST)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Copy your wallet address in Lace&lt;/li&gt;
&lt;li&gt;Go to the &lt;a href="https://midnight.network/test-faucet/" rel="noopener noreferrer"&gt;Midnight Faucet&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksnel0soxdyzy46v8b3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksnel0soxdyzy46v8b3e.png" alt="Lace balance" width="795" height="831"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Paste your address and request tokens
&amp;gt; Your address should start with &lt;code&gt;mn_shield-addr_test...&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✅ &lt;strong&gt;Verification:&lt;/strong&gt; You now have tDUST in your wallet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgntbzeiogdt5yhfqz18o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgntbzeiogdt5yhfqz18o.png" alt="mywallet" width="701" height="392"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Step 3: Install the Compact Compiler
&lt;/h2&gt;

&lt;p&gt;Compact is Midnight’s smart contract language.&lt;/p&gt;

&lt;p&gt;Install it using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/download/compact-v0.2.0/compact-installer.sh | sh

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
compact --version
which compact

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ &lt;strong&gt;Verification:&lt;/strong&gt; You see the version and path printed.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 Step 4: Run the Proof Server with Docker
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.docker.com/products/docker-desktop/" rel="noopener noreferrer"&gt;Install Docker Desktop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Start the proof server:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 6300:6300 midnightnetwork/proof-server &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="s1"&gt;'midnight-proof-server --network testnet'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ &lt;strong&gt;Verification:&lt;/strong&gt; Terminal shows logs and proof server runs at &lt;code&gt;http://localhost:6300&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Tip:&lt;/strong&gt; In Lace, go to: &lt;code&gt;Settings → Midnight → Local&lt;/code&gt; to use this local server.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 Step 5: Install the Compact VS Code Extension
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/midnightntwrk/compact/releases" rel="noopener noreferrer"&gt;Download from Releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In VS Code: go to &lt;strong&gt;Extensions → Install from .vsix&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ &lt;strong&gt;Verification:&lt;/strong&gt; You see &lt;strong&gt;Compact Language Support&lt;/strong&gt; enabled in VS Code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkgpywbehpf2vfmd8ici.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkgpywbehpf2vfmd8ici.png" alt="Compact-VSC" width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎉 You’re Ready!
&lt;/h2&gt;

&lt;p&gt;With all tools installed, you’re now ready to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compile &amp;amp; deploy ZK smart contracts&lt;/li&gt;
&lt;li&gt;Interact with dApps using your Lace wallet&lt;/li&gt;
&lt;li&gt;Build private logic using Compact&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📎 Want to try a real project?
&lt;/h2&gt;

&lt;p&gt;Fork and deploy this one:&lt;br&gt;
🔗 &lt;a href="https://github.com/martinrivero15/midnight-kitties" rel="noopener noreferrer"&gt;Midnight Kitties – GitHub fork&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you'll be able to mint your first NFT like this one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxv9i7zyyj5xufdhyjfmw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxv9i7zyyj5xufdhyjfmw.png" alt="Minted Kitty" width="548" height="807"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;🧠 If you found this helpful, follow for more ZK dev cont&lt;br&gt;
You can find out more info: &lt;a href="https://midnight.network/" rel="noopener noreferrer"&gt;Midnight&lt;/a&gt;&lt;/p&gt;

</description>
      <category>midnightchallenge</category>
      <category>web3</category>
      <category>zk</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
