google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Use when asking about Midnight transaction structure, system architecture, building blocks, how Zswap/Kachina/Impact components fit together, bindings, commitments, or Schnorr proofs.
Full skill instructions
Midnight combines ZK proofs, shielded tokens, and smart contracts into a unified privacy-preserving system. Understanding how pieces connect is essential for building applications.
┌─────────────────────────────────────────────────────────┐
│ Midnight Network │
├─────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Zswap │ │ Kachina │ │ Impact │ │
│ │ (Tokens) │←→│ (Contracts) │←→│ (VM) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ↑ ↑ ↑ │
│ └────────────────┼────────────────┘ │
│ │ │
│ ┌───────────────────────┐ │
│ │ ZK Proof System │ │
│ │ (ZK SNARKs) │ │
│ └───────────────────────┘ │
└─────────────────────────────────────────────────────────┘
Every Midnight transaction contains:
Transaction {
guaranteed_zswap_offer, // Required: token operations
fallible_zswap_offer?, // Optional: may-fail token ops
contract_calls?, // Optional: contract interactions
binding_randomness // Cryptographic binding
}
| Section | Behavior |
|---|---|
| Guaranteed | Must succeed, or entire tx rejected |
| Fallible | May fail without affecting guaranteed section |
Use case: Guaranteed section collects fees. Fallible section attempts swap. If swap fails, fees still collected.
Token movement layer:
Offer {
inputs: Coin[], // Spent coins (nullifiers)
outputs: Coin[], // Created coins (commitments)
transient: Coin[], // Created and spent same tx
balance: Map<Type, Value> // Net value per token
}
Computation layer:
ContractCall {
guaranteed_transcript, // Visible effects
fallible_transcript, // May-fail effects
communication_commitment, // Cross-contract (future)
zk_proofs // Validity proofs
}
All components bound together via:
Midnight extends Zswap's Pedersen commitment scheme:
Commitment(v1) + Commitment(v2) = Commitment(v1 + v2)
This allows verifying total value without revealing individual values.
Transaction binding ensures:
1. Zswap values balance (inputs = outputs + fees)
2. Contract effects match proofs
3. All components cryptographically linked
4. No value created from nothing
Ledger {
zswap_state: {
coin_commitments: MerkleTree,
free_slot_index: Index,
nullifier_set: Set<Nullifier>,
valid_roots: Set<MerkleRoot>
},
contract_map: Map<Address, ContractState>
}
ContractState {
public_fields: Map<Name, Value>,
merkle_trees: Map<Name, MerkleTree>,
sets: Map<Name, Set>
}
1. Well-formedness Check (stateless)
├─ Format validation
├─ ZK proof verification
├─ Schnorr proof verification
├─ Balance verification
└─ Claim matching
2. Guaranteed Execution (stateful)
├─ Contract lookups
├─ Zswap offer application
├─ Contract call execution
└─ State persistence
3. Fallible Execution (stateful, may fail)
├─ Similar to guaranteed
└─ Failure doesn't revert guaranteed
For each contract call:
1. Lookup contract state
2. Verify ZK proof against circuit
3. Execute Impact program
4. Verify effects match declared effects
5. Update state
Zswap enables atomic composition:
Tx1 (Party A) Tx2 (Party B)
↓ ↓
└─────┬───────────┘
↓
Merged Transaction
(atomic, all-or-nothing)
Contract Address = Hash(deployment_data)
Token Type = Hash(contract_address, domain_separator)
Coin Commitment = Pedersen(type, value, owner, randomness)
Nullifier = Hash(commitment, owner_secret)
User Wallet Contract
│ │
│ ──── Zswap Input ────────→ │ (spend coin)
│ │
│ ←─── Zswap Output ───────── │ (receive coin)
│ │
│ ──── Contract Call ──────→ │ (invoke logic)
Private Domain Public Domain
────────────── ─────────────
User secrets ──ZK Proof──→ Transcript
Local state State changes
Merkle paths Nullifiers
Witness data Commitments
1. Construct Zswap offer
- Input: Your coin (create nullifier)
- Output: Recipient coin (create commitment)
2. Balance must be zero (minus fees)
3. Generate ZK proof
4. Submit transaction
1. Prepare witness data (private inputs)
2. Construct contract call
3. Generate ZK proof (proves valid execution)
4. Optionally combine with Zswap offers
5. Submit transaction
1. Party A: Create partial offer (gives TokenX)
2. Party B: Create partial offer (gives TokenY, wants TokenX)
3. Merge offers off-chain
4. Submit merged transaction
5. Both transfers atomic
For detailed technical information:
references/transaction-deep-dive.md - Complete transaction structurereferences/state-management.md - Ledger operations, state transitionsreferences/cryptographic-binding.md - Pedersen, Schnorr, proof compositionWorking patterns:
examples/transaction-construction.md - Building transactions step by stepProject scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.