{"_id":"@caravan/bip32","_rev":"6-9f0d9022ba89746fd4157ebae079706e","name":"@caravan/bip32","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@caravan/bip32","version":"1.0.0","author":{"name":"unchained capital"},"license":"MIT","_id":"@caravan/bip32@1.0.0","maintainers":[{"name":"bucko","email":"buck.perley@protonmail.com"}],"dist":{"shasum":"78d3ff2f190bf4f70930eed4ffc5320bea6401d2","tarball":"https://registry.npmjs.org/@caravan/bip32/-/bip32-1.0.0.tgz","fileCount":5,"integrity":"sha512-cjUm7IeCNRdfpHl01Wtx4qzjm750+ZbjMe/Ifb0prPlEKCqi5pqu0kuqwawZ9kCVy2o/q10cGRhXaqm2UVoLxA==","signatures":[{"sig":"MEYCIQC1+PiyFDiT2TPUxf4IOznh3QwmkG2P5IUc0EaWxLXtTgIhANIkyBVcGq0e8VAcoHsVfq8VmF7Vg4QwV201XDpsJA5F","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20425},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"c8459fca314c2e34dede43d59aa93a084a122e42","private":false,"scripts":{"ci":"npm run lint && npm run test","dev":"npm run build -- --watch","lint":"eslint src/","test":"jest src","build":"tsup src/index.ts --format cjs,esm --dts","test:debug":"node --inspect-brk ../../node_modules/.bin/jest --runInBand","test:watch":"jest --watch src"},"_npmUser":{"name":"bucko","email":"buck.perley@protonmail.com"},"_npmVersion":"10.5.0","description":"Package for working with bip32 and derivative objects like extended public keys","directories":{},"_nodeVersion":"20.12.2","dependencies":{"bip174":"^2.1.1","buffer":"^6.0.3","@caravan/bitcoin":"*"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","tsup":"^7.2.0","jsdom":"24.0.0","eslint":"^8.56.0","ts-jest":"^29.1.2","ts-node":"^10.9.2","typescript":"^5.2.2","@types/jest":"^29.5.12","jsdom-global":"3.0.2","@jest/globals":"^29.7.0","eslint-plugin-import":"^2.30.0","@caravan/eslint-config":"*","eslint-plugin-prettier":"^5.1.3","@caravan/typescript-config":"*","@inrupt/jest-jsdom-polyfills":"^3.2.1"},"_npmOperationalInternal":{"tmp":"tmp/bip32_1.0.0_1725914322167_0.3642477292032318","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@caravan/bip32","version":"1.0.1","author":{"name":"unchained capital"},"license":"MIT","_id":"@caravan/bip32@1.0.1","maintainers":[{"name":"bucko","email":"buck.perley@protonmail.com"}],"dist":{"shasum":"5a8840f4fee9e99634b38439852ace001719d98f","tarball":"https://registry.npmjs.org/@caravan/bip32/-/bip32-1.0.1.tgz","fileCount":5,"integrity":"sha512-I6KdBkSlp/nDNDRanNdCgqarq26Pl+GLV9Sq5ENQpi4brOyoW9rwnRQUcZ1IoRmWUWIFCjF05j/BEcoL4U76FA==","signatures":[{"sig":"MEQCIA6LuEb857ohHA8KbGAIBzMqrUtF4/BYUa17Xq2lZjljAiA06jwy3SFnqw9PWvHnt0Jygs5hnv0J4mhLtu2ci0DaHw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21016},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ff187d6ddefd23bfc3a5a5eab872223dadcdf04f","private":false,"scripts":{"ci":"npm run lint && npm run test","dev":"npm run build -- --watch","lint":"eslint src/","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","test:debug":"node --inspect-brk ../../node_modules/.bin/vitest run","test:watch":"vitest watch"},"_npmUser":{"name":"bucko","email":"buck.perley@protonmail.com"},"_npmVersion":"10.8.2","description":"Package for working with bip32 and derivative objects like extended public keys","directories":{},"_nodeVersion":"20.18.1","dependencies":{"bip174":"^2.1.1","buffer":"^6.0.3","@caravan/bitcoin":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","ts-node":"^10.9.2","typescript":"^5.2.2","@types/jest":"^29.5.12","@types/node":"^22.14.0","@jest/globals":"^29.7.0","eslint-plugin-import":"^2.30.0","@caravan/eslint-config":"*","eslint-plugin-prettier":"^5.1.3","@caravan/typescript-config":"*","@inrupt/jest-jsdom-polyfills":"^3.2.1"},"_npmOperationalInternal":{"tmp":"tmp/bip32_1.0.1_1745541729401_0.5453044981562862","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@caravan/bip32","version":"1.0.2","author":{"name":"unchained capital"},"license":"MIT","_id":"@caravan/bip32@1.0.2","maintainers":[{"name":"bucko","email":"buck.perley@protonmail.com"}],"dist":{"shasum":"806615b01a84e179f8d97b2df85fe54b33522e8c","tarball":"https://registry.npmjs.org/@caravan/bip32/-/bip32-1.0.2.tgz","fileCount":5,"integrity":"sha512-7xw0DVKoHT1oriKH7dESqzchvDg09r6fb/ts4bFrmKmtcZxP9lgTeJ87C4HqEZ5v1WcLGg3jqV+zsCa0vYQ6cw==","signatures":[{"sig":"MEUCIQCab8AvmuzgHjLoHVcNQm2xMdp1fD5sL73X1j6uJgXuHwIgCGoXI846p11VyvEPsT5HH3/YqW01h15pxUnz/EK1LiA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20981},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"259691271d153ba76ebe78fa6c8fa281aaacd2b8","private":false,"scripts":{"ci":"npm run lint && npm run test","dev":"npm run build -- --watch","lint":"eslint src/","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","test:debug":"node --inspect-brk ../../node_modules/.bin/vitest run","test:watch":"vitest watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"bucko","email":"buck.perley@protonmail.com"},"_npmVersion":"10.8.2","description":"Package for working with bip32 and derivative objects like extended public keys","directories":{},"_nodeVersion":"20.19.5","dependencies":{"bip174":"^2.1.1","buffer":"^6.0.3","@caravan/bitcoin":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","ts-node":"^10.9.2","typescript":"^5.2.2","@types/node":"^22.14.0","eslint-plugin-import":"^2.30.0","@caravan/eslint-config":"*","eslint-plugin-prettier":"^5.1.3","@caravan/typescript-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/bip32_1.0.2_1763762555554_0.778049086814735","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@caravan/bip32","version":"1.0.3","author":{"name":"unchained capital"},"license":"MIT","_id":"@caravan/bip32@1.0.3","maintainers":[{"name":"bucko","email":"buck.perley@protonmail.com"}],"dist":{"shasum":"673055a4597d071dd72ada774481ee84068752ea","tarball":"https://registry.npmjs.org/@caravan/bip32/-/bip32-1.0.3.tgz","fileCount":5,"integrity":"sha512-o7q25Sxth3wmdZsXBNgc+PcidZrmGU1cP3A9wrCuUl2cNLwlDVtt9IZAlTU+X8YC9lFkBL1wqNPMVbm5MhbjUQ==","signatures":[{"sig":"MEQCIGUOW9RaxH2GK15nbfcaZyDfKSuPTXb5lrrgdmCVtxnyAiBySQdeAi2CInC7UUlDoBl+0cmHnmj/iuriI/NTYy4Brw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23009},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"1f8f594e04acc7452618769780a105e9698584ab","private":false,"scripts":{"ci":"npm run lint && npm run test","dev":"npm run build -- --watch","lint":"eslint src/","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","test:debug":"node --inspect-brk ../../node_modules/.bin/vitest run","test:watch":"vitest watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"bucko","email":"buck.perley@protonmail.com"},"_npmVersion":"10.8.2","description":"Package for working with bip32 and derivative objects like extended public keys","directories":{},"_nodeVersion":"20.19.6","dependencies":{"bip174":"^2.1.1","buffer":"^6.0.3","@caravan/bitcoin":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","ts-node":"^10.9.2","typescript":"^5.2.2","@types/node":"^22.14.0","eslint-plugin-import":"^2.30.0","@caravan/eslint-config":"*","eslint-plugin-prettier":"^5.1.3","@caravan/typescript-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/bip32_1.0.3_1767649923470_0.38774511036398107","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@caravan/bip32","version":"1.0.4","author":{"name":"unchained capital"},"license":"MIT","_id":"@caravan/bip32@1.0.4","maintainers":[{"name":"bucko","email":"buck@unchained.com"}],"homepage":"https://github.com/caravan-bitcoin/caravan#readme","bugs":{"url":"https://github.com/caravan-bitcoin/caravan/issues"},"dist":{"shasum":"a61c694ede78afe4c57c7ffaece39d12c944cde1","tarball":"https://registry.npmjs.org/@caravan/bip32/-/bip32-1.0.4.tgz","fileCount":5,"integrity":"sha512-KhyPnNj6uZuHkDIrMeCqiG4vUatRCyrHOCJLdcUC9h7hINx3sNA584UvH/EkV/lcZLJWuU5P9X2Iyf0hueJAPw==","signatures":[{"sig":"MEUCIQCrbLQxq3Oahd6cP6g9HHEu3vw4fcw8UH+i0lJNc4phTQIgVdGwODso/Q9FnvoRexiXPYps6JFGKDXeVu8vJrkw9TU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@caravan%2fbip32@1.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23142},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ba0df232530e5a4233178dbb4ae757f642b1390c","private":false,"scripts":{"ci":"npm run lint && npm run test","dev":"npm run build -- --watch","lint":"eslint src/","test":"vitest run","build":"tsup src/index.ts --format cjs,esm --dts","test:debug":"node --inspect-brk ../../node_modules/.bin/vitest run","test:watch":"vitest watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d4567900-b607-4c10-bd74-eefb693ab902"}},"repository":{"url":"git+https://github.com/caravan-bitcoin/caravan.git","type":"git","directory":"packages/bip32"},"_npmVersion":"11.6.2","description":"Package for working with bip32 and derivative objects like extended public keys","directories":{},"_nodeVersion":"24.13.0","dependencies":{"bip174":"^2.1.1","buffer":"^6.0.3","@caravan/bitcoin":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","ts-node":"^10.9.2","typescript":"^5.2.2","@types/node":"^22.14.0","eslint-plugin-import":"^2.30.0","@caravan/eslint-config":"*","eslint-plugin-prettier":"^5.1.3","@caravan/typescript-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/bip32_1.0.4_1771476609553_0.7683630180099985","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-09-09T20:38:42.058Z","modified":"2026-04-17T19:41:21.009Z","1.0.0":"2024-09-09T20:38:42.315Z","1.0.1":"2025-04-25T00:42:09.585Z","1.0.2":"2025-11-21T22:02:35.793Z","1.0.3":"2026-01-05T21:52:03.617Z","1.0.4":"2026-02-19T04:50:09.707Z"},"bugs":{"url":"https://github.com/caravan-bitcoin/caravan/issues"},"author":{"name":"unchained capital"},"license":"MIT","homepage":"https://github.com/caravan-bitcoin/caravan#readme","repository":{"url":"git+https://github.com/caravan-bitcoin/caravan.git","type":"git","directory":"packages/bip32"},"description":"Package for working with bip32 and derivative objects like extended public keys","maintainers":[],"readme":"# Bip32 Utilities\n\n## Paths\n\n### `secureSecretPath`\n\nGenerates a random BIP32 path of a given depth. The randomness is generated using the Node.js crypto module. This can be used for blinding an xpub. The function ensures that the depth is an integer and less than 32.\n\n### `combineBip32Paths`\n\nGiven two BIP32 paths, combine them into a single path.\nUseful for creating blinded xpubs when you have the source\npath and want to append the randomly generated one\n\n### `getUnmaskedPath`\n\nGiven a derivation and a global xpub, return the unmasked path\nthat can be used to derive the child pubkey from the global xpub.\nThis is useful when you have a child xpub (e.g. a blinded xpub) derived\nfrom a masked xpub and you need to generate the full, unmasked path.\n\n### `getRelativeBip32Sequence`\n\nA utility to use when you have a parent and child bip32 paths and want the \"relative\"\nsequence (the path elements from the child that are added on to the parent).\n\n## Keys\n\n### `getRandomChildXpub`\n\nGiven a source xpub, derive a child xpub at a random path using secureSecretPath\ndefaults to depth 4. Useful for creating blinded xpubs or generating random child xpubs (e.g. strands)\n\n### `getMaskedKeyOrigin`\n\nDerive a masked key origin from an xpub. Useful for generating\ndescriptors and wallet configurations for keys that don't need to have their\nkey origin info revealed.\nBip32 path will use all 0s for the depth of the given xpub and the\nroot fingerprint will be set to the parent fingerprint of the xpub\n\n### `isValidChildPubKey`\n\nWhen you have a global xpub from a PSBT, it's useful to make\nsure that a child pubkey can be derived from that psbt. Sometimes\nthe pubkey derivation comes from a masked and/or blinded xpub.\nSo we need to combine the child derivation with the global\nand confirm that the pubkey can be derived from that source\n\n### `setXpubNetwork`\n\nSets and updates serialization of xpub for a network accordingly.\n\n### `getBlindedXpub`\n\nGiven a source xpub, derive a blinded xpub at a random path.\nWill target 128 bits of entropy for the path with a depth of 4.\n","readmeFilename":"README.md"}