{"_id":"@ambosstech/lightning-mpp-adapter-mock","_rev":"4-5149a4ac78dc3f24774a597c04fca6e4","name":"@ambosstech/lightning-mpp-adapter-mock","dist-tags":{"latest":"0.2.3"},"versions":{"0.1.1":{"name":"@ambosstech/lightning-mpp-adapter-mock","version":"0.1.1","_id":"@ambosstech/lightning-mpp-adapter-mock@0.1.1","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"dist":{"shasum":"57c7e200d7858bac815df47afc629c33c3423cc3","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-mock/-/lightning-mpp-adapter-mock-0.1.1.tgz","fileCount":7,"integrity":"sha512-ERfHtGPxLOVHfQyH8SkO1Ix7MUu0FRwE9KQlXV7h15gTcKJ1arYWR109ArtrMpEM/6wH7onGfkbqRqbpXHfpeg==","signatures":[{"sig":"MEUCIHLvCzTxl3TRJG2DYGPTDnYcrsjq6dRVeAlP4Cyk+zWyAiEAy2fTOkndDzzKBFYWgoENvJb/+Dx5QjAB17DPT2B0OPU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18561},"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":"8e4a6b902c84c8818036ceda00a192a129105134","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":{"@ambosstech/lightning-mpp-sdk":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^2.1.0","typescript":"~5.7.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/lightning-mpp-adapter-mock_0.1.1_1773874556986_0.1902096983496846","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ambosstech/lightning-mpp-adapter-mock","version":"0.2.0","_id":"@ambosstech/lightning-mpp-adapter-mock@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":"2d02aaa03e270bf5dc978d215f295272f45d6160","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-mock/-/lightning-mpp-adapter-mock-0.2.0.tgz","fileCount":8,"integrity":"sha512-0RCHmLDY90PPw1t7mwXHl+VienizS2CL11bxhhUwI2unFDctoPCIXsZRIi0XaavGOOyVFz9gf8SzrrLaAWqmAQ==","signatures":[{"sig":"MEUCIQDGIMEuD5P63ZOuxk3u4/TA+TmC2s/bt1f1vFdf7HkRVQIgICy3pyXt81BXB1qDZEHRV0SWbmBA6cUy0FOjPnBjdzM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ambosstech%2flightning-mpp-adapter-mock@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20330},"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:9691a5d4-4a7a-44f0-95cc-a6d41d04a78b"}},"repository":{"url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","type":"git","directory":"packages/adapter-mock"},"_npmVersion":"11.9.0","description":"Mock adapter for the [Lightning MPP SDK](https://www.npmjs.com/package/@ambosstech/lightning-mpp-sdk). Test the full payment flow without a real Lightning node.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@ambosstech/lightning-mpp-sdk":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^2.1.0","typescript":"~5.7.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/lightning-mpp-adapter-mock_0.2.0_1774029957777_0.8882748305474089","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@ambosstech/lightning-mpp-adapter-mock","version":"0.2.2","keywords":["lightning","bitcoin","mock","testing","mpp"],"_id":"@ambosstech/lightning-mpp-adapter-mock@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":"342bdcb44b9d9ac9e094e44e2a612258e300f5d5","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-mock/-/lightning-mpp-adapter-mock-0.2.2.tgz","fileCount":8,"integrity":"sha512-EeaEul0LG83wGGrUezAI9s4HK0UCZDa89ruEHi611EfU+b3+395c6e0bPn5RFrXmYacaSHEj+Ya2Tpb/v0n4yA==","signatures":[{"sig":"MEQCIFQZH3RgC4LclThwmsJWKWJCu0S3YyC40ZLjITFGNdVQAiAlQO5gND+zHqSs9BWIlw1yKUfbjAcnS9y5qHxCoc73WA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ambosstech%2flightning-mpp-adapter-mock@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20507},"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:49e94d7b-e518-4646-92ab-252084f17a7b"}},"repository":{"url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","type":"git","directory":"packages/adapter-mock"},"_npmVersion":"11.9.0","description":"Mock adapter for testing the Lightning MPP SDK without a real node","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@ambosstech/lightning-mpp-sdk":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.0","vitest":"^2.1.0","typescript":"~5.7.0","@types/node":"^25.5.0"},"_npmOperationalInternal":{"tmp":"tmp/lightning-mpp-adapter-mock_0.2.2_1774033982413_0.5264504808513653","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@ambosstech/lightning-mpp-adapter-mock","description":"Mock adapter for testing the Lightning MPP SDK without a real node","keywords":["lightning","bitcoin","mock","testing","mpp"],"version":"0.2.3","repository":{"type":"git","url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","directory":"packages/adapter-mock"},"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:*"},"devDependencies":{"@types/node":"^25.5.0","tsup":"^8.3.0","typescript":"~5.7.0","vitest":"^2.1.0"},"gitHead":"7f80fd3e759cb6c3edc2149e83e2f0d75adec4f4","_id":"@ambosstech/lightning-mpp-adapter-mock@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-3J01ohZKLKJLui8RkK+LPjb4dwlYotTwisz1d3UTGmyP2H/5yikqt/M1HhT00sJQ03G2/c3xMRfNQFzx1sqbgw==","shasum":"95b94ac32e3fb34432d02417307fd70a1a5ddce6","tarball":"https://registry.npmjs.org/@ambosstech/lightning-mpp-adapter-mock/-/lightning-mpp-adapter-mock-0.2.3.tgz","fileCount":8,"unpackedSize":20507,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ambosstech%2flightning-mpp-adapter-mock@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDXHF0nMOtSxi3vcZQyIKAgHMEo5fCNTrIQ32CaQvB8bgIhAPcIF0/1DBz+T9f6xIOc3LPSEJd1qHHmAGhGLg938RGg"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:49e94d7b-e518-4646-92ab-252084f17a7b"}},"directories":{},"maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lightning-mpp-adapter-mock_0.2.3_1774037243114_0.8587395776689379"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-18T22:55:56.890Z","modified":"2026-03-20T20:07:23.527Z","0.1.1":"2026-03-18T22:55:57.126Z","0.2.0":"2026-03-20T18:05:57.928Z","0.2.2":"2026-03-20T19:13:02.566Z","0.2.3":"2026-03-20T20:07:23.243Z"},"bugs":{"url":"https://github.com/AmbossTech/lightning-mpp-sdk/issues"},"homepage":"https://github.com/AmbossTech/lightning-mpp-sdk#readme","keywords":["lightning","bitcoin","mock","testing","mpp"],"repository":{"type":"git","url":"git+https://github.com/AmbossTech/lightning-mpp-sdk.git","directory":"packages/adapter-mock"},"description":"Mock adapter for testing the Lightning MPP SDK without a real node","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"readme":"# @ambosstech/lightning-mpp-adapter-mock\n\nMock adapter for the [Lightning MPP SDK](https://www.npmjs.com/package/@ambosstech/lightning-mpp-sdk). Test the full payment flow without a real Lightning node.\n\n## Installation\n\n```bash\npnpm add @ambosstech/lightning-mpp-sdk @ambosstech/lightning-mpp-adapter-mock\n```\n\n## Usage\n\n```ts\nimport { MockLightningProvider } from \"@ambosstech/lightning-mpp-adapter-mock\";\n\n// Auto-settles invoices on lookup (default)\nconst provider = new MockLightningProvider({ autoSettle: true });\n\n// Create and pay invoices\nconst { bolt11, paymentHash } = await provider.createInvoice({ amountSats: 1000 });\nconst { preimage } = await provider.payInvoice({ bolt11 });\nconst { settled } = await provider.lookupInvoice({ paymentHash });\n```\n\n### Test failure scenarios\n\n```ts\n// Payments always fail\nconst failProvider = new MockLightningProvider({ failOnPay: true });\n\n// Simulate slow payments\nconst slowProvider = new MockLightningProvider({ paymentDelay: 2000 });\n\n// Manual settlement control\nconst manualProvider = new MockLightningProvider({ autoSettle: false });\nmanualProvider.settleInvoice(paymentHash);\n```\n\n## Options\n\n| Option         | Type      | Default | Description                                    |\n| -------------- | --------- | ------- | ---------------------------------------------- |\n| `autoSettle`   | `boolean` | `true`  | Auto-mark invoices as settled on lookup        |\n| `failOnPay`    | `boolean` | `false` | Throw `RouteNotFoundError` on payment          |\n| `paymentDelay` | `number`  | `0`     | Artificial delay in ms before payment resolves |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}