{"_id":"bech32","_rev":"4578913","name":"bech32","description":"Bech32 encoding / decoding","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"time":{"modified":"2026-04-10T15:52:26.000Z","created":"2017-03-31T10:31:53.574Z","2.0.0":"2021-02-15T02:31:38.466Z","1.1.4":"2020-04-15T23:32:37.437Z","1.1.3":"2018-01-01T20:00:51.906Z","1.1.2":"2017-12-16T23:22:23.805Z","1.1.1":"2017-12-16T11:39:33.121Z","1.1.0":"2017-12-06T21:14:40.706Z","1.0.0":"2017-09-24T13:14:16.532Z","0.0.3":"2017-08-15T00:34:58.465Z","0.0.2":"2017-04-02T06:42:18.376Z","0.0.1":"2017-03-31T10:31:53.574Z"},"users":{},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"versions":{"2.0.0":{"name":"bech32","version":"2.0.0","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bech32m","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","devDependencies":{"@types/node":"^14.0.14","@types/tape":"^4.13.0","nyc":"^15.0.0","prettier":"^2.0.5","rimraf":"^3.0.2","tap-dot":"*","tape":"^4.13.2","tslint":"^6.1.3","typescript":"^3.9.5"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"build":"npm run clean && tsc -d","clean":"rimraf dist","coverage":"nyc -x dist/test/*.js --check-coverage --branches 90 --functions 90 tape dist/test/*.js","format":"npm run prettier -- --write","format:ci":"npm run prettier -- --check","gitdiff:ci":"npm run build && git diff --exit-code","lint":"tslint -p tsconfig.json -c tslint.json","prettier":"prettier --print-width 100 --single-quote --trailing-comma=all \"**/!(*.d).ts\"","test":"tape dist/test/*.js | tap-dot"},"gitHead":"d89ca54494ff85b2d3816f732bc7803eaa48d70e","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@2.0.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.11","dist":{"shasum":"078d3686535075c8c79709f054b1b226a133b355","size":3945,"noattachment":false,"key":"/bech32/-/bech32-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-2.0.0.tgz"},"_npmUser":{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"},"directories":{},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32_2.0.0_1613356298031_0.13338337680776036"},"_hasShrinkwrap":false,"publish_time":1613356298466,"_cnpm_publish_time":1613356298466,"_cnpmcore_publish_time":"2021-12-16T10:41:10.670Z"},"1.1.4":{"name":"bech32","version":"1.1.4","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","types":"index.d.ts","license":"MIT","dependencies":{},"devDependencies":{"nyc":"^15.0.0","standard":"^14.3.3","tap-dot":"*","tape":"^4.13.2"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","standard":"standard","test":"tape test/*.js | tap-dot"},"gitHead":"c993c6817175813ccfabe02a5877d2690e30ad83","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@1.1.4","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"shasum":"e38c9f37bf179b8eb16ae3a772b40c356d4832e9","size":3723,"noattachment":false,"key":"/bech32/-/bech32-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-1.1.4.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmUser":{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32_1.1.4_1586993557274_0.8463541620930355"},"_hasShrinkwrap":false,"publish_time":1586993557437,"_cnpm_publish_time":1586993557437,"_cnpmcore_publish_time":"2021-12-16T10:41:10.896Z"},"1.1.3":{"name":"bech32","version":"1.1.3","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"nyc":"^10.2.0","standard":"*","tape":"^4.6.3","tap-dot":"*"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","standard":"standard","test":"tape test/*.js | tap-dot"},"gitHead":"b91129de18826dc17b82ba11c6762b4627fc3d1c","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@1.1.3","_npmVersion":"5.6.0","_nodeVersion":"9.2.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"shasum":"bd47a8986bbb3eec34a56a097a84b8d3e9a2dfcd","size":2414,"noattachment":false,"key":"/bech32/-/bech32-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-1.1.3.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32-1.1.3.tgz_1514836851806_0.44081026990897954"},"directories":{},"publish_time":1514836851906,"_hasShrinkwrap":false,"_cnpm_publish_time":1514836851906,"_cnpmcore_publish_time":"2021-12-16T10:41:11.097Z"},"1.1.2":{"name":"bech32","version":"1.1.2","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"nyc":"^10.2.0","standard":"*","tape":"^4.6.3","tap-dot":"*"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","standard":"standard","test":"tape test/*.js | tap-dot"},"gitHead":"71704d5119ec0df21b6c9ac3d02c8902194a2662","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@1.1.2","_npmVersion":"5.6.0","_nodeVersion":"9.2.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"shasum":"d478ec934ba8497f461ce0b27a2e31450620f7f9","size":2385,"noattachment":false,"key":"/bech32/-/bech32-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-1.1.2.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32-1.1.2.tgz_1513466543720_0.9379815976135433"},"directories":{},"publish_time":1513466543805,"_hasShrinkwrap":false,"_cnpm_publish_time":1513466543805,"_cnpmcore_publish_time":"2021-12-16T10:41:11.310Z"},"1.1.1":{"name":"bech32","version":"1.1.1","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"nyc":"^10.2.0","standard":"*","tape":"^4.6.3","tap-dot":"*"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","standard":"standard","test":"tape test/*.js | tap-dot"},"gitHead":"0d43090b606a3b6f3d3e5e5b3f903e787a5020fb","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@1.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.2.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"shasum":"1fc37b97226f0c6af67fb7d0b9608b5c5cdfacda","size":2380,"noattachment":false,"key":"/bech32/-/bech32-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-1.1.1.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32-1.1.1.tgz_1513424372842_0.03126510791480541"},"directories":{},"publish_time":1513424373121,"_hasShrinkwrap":false,"_cnpm_publish_time":1513424373121,"_cnpmcore_publish_time":"2021-12-16T10:41:11.528Z"},"1.1.0":{"name":"bech32","version":"1.1.0","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"nyc":"^10.2.0","standard":"*","tape":"^4.6.3","tap-dot":"*"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","standard":"standard","test":"tape test/*.js | tap-dot"},"gitHead":"2fd0c518e9be406743b9bbb5f5fd495cf504f79e","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"9.2.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"shasum":"fe9784d8e8290880bebda7d6766b7665a46e51d3","size":2306,"noattachment":false,"key":"/bech32/-/bech32-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-1.1.0.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32-1.1.0.tgz_1512594880640_0.6595257199369371"},"directories":{},"publish_time":1512594880706,"_hasShrinkwrap":false,"_cnpm_publish_time":1512594880706,"_cnpmcore_publish_time":"2021-12-16T10:41:11.727Z"},"1.0.0":{"name":"bech32","version":"1.0.0","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"nyc":"^10.2.0","standard":"*","tape":"^4.6.3","tap-dot":"*"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","standard":"standard","test":"tape test/*.js | tap-dot"},"gitHead":"2077fe08df1a3db32270c0d83da205f21846c233","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"shasum":"78db633c6891b51e1a832f9beb25454cf5706865","size":2003,"noattachment":false,"key":"/bech32/-/bech32-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-1.0.0.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32-1.0.0.tgz_1506258856426_0.05329692433588207"},"directories":{},"publish_time":1506258856532,"_hasShrinkwrap":false,"_cnpm_publish_time":1506258856532,"_cnpmcore_publish_time":"2021-12-16T10:41:11.932Z"},"0.0.3":{"name":"bech32","version":"0.0.3","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"nyc":"^10.2.0","standard":"*","tape":"^4.6.3","tap-dot":"*"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","standard":"standard","test":"tape test/*.js | tap-dot"},"gitHead":"b3bc5d82896c45d046b74ae18ee13681f4212462","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@0.0.3","_npmVersion":"5.3.0","_nodeVersion":"8.3.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"shasum":"736747c4a6531c5d8937d0400498de30e93b2f9c","size":2001,"noattachment":false,"key":"/bech32/-/bech32-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-0.0.3.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bech32-0.0.3.tgz_1502757297950_0.5429511414840817"},"directories":{},"publish_time":1502757298465,"_hasShrinkwrap":false,"_cnpm_publish_time":1502757298465,"_cnpmcore_publish_time":"2021-12-16T10:41:12.156Z"},"0.0.2":{"name":"bech32","version":"0.0.2","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"standard":"*","tape":"^4.6.3"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"standard":"standard","test":"tape test/index.js | tap-dot"},"gitHead":"b6ae3789a5f5391ab83098d34f2de4bb15c40387","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@0.0.2","_shasum":"1d23dffa54a00035a3acc5dd19ca535b20ee8118","_from":".","_npmVersion":"4.4.4","_nodeVersion":"7.7.3","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"1d23dffa54a00035a3acc5dd19ca535b20ee8118","size":1870,"noattachment":false,"key":"/bech32/-/bech32-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-0.0.2.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bech32-0.0.2.tgz_1491115338024_0.3762250773143023"},"directories":{},"publish_time":1491115338376,"_hasShrinkwrap":false,"_cnpm_publish_time":1491115338376,"_cnpmcore_publish_time":"2021-12-16T10:41:12.348Z"},"0.0.1":{"name":"bech32","version":"0.0.1","description":"Bech32 encoding / decoding","keywords":["base32","bech32","bitcoin","crypto","crytography","decode","decoding","encode","encoding"],"main":"index.js","files":["index.js"],"license":"MIT","dependencies":{},"devDependencies":{"standard":"*","tape":"^4.6.3"},"repository":{"url":"git+ssh://git@github.com/bitcoinjs/bech32.git","type":"git"},"scripts":{"standard":"standard"},"gitHead":"803034cc658b3dfaf0ae6a06d631c82da35b610c","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"homepage":"https://github.com/bitcoinjs/bech32#readme","_id":"bech32@0.0.1","_shasum":"da6da04b309c9770e61e9a7c317d74c0bce3052b","_from":".","_npmVersion":"4.4.4","_nodeVersion":"7.7.3","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"da6da04b309c9770e61e9a7c317d74c0bce3052b","size":1586,"noattachment":false,"key":"/bech32/-/bech32-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bech32/download/bech32-0.0.1.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bech32-0.0.1.tgz_1490956313291_0.9111667913384736"},"directories":{},"publish_time":1490956313574,"_hasShrinkwrap":false,"_cnpm_publish_time":1490956313574,"_cnpmcore_publish_time":"2021-12-16T10:41:12.579Z"}},"readme":"# bech32\n[![build status](https://secure.travis-ci.org/bitcoinjs/bech32.png)](http://travis-ci.org/bitcoinjs/bech32)\n[![Version](http://img.shields.io/npm/v/bech32.svg)](https://www.npmjs.org/package/bech32)\n\nA [BIP173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)/[BIP350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki) compatible Bech32/Bech32m encoding/decoding library.\n\n\n## Example\n``` javascript\nlet { bech32, bech32m } = require('bech32')\n\nbech32.decode('abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw')\n// => {\n// \t prefix: 'abcdef',\n// \t words: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]\n// }\nbech32m.decode('abcdef1l7aum6echk45nj3s0wdvt2fg8x9yrzpqzd3ryx')\n// => {\n// \t prefix: 'abcdef',\n// \t words: [31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0]\n// }\n\n// toWords etc. are available on both bech32 and bech32m objects\nlet words = bech32.toWords(Buffer.from('foobar', 'utf8'))\nbech32.encode('foo', words)\n// => 'foo1vehk7cnpwgry9h96'\nbech32m.encode('foo', words)\n// => 'foo1vehk7cnpwgkc4mqc'\n```\n\n\n### Advanced\nBIP173 enforces a limitation of 90 characters,  if extend the `LIMIT` parameter beyond this,  be aware that the [effectiveness of checksum decreases as the length increases](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#checksum-design).\n\nIt is highly recommended **NOT** exceed 1023 characters, as the module could only guarantee detecting 1 error.\n\n\n## Credits\n- [Peter Wuille](https://github.com/sipa/bech32) for the reference JavaScript implementation, and for authoring the Bech32 [BIP173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) and Bech32m [BIP350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki).\n\n\n## License [MIT](LICENSE)\n","_attachments":{},"homepage":"https://github.com/bitcoinjs/bech32#readme","bugs":{"url":"https://github.com/bitcoinjs/bech32/issues"},"license":"MIT"}