Skip to content

p2pderivatives/cfd-dlc-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

155fa94 · Aug 23, 2022

History

43 Commits
Jul 20, 2020
Oct 22, 2020
Jul 4, 2022
Jul 4, 2022
May 24, 2021
Aug 23, 2022
Feb 4, 2021
Jul 20, 2020
Aug 23, 2022
Sep 14, 2020
Feb 4, 2021
Jul 20, 2020
Jul 20, 2020
Jul 20, 2020
Jul 20, 2020
Aug 18, 2022
May 11, 2020
Feb 4, 2021
May 7, 2020
May 7, 2020
May 7, 2020
Aug 23, 2022
Feb 4, 2021
Aug 23, 2022
May 7, 2020
May 7, 2020

Repository files navigation

cfd-dlc-js

Javascript wrapper for the cfd-dlc library

Tutorial

Learn how to develop an application integrating DLC using this library with the tutorial available at: https://p2pderivatives.github.io/cfd-dlc-js/

Setup

Run:

npm install
npm run cmake_all

Test

Unit tests

To run unit tests, use npm test.

Integration tests

To run integration tests, you need to have bitcoin installed. Start by running

./integration_tests/__tests__/start-bitcoind.sh $(pwd) integration_tests

to start a bitcoind instance in regtest.

Then run npm run test_integration.

Code generation

The interface between the C++ layer and JS/TS is automatically generated from the files located in the src/input_json_format folder. To update an interface update the json file and run npm run convert_json.