This is the front end application for 2-Way-Peg solution. The solution will be a web interface (this app), which integrates with a Rest API, which in turn communicates with internal services such as the blockchain node and databases. In addition, a daemon/worker will be created that will be responsible for obtaining data from the blockchain and changing the status of the transaction.
npm install
Create a .env.local
file in order to store locally the required variables for the app with the following fields:
All environment variables are listed in this here.
The 2wp-app application will run on 8080 port.
npm run serve
npm -version
6.14.16
node -v
v14.19.1
docker-compose up
To execute unit tests, run:
npm run test:unit
It should execute 6 test suites with 28 tests in total.
Like this example:
PASS tests/unit/PowPegAddressUtils.spec.ts
PASS tests/unit/SatoshiBig.spec.ts
PASS tests/unit/utils.spec.ts
PASS tests/unit/OpReturnUtils.spec.ts
PASS tests/unit/txSummary.spec.ts
PASS tests/unit/ApiService.spec.ts
Test Suites: 6 passed, 6 total
Tests: 28 passed, 28 total
Snapshots: 0 total
Time: 2.809s
npm run lint
To create a production build, run:
npm run build
To report a vulnerability, please use the vulnerability reporting guideline for details on how to do it.