{"id":13773116,"url":"https://github.com/cryptocoinjs/stealth","last_synced_at":"2025-10-20T11:27:18.357Z","repository":{"id":27329868,"uuid":"30804420","full_name":"cryptocoinjs/stealth","owner":"cryptocoinjs","description":"Stealth addresses for Bitcoin and other crypto currencies.","archived":false,"fork":false,"pushed_at":"2015-08-31T12:34:36.000Z","size":144,"stargazers_count":46,"open_issues_count":0,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-09-09T23:38:38.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptocoinjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-14T18:15:37.000Z","updated_at":"2025-08-25T07:39:21.000Z","dependencies_parsed_at":"2022-08-17T17:55:38.964Z","dependency_job_id":null,"html_url":"https://github.com/cryptocoinjs/stealth","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/cryptocoinjs/stealth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Fstealth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Fstealth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Fstealth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Fstealth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptocoinjs","download_url":"https://codeload.github.com/cryptocoinjs/stealth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptocoinjs%2Fstealth/sbom","scorecard":{"id":310215,"data":{"date":"2025-08-11","repo":{"name":"github.com/cryptocoinjs/stealth","commit":"b271b731401b0107bc2970f95cfc2ef18e42c5f4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T23:03:28.335Z","repository_id":27329868,"created_at":"2025-08-17T23:03:28.335Z","updated_at":"2025-08-17T23:03:28.335Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280082239,"owners_count":26268710,"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","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-03T17:01:11.582Z","updated_at":"2025-10-20T11:27:18.302Z","avatar_url":"https://github.com/cryptocoinjs.png","language":"JavaScript","funding_links":[],"categories":["List of content"],"sub_categories":["Utilities"],"readme":"stealth\n=======\n\n[![build status](https://secure.travis-ci.org/cryptocoinjs/stealth.svg)](http://travis-ci.org/cryptocoinjs/stealth)\n[![Coverage Status](https://img.shields.io/coveralls/cryptocoinjs/stealth.svg)](https://coveralls.io/r/cryptocoinjs/stealth)\n\n[![js-standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)\n\nThis module is used for stealth addresses for Bitcoin and other crypto currencies.\n\n\nUsage\n-----\n\nFirst, you should really read this excellent resource: https://gist.github.com/ryanxcharles/1c0f95d0892b4a92d70a\n\nThis module depends upon [ecurve](https://github.com/cryptocoinjs/ecurve) and may change to\n[elliptic](https://github.com/indutny/elliptic) in the future. However, this is just an implementation detail\nthat shouldn't affect your code.\n\n### Example\n\n#### If you're the payer (sender)\n\n```js\nvar Stealth = require('stealth')\n\n// you get this from the person you're going to pay (receiver)\nvar addr = 'vJmtuUb8ysKiM1HtHQF23FGfjGAKu5sM94UyyjknqhJHNdj5CZzwtpGzeyaATQ2HvuzomNVtiwsTJSWzzCBgCTtUZbRFpzKVq9MAUr'\nvar stealth = Stealth.fromString(addr)\n\n// single-use nonce key pair, works with CoinKey, bitcoinjs-lib, bitcore, etc\nvar keypair = require('coinkey').createRandom()\n\n// generate payment address\nvar payToAddress = stealth.genPaymentAddress(keypair.privateKey)\n\n// create transaction with two outputs:\n// 1. Regular pay-to-pubkeyhash with `payToAddress` as recipient\n// 2. OP_RETURN with `keypair.publicKey`\n```\n\n\n#### If you're the payee (recipient)\n\n```js\nvar Stealth = require('stealth')\n\n// you need to scan every transaction and look for the following:\n// 1. does the transaction contain an OP_RETURN?\n// 2. if yes, then extract the OP_RETURN\n// 3. is the OP_RETURN data a compressed public key (33 bytes)?\n// 4. if yes, check if mine\n\n// generate two key pairs, can use CoinKey, bitcoinjs-lib, bitcore, etc\nvar payloadKeyPair = require('coinkey').createRandom()\nvar scanKeyPair = require('coinkey').createRandom()\n\n// note, the private keys are NOT encoded in the Stealth address\n// you need to save them somewhere\nvar stealth = new Stealth({\n  payloadPrivKey: payloadKeyPair.privateKey,\n  payloadPubKey: payloadKeyPair.publicKey,\n  scanPrivKey: scanKeyPair.privateKey,\n  scanPubKey: scanKeyPair.publicKey\n})\n\nvar addr = stealth.toString()\n// =\u003e 'vJmtuUb8ysKiM1HtHQF23FGfjGAKu5sM94UyyjknqhJHNdj5CZzwtpGzeyaATQ2HvuzomNVtiwsTJSWzzCBgCTtUZbRFpzKVq9MAUr'\n\n// publish addr or give it someone\n// unlike regular Bitcoin addresses, you can use\n// stealth address as much as you like\n\n// scan and decode transactions\n\nvar opReturnPubKey = /* */\nvar pubKeyHashWithPayment = /* */\n\nvar keypair = stealth.checkPaymentPubKeyHash(opReturnPubKey, pubKeyHashWithPayment)\n\n// it NOT YOURS, `keypair` will be falsey\n\nif (keypair == null) {\n  console.log('payment is not mine')\n} else {\n  console.log('payment is mine')\n\n  // redeem with `privKey`\n  console.log(keypair.privKey)\n}\n```\n\nAPI\n---\n\n(TODO)\n\n### + fromRandom([config])\n\nClass method to create a stealth key from a random entropy. Optionally pass in `config` with the following:\n- `rng`: A function that should accept a number `n` and return a `Buffer`/`Array` with length `n`.\n- `version`: Version code for stealth string.\n\n\n\nResources\n---------\n\n### Credits\n\nThe creation of this module owes a lot of credit to the prior work of [Ryan X. Charles](https://github.com/ryanxcharles), specifically the following\nresources:\n\n- https://github.com/ryanxcharles/fullnode\n- https://gist.github.com/ryanxcharles/1c0f95d0892b4a92d70a\n\n\n### Additional Resources\n\n- Dark Wallet description: https://wiki.unsystem.net/en/index.php/DarkWallet/Stealth\n- Dark Wallet infographic: https://wiki.unsystem.net/en/images/e/e5/RHhNKL6.jpg\n- Stealth Whitepaper: http://sourceforge.net/p/bitcoin/mailman/message/31813471/\n\n\nLicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptocoinjs%2Fstealth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptocoinjs%2Fstealth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptocoinjs%2Fstealth/lists"}