2018-02-13 18:20:27 +00:00
|
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
|
|
# Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
|
|
|
|
2018-02-14 18:50:36 +00:00
|
|
|
import ./private/lowlevel_types
|
|
|
|
import ttmath
|
|
|
|
|
|
|
|
export lowlevel_types, ttmath
|
2018-02-13 18:20:27 +00:00
|
|
|
|
|
|
|
type
|
|
|
|
PublicKey* = object
|
2018-02-14 15:24:29 +00:00
|
|
|
raw_key*: ByteArrayBE[64]
|
2018-02-13 18:20:27 +00:00
|
|
|
|
|
|
|
PrivateKey* = object
|
2018-02-14 15:24:29 +00:00
|
|
|
raw_key*: ByteArrayBE[32]
|
2018-02-13 18:20:27 +00:00
|
|
|
public_key*: PublicKey
|
|
|
|
|
|
|
|
BaseKey* = PrivateKey|PublicKey
|
|
|
|
|
2018-02-14 18:50:36 +00:00
|
|
|
Signature* {.packed.}= object
|
2018-02-13 18:20:27 +00:00
|
|
|
r*: UInt256
|
|
|
|
s*: UInt256
|
2018-02-14 18:50:36 +00:00
|
|
|
v*: range[0.byte .. 1.byte]
|