Skip to content

adamreynolds-io/nightcap

NIGHTCAP

Nightcap is Midnight Foundation's Midnight development environment for professionals. Designed to simplify building, testing, and deploying smart contracts and dApps on the Midnight blockchain. Inspired by Ethereum's Hardhat (and many others), Nightcap provides a flexible environment for Midnight developers with features tailored to the unique aspects of the Midnight network.

Quick Start

# Install
pnpm add -D @nightcap/core

# Create a project
npx nightcap init

# Start local network
npx nightcap node

# Compile contracts
npx nightcap compile

# Deploy
npx nightcap deploy

Features

  • Local Midnight node simulation for rapid development and testing of Compact Contracts
  • Automated contract compilation, deployment, and verification workflows
  • Plugin architecture to extend functionality for Midnight-specific use cases
  • Scriptable tasks for common developer operations
  • TypeScript-first with full type safety
  • Docker-based local network with snapshot/restore capability

Documentation

See the docs/ folder for comprehensive documentation:

Requirements

  • Node.js 20 or higher
  • Docker (for local network)
  • pnpm (recommended)

Run nightcap doctor to verify your environment.

Be Part of the Journey

Nightcap is an open source project maintained by the Midnight Foundation. We welcome contributions from the community to help improve and expand its capabilities.

Reference Ecosystems

LICENSE

Apache 2.0.

SECURITY.md

Provides a brief description of the Midnight Foundation's security policy and how to properly disclose security issues.

CONTRIBUTING.md

Provides guidelines for how people can contribute to the Midnight project.

CODEOWNERS

Defines repository ownership rules.

ISSUE_TEMPLATE

Provides templates for reporting various types of issues, such as: bug report, documentation improvement and feature request.

PULL_REQUEST_TEMPLATE

Provides a template for a pull request.

CLA Assistant

The Midnight Foundation appreciates contributions, and like many other open source projects asks contributors to sign a contributor License Agreement before accepting contributions. We use CLA assistant (https://github.com/cla-assistant/cla-assistant) to streamline the CLA signing process, enabling contributors to sign our CLAs directly within a GitHub pull request.

Dependabot

The Midnight Foundation uses GitHub Dependabot feature to keep our projects dependencies up-to-date and address potential security vulnerabilities.

Checkmarx

The Midnight Foundation uses Checkmarx for application security (AppSec) to identify and fix security vulnerabilities. All repositories are scanned with Checkmarx's suite of tools including: Static Application Security Testing (SAST), Infrastructure as Code (IaC), Software Composition Analysis (SCA), API Security, Container Security and Supply Chain Scans (SCS).

Unito

Facilitates two-way data synchronization, automated workflows and streamline processes between: Jira, GitHub issues and Github project Kanban board.

TODO - New Repo Owner

Software Package Data Exchange (SPDX)

Include the following Software Package Data Exchange (SPDX) short-form identifier in a comment at the top headers of each source code file.

// This file is part of NIGHTCAP.
// Copyright (C) 2025 Midnight Foundation
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors