{"_id":"@ambosstech/lnd-macaroon","_rev":"6-6211c7d318820d7957a895ce30073614","name":"@ambosstech/lnd-macaroon","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"@ambosstech/lnd-macaroon","version":"0.0.1","author":{"name":"Amboss Technologies Inc."},"license":"AGPL-3.0-only","_id":"@ambosstech/lnd-macaroon@0.0.1","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"homepage":"https://github.com/AmbossTech/lnd-macaroon#readme","bugs":{"url":"https://github.com/AmbossTech/lnd-macaroon/issues"},"dist":{"shasum":"d3a9cb4909f0e0cfcb59ab8fcf5bf115c65d7927","tarball":"https://registry.npmjs.org/@ambosstech/lnd-macaroon/-/lnd-macaroon-0.0.1.tgz","fileCount":8,"integrity":"sha512-fzh62XRseCki2YxLs1wWfY6WIL/IwWlBLzEbR1lSgVECrToUcIR3wYZiLl+fM2ekUu2sZy6SwzM7Lrpwr8+84w==","signatures":[{"sig":"MEMCIH07cTChdWWNmlvMfo13tAsL2kfsvrI6tiv5Ns6UJc8hAh9MnYIVa53RG86obeFUKFaLQnpSnCssqqP0VcbPoLUS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17663},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c1662d4da52ccb8e02ba1c33afce6ed236dc1e8a","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prebuild":"rimraf dist","postbuild":"copyfiles -f ./src/proto/id* ./dist/proto"},"_npmUser":{"name":"ambossbot","email":"external-npm@amboss.tech"},"repository":{"url":"git+https://github.com/AmbossTech/lnd-macaroon.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple NPM package which helps decoding LND macaroons","directories":{},"_nodeVersion":"20.11.1","dependencies":{"macaroon":"^3.0.4","google-protobuf":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","copyfiles":"^2.4.1","typescript":"^5.9.2","@types/node":"^24.3.0"},"_npmOperationalInternal":{"tmp":"tmp/lnd-macaroon_0.0.1_1756834010566_0.7197529375379201","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@ambosstech/lnd-macaroon","version":"0.0.2","author":{"name":"Amboss Technologies Inc."},"license":"AGPL-3.0-only","_id":"@ambosstech/lnd-macaroon@0.0.2","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"homepage":"https://github.com/AmbossTech/lnd-macaroon#readme","bugs":{"url":"https://github.com/AmbossTech/lnd-macaroon/issues"},"dist":{"shasum":"d2fc93253e343904efd660b270119770b0114692","tarball":"https://registry.npmjs.org/@ambosstech/lnd-macaroon/-/lnd-macaroon-0.0.2.tgz","fileCount":10,"integrity":"sha512-p9jQeJNoFVMYIU1hPt4ywj07udr2yCGjFpEQFG+EsCzdzjyWNeKdh94P5eqAq2ftREobA1SzscxHn1wrkLjLnw==","signatures":[{"sig":"MEYCIQCeaplAJ3HyKervQIZbgGJZRKGl5+Rtnql+2+3IWBxLvgIhAPZLmGL2FNl5TFFnWx6Zs1fx1Ov1ivujHG7Sc0x8GUXf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57205},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"361f480791ffc4f51f879cb686e00714d3865a03","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prebuild":"rimraf dist","postbuild":"copyfiles -f ./src/proto/id* ./dist/proto"},"_npmUser":{"name":"ambossbot","email":"external-npm@amboss.tech"},"repository":{"url":"git+https://github.com/AmbossTech/lnd-macaroon.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple NPM package which helps decoding LND macaroons","directories":{},"_nodeVersion":"20.11.1","dependencies":{"lodash":"^4.17.21","macaroon":"^3.0.4","google-protobuf":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","copyfiles":"^2.4.1","typescript":"^5.9.2","@types/node":"^24.3.0","@types/lodash":"^4.17.20"},"_npmOperationalInternal":{"tmp":"tmp/lnd-macaroon_0.0.2_1757089751897_0.027128006103741775","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@ambosstech/lnd-macaroon","version":"0.0.3","author":{"name":"Amboss Technologies Inc."},"license":"AGPL-3.0-only","_id":"@ambosstech/lnd-macaroon@0.0.3","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"homepage":"https://github.com/AmbossTech/lnd-macaroon#readme","bugs":{"url":"https://github.com/AmbossTech/lnd-macaroon/issues"},"dist":{"shasum":"279eadb1bc97fabe893afefc325cb820cdaed431","tarball":"https://registry.npmjs.org/@ambosstech/lnd-macaroon/-/lnd-macaroon-0.0.3.tgz","fileCount":10,"integrity":"sha512-QJOpBqEgVX05mW2ktiQBzQB4UiZVdQUmtGtFEUUnqfQeZK1qs5HjJ97t6QVUml5Oew8AEOuBzipHOWMaK4JY4Q==","signatures":[{"sig":"MEUCIQCbnq8aAk2D3LAQ3tbXacGuRvJqpvNwe/+sVXiYCIpZVwIgeZZxigbxUVc5ClQ+pAH9/Eb5y9gviYXZLVeWZAtWfM0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57280},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a0c4e14be7ee3e3a8c42013602807f7cb34b7e8b","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prebuild":"rimraf dist","postbuild":"copyfiles -f ./src/proto/id* ./dist/proto"},"_npmUser":{"name":"ambossbot","email":"external-npm@amboss.tech"},"repository":{"url":"git+https://github.com/AmbossTech/lnd-macaroon.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple NPM package which helps decoding LND macaroons","directories":{},"_nodeVersion":"20.11.1","dependencies":{"lodash":"^4.17.21","macaroon":"^3.0.4","google-protobuf":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","copyfiles":"^2.4.1","typescript":"^5.9.2","@types/node":"^24.3.0","@types/lodash":"^4.17.20"},"_npmOperationalInternal":{"tmp":"tmp/lnd-macaroon_0.0.3_1757107096188_0.9068887426201668","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@ambosstech/lnd-macaroon","version":"0.0.4","author":{"name":"Amboss Technologies Inc."},"license":"AGPL-3.0-only","_id":"@ambosstech/lnd-macaroon@0.0.4","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"homepage":"https://github.com/AmbossTech/lnd-macaroon#readme","bugs":{"url":"https://github.com/AmbossTech/lnd-macaroon/issues"},"dist":{"shasum":"e8a6aca90689c41fa336efe07a8bb209697b5d97","tarball":"https://registry.npmjs.org/@ambosstech/lnd-macaroon/-/lnd-macaroon-0.0.4.tgz","fileCount":10,"integrity":"sha512-YKs9/pZQzRaZiLT4bzODWSD358xyEZzrmSEdvMpafah0BKSrA3yTfZ/NJuruOWxdN5wjIx9enfwJVrjdkpuEAA==","signatures":[{"sig":"MEQCIBpEZKuazPXODNFfb7J2OrJUN+I+/EMzUptPjZs6wW5gAiAflItxU82OFML8KZbOBhaR/JSYrAe5eyzD9RpZ/bLyhg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59223},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e28c229781d25218e4ab8657d16ba448963a89a1","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","prebuild":"rimraf dist","postbuild":"copyfiles -f ./src/proto/id* ./dist/proto"},"_npmUser":{"name":"ambossbot","email":"external-npm@amboss.tech"},"repository":{"url":"git+https://github.com/AmbossTech/lnd-macaroon.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple NPM package which helps decoding LND macaroons","directories":{},"_nodeVersion":"20.11.1","dependencies":{"lodash":"^4.17.21","macaroon":"^3.0.4","google-protobuf":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","copyfiles":"^2.4.1","typescript":"^5.9.2","@types/node":"^24.3.0","@types/lodash":"^4.17.20"},"_npmOperationalInternal":{"tmp":"tmp/lnd-macaroon_0.0.4_1758132239568_0.49215369099238804","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@ambosstech/lnd-macaroon","version":"0.0.5","author":{"name":"Amboss Technologies Inc."},"license":"AGPL-3.0-only","_id":"@ambosstech/lnd-macaroon@0.0.5","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"homepage":"https://github.com/AmbossTech/lnd-macaroon#readme","bugs":{"url":"https://github.com/AmbossTech/lnd-macaroon/issues"},"dist":{"shasum":"fd52de7f5845861da063c834fee812f789aecf64","tarball":"https://registry.npmjs.org/@ambosstech/lnd-macaroon/-/lnd-macaroon-0.0.5.tgz","fileCount":14,"integrity":"sha512-bq988GkkQm8mUim728KTBroiMwWAbHPvRCky1ZycPWEdoxCH+VB/geWsc+V6sA3apPPXd72IGuNQez9Oi89e+A==","signatures":[{"sig":"MEUCIQCLxJtPna8RJseDkHh3ZGwY+z7s8VYLLDgEnXo16Eh73AIgWyntIP5sVb9CFIlIVArHKBuNRjs83F8pbY0aI6eoFL0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62792},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"63a7f7f91fb298e0035a6b4e8091de9d3a4822d2","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc","decode":"ts-node src/cli.ts","prebuild":"rimraf dist","postbuild":"copyfiles -f ./src/proto/id* ./dist/proto"},"_npmUser":{"name":"ambossbot","email":"external-npm@amboss.tech"},"repository":{"url":"git+https://github.com/AmbossTech/lnd-macaroon.git","type":"git"},"_npmVersion":"10.2.4","description":"A simple NPM package which helps decoding LND macaroons","directories":{},"_nodeVersion":"20.11.1","dependencies":{"lodash":"^4.17.21","macaroon":"^3.0.4","google-protobuf":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","ts-node":"^10.9.2","copyfiles":"^2.4.1","typescript":"^5.9.2","@types/node":"^24.3.0","@types/lodash":"^4.17.20"},"_npmOperationalInternal":{"tmp":"tmp/lnd-macaroon_0.0.5_1763737111675_0.9781622862474473","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@ambosstech/lnd-macaroon","version":"0.0.9","description":"A simple NPM package which helps decoding LND macaroons","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/AmbossTech/lnd-macaroon.git"},"scripts":{"prebuild":"rimraf dist","postbuild":"copyfiles -f ./src/proto/id* ./dist/proto","build":"tsc","decode":"ts-node src/cli.ts","test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Amboss Technologies Inc."},"license":"AGPL-3.0-only","devDependencies":{"@types/lodash":"^4.17.20","@types/node":"^24.3.0","copyfiles":"^2.4.1","rimraf":"^6.0.1","ts-node":"^10.9.2","typescript":"^5.9.2"},"dependencies":{"google-protobuf":"^4.0.0","lodash":"^4.17.21","macaroon":"^3.0.4"},"gitHead":"25ef995e05cf193227525102ccd5aee63c9b8df9","_id":"@ambosstech/lnd-macaroon@0.0.9","bugs":{"url":"https://github.com/AmbossTech/lnd-macaroon/issues"},"homepage":"https://github.com/AmbossTech/lnd-macaroon#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-4n7/8u1kD9/gn1b5Sl9f8fxogoCfREWyWF1AKCROdkXxmGbWpUcV7Me5MkKSA8kfwbKoPUA36615IZdUr4UEaQ==","shasum":"74de35ce92f06278c31ee2f190b5a927ece4af0f","tarball":"https://registry.npmjs.org/@ambosstech/lnd-macaroon/-/lnd-macaroon-0.0.9.tgz","fileCount":16,"unpackedSize":64390,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ambosstech%2flnd-macaroon@0.0.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC5Y9YKAKuLrK4nCAHWtZZEhSYtmjCt0jm+rGSpLMdu7AiEAsgsSD9mGUkH3psZbLbmgRHNaAkernTJFnSZHyH3FMMU="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a23f1d8f-538d-4b64-9063-b908b25342f7"}},"directories":{},"maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lnd-macaroon_0.0.9_1764280046407_0.1693674727751242"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-02T17:26:50.473Z","modified":"2025-11-27T21:47:27.466Z","0.0.1":"2025-09-02T17:26:50.803Z","0.0.2":"2025-09-05T16:29:12.099Z","0.0.3":"2025-09-05T21:18:16.389Z","0.0.4":"2025-09-17T18:03:59.843Z","0.0.5":"2025-11-21T14:58:31.856Z","0.0.9":"2025-11-27T21:47:26.609Z"},"bugs":{"url":"https://github.com/AmbossTech/lnd-macaroon/issues"},"author":{"name":"Amboss Technologies Inc."},"license":"AGPL-3.0-only","homepage":"https://github.com/AmbossTech/lnd-macaroon#readme","repository":{"type":"git","url":"git+https://github.com/AmbossTech/lnd-macaroon.git"},"description":"A simple NPM package which helps decoding LND macaroons","maintainers":[{"name":"ambossbot","email":"external-npm@amboss.tech"}],"readme":"# LND Macaroon Decoder\n\nA helper NPM package which decodes [LND](https://github.com/lightningnetwork/lnd) macaroons.\n\nBuilt with the help of [guggero/cryptography-toolkit](https://github.com/guggero/cryptography-toolkit)\n\n## Programmatic usage\n\n`getMacaroonOperations` takes in an LND macaroon in hex format and returns an array of entities and actions.\n\n```typescript\nconst permissions = getMacaroonOperations(macaroonHex);\n\nfor (const { entity, actions } of permissions) {\n  console.log({ entity, actions });\n}\n\n// { entity: 'address', actions: [ 'read' ] }\n// { entity: 'info', actions: [ 'read' ] }\n// { entity: 'macaroon', actions: [ 'write' ] }\n// {\n//   entity: 'uri',\n//   actions: [\n//     '/lnrpc.Lightning/AddInvoice',\n//     '/peersrpc.Peers/UpdateNodeAnnouncement'\n//   ]\n// }\n```\n\n`getMacaroonInfo` includes the macaroon's `location` value, which lets you\ndistinguish between macaroons from `lnd`, `tapd` and `litd`.\n\n```typescript\nconst info = getMacaroonInfo(macaroonHex);\nconsole.log(info);\n\n// {\n//   location: \"lnd\",\n//   permissions: [\n//     { entity: 'address', actions: [ 'read' ] },\n//     { entity: 'info', actions: [ 'read' ] },\n//     // ...\n//   ]\n// }\n```\n\n`getFlatPermissionList` and `verifyMacaroonPermissions` are helper functions to check the macaroon permissions.\n\n## Running the CLI command\n\nUse the NPM script to decode a macaroon:\n\n```bash\nnpm run decode <your-macaroon-hex>\n```\n\nReplace `<your-macaroon-hex>` with an actual LND macaroon in hex format.\n\n## Publishing Method\n\nWhen you update the package version and that change is merged in the `main` branch, the publication happens automatically. You can either manually update the `version` inside `package.json` or use one of these NPM commands for [semantic versioning](https://semver.org/).\n\n```bash\nnpm version minor\n\nnpm version patch\n\nnpm version major\n```\n","readmeFilename":"README.md"}