mirror of https://github.com/status-im/nim-eth.git
tighter nimcrypto imports (#532)
This commit is contained in:
parent
d31abca010
commit
5e4123fda8
|
@ -9,6 +9,9 @@ when (NimMajor, NimMinor) < (1, 4):
|
||||||
else:
|
else:
|
||||||
{.push raises: [].}
|
{.push raises: [].}
|
||||||
|
|
||||||
|
## Core ethereum types and smalll helpers - keep focused as it gets imported
|
||||||
|
## from many places
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[options, strutils, times],
|
std/[options, strutils, times],
|
||||||
stew/[byteutils, endians2], stint,
|
stew/[byteutils, endians2], stint,
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[tables, options, hashes, net],
|
std/[tables, options, hashes, net],
|
||||||
nimcrypto, stint, chronicles, stew/[results, byteutils], metrics,
|
nimcrypto/[bcmode, rijndael, sha2], stint, chronicles,
|
||||||
|
stew/[results, byteutils], metrics,
|
||||||
".."/../[rlp, keys],
|
".."/../[rlp, keys],
|
||||||
"."/[messages, node, enr, hkdf, sessions]
|
"."/[messages, node, enr, hkdf, sessions]
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[strutils, macros, algorithm, options],
|
std/[strutils, macros, algorithm, options],
|
||||||
stew/shims/net, stew/[base64, results], nimcrypto,
|
nimcrypto/[keccak, utils], stew/shims/net, stew/[base64, results],
|
||||||
".."/../[rlp, keys]
|
".."/../[rlp, keys]
|
||||||
|
|
||||||
export options, results, keys
|
export options, results, keys
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
import nimcrypto
|
import
|
||||||
|
nimcrypto/[hmac, hash]
|
||||||
|
|
||||||
|
export hmac, hash
|
||||||
|
|
||||||
proc hkdf*(HashType: typedesc, ikm, salt, info: openArray[byte],
|
proc hkdf*(HashType: typedesc, ikm, salt, info: openArray[byte],
|
||||||
output: var openArray[byte]) =
|
output: var openArray[byte]) =
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
std/hashes,
|
std/hashes,
|
||||||
nimcrypto, stint, chronos, stew/shims/net, chronicles,
|
nimcrypto/[keccak], stint, chronos, stew/shims/net, chronicles,
|
||||||
../../keys, ../../net/utils,
|
../../keys, ../../net/utils,
|
||||||
./enr
|
./enr
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,6 @@ import
|
||||||
"."/[messages, encoding, node, routing_table, enr, random2, sessions, ip_vote,
|
"."/[messages, encoding, node, routing_table, enr, random2, sessions, ip_vote,
|
||||||
nodes_verification]
|
nodes_verification]
|
||||||
|
|
||||||
import nimcrypto except toHex
|
|
||||||
|
|
||||||
export
|
export
|
||||||
options, results, node, enr, encoding.maxDiscv5PacketSize
|
options, results, node, enr, encoding.maxDiscv5PacketSize
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
std/[tables, algorithm, deques, hashes, options, typetraits],
|
std/[tables, algorithm, deques, hashes, options, typetraits],
|
||||||
stew/shims/macros, chronicles, nimcrypto, chronos,
|
stew/shims/macros, chronicles, nimcrypto/utils, chronos,
|
||||||
".."/[rlp, common, keys, async_utils],
|
".."/[rlp, common, keys, async_utils],
|
||||||
./private/p2p_types, "."/[kademlia, auth, rlpxcrypt, enode, p2p_protocol_dsl]
|
./private/p2p_types, "."/[kademlia, auth, rlpxcrypt, enode, p2p_protocol_dsl]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue