nim-eth-keys/eth_keys.nimble
Eugene Kabanov 36df1300ce Eth keys API refactor (#14)
* Fix eth_keys to follow nimble rules.
Fix eth_keys to follow NEP-1 rules.
Fix eth_keys to work properly with libsecp256k1 (do not raise uncatchable exceptions).
Added more tests from py_evm, go-ethereum, cpp-ethereum.
Added address utility functions.
Changed public api, to be compatible with more modules.

* Fix newline.

* Added proper appveyor.yml.

* Fix appveyor.yml.

* Removed safeXXX functions.

* Removed Nonce object declaration.
Removed EthKeysContext possibility of inheritation.
Added shutdownLibsecp256k1() and shutdown() procedures.
Some documentation comments got modified.

* Removed RawPublicKey and RawSignature bytes.
getRaw(PublicKey) and getRaw(Signature) are now returning arrays.
Added toRaw(PublicKey, data) and toRaw(Signature, data).

* Added `$` hexadecimal string representation functions.
Added initSignature functions.
Added some previous tests.

* Removed 0x prefixes from `$` functions.
2018-04-10 19:07:40 +02:00

37 lines
1.1 KiB
Nim

packageName = "eth_keys"
version = "0.0.2"
author = "Status Research & Development GmbH"
description = "A reimplementation in pure Nim of eth-keys, the common API for Ethereum key operations."
license = "Apache License 2.0 or MIT"
# srcDir = "src"
skipDirs = @["src", "tests", "Nim"]
### Dependencies
requires "nim > 0.18.0", "nimcrypto", "secp256k1"
proc test(name: string, lang: string = "c") =
if not dirExists "build":
mkDir "build"
if not dirExists "nimcache":
mkDir "nimcache"
--run
--nimcache: "nimcache"
switch("out", ("./build/" & name))
setCommand lang, "tests/" & name & ".nim"
task test, "Run all tests - C only & libsecp256k1 backend":
test "tests"
# task test_cpp, "Run all tests - C++ only & libsecp256k1 backend":
# test "all_tests", "cpp"
# task test, "Run all tests - C and C++ & libsecp256k1 backend":
# exec "nimble test_c"
# exec "rm ./nimcache/*"
# exec "nimble test_cpp"
# task test_backend_native, "Run all tests - pure Nim backend":
# switch("define", "backend_native")
# test "all_tests", "cpp"