nim-abc/abc/wallet.nim

19 lines
343 B
Nim
Raw Normal View History

2021-06-29 13:18:41 +00:00
import ./keys
import ./transactions
export keys
2021-06-29 13:24:11 +00:00
export transactions
2021-06-29 13:18:41 +00:00
type
Wallet* = object
key: PrivateKey
func init*(_: type Wallet, key: PrivateKey): Wallet =
Wallet(key: key)
func id*(wallet: Wallet): PublicKey =
wallet.key.toPublicKey
func sign*(wallet: Wallet, transaction: var Transaction) =
wallet.key.sign(transaction)