129 Commits

Author SHA1 Message Date
matthewkeil
31c1ea3811 fix: simplify how default setup is found 2024-05-03 14:31:51 +07:00
Matthew Keil
164827e3a8
[nodejs] Enable exceptions (#423)
* feat: enable exceptions

* fix: windows exception handling flag value
2024-04-30 12:53:52 -05:00
Matthew Keil
8ab57f44db
[nodejs] Bundle and auto-load trusted setup (#422) 2024-04-30 11:38:48 -05:00
Justin Traglia
94205cc1f6 Update versions in preparation for release 2024-03-12 08:19:33 -05:00
Justin Traglia
8a9014cf3e Update versions in preparation of release 2024-03-04 10:32:55 -06:00
Dimitris Apostolou
486b15b305
Fix more typos (#397) 2024-02-22 11:55:22 -06:00
omahs
6ccdc57cbb
fix typo 2024-02-22 13:19:27 +01:00
gajinder
58d873eb2f chore: npm publish 2.1.2 2023-10-20 16:40:09 +05:30
Justin Traglia
d637761a2e
Use official trusted setup (#377) 2023-10-18 13:31:55 -05:00
Justin Traglia
3ce8f86341
Force use of portable blst in nodejs bindings (#339) 2023-08-11 16:20:07 +01:00
Matthew Keil
51a669ff80
test(node-bindings): add argument count unit tests (#311)
* test(node-bindings): add argument count unit tests

* test(node-bindings): make arg length check more explicit

* refactor(node-bindings): make getValidTest to DRY code

* test(node-bindings): extra args give same result

* refactor(node-bindings): adjust unit test spacing

* refactor(node-bindings): move argument length checks to it block

* refactor(node-bindings): simplify arg slicing

* chore(node-bindings): lint/format code

* docs(node-bindings): add docstring to test helper functions

* test(node-bindings): fix bytesEqual and add docstrings to all helper functions

* refactor(node-bindings): change name to assertBytesEqual
2023-06-09 12:06:12 +03:00
g11tech
cfdd9e5f8f
chore: Publish to npm version 2.1.0 for big endian release (#310) 2023-06-01 16:09:59 +03:00
Justin Traglia
3adec442de
Switch to big-endian (#305) 2023-05-24 08:44:05 -05:00
Justin Traglia
6d21a0ea98
Speed up loading trusted setup (#299)
* Replace g1 points with g1 lagrange points

* Swap out validate_kzg_g1 with blst funcs

* Update minimal preset too

* Fix java & nodejs bindings

* Put variables in smaller scope

* Update some comments

* Remove FFTSettings (#2)

* Fix issue when expanding roots of unity

* Fix formatting

* Revert back to using intermediate array

* Add missing c_kzg_free

* Fix some nits

* Replace free_kzg_settings with free_trusted_setup

* Add parens to NUM_ELEMENTS

Co-authored-by: George Kadianakis <desnacked@riseup.net>

* Move memcpy to the end

* Revert "Move memcpy to the end"

This reverts commit 5331c7feadc92e4b5dd5d4e7512e4be563d7f386.

* Add comment about free_trusted_setup

* Move check before alloc

* Add remark

* Delete unnecessary blank line

* Fix asn's nits

* Update comment for roots_of_unity in header

Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>

* Fix formatting

* Update comment about max_scale

Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>

---------

Co-authored-by: Suphanat Chunhapanya <haxx.pop@gmail.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>
2023-05-12 16:44:37 +03:00
Justin Traglia
aa8d85dbbb
Fix some minor nits (#298) 2023-05-09 16:40:36 +03:00
g11tech
89c1c3a811
chore: Publish 2.0.4 nodejs (#286) 2023-04-10 08:03:05 -05:00
g11tech
fd0a51aa35
[Nodejs] Change Buffer types to Uint8Array (#280) 2023-04-07 08:06:13 -05:00
Justin Traglia
fe857cb3b9
Update blst and remove hacks (#281) 2023-04-07 07:58:17 -05:00
Matthew Keil
feb4037de5
Add eslint to node bindings (#269)
* add eslint and run for TS files

* add eslint and run for JS/TS

* remove eslint file comments

* add endOfLine: "auto" for windows

* fix yarn command to remove excess output

* update eslint versions
2023-03-31 17:46:54 +09:00
Matthew Keil
966e40d70e
Add repo link to npm page (#272) 2023-03-30 17:03:01 -05:00
Justin Traglia
60d8402e19
Fix some nodejs nits (#271) 2023-03-30 16:34:55 -05:00
Matthew Keil
e9c9c912f6
Format node bindings with clang-format (#268) 2023-03-30 11:20:25 -05:00
Matthew Keil
dd5ec7ba7e
Add bundle to publish command (#262) 2023-03-30 11:05:22 -05:00
Matthew Keil
ac4b945429
Clean-up node error messages (#266) 2023-03-30 09:17:57 -05:00
Matthew Keil
ed4e795c18
return undefined if JS error is thrown (#267) 2023-03-30 08:54:34 -05:00
Matthew Keil
e83ec0374c
.gitignore node deps (#265) 2023-03-30 08:25:24 -05:00
Matthew Keil
a7f4890a7e
Remove tsc build step and export raw .js file and .d.ts from node bindings (#260) 2023-03-29 19:32:06 -05:00
George Kadianakis
656d0c74a7
nodejs: Remove the fclose() error handling (#261) 2023-03-29 08:51:50 -05:00
Matthew Keil
db8f42507a
close file descriptor (#248) 2023-03-28 15:23:17 -05:00
Justin Traglia
c5920c4ef4
Multi-platform nodejs bindings (#242) 2023-03-28 11:01:07 -05:00
Matthew Keil
da5a644781
Update node README (#228) 2023-03-21 09:53:27 -05:00
George Kadianakis
cc10ef024d
Some misc minor codebase improvements (#229) 2023-03-20 21:31:53 -05:00
Justin Traglia
5e34bc0232
Fix some nits with nodejs (#219) 2023-03-17 11:55:24 +02:00
Justin Traglia
5580f355ae
Add ref test count checks for all bindings (#211) 2023-03-15 16:39:19 +02:00
Matthew Keil
2642595e39
Reorganize/Clean-Up Node Bindings (#189)
* refactor(node-bindings): create src/lib/test folders

* feat(node-bindings): update bundle/publish commands

* refactor(node-bindings): remove unused files and dependencies

* refactor(node-bindings): move fixtures to __fixtures__

* fix(node-bindings): revert format of fixture json file

* fix(node-bindings): prettierignore and gitignore

* feat(node-bindings): add bindings package

* fix(node-bindings): fix test setup path

* fix(node-bindings): remove post-build copy action in bindings.gyp

* fix(node-bindings): package.json keys

* Update contributors

---------

Co-authored-by: George Kadianakis <desnacked@riseup.net>
2023-03-09 18:21:28 +02:00
Matthew Keil
5ebf750a1e
Update Compute*KZGProof in node bindings (#188)
* feat(node-bindings): update Compute*KZGProof

* ComputationProof -> ProofResult

---------

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2023-03-09 16:40:57 +02:00
Matthew Keil
87a3e4148d
Move setup handle to C in node bindings (#177)
* feat(node-bindings): move KzgSettings to c

* fix(node-bindings): typo in comment

* fix(node-bindings): remove unnecessary SetInstanceData

* feat(node-bindings): use C for setting instance data

* docs(node-bindings): fix comment on struct

* refactor(node-bindings): revert export order to minimize diff
2023-03-09 16:00:15 +02:00
Matthew Keil
ecc668bbe7
Node binding argument and return type updates (#170) 2023-03-06 19:28:30 -06:00
Justin Traglia
54ab82c93b
Update nodejs bindings to support YAML ref tests (#167)
* Update nodejs bindings to support YAML ref tests

* Remove c-kzg from deps

* Fix test checks

* Add return statements in error checks

* Fix uint8array comparisons

* Revert test_dir to original value
2023-03-06 12:08:59 +02:00
g11tech
021674111a
Update the node bindings version to the latest published (#162) 2023-03-01 12:39:37 +02:00
Justin Traglia
b34cc3ce1e Add missing exception pending checks 2023-02-22 09:39:16 -06:00
Justin Traglia
0e78319a44 Free allocations in success case 2023-02-22 09:36:32 -06:00
Justin Traglia
4a77aeff26 Add explicit type check 2023-02-22 09:10:09 -06:00
Justin Traglia
d5bd326877 Update test names 2023-02-21 14:22:44 -06:00
Justin Traglia
21b3139dc8 Update nodejs bindings 2023-02-18 15:49:52 -06:00
Justin Traglia
8aa78231f2
Check UInt8Array lengths (#126) 2023-02-14 15:11:10 -06:00
Justin Traglia
dc28b03f9d
Cleanup the Makefile (#119)
* Cleanup the Makefile some

* Fix compiler error

* Fix compiler errors in tests

* Fix problems on Linux

* Add test_c_kzg_4844_cov to gitignore

* Add back closing brace for cpp

* Split clean rule into two lines

* Not echo commands when running them

* Allow other compilers to be used

* Update comment

* Only allow clang, actually
2023-02-08 17:35:33 +00:00
Daniel Coffman
c6fa137cd4
Verify blobs count matches commitments count (#113) 2023-02-01 20:56:03 +00:00
Justin Traglia
9076280cd2
Add compute_kzg_proof to nodejs bindings (#92) 2023-01-27 15:15:17 +00:00
Justin Traglia
03b90ef63f
Use Bytes48 for commitments/proofs (#86)
* Start to use bytes48 type

* Update java bindings

* Update variable names

* Update csharp bindings

* Update node.js bindings

* Update python bindings

* Fix mistake in python bindings

* Add new functions

* Fix nit in java bindings

* Update variable names in java bindings

* Compare to point at infinity

* Update bytes_to_bls_field doc

* Add todo

* Do key validation

* Remove bytes_to_g1

* Fix bug & add remark

* Fix memcmp mistake

* Fix nit in nodejs bindings

* Fix another nit

* Update nodejs parameter names

* Remove to_proof() and to_commitment()

* Fix bug
2023-01-26 14:53:30 +00:00