tighter nimcrypto imports (#532)

This commit is contained in:
Jacek Sieka 2022-09-05 11:09:38 +02:00 committed by GitHub
parent d31abca010
commit 5e4123fda8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 7 deletions

View File

@ -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,

View File

@ -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]

View File

@ -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

View File

@ -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]) =

View File

@ -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

View File

@ -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

View File

@ -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]