The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Blockchain::Ethereum::Keystore::Seed

VERSION

version 0.009

SYNOPSIS

Creating a new seed and derivating the key from it:

    my $seed = Blockchain::Ethereum::Seed->new;
    my $key = $seed->deriv_key(2); # Blockchain::Ethereum::Keystore::Key
    print $key->address;

Importing a mnemonic:

    my $seed = Blockchain::Ethereum::Seed->new(mnemonic => 'your mnemonic here');

Importing seed bytes:

    my $hex_seed = '...';
    my $seed = Blockchain::Ethereum::Seed->new(seed => pack("H*", $hex_seed));

OVERVIEW

If instantiated without a seed or mnemonic, this module uses Crypt::PRNG for the random seed generation

METHODS

deriv_key

Derivates a Blockchain::Ethereum::Keystore::Key for the given index

  • $index key index

  • $account [optional, default 0] account index

  • $purpose [optional, default 44] improvement proposal

  • $coin_type [optional, default 60] coin type code

Blockchain::Ethereum::Keystore::Key

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