nim-abc/abc/wallet.nim

18 lines
323 B
Nim
Raw Normal View History

2021-06-29 13:18:41 +00:00
import ./keys
import ./transactions
export keys
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)