{"id":26761702,"url":"https://github.com/gabidi/cyphernode-js-sdk","last_synced_at":"2026-03-13T06:32:18.257Z","repository":{"id":47930679,"uuid":"195709463","full_name":"gabidi/cyphernode-js-sdk","owner":"gabidi","description":"Isomorphic Javascript Cyphernode SDK for Bitcoin, C-lightning and OTS","archived":false,"fork":false,"pushed_at":"2023-01-24T00:55:21.000Z","size":587,"stargazers_count":9,"open_issues_count":14,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T09:17:33.354Z","etag":null,"topics":["bitcoin","cyphernode","javascript","lightning-network","opentimestamp","ots","typescript","wasabi"],"latest_commit_sha":null,"homepage":"","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/gabidi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-08T00:15:03.000Z","updated_at":"2022-04-05T06:40:20.000Z","dependencies_parsed_at":"2023-02-03T06:45:16.051Z","dependency_job_id":null,"html_url":"https://github.com/gabidi/cyphernode-js-sdk","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gabidi/cyphernode-js-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabidi%2Fcyphernode-js-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabidi%2Fcyphernode-js-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabidi%2Fcyphernode-js-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabidi%2Fcyphernode-js-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabidi","download_url":"https://codeload.github.com/gabidi/cyphernode-js-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabidi%2Fcyphernode-js-sdk/sbom","scorecard":{"id":416317,"data":{"date":"2025-08-11","repo":{"name":"github.com/gabidi/cyphernode-js-sdk","commit":"cdcefc87607f520087ad0ca68b2e3181d1df90e3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 1/17 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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating node:12.2.0-alpine to node:12.2.0-alpine@sha256:2ab3d9a1bac67c9b4202b774664adaa94d2f1e426d8d28e07bf8979df61c8694","Info:   0 out of   1 containerImage dependencies pinned"],"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"38 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-xwcq-pm8m-c4vf","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-9j49-mfvp-vmhm","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-4c7m-wxvm-r7gc","Warn: Project is vulnerable to: GHSA-pch5-whg9-qr2r","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T23:57:20.911Z","repository_id":47930679,"created_at":"2025-08-18T23:57:20.911Z","updated_at":"2025-08-18T23:57:20.911Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30460627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bitcoin","cyphernode","javascript","lightning-network","opentimestamp","ots","typescript","wasabi"],"created_at":"2025-03-28T18:26:47.713Z","updated_at":"2026-03-13T06:32:18.209Z","avatar_url":"https://github.com/gabidi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Isomorphic Javascript SDK for Bitcoin, C-lightning, Wasabi and Opentimestamp Vis-à-vis CypherNode.\n\n# Why ?\n\nCyphernode simplifies to a large extent the historically cumbersome process for an individual to run a full-node and thus participate in the Bitcoin value network.\nThe aim of the SDK is to further help access by bridging the gap between the \"systems software\" technological stack and the \"product space\" where product developers can start easily building apps for the future.\n\nThis SDK aims to abstract complications and offer a clean and friendly way to access the value proposition these systems offer with a value add of a modular transport.\n\n## Usage,Tests and Examples\n\n### Requirements\n1. You need to have Cyphernode running on an HTTP accessible PC\n2. You must have a valid Cyphernode admin api key to run the tests and you must pass the key to the SDK tests. The easiest way to do so is using environment variables. \nMake sure the following enviroment variables are set when using the sdk:\n```\nCYPHERNODE_API_KEY=\nCYPHER_GATEWAY_URL=https://localhost:2009/v0/\n```\n### A quick note on Cyphernode's gatekeeper SSL certifcate\nCyphernode's gatekeeper has a self signed SSL certificate. The SDK's tests use the node global to ignore invalid tickets. * THIS SHOULD NOT BE DONE IN PRODUCTION *\nThe SDK also accepts an enviroment variable CYPHERNODE_GATEKEEPER_CERT_CA which can be used to passed the contents of the cyphernode's certificate CA.  This is usaully located in:\n`~/path/to/your/cyphernode/dist/cyphernode/gatekeeper/certs`\nAn Example of providing the contents of the cert would be:\n```bash\nCYPHERNODE_GATEKEEPER_CERT_CA=$(cat ~/cyphernode/dist/cyphernode/gatekeeper/certs.pem) node yourapp.js\n```\nor by any other method like docker-compose, etc..\n### Example using the BTC client:\n```js \nconst {btcClient} = require('cyphernode-js-sdk');\nconst client = btcClient();\nconst balance = client.getBalance();\nconsole.log(`Your balance is ${balance} bitcoins`);\n```\n\n### Example using the Lightining client:\n```js \nconst {lnClient} = require('cyphernode-js-sdk');\nconst client = lnClient();\nconst makeInvoicePayload = {\n   msatoshi: 10,\n   label: \"much-ease-invoice\",\n   description: \"This rocks\",\n   expiry: 900,\n   callback_url: \"http://url.to/call/when/invoice/paid\"\n };\nconst invoice = await createInvoice(makeInvoicePayload);\n// Show qrCode(invoice)\n```\nDocumentation of this SDK is WIP in the meantime client tests serve as 'how-to' examples.\nFuthermore the SDK is written in typescript which should help give a better understanding of parameters and return types for the functions being called.\n\n## Transport Stacks\n\nThis SDK ships with a default HTTP transport stack, IE it will forward all your requests to the cyphernode endpoint via 'regular' GET and POST http requests.\nThe HTTP transport stack is automatically initilaized by default when a client is instantiated and uses the isomorphic package 'superagent' to send HTTP requests and is in fact the only depedency this sdk has. This is in the name of ease of use for both node and browser users.\n\nYou can easily drop that dependancy from the sdk by modifiying `./transports/cypherNodeHTTPTransport.ts` (or creating a new one in our [transports repo](https://github.com/gabidi/cyphernode-js-sdk-transports) !).\n\n### Connecting Using a proxy (ex: TOR)\nThe included HTTP transport supports connecting to your Cyphernode using an HTTP, HTTPS or Socks proxy !\nYou can simply set the enviroment variable below with your proxy's url:\n```bash\nCYPHERNODE_HTTP_TRANSPORT_PROXY=socks://localhost:9050\nCYPHER_GATEWAY_URL=cyphernode.onion or cleanet url/ip\n```\nand the SDK will automatically route all requests through the proxy.\nAlternativley you can also setup the proxy programmatically, please reference the example located in the `./src/examples/` folder.\n\n### Distritbued and custom transports\n\nA big part of this SDK seeks to help integrate Bitcoin into other communication protocols via the notion of transport architecture. Please check the [Cyphernode transport repo](https://github.com/gabidi/cyphernode-js-sdk-transports) for more information on how to reach your Cyphernode via different communication protocols\n\n### Client Tests\n```\n/clients/\n```\nContains the individual clients that can be instaniated to access each of Cyphernode's services, at this time these are:\n\n- btcClient.js : All things bitcoin\n- lncClient.js : All things lighting\n- otsClient.js : All things opentimestamp\n- wasabi.js : All things Wasabi\n\nTest files for each client are included that showcase the usage of functionality\n\n#### Client test requirements and steps:\n1. All tests need to have Cyphernode running on your PC\n2. You must have a valid Cyphernode admin api key to run the tests and you must pass the key to the SDK tests. The easiest way to do so is using environment variables. Simply create a \n```\n.env\n``` \nfile in the root directory of this repo and add the following enviroment variables:\n```\nCYPHERNODE_API_KEY=\nCYPHER_GATEWAY_URL=https://localhost:2009/v0/\n```\nthen run \n```\nyarn test:clients\n```\n## TODOs\n\n1. JSDoc this puppy\n2. Test coverage for all functions\n3. ~Fix OTS functions~\n4. ~Add remaining LN functions~\n\n## Example Real life usage\n\n- Sifir's [Private Bitcoin mobile wallet](https://sifir.io/bitcoin/cyphernode)\n--- \nLicense\n\n(The MIT License)\n\nCopyright (c) 2020 gabidi \u003cgabidi@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.i\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabidi%2Fcyphernode-js-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabidi%2Fcyphernode-js-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabidi%2Fcyphernode-js-sdk/lists"}