Skip to content

Commit

Permalink
Feat/update v0.4.1 (#132)
Browse files Browse the repository at this point in the history
* (feat) secp256k1 v0.4.0

* (feat) CFFI for new support

* (fix) Could not figure out why egg_info adds absolute paths. Prune them

* (feat) Use TOML project definition. Version bump to 19.0.0

* (feat) Use TOML project definition. Version bump to 19.0.0

* (feat) tox with python 3.12

* (fix) copy-paste fumble

* (fix) missing EOL

* (fix) relaxed setuptools constraint

* (fix) issues with mkdocstring

* (ref) remove unnecessary dependence

* (ref) remove deprecated functions

* (fea) selectable download using pkg-config

* (fix) path to header for windows

* (fix) don't remember why zzz

* (fix) bypass download for windows?

* (fix) bypass download for windows. lint check

* (fix) use pkgconfig to resolve lib location in windows?

* (fix) odd ruff fail

* (dbg) trying to figure out the windows annoyance

* (dbg) trying to figure out the windows annoyance

* (fix) ffi.dlopen() needs full lib name under windows?

* (dbg) linking on windows requires to prepend with 'lib', how to do that?

* (fix) linking on windows requires to prepend with 'lib'

* (fix) catch PackageNotFoundError when detecting system libsecp256k1

* (fix) wrong PackageNotFoundError?

* (dbg) libname on windows

* (fix) build for linking shared libsecp256k1 on windows

* Apply suggestions from code review

* (ref) Move library to API (instead of ABI)

* (fix) There's an issue with import pkgconfig on windows ...

* (fix) There's an issue with import pkgconfig on windows ...

* (fix) Turning in circles around windows ...

* (fix) Turning in circles around windows ...

* (fix) The issue is when building with setup.py (not TOML)

* (fix) remove pkgconfig, usr pkg-config instead?

* (fix) fmt

* (fix) subprocess fails if command exists with 1

* (fix) back to guessing game :\

* (ref) Let's have a pkg name, UNKNOWN-0.0.0 is too mysterious

* (fea) Update to SECP256K1 v0.4.1

* (fea) which part of "IMPORTANT: Keep in sync" did I not understand?

* (fix) broke the build with system libs :,(

* (ref) forgot to re-enable windows selection for libname change. deprec distutils

* (ref) update workflow to python 3.12. cibuildwheels to 2.16.2

* (ref) update workflow to python 3.12. cibuildwheel fails due to urllib3/ssl

* (ref) update workflow to python 3.12. cibuildwheel fails due to urllib3/ssl. upgrade to ubuntu-22.04?

* (bld) urllib3>2?

* (fix) missing Distribution for system lib case?

* (fix) retrofit cibuildwheel to 2.11.2 for linux (urllib3/ssl issue)

* (fix) why is it not finding the lib?

* (fix) why is it not finding the lib?

* (fix) why is it not finding the lib?

* (dbg) why is it not finding the lib?

* (dbg) too fast to simplify, header not found!

* (fix) path to headers found?

* (fix) byte to string

* (fix) lint/fmt

* (dbg) back to squre one on conda recipe ... it downloads :/

* (ref) silly, I don't need to commit, just patch-debug the recipe

* (ref) silly, I don't need to commit, just patch-debug the recipe

* (ref) silly, I don't need to commit, just patch-debug the recipe

* (ref) correct differences between  pkg-config and pkgconfig

* (fix) Do we need env?

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Ofek Lev <[email protected]> ff39dd7
  • Loading branch information
ofek committed Jan 11, 2024
1 parent 0f77afe commit fc7036c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@

<span class=n>secret</span> <span class=o>=</span> <span class=n>ffi</span><span class=o>.</span><span class=n>new</span><span class=p>(</span><span class=s1>&#39;unsigned char [32]&#39;</span><span class=p>,</span> <span class=bp>self</span><span class=o>.</span><span class=n>secret</span><span class=p>)</span>

<span class=n>success</span> <span class=o>=</span> <span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_privkey_tweak_add</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>
<span class=n>success</span> <span class=o>=</span> <span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_seckey_tweak_add</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>

<span class=k>if</span> <span class=ow>not</span> <span class=n>success</span><span class=p>:</span>
<span class=k>raise</span> <span class=ne>ValueError</span><span class=p>(</span><span class=s1>&#39;The tweak was out of range, or the resulting private key is invalid.&#39;</span><span class=p>)</span>
Expand All @@ -197,7 +197,7 @@

<span class=n>secret</span> <span class=o>=</span> <span class=n>ffi</span><span class=o>.</span><span class=n>new</span><span class=p>(</span><span class=s1>&#39;unsigned char [32]&#39;</span><span class=p>,</span> <span class=bp>self</span><span class=o>.</span><span class=n>secret</span><span class=p>)</span>

<span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_privkey_tweak_mul</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>
<span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_seckey_tweak_mul</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>

<span class=n>secret</span> <span class=o>=</span> <span class=nb>bytes</span><span class=p>(</span><span class=n>ffi</span><span class=o>.</span><span class=n>buffer</span><span class=p>(</span><span class=n>secret</span><span class=p>,</span> <span class=mi>32</span><span class=p>))</span>

Expand Down Expand Up @@ -324,7 +324,7 @@

<span class=n>secret</span> <span class=o>=</span> <span class=n>ffi</span><span class=o>.</span><span class=n>new</span><span class=p>(</span><span class=s1>&#39;unsigned char [32]&#39;</span><span class=p>,</span> <span class=bp>self</span><span class=o>.</span><span class=n>secret</span><span class=p>)</span>

<span class=n>success</span> <span class=o>=</span> <span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_privkey_tweak_add</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>
<span class=n>success</span> <span class=o>=</span> <span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_seckey_tweak_add</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>

<span class=k>if</span> <span class=ow>not</span> <span class=n>success</span><span class=p>:</span>
<span class=k>raise</span> <span class=ne>ValueError</span><span class=p>(</span><span class=s1>&#39;The tweak was out of range, or the resulting private key is invalid.&#39;</span><span class=p>)</span>
Expand Down Expand Up @@ -405,7 +405,7 @@

<span class=n>secret</span> <span class=o>=</span> <span class=n>ffi</span><span class=o>.</span><span class=n>new</span><span class=p>(</span><span class=s1>&#39;unsigned char [32]&#39;</span><span class=p>,</span> <span class=bp>self</span><span class=o>.</span><span class=n>secret</span><span class=p>)</span>

<span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_privkey_tweak_mul</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>
<span class=n>lib</span><span class=o>.</span><span class=n>secp256k1_ec_seckey_tweak_mul</span><span class=p>(</span><span class=bp>self</span><span class=o>.</span><span class=n>context</span><span class=o>.</span><span class=n>ctx</span><span class=p>,</span> <span class=n>secret</span><span class=p>,</span> <span class=n>scalar</span><span class=p>)</span>

<span class=n>secret</span> <span class=o>=</span> <span class=nb>bytes</span><span class=p>(</span><span class=n>ffi</span><span class=o>.</span><span class=n>buffer</span><span class=p>(</span><span class=n>secret</span><span class=p>,</span> <span class=mi>32</span><span class=p>))</span>

Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

0 comments on commit fc7036c

Please sign in to comment.