Node::Ethereum::KeyStore::V3
Shuffle Ethereum keystore with Raku
Raku module to manage Ethereum keystore.
Quick start
Keystore decryption
my $password = 'node1';
my $decrypted = Node::Ethereum::KeyStore::V3.new(:keystore('./data/92745E7e310d18e23384511b50FAd184cB7CF826.keystore')).decrypt_key(:$password);
$decrypted<buf8>.say;
$decrypted<str>.say;
# Buf[uint8]:0x<63 27 35 B6 6A D8 75 10 8D EE F0 39 BE 85 5A AE 7F 70 26 53 FC C2 B2 EF B1 E5 66 6C 13 06 F2 FD>
# 632735b66ad875108deef039be855aae7f702653fcc2b2efb1e5666c1306f2fd
Plain secret encryption
my $secret = '632735b66ad875108deef039be855aae7f702653fcc2b2efb1e5666c1306f2fd'
my $password = 'node1';
my $key_crypto = Node::Ethereum::KeyStore::V3.new.key_crypto(:$password, :$secret);
$key_crypto<ciphertext>.say;
# b6aa5d0dd018a000b4fd530db7d55b97d251238d37e2b6c0ee110de3bb524e85
License
Module Node::Ethereum::KeyStore
is free and open source software, so you can redistribute it and/or modify it under the terms of the The Artistic License 2.0.
Credits
https://github.com/ethereum/go-ethereum/blob/v1.13.4/accounts/keystore/passphrase.go#L200
https://pkg.go.dev/github.com/ethereum/go-ethereum/accounts/keystore#DecryptKey
https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition#scrypt
Author
Please contact me via LinkedIn or Twitter. Your feedback is welcome at narkhov.pro.