{"id":42491360,"url":"https://github.com/p2pderivatives/cfd-js","last_synced_at":"2026-01-28T12:19:45.751Z","repository":{"id":37851823,"uuid":"214355605","full_name":"p2pderivatives/cfd-js","owner":"p2pderivatives","description":"Crypto Finance Development Kit for JavaScript","archived":false,"fork":false,"pushed_at":"2026-01-22T00:24:43.000Z","size":3167,"stargazers_count":6,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-22T13:50:45.194Z","etag":null,"topics":["bitcoin","cfd","electron","elements","javascript","liquid","nodejs"],"latest_commit_sha":null,"homepage":"","language":"C++","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/p2pderivatives.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-11T06:02:19.000Z","updated_at":"2026-01-22T00:24:42.000Z","dependencies_parsed_at":"2024-02-21T04:23:52.343Z","dependency_job_id":"f7032868-5308-4a75-a9de-cdb0b5a67159","html_url":"https://github.com/p2pderivatives/cfd-js","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/p2pderivatives/cfd-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p2pderivatives","download_url":"https://codeload.github.com/p2pderivatives/cfd-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"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","cfd","electron","elements","javascript","liquid","nodejs"],"created_at":"2026-01-28T12:19:44.979Z","updated_at":"2026-01-28T12:19:45.746Z","avatar_url":"https://github.com/p2pderivatives.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto Finance Development Kit for JavaScript (CFD-JS)\n\nJavaScript wrapper of cfd libraries\n\n\n## Overview\n\nThis library is development kit for crypto finance application.\nUseful when developing applications for cryptocurrencies.\n\n### Target Network\n\n- Bitcoin\n- Liquid Network\n\n### Support function by cfd\n\n- Bitcoin\n  - Bitcoin Script (builder, viewer)\n  - Transaction\n    - Create, Parse, Decode\n    - Simple pubkey-hash sign / verify\n    - Estimate Fee\n    - Coin Selection (FundRawTransaction)\n  - PSBT (v0. v2 \u0026 taproot is not yet.)\n    - Create, Parse, Decode\n    - Simple pubkey-hash sign / verify\n    - Estimate Fee\n    - Coin Selection (FundRawTransaction)\n  - ECDSA Pubkey/Privkey (TweakAdd/Mul, Negate, Sign, Verify)\n  - BIP32, BIP39\n  - Output Descriptor (contains miniscript parser)\n  - Schnorr/Taproot\n  - Bitcoin Address (Segwit-v0, Segwit-v1, P2PKH/P2SH)\n- Liquid Network\n  - Confidential Transaction\n    - Blind, Unblind\n    - Reissuance\n  - Confidential Address\n\n### Libraries for each language\n\n- JavaScript : cfd-js\n  - C/C++ : cfd\n    - Extend the cfd-core library. Defines the C language API and extension classes.\n  - C++ : cfd-core\n    - Core library. Definition base class.\n- other language:\n  - WebAssembly : cfd-js-wasm\n  - Python : cfd-python\n  - C# : cfd-csharp\n  - Go : cfd-go\n  - Rust : cfd-rust\n\n## Dependencies\n\n- C/C++ Compiler\n  - can compile c++11\n- CMake (3.14.3 or higher)\n- node.js (stable version)\n- Python 3.x\n  - for building libwally-core js wrapper\n\n### Windows\n\ndownload and install files.\n- node.js\n- Python 3.x\n- [CMake](https://cmake.org/) (3.14.3 or higher)\n- MSVC\n  - [Visual Studio](https://visualstudio.microsoft.com/downloads/) (Verified version is 2017 or higher)\n  - [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/) (2017 or higher)\n  - (Using only) [msvc redistribution package](https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads)\n\n### MacOS\n\n- [Homebrew](https://brew.sh/)\n\n```Shell\n# xcode cli tools\nxcode-select --install\n\n# install dependencies using Homebrew\nbrew install cmake python node\n```\n\n### Linux(Ubuntu)\n\n```Shell\n# install dependencies using APT package Manager\napt-get install -y build-essential cmake python nodejs\n```\n\ncmake version 3.14.2 or lower, download from website and install cmake.\n(https://cmake.org/download/)\n\n---\n\n## Use case\n\n### add dependencies on package.json (nodejs or Electron)\n\nAdd cfd-js github on caller app's package.json.\n\nex)\n```\n  \"cfd-js\": \"p2pderivatives/cfd-js#semver:^0.3.2\",\n```\n\nIf you use old npm or yarn, describe as follows.\n\nex)\n```\n  \"cfd-js\": \"git+https://github.com/p2pderivatives/cfd-js#semver:^0.3.2\",\n```\n\nWhen npm is installed, the cfd-js build is executed.\n\n### N-API\n\ncfd-js uses the N-API. Therefore, the same binary can be used for both node.js and electron.\n\n---\n\n## Test and Example\n\n### Build\n\n#### Using cmake-js\n\nWhen using the cmake-js package and npm script, the options for compilation are already set.\n\n```Shell\nnpm install\nnpm run cmake_all\n```\n\n### Test\n\n```Shell\nnpm run test_all\n```\n\n### Example\n\n#### Bitcoin\n\n```\nnpm run example\n```\n\n#### Elements\n\n```\nnpm run elements_example\n```\n\n---\n\n## Information for developers\n\n### using library\n\n- cfd\n  - cfd-core\n    - [libwally-core](https://github.com/cryptogarageinc/libwally-core/tree/cfd-develop) (forked from [ElementsProject/libwally-core](https://github.com/ElementsProject/libwally-core))\n    - [univalue](https://github.com/jgarzik/univalue) (for JSON encoding and decoding)\n\n### formatter\n\n- clang-format (using v10.0.0)\n- eslint\n\n### linter\n\n- cpplint\n- eslint\n\n### document tool\n\n- Not Implemented yet\n\n### support compilers\n\n- Visual Studio (2017 or higher)\n- Clang (7.x or higher)\n- GCC (contains MinGW) (5.x or higher)\n\n---\n\n## Note\n\n### Git connection:\n\nGit repository connections default to HTTPS.\nHowever, depending on the connection settings of GitHub, you may only be able to connect via SSH.\nAs a countermeasure, forcibly establish SSH connection by setting `CFD_CMAKE_GIT_SSH=1` in the environment variable.\n\n- Windows: (On the command line. Or set from the system setting screen.)\n```\nset CFD_CMAKE_GIT_SSH=1\n```\n\n- MacOS \u0026 Linux(Ubuntu):\n```\nexport CFD_CMAKE_GIT_SSH=1\n```\n\n### For installed fail:\n\nIf the shared library you downloaded cannot be referenced and the build fails, do a full build without downloading the shared library.\nPrevents the download of the shared library by setting `CFDJS_UNUSE_ASSET=1` in the environment variable.\n\n- Windows: (On the command line. Or set from the system setting screen.)\n```\nset CFDJS_UNUSE_ASSET=1\n```\n\n- MacOS \u0026 Linux(Ubuntu):\n```\nexport CFDJS_UNUSE_ASSET=1\n```\n\n### Ignore git update for CMake External Project:\n\nDepending on your git environment, you may get the following error when checking out external:\n```\n  Performing update step for 'libwally-core-download'\n  Current branch cmake_build is up to date.\n  No stash entries found.\n  No stash entries found.\n  No stash entries found.\n  CMake Error at /workspace/cfd-core/build/external/libwally-core/download/libwally-core-download-prefix/tmp/libwally-core-download-gitupdate.cmake:133 (message):\n\n\n    Failed to unstash changes in:\n    '/workspace/cfd-core/external/libwally-core/'.\n\n    You will have to resolve the conflicts manually\n```\n\nThis phenomenon is due to the `git update` related command.\nPlease set an environment variable that skips update processing.\n\n- Windows: (On the command line. Or set from the system setting screen.)\n```\nset CFD_CMAKE_GIT_SKIP_UPDATE=1\n```\n\n- MacOS \u0026 Linux(Ubuntu):\n```\nexport CFD_CMAKE_GIT_SKIP_UPDATE=1\n```\n\n### Build error on windows:\n\nErrors may occur during processing of CMake External project on Windows.\nThis is a problem with the Windows environment, but you can work around it by using npm v7.\nIf npm is less than v7, please try to cleanup\u0026build after running the following command:\n```bat\nnpm i -g npm@7\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2pderivatives%2Fcfd-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp2pderivatives%2Fcfd-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2pderivatives%2Fcfd-js/lists"}