{"_id":"bip32-path","_rev":"3-150b413f4d2c97e320c5684946ca1bb7","name":"bip32-path","description":"Bitcoin BIP32 ('HD Wallet') path helpers.","dist-tags":{"latest":"0.4.2"},"versions":{"0.4.2":{"name":"bip32-path","version":"0.4.2","description":"Bitcoin BIP32 ('HD Wallet') path helpers.","main":"index.js","author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"license":"MIT","keywords":["bitcoin","bip32","hdwallet","trezor"],"repository":{"type":"git","url":"git+https://github.com/axic/bip32-path.git"},"bugs":{"url":"https://github.com/axic/bip32-path/issues"},"homepage":"https://github.com/axic/bip32-path","scripts":{"test":"mocha ./test/"},"devDependencies":{"mocha":"^2.1.0"},"gitHead":"7ec093c5c0930dffca12b31e81bc5de0af6c028c","_id":"bip32-path@0.4.2","_shasum":"5db0416ad6822712f077836e2557b8697c0c7c99","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"axic","email":"alex@rtfs.hu"},"dist":{"shasum":"5db0416ad6822712f077836e2557b8697c0c7c99","tarball":"https://registry.npmjs.org/bip32-path/-/bip32-path-0.4.2.tgz","integrity":"sha512-ZBMCELjJfcNMkz5bDuJ1WrYvjlhEF5k6mQ8vUr4N7MbVRsXei7ZOg8VhhwMfNiW68NWmLkgkc6WvTickrLGprQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGIsJNxQAnxre2ojUWnvsZIlpJDWEB8H393wnJrfLO/3AiEA7Gq6QCTWVZDdO1I1BqzaeqJDF7R58LzkHa1d7CMxgyc="}]},"maintainers":[{"name":"axic","email":"alex@rtfs.hu"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bip32-path-0.4.2.tgz_1461612321866_0.8117404778022319"}}},"readme":"# BIP32 Path\n\nBitcoin BIP32 (\"HD Wallet\") path helpers.\n\nThere are multiple path representations being used by different implementations. These includes:\n- `m/44'/0'/0'/0/0` where the apostrophe means hardened key\n- `m/44h/0h/0h/0/0` where the letter `h` means hardened key\n- and a binary representation predominantly used by Trezor & compatible wallets and some software tools, such as [bitcoinjs-lib](https://github.com/bitcoinjs/bitcoinjs-lib)\n\nSome useful links:\n- [BIP32 specification](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)\n- [BIP44 specification](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki)\n- [BIP39, an online tool to convert/derive keys](https://dcpos.github.io/bip39/)\n- [BIP32JP, an online tool to convert/derive keys](https://bip32jp.github.io/english/index.html)\n\n\n### API\n\n- `BIPPath.fromString(path, reqRoot)` - creates an instance from a path written as text. Set `reqRoot` to true if the `m/` prefix is mandatory.\n- `BIPPath.fromPathArray(path)` - creates an instance from a binary path array\n- `new BIPPath(path)` - alias for `BIPPath.fromPathArray(path)`\n- `<bippath>.toString(noRoot, oldStyle)` - returns a text encoded path. Set to `noRoot` to true to omit the `m/` prefix. Set `oldStyle` true to use `h` instead of `'` for marking hardened nodes.\n- `<bippath>.toPathArray()` - returns a binary path array\n- `BIPPath.validateString(path, reqRoot)` - returns true if the input is a valid path string\n- `BIPPath.validatePathArray(path)` - returns true if the input is a valid binary path array\n\nBinary path arrays contain each node as a separate number, where hardened nodes are marked by setting the 32th bit: `m/44'/1/1/0` corresponds to `[ 0x8000002c, 1, 1, 0 ]`\n\n\n### Examples\n\n```js\nvar bippath = require('bip32-path')\n\nbippath.fromPathArray([0x8000002c, 1, 1, 0]).toString() // m/44'/1/1/0\n\nbippath.fromString(\"m/44'/0'/0'\").toString(false, true) // m/44h/0h/0h\n\nbippath.fromString(\"m/44h/0h/0'\").toString(true) // 44'/0'/0'\n\nbippath.fromString(\"m/44'/0'/0'\").toPathArray() // [ 0x8000002c, 0x80000000, 0x80000000 ]\n```\n","maintainers":[{"name":"axic","email":"alex@rtfs.hu"}],"time":{"modified":"2022-06-13T04:40:10.101Z","created":"2016-04-25T19:25:24.226Z","0.4.2":"2016-04-25T19:25:24.226Z"},"homepage":"https://github.com/axic/bip32-path","keywords":["bitcoin","bip32","hdwallet","trezor"],"repository":{"type":"git","url":"git+https://github.com/axic/bip32-path.git"},"author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"bugs":{"url":"https://github.com/axic/bip32-path/issues"},"license":"MIT","readmeFilename":"README.md"}