mirror of https://github.com/status-im/nim-abc.git
19 lines
343 B
Nim
19 lines
343 B
Nim
import ./keys
|
|
import ./transactions
|
|
|
|
export keys
|
|
export transactions
|
|
|
|
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)
|