Browse Source

Add GHA, package to v0.0.2

master-old
arnaucube 3 years ago
parent
commit
41db9e0164
6 changed files with 27 additions and 1759 deletions
  1. +23
    -0
      .github/workflows/test.yml
  2. +0
    -1
      .gitignore
  3. +1
    -4
      README.md
  4. +2
    -1752
      package-lock.json
  5. +1
    -1
      package.json
  6. +0
    -1
      src/index.ts

+ 23
- 0
.github/workflows/test.yml

@ -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

+ 0
- 1
.gitignore

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

+ 1
- 4
README.md

@ -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`.

+ 2
- 1752
package-lock.json
File diff suppressed because it is too large
View File


+ 1
- 1
package.json

@ -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",

+ 0
- 1
src/index.ts

@ -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"))

Loading…
Cancel
Save