Migration
⚠️ Breaking Changes
We removed the legacy namespace exports from the main SDK bundle, so importing like this won't work anymore:
- import { nwc } from '@getalby/sdk'
console.log(nwc.NWCWalletService)
Instead you can do it like:
+ import { NWCWalletService } from '@getalby/sdk'
console.log(NWCWalletService)
or you can use subpath imports.
✨ New Subpath Import (Recommended)
For better tree-shaking, you can also import directly from the nwc
subpath (and similarly for lnclient
, oauth
and webln
)
+ import { NWCWalletService } from '@getalby/sdk/nwc'
console.log(NWCWalletService)
What's Changed
- feat: add subpath imports and fix bundling issues by @im-adithya in #443
- chore: update dependencies by @im-adithya in #445
- fix: package json and examples fixes by @im-adithya in #452
- chore: upgrade dev dependencies by @im-adithya in #453
- chore: bump version to 6.0.0 by @im-adithya in #446
Full Changelog: v5.1.2...v6.0.0