implement key import and export
This commit is contained in:
@@ -68,3 +68,11 @@ func (a *WalletAPI) WalletDefaultAddress(ctx context.Context) (address.Address,
|
||||
// TODO: store a default address in the config or 'wallet' portion of the repo
|
||||
return addrs[0], nil
|
||||
}
|
||||
|
||||
func (a *WalletAPI) WalletExport(ctx context.Context, addr address.Address) ([]byte, error) {
|
||||
return a.Wallet.Export(addr)
|
||||
}
|
||||
|
||||
func (a *WalletAPI) WalletImport(ctx context.Context, b []byte) (address.Address, error) {
|
||||
return a.Wallet.Import(b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user