https://github.com/vulpemventures/liquidjs-test
Node and browser scripts testing liquidjs-lib
https://github.com/vulpemventures/liquidjs-test
Last synced: 12 months ago
JSON representation
Node and browser scripts testing liquidjs-lib
- Host: GitHub
- URL: https://github.com/vulpemventures/liquidjs-test
- Owner: vulpemventures
- Created: 2020-02-10T15:52:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T15:57:51.000Z (over 3 years ago)
- Last Synced: 2025-06-30T15:57:02.134Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.42 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Liquid tests and examples
## Requirements for Node examples
- Node/NPM
- Docker/Docker compose
- [Nigiri](https://nigiri.vulpem.com)
## Installation
- Install dependencies with `npm install`
## Usage (Node examples)
### Run Nigiri
- Start Docker
- Run in a console tab `nigiri start --liquid`
### Test one or multiple scripts
- Test legacy addresses `node node/legacy`
- Test native segwit `node node/native-segwit`
- test wrapped segwit `node node/wrapped-segwit`
### Broadcast
- Open via browser [localhost:5001/tx/push](http://localhost:5001/tx/push)
- Copy and paste the hex encoded transaction
## Usage (Web tests)
### Run tests in the browser
- Open the `web/index.html` in your preferred browser and just wait for mocha to run the tests
NOTE: each test is repeated [10 times](web/tests/index.js#L2) by the default to calculate an average execution time for Psbt operations. Do not panic if the page doesn't seem to respond :).