NAME

Blockchain::Ethereum::Keystore::Key - Ethereum key abstraction

VERSION

version 0.011

SYNOPSIS

Generate a new key:

my $key = Blockchain::Ethereum::Key->new;
$key->sign_transaction($transaction); # Blockchain::Ethereum::Transaction

Import existent key:

my $key = Blockchain::Ethereum::Key->new(private_key => $private_key); # private key bytes
$key->sign_transaction($transaction); # Blockchain::Ethereum::Transaction

OVERVIEW

This is a private key abstraction

If instantiated without a private key, this module uses Crypt::PRNG for the random key generation

METHODS

export

Export the private key bytes (the auto generated if no private key given)

Private key bytes

sign_transaction

Sign a Blockchain::Ethereum::Transaction object

self

address

Export the Blockchain::Ethereum::Keystore::Address from the imported/generated private key

Blockchain::Ethereum::Keystore::Address

export

Use `private_key` instead this method is deprecated and will be removed.

Private key bytes

AUTHOR

Reginaldo Costa <refeco@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023 by REFECO.

This is free software, licensed under:

The MIT (X11) License