midnight-dapp-dev:dapp-connector

Official

Secure browser DApp integration with Lace.

Authordevrelaicom
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill removes ambiguity and boilerplate from connecting browser-based DApps to the Lace wallet extension by documenting the connection lifecycle, injected APIs, error handling, and recommended provider assembly patterns so developers can reliably detect wallets, respect user network selection, and perform transactions and proofs from the client.

Core Features & Use Cases

  • Wallet Detection & Connection: Guidance for detecting window.midnight.mnLace, calling connect(networkId), and handling user authorization modes.
  • ConnectedAPI Usage: How to call getConfiguration, getShieldedAddresses, getShieldedBalances, balanceUnsealedTransaction, submitTransaction, signData, and getProvingProvider for common wallet operations.
  • Provider Assembly & Deployment Patterns: Steps to build MidnightProviders in the browser using FetchZkConfigProvider, indexerPublicDataProvider, in-memory or IndexedDB private state providers, and wallet-delegated proving.
  • React 19 / Next.js 16 Best Practices: Client-only patterns, dynamic imports to avoid SSR issues, using getConfiguration() for network endpoints, and common error-handling patterns for DAppConnectorAPIError.
  • Use Case: Integrate Lace into a Next.js DApp to read balances, create balanced transactions from contract calls, submit transactions, and optionally delegate ZK proving to the wallet, all while respecting user network selection.

Quick Start

Connect a Next.js client component to the Lace wallet on the preview network and assemble browser MidnightProviders for transaction balancing, submission, and wallet-delegated proving.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: midnight-dapp-dev:dapp-connector
Download link: https://github.com/devrelaicom/midnight-expert/archive/main.zip#midnight-dapp-dev-dapp-connector

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.