mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2026-01-09 03:28:14 -05:00
Rename getKey -> getPublicKey (#621)
* rename getKey to getPublicKey * use publicKey directly in gossipsub * update error messages
This commit is contained in:
@@ -141,7 +141,7 @@ proc init*(t: typedesc[SkSignature], data: string): SkResult[SkSignature] =
|
||||
var sig: SkSignature
|
||||
sig.init(data) and ok(sig)
|
||||
|
||||
proc getKey*(key: SkPrivateKey): SkPublicKey =
|
||||
proc getPublicKey*(key: SkPrivateKey): SkPublicKey =
|
||||
## Calculate and return Secp256k1 `public key` from `private key` ``key``.
|
||||
SkPublicKey(SkSecretKey(key).toPublicKey())
|
||||
|
||||
@@ -211,4 +211,4 @@ proc `$`*(key: SkKeyPair): string {.borrow.}
|
||||
proc `==`*(a, b: SkPrivateKey): bool {.borrow.}
|
||||
proc `==`*(a, b: SkPublicKey): bool {.borrow.}
|
||||
proc `==`*(a, b: SkSignature): bool {.borrow.}
|
||||
proc `==`*(a, b: SkKeyPair): bool {.borrow.}
|
||||
proc `==`*(a, b: SkKeyPair): bool {.borrow.}
|
||||
|
||||
Reference in New Issue
Block a user