Skip to content

Commit

Permalink
Merge pull request #258 from ko-matsu/feature/schnorr-sign
Browse files Browse the repository at this point in the history
feat: update to cfd v0.4.3
  • Loading branch information
k-matsuzawa authored Apr 19, 2022
2 parents 1d29d88 + 5000886 commit c3b5cf3
Show file tree
Hide file tree
Showing 12 changed files with 8,973 additions and 1,536 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/check_pre-merge_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,15 @@ jobs:
node: 12
- os: macos-11
node: 17
include:
- node: 12
always: false
npmv7: false
- node: 14
always: false
npmv7: false
- node: 16
always: true
npmv7: true
- node: 17
always: true
npmv7: true

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
timeout-minutes: 1
with:
node-version: ${{ matrix.node }}
- name: update to npm v7
if: runner.os == 'Windows' || matrix.npmv7 == true
run: npm i -g npm@7
- name: update to npm v8
run: npm i -g npm@8
- name: dump node version
id: node_ver
run: |
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/check_pre-merge_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,15 @@ jobs:
node: 12
- os: macos-11
node: 17
include:
- node: 12
always: false
npmv7: false
- node: 14
always: false
npmv7: false
- node: 16
always: true
npmv7: true
- node: 17
always: true
npmv7: true

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
timeout-minutes: 1
with:
node-version: ${{ matrix.node }}
- name: update to npm v7
if: runner.os == 'Windows' || matrix.npmv7 == true
run: npm i -g npm@7
- name: update to npm v8
run: npm i -g npm@8
- name: dump node version
id: node_ver
run: |
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/check_pre-merge_sprint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,15 @@ jobs:
node: 12
- os: macos-11
node: 17
include:
- node: 12
always: false
npmv7: false
- node: 14
always: false
npmv7: false
- node: 16
always: true
npmv7: true
- node: 17
always: true
npmv7: true

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
timeout-minutes: 1
with:
node-version: ${{ matrix.node }}
- name: update to npm v7
if: runner.os == 'Windows' || matrix.npmv7 == true
run: npm i -g npm@7
- name: update to npm v8
run: npm i -g npm@8
- name: dump node version
id: node_ver
run: |
Expand Down
70 changes: 40 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

JavaScript wrapper of cfd libraries


## Overview

This library is development kit for crypto finance application.
Expand Down Expand Up @@ -64,7 +63,8 @@ Useful when developing applications for cryptocurrencies.
### Windows

download and install files.
- node.js

- node.js (by npm v7 or higher, or yarn.)
- Python 3.x
- [CMake](https://cmake.org/) (3.14.3 or higher)
- MSVC
Expand Down Expand Up @@ -92,7 +92,7 @@ apt-get install -y build-essential cmake python nodejs
```

cmake version 3.14.2 or lower, download from website and install cmake.
(https://cmake.org/download/)
([https://cmake.org/download/](https://cmake.org/download/))

---

Expand All @@ -103,14 +103,16 @@ cmake version 3.14.2 or lower, download from website and install cmake.
Add cfd-js github on caller app's package.json.

ex)
```

```package
"cfd-js": "cryptogarageinc/cfd-js#semver:^0.1.3",
```

If you use old npm or yarn, describe as follows.

ex)
```

```package
"cfd-js": "git+https://github.com/cryptogarageinc/cfd-js#semver:^0.1.3",
```

Expand Down Expand Up @@ -145,13 +147,13 @@ npm run test_all

#### Bitcoin

```
```sh
npm run example
```

#### Elements

```
```sh
npm run elements_example
```

Expand Down Expand Up @@ -190,41 +192,46 @@ npm run elements_example

## Note

### Git connection:
### Git connection

Git repository connections default to HTTPS.
However, depending on the connection settings of GitHub, you may only be able to connect via SSH.
As a countermeasure, forcibly establish SSH connection by setting `CFD_CMAKE_GIT_SSH=1` in the environment variable.

- Windows: (On the command line. Or set from the system setting screen.)
```
set CFD_CMAKE_GIT_SSH=1
```

```bat
set CFD_CMAKE_GIT_SSH=1
```

- MacOS & Linux(Ubuntu):
```
export CFD_CMAKE_GIT_SSH=1
```

### For installed fail:
```sh
export CFD_CMAKE_GIT_SSH=1
```

### For installed fail

If the shared library you downloaded cannot be referenced and the build fails, do a full build without downloading the shared library.
Prevents the download of the shared library by setting `CFDJS_UNUSE_ASSET=1` in the environment variable.

- Windows: (On the command line. Or set from the system setting screen.)
```
set CFDJS_UNUSE_ASSET=1
```

```bat
set CFDJS_UNUSE_ASSET=1
```

- MacOS & Linux(Ubuntu):
```
export CFDJS_UNUSE_ASSET=1
```

### Ignore git update for CMake External Project:
```sh
export CFDJS_UNUSE_ASSET=1
```

### Ignore git update for CMake External Project

Depending on your git environment, you may get the following error when checking out external:
```

```sh
Performing update step for 'libwally-core-download'
Current branch cmake_build is up to date.
No stash entries found.
Expand All @@ -243,20 +250,23 @@ This phenomenon is due to the `git update` related command.
Please set an environment variable that skips update processing.

- Windows: (On the command line. Or set from the system setting screen.)
```
set CFD_CMAKE_GIT_SKIP_UPDATE=1
```

```bat
set CFD_CMAKE_GIT_SKIP_UPDATE=1
```

- MacOS & Linux(Ubuntu):
```
export CFD_CMAKE_GIT_SKIP_UPDATE=1
```

### Build error on windows:
```sh
export CFD_CMAKE_GIT_SKIP_UPDATE=1
```

### Build error on windows

Errors may occur during processing of CMake External project on Windows.
This is a problem with the Windows environment, but you can work around it by using npm v7.
If npm is less than v7, please try to cleanup&build after running the following command:

```bat
npm i -g npm@7
```
6 changes: 4 additions & 2 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ if(CFD_TARGET_VERSION)
set(CFD_TARGET_TAG ${CFD_TARGET_VERSION})
message(STATUS "[external project local] cfd target=${CFD_TARGET_VERSION}")
else()
set(CFD_TARGET_TAG v0.3.2)
set(CFD_TARGET_TAG v0.4.3)
endif()
if(CFD_TARGET_URL)
set(CFD_TARGET_REP ${CFD_TARGET_URL})
message(STATUS "[external project local] cfd url=${CFD_TARGET_URL}")
else()
set(CFD_TARGET_REP p2pderivatives/cfd.git)
#set(CFD_TARGET_REP p2pderivatives/cfd.git)
# TODO: Until p2pderivatives/cfd v0.4.0 is released, have cryptogarageinc referenced.
set(CFD_TARGET_REP cryptogarageinc/cfd.git)
endif()

if(${USE_GIT_SSH})
Expand Down
8 changes: 4 additions & 4 deletions local_resource/external_project_local_setting.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CFDJS_VERSION=0.4.0
CFD_TARGET_VERSION=refs/tags/v0.4.0
CFDCORE_TARGET_VERSION=refs/tags/v0.4.2
LIBWALLY_TARGET_VERSION=refs/tags/cfd-0.4.4
CFDJS_VERSION=0.4.1
CFD_TARGET_VERSION=refs/tags/v0.4.3
CFDCORE_TARGET_VERSION=refs/tags/v0.4.3
LIBWALLY_TARGET_VERSION=refs/tags/cfd-0.4.5
CFD_TARGET_URL=cryptogarageinc/cfd.git
CFDCORE_TARGET_URL=cryptogarageinc/cfd-core.git
Loading

0 comments on commit c3b5cf3

Please sign in to comment.