Skip to content

Commit 544161c

Browse files
committed
Prepare license
1 parent 2cf2803 commit 544161c

26 files changed

+1129
-4
lines changed

COPYING

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
120
exports.Circuit = require("./src/circuit.js");
221
exports.setup = require("./src/setup.js");
322
exports.genProof = require("./src/prover.js");

package-lock.json

Lines changed: 60 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "zkSnark implementation in javascript",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "mocha"
88
},
99
"keywords": [
1010
"zksnark",
@@ -17,12 +17,17 @@
1717
],
1818
"author": "Jordi Baylina",
1919
"license": "GPL-3.0",
20+
"repository": {
21+
"type": "git",
22+
"url": "git+https://github.com/iden3/zksnark.git"
23+
},
2024
"dependencies": {
2125
"big-integer": "^1.6.34",
2226
"chai": "^4.1.2",
2327
"eslint": "^5.3.0"
2428
},
2529
"devDependencies": {
26-
"eslint-plugin-mocha": "^5.1.0"
30+
"eslint-plugin-mocha": "^5.1.0",
31+
"mocha": "^5.2.0"
2732
}
2833
}

src/bigint.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
120
/* global BigInt */
221
const bigInt = require("big-integer");
322

src/bn128.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const bigInt = require("./bigint.js");
220
const assert = require("assert");
321

src/calculateWitness.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const bigInt = require("./bigInt");
220

321
module.exports = calculateWitness;

src/circuit.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const bigInt = require("./bigint.js");
220

321
const __P__ = bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617");

src/constants.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const bigInt = require("big-integer");
220

321
const F1Field = require("./f1field");

src/f2field.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const fUtils = require("./futils.js");
220

321
class F2Field {

src/f3field.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const fUtils = require("./futils.js");
220

321
class F3Field {

src/futils.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const bigInt = require("./bigint.js");
220

321
exports.mulScalar = (F, base, e) =>{

src/gcurve.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
119
const fUtils = require("./futils.js");
220

321
class GCurve {

src/polfield.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
120
/*
221
This library do operations on polinomials where their coefficients are in field F
322

src/prover.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
Copyright 2018 0kims association
3+
4+
This file is part of zksnark javascript library.
5+
6+
zksnark javascript library is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
zksnark javascript library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with zksnark javascript library. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
120
const BN128 = require("./BN128.js");
221
const PolField = require("./polfield.js");
322
const ZqField = require("./zqfield.js");

0 commit comments

Comments
 (0)