{"id":28394952,"url":"https://github.com/ealmansi/cashaddrjs","last_synced_at":"2026-04-08T14:32:50.650Z","repository":{"id":42673750,"uuid":"115899761","full_name":"ealmansi/cashaddrjs","owner":"ealmansi","description":"CashAddr.js: The new Bitcoin Cash address format for Node.js and web browsers.","archived":false,"fork":false,"pushed_at":"2023-11-26T14:47:16.000Z","size":1529,"stargazers_count":37,"open_issues_count":0,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-12T20:24:58.844Z","etag":null,"topics":["address","bitcoin","browser","cash","cashaddr","format","node"],"latest_commit_sha":null,"homepage":"https://emilio.almansi.me/cashaddrjs/module-cashaddr.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ealmansi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-01T04:44:26.000Z","updated_at":"2024-01-06T21:31:29.000Z","dependencies_parsed_at":"2023-11-26T15:39:52.887Z","dependency_job_id":null,"html_url":"https://github.com/ealmansi/cashaddrjs","commit_stats":{"total_commits":120,"total_committers":3,"mean_commits":40.0,"dds":0.125,"last_synced_commit":"8a0efc2cb84e174e88f201b1951fc79c5ffe2ac8"},"previous_names":["bitcoincashjs/cashaddrjs"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/ealmansi/cashaddrjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ealmansi%2Fcashaddrjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ealmansi%2Fcashaddrjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ealmansi%2Fcashaddrjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ealmansi%2Fcashaddrjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ealmansi","download_url":"https://codeload.github.com/ealmansi/cashaddrjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ealmansi%2Fcashaddrjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262172500,"owners_count":23270028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address","bitcoin","browser","cash","cashaddr","format","node"],"created_at":"2025-05-31T19:09:28.422Z","updated_at":"2025-12-12T03:01:41.633Z","avatar_url":"https://github.com/ealmansi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CashAddr.js: The new Bitcoin Cash address format for Node.js and web browsers.\n\n[![Build Status](https://travis-ci.org/ealmansi/cashaddrjs.svg?branch=master)](https://travis-ci.org/ealmansi/cashaddrjs) [![Coverage Status](https://coveralls.io/repos/github/ealmansi/cashaddrjs/badge.svg?branch=master)](https://coveralls.io/github/ealmansi/cashaddrjs?branch=master)\n\n[![NPM](https://nodei.co/npm/cashaddrjs.png?downloads=true)](https://nodei.co/npm/cashaddrjs/)\n\nJavaScript implementation for the new CashAddr address format for Bitcoin Cash.\n\nCompliant with the original CashAddr [specification](https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md) which improves upon [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki).\n\n*Note:* This is a JavaScript implementation of the CashAddr format specification. If you are looking for a general purpose Bitcoin Cash address translation library, check out the easy-to-use and well-tested [BchAddr.js](https://github.com/ealmansi/bchaddrjs).\n\n## Installation\n\n### Using NPM\n\n```bsh\n$ npm install --save cashaddrjs\n```\n\n### Using Bower\n\n```bsh\n$ bower install --save cashaddrjs\n```\n\n### Manually\n\nYou may also download the distribution file manually and place it within your third-party scripts directory: [dist/cashaddrjs-0.4.4.min.js](https://unpkg.com/cashaddrjs@0.4.4/dist/cashaddrjs-0.4.4.min.js).\n\n## Usage\n\n### In Node.js\n\n```javascript\nconst cashaddr = require('cashaddrjs');\nconst address = 'bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a';\nconst { prefix, type, hash } = cashaddr.decode(address);\nconsole.log(prefix); // 'bitcoincash'\nconsole.log(type); // 'P2PKH'\nconsole.log(hash); // Uint8Array [ 118, 160, ..., 115 ]\nconsole.log(cashaddr.encode(prefix, type, hash)); // 'bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a'\n```\n\n*Note:* This is a JavaScript implementation of the CashAddr format specification. If you are looking for an easy-to-use and well-tested library to translate between different formats, check out [BchAddr.js](https://github.com/ealmansi/bchaddrjs).\n\n### Browser\n\n#### Script Tag\n\nYou may include a script tag in your HTML and the `cashaddr` module will be defined globally on subsequent scripts.\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    ...\n    \u003cscript src=\"https://unpkg.com/cashaddrjs@0.4.4/dist/cashaddrjs-0.4.4.min.js\"\u003e\u003c/script\u003e\n  \u003c/head\u003e\n  ...\n\u003c/html\u003e\n```\n\n## Documentation\n\n### Generate and Browse Locally\n\n```bsh\n$ npm run docs\n```\n\n### Online\n\nBrowse automatically generated jsdocs [online](https://emilio.almansi.me/cashaddrjs/module-cashaddr.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fealmansi%2Fcashaddrjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fealmansi%2Fcashaddrjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fealmansi%2Fcashaddrjs/lists"}