mirror of
https://github.com/logos-storage/logos-storage-nim-validator.git
synced 2026-01-03 05:53:06 +00:00
14 lines
330 B
Nim
14 lines
330 B
Nim
import pkg/blscurve
|
|
import ./identity
|
|
import ./signing
|
|
|
|
func toBytes*(identifier: Identifier): seq[byte] =
|
|
var bytes: array[48, byte]
|
|
doAssert blscurve.serialize(bytes, identifier)
|
|
@bytes
|
|
|
|
func toBytes*(signature: Signature): seq[byte] =
|
|
var bytes: array[96, byte]
|
|
doAssert blscurve.serialize(bytes, signature)
|
|
@bytes
|