mirror of
https://github.com/logos-storage/logos-storage-nim-validator.git
synced 2026-01-05 06:53:08 +00:00
19 lines
476 B
Nim
19 lines
476 B
Nim
import codexvalidator/signatures
|
|
|
|
export signatures.Identity
|
|
export signatures.Identifier
|
|
export signatures.Signature
|
|
export signatures.Signed
|
|
|
|
proc example*(_: type Identity): Identity =
|
|
Identity.random(result)
|
|
|
|
proc example*(_: type Identifier): Identifier =
|
|
Identity.example.identifier
|
|
|
|
proc example*(_: type Signature): Signature =
|
|
Identity.example.sign(seq[byte].example)
|
|
|
|
proc example*[T](_: type Signed[T]): Signed[T] =
|
|
Signed.sign(Identity.example, T.example)
|