{"_id":"@ambosstech/lightning-mpp-adapter-nwc","_rev":"4-59a0278d2649ad6afe06425f7a55c3de","name":"@ambosstech/lightning-mpp-adapter-nwc","dist-tags":{"latest":"0.2.3"},"versions":{"0.1.1":{"name":"@ambosstech/lightning-mpp-adapter-nwc","version":"0.1.1","_id":"@ambosstech/lightning-mpp-adapter-nwc@0.1.1","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"dist":{"shasum":"85e34f99b7f6d97a9cac5d35309f3c54de894d59","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-nwc/-/lightning-mpp-adapter-nwc-0.1.1.tgz","fileCount":7,"integrity":"sha512-442W/Yf9jQGlU7OqOBmSbAS1gDIadaXq4vsDMhkNS5CTy4wikrgLvo1ms9HCxWGekmEgAN0EF6u7zGgSTpTp7g==","signatures":[{"sig":"MEQCIB5+sBTYuknXzLFgo0op9y1Kbxlw+spuoegoeDqyUyf6AiACSq3NT549p4utbh1NPVwmZoa6j5NYlF6oOaZ8Iy94NQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58571},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"74f059385fa40afe501876b5f7cfad0642c702af","scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"ambossbot","email":"external-npm@amboss.tech"},"_npmVersion":"11.8.0","directories":{},"_nodeVersion":"24.13.1","dependencies":{"nostr-tools":"^2.10.0","@ambosstech/lightning-mpp-sdk":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^2.1.0","typescript":"~5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/lightning-mpp-adapter-nwc_0.1.1_1774020807842_0.6855082383199527","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ambosstech/lightning-mpp-adapter-nwc","version":"0.2.0","_id":"@ambosstech/lightning-mpp-adapter-nwc@0.2.0","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"homepage":"https://github.com/AmbossTech/lightning-mpp-sdk#readme","bugs":{"url":"https://github.com/AmbossTech/lightning-mpp-sdk/issues"},"dist":{"shasum":"d5558861447a5545cd03d948beb54b85e4bb8d47","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-nwc/-/lightning-mpp-adapter-nwc-0.2.0.tgz","fileCount":8,"integrity":"sha512-wz4CDTdFjvq/RV/pF33hE3AyUxxJPKGByH2CICF8c2O/pk0P8YDSn3feb8xqG/MNQBmJFwvWCf14F8qYUSYKPg==","signatures":[{"sig":"MEUCIQDe9Kt47cHzFyNql6oM3cSZUB2ngrUfg3a7R8g+3V1UcQIgK0pITGgzUN1RvFJmYN5lqmqq1C2nFLO/n1Z+Rvt2x4w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ambosstech%2flightning-mpp-adapter-nwc@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":60828},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"c3ea9b293975a02d3f26c38566e0fcc198183878","scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d004f36f-d47e-4e37-a89e-f5468b20aac6"}},"repository":{"url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","type":"git","directory":"packages/adapter-nwc"},"_npmVersion":"11.9.0","description":"[Nostr Wallet Connect](https://github.com/nostr-protocol/nips/blob/master/47.md) (NIP-47) adapter for the [Lightning MPP SDK](https://www.npmjs.com/package/@ambosstech/lightning-mpp-sdk). Connect to any NWC-compatible wallet — Alby Hub, coinos, Primal, et","directories":{},"_nodeVersion":"24.14.0","dependencies":{"nostr-tools":"^2.10.0","@ambosstech/lightning-mpp-sdk":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^2.1.0","typescript":"~5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/lightning-mpp-adapter-nwc_0.2.0_1774029962825_0.3845079281793351","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@ambosstech/lightning-mpp-adapter-nwc","version":"0.2.2","keywords":["lightning","bitcoin","nostr","nwc","nip-47","mpp"],"_id":"@ambosstech/lightning-mpp-adapter-nwc@0.2.2","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"homepage":"https://github.com/AmbossTech/lightning-mpp-sdk#readme","bugs":{"url":"https://github.com/AmbossTech/lightning-mpp-sdk/issues"},"dist":{"shasum":"364a29b5c35bd655a1d2f4ff436a607c755db8a6","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-nwc/-/lightning-mpp-adapter-nwc-0.2.2.tgz","fileCount":8,"integrity":"sha512-wDbN+EWKZfN5NK/ft5UAJvmMAI6mcpNjI9V/d79G4haPHpN9MynNZlKyIIQUn8hTYg0e/CCcW5/l1K3xvWTdKw==","signatures":[{"sig":"MEUCIEqT6eWeQP4RZ6WwODgrr+dqHeY6DWfrmOc/MR8LMd5wAiEA/DGq0RzaBEh+Hpt67mIh1TcIt2tkuOkk5jWxxgQfm4U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ambosstech%2flightning-mpp-adapter-nwc@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61013},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"9d2cf2842f6ee9eb65af3276474494470a3ed5f0","scripts":{"test":"vitest run","build":"tsup","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df04d9c-d03c-4ce0-a00c-721b8d815e7e"}},"repository":{"url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","type":"git","directory":"packages/adapter-nwc"},"_npmVersion":"11.9.0","description":"Nostr Wallet Connect (NIP-47) adapter for the Lightning MPP SDK","directories":{},"_nodeVersion":"24.14.0","dependencies":{"nostr-tools":"^2.10.0","@ambosstech/lightning-mpp-sdk":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^2.1.0","typescript":"~5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/lightning-mpp-adapter-nwc_0.2.2_1774033987037_0.05268744199116182","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@ambosstech/lightning-mpp-adapter-nwc","description":"Nostr Wallet Connect (NIP-47) adapter for the Lightning MPP SDK","keywords":["lightning","bitcoin","nostr","nwc","nip-47","mpp"],"version":"0.2.3","repository":{"type":"git","url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","directory":"packages/adapter-nwc"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"dependencies":{"@ambosstech/lightning-mpp-sdk":"workspace:*","nostr-tools":"^2.10.0"},"devDependencies":{"tsup":"^8.3.0","typescript":"~5.7.0","vitest":"^2.1.0"},"gitHead":"7f80fd3e759cb6c3edc2149e83e2f0d75adec4f4","_id":"@ambosstech/lightning-mpp-adapter-nwc@0.2.3","bugs":{"url":"https://github.com/AmbossTech/lightning-mpp-sdk/issues"},"homepage":"https://github.com/AmbossTech/lightning-mpp-sdk#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-21ruLul/h81h9tpwEcnEJIujiik8VGmmHNLNOMr0OlUK3262xV/v/pPHlgBpa0Ct2Bq4BVImlnbSEpsGmQFD+A==","shasum":"b94fc908d47c19ee68376c1598d8196cdc23f963","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-nwc/-/lightning-mpp-adapter-nwc-0.2.3.tgz","fileCount":8,"unpackedSize":61013,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ambosstech%2flightning-mpp-adapter-nwc@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCLpnTrbmM84j1KGkaQzUmpegoIToICLygukLqY1y3yBgIgO0prG/yYsxKOV3KJ02O+z2zrbNMMJwhjc1rXbmH9U4s="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4df04d9c-d03c-4ce0-a00c-721b8d815e7e"}},"directories":{},"maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lightning-mpp-adapter-nwc_0.2.3_1774037248394_0.9993759592047784"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-20T15:33:27.685Z","modified":"2026-03-20T20:07:28.867Z","0.1.1":"2026-03-20T15:33:27.990Z","0.2.0":"2026-03-20T18:06:03.004Z","0.2.2":"2026-03-20T19:13:07.211Z","0.2.3":"2026-03-20T20:07:28.547Z"},"bugs":{"url":"https://github.com/AmbossTech/lightning-mpp-sdk/issues"},"homepage":"https://github.com/AmbossTech/lightning-mpp-sdk#readme","keywords":["lightning","bitcoin","nostr","nwc","nip-47","mpp"],"repository":{"type":"git","url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","directory":"packages/adapter-nwc"},"description":"Nostr Wallet Connect (NIP-47) adapter for the Lightning MPP SDK","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"readme":"# @ambosstech/lightning-mpp-adapter-nwc\n\n[Nostr Wallet Connect](https://github.com/nostr-protocol/nips/blob/master/47.md) (NIP-47) adapter for the [Lightning MPP SDK](https://www.npmjs.com/package/@ambosstech/lightning-mpp-sdk). Connect to any NWC-compatible wallet — Alby Hub, coinos, Primal, etc.\n\n## Installation\n\n```bash\npnpm add @ambosstech/lightning-mpp-sdk @ambosstech/lightning-mpp-adapter-nwc\n```\n\n## Usage\n\n```ts\nimport { NwcLightningProvider } from \"@ambosstech/lightning-mpp-adapter-nwc\";\n\nconst provider = new NwcLightningProvider({\n  connectionString: \"nostr+walletconnect://pubkey?relay=wss://relay.example.com&secret=hex\",\n  timeoutSecs: 60, // optional, default 60\n});\n\n// Use like any other provider\nconst invoice = await provider.createInvoice({ amountSats: 1000, memo: \"test\" });\nconst { preimage } = await provider.payInvoice({ bolt11: invoice.bolt11 });\nconst lookup = await provider.lookupInvoice({ paymentHash: invoice.paymentHash });\n\n// Clean up when done\nprovider.close();\n```\n\n### With the SDK\n\n```ts\nimport { lightningChargeServer } from \"@ambosstech/lightning-mpp-sdk\";\n\nconst chargeMethod = lightningChargeServer({\n  provider,\n  currency: \"sat\",\n  network: \"mainnet\",\n});\n```\n\n## Configuration\n\n| Option             | Type     | Default | Description                          |\n| ------------------ | -------- | ------- | ------------------------------------ |\n| `connectionString` | `string` | —       | NWC connection URI (required)        |\n| `timeoutSecs`      | `number` | `60`    | Response timeout in seconds          |\n\nThe connection string is provided by your wallet and contains the wallet pubkey, relay URL, and client secret. All communication is encrypted with NIP-44.\n\n## Notes\n\n- **Unit conversion**: The SDK uses satoshis; NWC uses millisatoshis. Conversion is handled automatically.\n- **`maxFeeSats`**: NWC does not support fee limits — fees are controlled by the wallet. A warning is logged if provided.\n- **Connection lifecycle**: The relay connection is established lazily on the first request. Call `provider.close()` to disconnect.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}