TY
our $VERSION = '0.001'; # VERSION
use Carp;
use File::Slurp;
use JSON::MaybeXS qw(decode_json encode_json);
use Crypt::PRNG;
use Net::SSH::Perl::Cipher;
use Blockchain::Ethereum::Keyst
ub id {
shift->{id};
}
sub private_key {
shift->{private_key};
}
sub _json {
return shift->{json} //= JSON::MaybeXS->new(utf8 => 1);
}
sub import_file {
my ($self, $file_path, $pass
word) = @_;
my $content = read_file($file_path);
my $decoded = $self->_json->decode(lc $content);
return $self->_from_object($decoded, $password);
}
sub _from_object {
my ($self, $o