NAME

Web3::Tiny::Wallet - Private key handling and transaction signing

SYNOPSIS

use Web3::Tiny::Wallet;

my $wallet = Web3::Tiny::Wallet->new(private_key => '0x' . ('11' x 32));
print $wallet->address, "\n";    # EIP-55 checksummed

my $raw_tx = $wallet->sign_transaction(
    nonce     => 0,
    gas_price => '20000000000',
    gas       => 21000,
    to        => '0x5B38Da6a701c568545dCfcB03FcB875f56beddC4',
    value     => '1000000000000000000',
    chain_id  => 1,
);
# broadcast $raw_tx via eth_sendRawTransaction

DESCRIPTION

Signs legacy (pre-EIP-1559) Ethereum transactions with EIP-155 replay protection. EIP-1559 (type-2) transactions are not supported in this release -- legacy transactions are accepted on every EVM chain, so this covers the common case.