{"id":36576145,"url":"https://github.com/p2pderivatives/cfd-go","last_synced_at":"2026-01-12T07:35:34.675Z","repository":{"id":46772552,"uuid":"222341328","full_name":"p2pderivatives/cfd-go","owner":"p2pderivatives","description":"Crypto Finance Development Kit for Go","archived":false,"fork":false,"pushed_at":"2021-12-20T01:01:17.000Z","size":470,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T05:53:35.968Z","etag":null,"topics":["bitcoin","cfd","elements","golang","liquid"],"latest_commit_sha":null,"homepage":null,"language":"Go","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}},"created_at":"2019-11-18T01:47:22.000Z","updated_at":"2023-10-31T15:18:51.000Z","dependencies_parsed_at":"2022-09-26T18:30:44.032Z","dependency_job_id":null,"html_url":"https://github.com/p2pderivatives/cfd-go","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/p2pderivatives/cfd-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p2pderivatives","download_url":"https://codeload.github.com/p2pderivatives/cfd-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p2pderivatives%2Fcfd-go/sbom","scorecard":{"id":716808,"data":{"date":"2025-08-11","repo":{"name":"github.com/p2pderivatives/cfd-go","commit":"d5255b278a85bc8993b58d7968f20b4a24182242"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Code-Review","score":5,"reason":"Found 12/22 approved changesets -- score normalized to 5","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":"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":"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":"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":"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":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/check_pre-merge_develop.yml:1","Warn: no topLevel permission defined: .github/workflows/check_pre-merge_master.yml:1","Warn: no topLevel permission defined: .github/workflows/check_pre-merge_sprint.yml:1","Warn: no topLevel permission defined: .github/workflows/code_scanner.yml:1","Warn: no topLevel permission defined: .github/workflows/create_release-and-upload.yml:1","Info: no jobLevel write permissions found"],"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":"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:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.3.2 not signed: https://api.github.com/repos/p2pderivatives/cfd-go/releases/50283472","Warn: release artifact v0.3.1 not signed: https://api.github.com/repos/p2pderivatives/cfd-go/releases/43569305","Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/p2pderivatives/cfd-go/releases/40671058","Warn: release artifact v0.2.2 not signed: https://api.github.com/repos/p2pderivatives/cfd-go/releases/34628408","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/p2pderivatives/cfd-go/releases/33148872","Warn: release artifact v0.3.2 does not have provenance: https://api.github.com/repos/p2pderivatives/cfd-go/releases/50283472","Warn: release artifact v0.3.1 does not have provenance: https://api.github.com/repos/p2pderivatives/cfd-go/releases/43569305","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/p2pderivatives/cfd-go/releases/40671058","Warn: release artifact v0.2.2 does not have provenance: https://api.github.com/repos/p2pderivatives/cfd-go/releases/34628408","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/p2pderivatives/cfd-go/releases/33148872"],"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":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Info: Possibly incomplete results: error parsing job operating system: .github/workflows/create_release-and-upload.yml:128","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/create_release-and-upload.yml:131","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/create_release-and-upload.yml:143","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/create_release-and-upload.yml:149","Info: Possibly incomplete results: error parsing job operating system: .github/workflows/create_release-and-upload.yml:153","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_pre-merge_develop.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/check_pre-merge_develop.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_pre-merge_develop.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/check_pre-merge_develop.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_pre-merge_master.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/check_pre-merge_master.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_pre-merge_master.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/check_pre-merge_master.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_pre-merge_sprint.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/check_pre-merge_sprint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_pre-merge_sprint.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/check_pre-merge_sprint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code_scanner.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/code_scanner.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code_scanner.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/code_scanner.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code_scanner.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/code_scanner.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code_scanner.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/code_scanner.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:224: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:231: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:250: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:259: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:275: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:282: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:301: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:310: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:326: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:333: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:352: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:361: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:387: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:417: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:127: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:157: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:173: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:180: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:199: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create_release-and-upload.yml:208: update your workflow using https://app.stepsecurity.io/secureworkflow/p2pderivatives/cfd-go/create_release-and-upload.yml/master?enable=pin","Warn: containerImage not pinned by hash: build.dockerfile:1: pin your Docker image by updating alpine:3.12 to alpine:3.12@sha256:c75ac27b49326926b803b9ed43bf088bc220d22556de1bc5f72d742c91398f69","Warn: containerImage not pinned by hash: docker/golang17-alpine14.dockerfile:1: pin your Docker image by updating golang:1.17-alpine3.14 to golang:1.17-alpine3.14@sha256:7dee28aaabcbd25c4dcd0fa6663c01157c1cca061f903b69ecf0e6f0524634d1","Warn: containerImage not pinned by hash: docker/tools.dockerfile:1: pin your Docker image by updating golang:1.16-alpine3.14 to golang:1.16-alpine3.14@sha256:7d3ff18f693e2d4d7f2377f03efaba8b8d8884837debc8db475f07500749276e","Warn: containerImage not pinned by hash: test.dockerfile:1: pin your Docker image by updating golang:1.15-alpine3.12 to golang:1.15-alpine3.12@sha256:9069ca4c0deb28dfa50d2aa440d59add49cb95fa30d0b1f41cd215bd235059e6","Info:   0 out of  26 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   9 third-party GitHubAction dependencies pinned","Info:   0 out of   4 containerImage dependencies pinned","Info:   3 out of   3 goCommand 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":"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":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 19 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"}}]},"last_synced_at":"2025-08-22T09:57:47.579Z","repository_id":46772552,"created_at":"2025-08-22T09:57:47.580Z","updated_at":"2025-08-22T09:57:47.580Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","elements","golang","liquid"],"created_at":"2026-01-12T07:35:34.005Z","updated_at":"2026-01-12T07:35:34.668Z","avatar_url":"https://github.com/p2pderivatives.png","language":"Go","readme":"# Crypto Finance Development Kit for Go (CFD-GO)\n\nCFD library for Go.\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- Go : cfd-go\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  - JavaScript : cfd-js\n  - WebAssembly : cfd-js-wasm\n  - Python : cfd-python\n  - C# : cfd-csharp\n  - Rust : cfd-rust\n\n## Dependencies\n\n- Go (1.12 or higher)\n- C/C++ Compiler\n  - can compile c++11\n- CMake (3.14.3 or higher)\n- When using npm scripts and cmake-js\n  - node.js (stable version)\n  - Python 3.x\n    - for building libwally-core js wrapper\n\n### Windows (MinGW)\n\nattention: Cgo can only be used on the `make` platform.\n\n(Recommended to use wsl(Windows Subsystem for Linux), because it can be cumbersome.)\n\ndownload and install files.\n\n- go (1.12 or higher)\n- [CMake](https://cmake.org/) (3.14.3 or higher)\n- [MinGW](http://mingw-w64.org/) (Add to PATH after install)\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 go node\n```\n\n### Linux(Ubuntu)\n\n```Shell\n# install dependencies using APT package Manager\napt-get install -y build-essential golang cmake nodejs\n```\n\ncmake version 3.14.2 or lower, [download from website](https://cmake.org/download/) and install cmake.\n\ngo version 1.11 or lower, get `golang.org/dl/go1.12` or higher.\n\n---\n\n## Build\n\n### Using cmake-js\n\n(If you want to install, [see the installation](#Using-cmake-js-install). Introduces build and install command.)\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_release\ngo mod download\ngo build\n```\n\n### Using CMake\n\n```Shell\n# recommend out of source build\nmkdir build \u0026\u0026 cd $_\n# configure \u0026 build\ncmake .. -DENABLE_SHARED=on -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DENABLE_CAPI=on -DTARGET_RPATH=/usr/local/lib/\nmake\ncd ..\ngo mod download\ngo build\n```\n\n#### CMake options\n\n`cmake .. (CMake options) -DENABLE_JS_WRAPPER=off`\n\n- `-DENABLE_ELEMENTS`: Enable functionalies for elements sidechain. [ON/OFF] (default:ON)\n- `-DENABLE_SHARED`: Enable building a shared library. [ON/OFF] (default:OFF)\n- `-DENABLE_TESTS`: Enable building a testing codes. If enables this option, builds testing framework submodules(google test) automatically. [ON/OFF] (default:ON)\n- `-DCMAKE_BUILD_TYPE=Release`: Enable release build.\n- `-DCMAKE_BUILD_TYPE=Debug`: Enable debug build.\n- `-DCFDCORE_DEBUG=on`: Enable cfd debug mode and loggings log files. [ON/OFF] (default:OFF)\n\n---\n\n## install / uninstall\n\nOn Linux or MacOS, can use install / uninstall.\n\nOn Windows, can use `releases asset`.\n\n### Using releases asset\n\nThe fastest and easiest way.\n\n- macos / linux(ubuntu)\n\n```Shell\n(cleanup)\n./tools/cmake_cleanup.sh\nsudo ./tools/cleanup_install_files.sh\n\n(download)\nwget https://github.com/p2pderivatives/cfd-go/releases/download/v0.3.2/cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip\n\n(unzip)\nsudo unzip -q cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip -d /\n```\n\n- windows\n  1. cleanup: `c:/usr/local` directory.\n  2. download [asset](https://github.com/p2pderivatives/cfd-go/releases/download/v0.3.2/cfdgo-v0.3.2-win-gcc-static-x86_64.zip).\n  3. Unzip and extract to `c:/usr/local` directory.\n\n### install (after build)\n\ninstall for `/usr/local/lib`.\n\n#### Using cmake-js install\n\nWhen using the cmake-js package and npm script, the options for compilation are already set.\n\nAttention: Currently, there is a problem with ExternalProject, so a problem occurs when performing update processing. Please perform cleanup when building before installation.\n\n```Shell\n(cleanup)\n./tools/cmake_cleanup.sh\nsudo ./tools/cleanup_install_files.sh\n\n(build and install by using makefile)\nnpm run cmake_make_install\n(Enter the password when prompted to use the sudo command.)\n```\n\ncmake version is 3.15 or higher:\n\n```Shell\n(cleanup)\n./tools/cmake_cleanup.sh\nsudo ./tools/cleanup_install_files.sh\n\n(build and install by using ninja or makefile)\nnpm run cmake_install\n(Enter the password when prompted to use the sudo command.)\n```\n\n#### Using CMake install\n\nAttention: Currently, there is a problem with ExternalProject, so a problem occurs when performing update processing. Please perform cleanup when building before installation.\n\n```Shell\n(cleanup)\n./tools/cmake_cleanup.sh\nsudo ./tools/cleanup_install_files.sh\n\n(build)\nmkdir build \u0026\u0026 cd build \u0026\u0026 cmake .. -DENABLE_SHARED=on -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=off -DENABLE_JS_WRAPPER=off -DENABLE_CAPI=on -DTARGET_RPATH=/usr/local/lib \u0026\u0026 make\n\n(install by using makefile)\ncd build \u0026\u0026 sudo make install\n\n(install by using ninja)\ncd build \u0026\u0026 sudo ninja install\n```\n\ncmake version is 3.15 or higher: `cmake --install build`\n\n#### Using releases asset (for install)\n\n- Ubuntu / MacOS\n\n```Shell\n(cleanup)\n./tools/cmake_cleanup.sh\nsudo ./tools/cleanup_install_files.sh\n\n(download)\nwget https://github.com/p2pderivatives/cfd-go/releases/download/v0.3.2/cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip\n\n(unzip)\nsudo unzip -q cfdgo-v0.3.2-ubuntu2004-gcc-x86_64.zip -d /\n```\n\n- Windows\n  1. get [releases asset](https://github.com/p2pderivatives/cfd-go/releases/download/v0.3.2/cfdgo-v0.3.2-win-gcc-static-x86_64.zip).\n  2. Expand to PATH\n\n### uninstall\n\n```Shell\n(uninstall by using makefile)\ncd build \u0026\u0026 sudo make uninstall\n\n(uninstall by using ninja)\ncd build \u0026\u0026 sudo ninja uninstall\n\n(uninstall by using script)\nsudo ./tools/cleanup_install_files.sh\n```\n\n---\n\n## How to use cfd-go as go module\n\n1. Once, clone this repository.\n2. Build \u0026 install cfd-go(and dependencies).\n3. Modify `go.mod` file adding cfd-go as go moudle\n\n    go.mod\n\n    ```go\n    require (\n      github.com/p2pderivatives/cfd-go v0.3.2\n      ...\n    )\n    ```\n\n    Reference github commit:\n\n    ```go\n    require (\n      github.com/p2pderivatives/cfd-go v1.0.0-0.20191205091101-a48a6a8b1a24\n      ...\n    )\n    ```\n\n    (version format: UnknownVersionTag-UtcDate-CommitHash)\n\n4. Download cfd-go module\n\n    ```Shell\n    go mod download\n    ```\n\n---\n\n## Test and Example\n\n### Test\n\ntest file is `cfdgo_test.go` . Execute by the following method.\n\n- shell script or bat file\n\n  ```sh\n  (linux/macos)\n  ./go_test.sh\n\n  (Windows)\n  .\\go_test.bat\n  ```\n\n- go command (linux/macos)\n\n  ```Shell\n  LD_LIBRARY_PATH=./build/Release go test\n  ```\n\n### Example\n\n- cfdgo_test.go\n\n---\n\n## Information for developers\n\n### managed files\n\n- cfdgo.go, cfdgo.cxx: generated from swig.\n- swig.i: swig file.\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### develop tools\n\n#### generate from swig.i\n\nattention: At first, install swig and set PATH.\n\n```sh\n(linux/macos)\n./tools/gen_swig.sh\n\n(Windows)\n.\\tools\\gen_swig.bat\n```\n\n#### formatter\n\n- go fmt\n- goimports\n\nuse by makefile:\n\n```sh\nmake\n\n(windows)\nmingw32-make\n```\n\n#### mockgen\n\n```sh\nmake\n\n(windows)\nmingw32-make\n```\n\n### develop tools by docker compose\n\n#### generate from swig.i by docker compose\n\n```sh\ndocker-compose run swig\n```\n\n#### formatter and mockgen by docker compose\n\n```sh\ndocker-compose run formatter\n```\n\n### support compilers\n\n- GCC (contains MinGW) (5.x or higher)\n- Clang (7.x or higher)\n\n### code coverage\n\n```sh\n(Windows)\n.\\go_coverage.bat\n\n(Ubuntu / MacOS)\n./go_coverage.sh\n```\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\n  ```bat\n  set CFD_CMAKE_GIT_SSH=1\n  ```\n\n- MacOS \u0026 Linux(Ubuntu):\n\n  ```sh\n  export CFD_CMAKE_GIT_SSH=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```sh\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\n  ```bat\n  set CFD_CMAKE_GIT_SKIP_UPDATE=1\n  ```\n\n- MacOS \u0026 Linux(Ubuntu):\n\n  ```sh\n  export CFD_CMAKE_GIT_SKIP_UPDATE=1\n  ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2pderivatives%2Fcfd-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp2pderivatives%2Fcfd-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp2pderivatives%2Fcfd-go/lists"}