Add GHA, package to v0.0.2

This commit is contained in:
arnaucube
2021-02-04 21:00:55 +01:00
parent ed301e93d1
commit 41db9e0164
6 changed files with 27 additions and 1759 deletions

23
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Test
on: [push, pull_request]
jobs:
node-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Build
run: |
npm install
npm run build
- name: Run tests
run: npm run test

1
.gitignore vendored
View File

@@ -1,3 +1,2 @@
node_modules
blindsecp256k1-browser.js
dist

View File

@@ -1,10 +1,7 @@
# blindsecp256k1-js [![npm](https://img.shields.io/npm/v/blindsecp256k1)](https://img.shields.io/npm/v/blindsecp256k1)
# blindsecp256k1-js [![npm](https://img.shields.io/npm/v/blindsecp256k1)](https://img.shields.io/npm/v/blindsecp256k1) [![Test](https://github.com/arnaucube/blindsecp256k1-js/workflows/Test/badge.svg)](https://github.com/arnaucube/blindsecp256k1-js/actions?query=workflow%3ATest)
Javascript implementation compatible with https://github.com/arnaucube/go-blindsecp256k1
Blind signature over [secp256k1](https://en.bitcoin.it/wiki/Secp256k1), based on *"[New Blind Signature Schemes Based on the (Elliptic Curve) Discrete Logarithm Problem](https://sci-hub.do/10.1109/ICCKE.2013.6682844)"* paper by Hamid Mala & Nafiseh Nezhadansari.
**WARNING**: this repo is experimental, do not use in production.
## Build for browser
By running `npm run browserify`, and the file `blindsecp256k1-browser.js` will be generated, which can be imported in the html and used as `blindsecp256k1`.

1754
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "blindsecp256k1",
"version": "0.0.1",
"version": "0.0.2",
"description": "Blind signatures over secp256k1, compatible with https://github.com/arnaucube/go-blindsecp256k1",
"main": "dist/index",
"types": "dist/index",

View File

@@ -75,7 +75,6 @@ export function blind(m: BigNumber, signerR: Point): { mBlinded: BigNumber, user
const ainv = u.a.invm(n)
const ainvrx = ainv.mul(rx)
// const mHex = m.toString(16)
const hHex = hashBigNumber(m)
const h = new BigNumber(Buffer.from(hHex, "hex"))