Skip to main content

DApp Connector API v4.1.0 release notes

For the complete documentation index, see llms.txt
  • Version: v4.1.0
  • Date: 5 November 2026

High-level summary​

DApp Connector API v4.1.0 is a backwards-compatible minor release. The package now publishes under the @midnightntwrk npm scope, signData can describe ECDSA signatures, wallets get an error code for requests they can't fund, and TypeScript projects resolve the package's types correctly, including under moduleResolution: "NodeNext".


Audience​

This release note is relevant for developers who:

  • Use the DApp Connector API in their DApps.
  • Maintain wallet implementations compatible with the DApp Connector API.
  • Sign data through the connector and want to support ECDSA signatures.

What changed (Summary of updates)​

  • Published under the new @midnightntwrk npm scope. The legacy @midnight-ntwrk scope is mirrored as a transitional alias.
  • Added an optional scheme field to the signData Signature type.
  • Added the InsufficientFunds error code.
  • Added a ./globals export path for the global type augmentations.
  • Fixed packaging so the types entry point resolves.

New features​

New npm scope​

The package is now @midnightntwrk/dapp-connector-api. The legacy @midnight-ntwrk/dapp-connector-api name still receives the same releases for now, so existing installs keep working. New projects should use the new scope.

npm install @midnightntwrk/dapp-connector-api@4.1.0

ECDSA signatures in signData​

The Signature type returned by signData has an optional scheme field, either "ecdsa_secp256k1_sha256" or "schnorr_bip340". When a wallet omits it, the scheme is schnorr_bip340, so existing wallets and DApps keep working unchanged. A future major version will make the field required. For background, see MIP-0003: ECDSA support.

InsufficientFunds error code​

ErrorCodes.InsufficientFunds covers requests that are well formed but that the wallet can't complete because it lacks the balance. Previously a wallet had to report these as InvalidRequest. DApps can now tell the two cases apart and ask the user to top up instead of treating the request as malformed.

Explicit global types​

The global type augmentations are exported at @midnightntwrk/dapp-connector-api/globals, so you can reference them directly:

/// <reference types="@midnightntwrk/dapp-connector-api/globals" />

globalThis.midnight is now typed alongside Window.midnight, which helps in Node and test environments.


Bug fixes​

  • Declaration files were published under dist/src/, so the types entry point pointed at a file that didn't exist. They now sit directly in dist/, and the types condition comes first in exports.
  • Internal type imports use explicit .js extensions, so projects that use moduleResolution: "NodeNext" get the package's types instead of any.

Breaking changes​

No breaking changes in this release.


Known issues​

No new known issues in this release.