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
The old dashed packages still install, so your build keeps working for now. They are published as a transitional alias. But the dashed scope is deprecated, and the newest releases only show up on the new no-dash scope. So you want to move over.
There is one exception. @midnight-ntwrk/ledger-v8 stays on the dashed scope. Do not rename that one. More on that below.
What actually changed
Straight from the wallet SDK v1.2.0 release notes:
the npm scope has changed from
@midnight-ntwrkto@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.
So both scopes exist on npm right now. That is why nothing breaks. But they are not equal. The no-dash scope is where the active releases land, and the dashed scope lags behind.
You can see it yourself. Here are the current latest versions, dashed vs no-dash:
| 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 |
If you stay on the dashed names, you quietly get the older packages. The version fixes and new features go to the no-dash scope first.
The gotcha: ledger-v8 does not move
This is the part that catches people. When you do a find and replace across your project, it is tempting to swap every @midnight-ntwrk for @midnightntwrk. Do not do that.
The release notes are explicit:
Upstream, non-SDK dependencies remain on the dashed
@midnight-ntwrkscope (@midnight-ntwrk/ledger-v8,zkir-v2).
So the wallet SDK packages move to no-dash, but @midnight-ntwrk/ledger-v8 and @midnight-ntwrk/zkir-v2 stay dashed. If you rename ledger-v8 to the no-dash scope, you can end up importing a different package than the rest of your stack expects. Leave it alone.
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
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
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';
After:
import { WalletFacade } from '@midnightntwrk/wallet-sdk-facade';
import { DustWallet } from '@midnightntwrk/wallet-sdk-dust-wallet';
import * as ledger from '@midnight-ntwrk/ledger-v8';
3. Check your work. After the change, search your project for any leftover dashed wallet-sdk references. There should be none. The only dashed name left should be ledger-v8 (and zkir-v2 if you use it).
grep -rn "@midnight-ntwrk/wallet-sdk" src
If that returns nothing, you are done. If it returns hits, those are the ones you missed.
Do you need to rush?
No. The alias keeps your current code working, so this is not an emergency. But two reasons to do it soon:
- The bug fixes and new versions go to the no-dash scope first. Staying dashed means you fall behind.
- The alias is described as a migration-window thing. It will be retired eventually. Better to move on your own schedule than to scramble when the old names stop publishing.
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. If you want to confirm the current versions on each scope, npm view @midnightntwrk/wallet-sdk-facade version and npm view @midnight-ntwrk/wallet-sdk-facade version will show you the split directly.
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)