DEV Community

Cory Dabrowski
Cory Dabrowski

Posted on Edited on

The Midnight wallet SDK changed its npm scope. Here is what to update.

If you installed the Midnight wallet SDK a while back and pinned the package names, your imports are now pointing at a deprecated scope. Nothing is broken yet. But the packages you depend on moved, and the old names are living on borrowed time.

Here is what changed, why it matters, and the one gotcha that trips people up.

The short version

The wallet SDK packages moved from the @midnight-ntwrk scope (with a dash) to @midnightntwrk (no dash).

@midnight-ntwrk/wallet-sdk-facade   ->   @midnightntwrk/wallet-sdk-facade
Enter fullscreen mode Exit fullscreen mode

The old dashed packages still install, and the dashed scope still receives publishes. But the stable latest tags have drifted apart: for most of the wallet SDK packages, a plain install of the dashed name resolves an older release than the no-dash name. So you want to move over.

There is one exception to the rename. The release notes keep @midnight-ntwrk/ledger-v8 and zkir-v2 on the dashed scope, so leave those names alone. More on that below.

What actually changed

Straight from the wallet SDK v1.2.0 release notes:

the npm scope has changed from @midnight-ntwrk to @midnightntwrk (no dash). New installs should depend on @midnightntwrk/*. The old @midnight-ntwrk/* packages continue to be published as a transitional alias during the migration window, so existing consumers keep working, but the dashed scope is deprecated.

The alias is real. Publishes do land on both scopes: during a recent canary cycle, the exact same build showed up under both names within a minute of each other. But watch what a plain install actually resolves. Here is what npm view <package> version returns for each scope, meaning the version behind the stable latest tag (checked September 2, 2026):

Package Dashed (old) No-dash (new)
wallet-sdk-facade 4.0.1 4.1.0
wallet-sdk-hd 3.0.2 3.0.3
wallet-sdk-shielded 3.0.1 3.0.2
wallet-sdk-dust-wallet 4.1.0 4.2.0
wallet-sdk-unshielded-wallet 3.1.0 3.1.0

This table is a snapshot and will drift, so check it yourself. These two commands compare any package across the scopes:

npm view @midnightntwrk/wallet-sdk-facade version
npm view @midnight-ntwrk/wallet-sdk-facade version
Enter fullscreen mode Exit fullscreen mode

Four of the five packages resolve older on the dashed scope. I will not guess at why the tags differ. Whatever the mechanism, the observable state is what matters to your project: the newest stable releases are tagged on @midnightntwrk first, and the dashed names can lag behind. Stay on the dashed names and you can quietly end up with older packages.

The gotcha: leave ledger-v8 and zkir-v2 alone

When you do a find and replace across your project, it is tempting to swap every @midnight-ntwrk for @midnightntwrk. Hold on before you touch ledger-v8 and zkir-v2.

The release notes are explicit:

Upstream, non-SDK dependencies remain on the dashed @midnight-ntwrk scope (@midnight-ntwrk/ledger-v8, zkir-v2).

Both packages do exist on both scopes, and at identical versions: ledger-v8 is 8.1.1 whether you spell the scope with a dash or without, and zkir-v2 is 2.1.0 on both. So renaming them would not point you at a missing package. But there is harder evidence than the release notes for keeping them dashed. Look at the dependencies of the no-dash facade itself:

"@midnight-ntwrk/ledger-v8": "^8.1.0"            <- dashed, on purpose
"@midnightntwrk/wallet-sdk-shielded": "^3.0.2"   <- its wallet-sdk siblings, no-dash
Enter fullscreen mode Exit fullscreen mode

The SDK's own packages depend on the dashed ledger-v8, sitting right next to their no-dash siblings. If you rename ledger-v8 in your project, you now depend on a package the SDK itself does not use, and npm will happily install both copies side by side. Follow the notes. The wallet SDK packages move to no-dash, and ledger-v8 and zkir-v2 stay dashed.

How to fix your project

1. Update your install command. Move the wallet-sdk packages to no-dash. Keep ledger-v8 dashed.

Before:

npm install @midnight-ntwrk/wallet-sdk-facade@VERSION \
            @midnight-ntwrk/wallet-sdk-hd@VERSION \
            @midnight-ntwrk/wallet-sdk-shielded@VERSION \
            @midnight-ntwrk/wallet-sdk-dust-wallet@VERSION \
            @midnight-ntwrk/wallet-sdk-unshielded-wallet@VERSION \
            @midnight-ntwrk/ledger-v8
Enter fullscreen mode Exit fullscreen mode

After:

npm install @midnightntwrk/wallet-sdk-facade@VERSION \
            @midnightntwrk/wallet-sdk-hd@VERSION \
            @midnightntwrk/wallet-sdk-shielded@VERSION \
            @midnightntwrk/wallet-sdk-dust-wallet@VERSION \
            @midnightntwrk/wallet-sdk-unshielded-wallet@VERSION \
            @midnight-ntwrk/ledger-v8
Enter fullscreen mode Exit fullscreen mode

Notice the last line did not change.

2. Update your imports. Same rule. Wallet SDK to no-dash, ledger stays dashed.

Before:

import { WalletFacade } from '@midnight-ntwrk/wallet-sdk-facade';
import { DustWallet } from '@midnight-ntwrk/wallet-sdk-dust-wallet';
import * as ledger from '@midnight-ntwrk/ledger-v8';
Enter fullscreen mode Exit fullscreen mode

After:

import { WalletFacade } from '@midnightntwrk/wallet-sdk-facade';
import { DustWallet } from '@midnightntwrk/wallet-sdk-dust-wallet';
import * as ledger from '@midnight-ntwrk/ledger-v8';
Enter fullscreen mode Exit fullscreen mode

3. Check your work. After the change, search your project for any leftover dashed wallet-sdk references. There should be none. The only dashed names left should be ledger-v8 (and zkir-v2 if you use it).

grep -rn "@midnight-ntwrk/wallet-sdk" src
Enter fullscreen mode Exit fullscreen mode

If that returns nothing, you are done. If it returns hits, those are the ones you missed.

Do you need to rush?

No. The dashed packages still install and still work, so this is not an emergency. But two reasons to do it soon:

  • The newest stable releases are tagged on the no-dash scope, and the dashed facade already resolves a minor version behind. And here is the quiet part: the deprecation lives in the release notes, not in the npm registry. None of the dashed packages carry npm's deprecated flag, so npm install prints no warning at all. You fall behind silently.
  • The release notes frame the dashed scope as a migration-window measure. They do not say when the window closes, but moving on your own schedule beats scrambling if it does.

Fifteen minutes now saves you a broken install later.

Where this comes from

The details are in the Midnight wallet SDK v1.2.0 release notes on GitHub, which also point to ADR-0007 for the reasoning behind the rename. The version numbers above come straight from the npm registry, and the two npm view commands earlier let you re-check them any time.

That is the whole change. Move the wallet-sdk packages to @midnightntwrk, leave ledger-v8 and zkir-v2 on @midnight-ntwrk, and check for stragglers.

Top comments (0)