Ether Binder
Set of utilities for interacting with Ethereum and it's smart contracts with PHP, with generating ABI bindings and Ethereum-related types
Loading...
Searching...
No Matches
M8B\EtherBinder\Wallet\RawKeyWallet Class Reference
Inheritance diagram for M8B\EtherBinder\Wallet\RawKeyWallet:
M8B\EtherBinder\Wallet\AbstractWallet

Public Member Functions

 __construct (#[SensitiveParameter] string|Key $key)
 
 key ()
 
 getKeyRaw (bool $bin=false)
 
 getAddress ()
 

Protected Attributes

Key $key
 

Detailed Description

RawKeyWallet extends the AbstractWallet to allow wallet creation using raw keys.

Author
DubbaThony

Constructor & Destructor Documentation

◆ __construct()

M8B\EtherBinder\Wallet\RawKeyWallet::__construct ( # string|Key $key[SensitiveParameter])

Constructor to create a RawKeyWallet.

Parameters
string | Key$keyEither a Key object or a raw key as a hex string.

Member Function Documentation

◆ getAddress()

M8B\EtherBinder\Wallet\AbstractWallet::getAddress ( )
inherited

Returns the wallet's associated Ethereum address.

Returns
Address The Ethereum address.
Exceptions
EthBinderLogicExceptionLogic exception

◆ getKeyRaw()

M8B\EtherBinder\Wallet\AbstractWallet::getKeyRaw ( bool $bin = false)
inherited

Returns the raw private key in binary or hexadecimal format.

Parameters
bool$binIf true, returns in binary. Otherwise, returns in hexadecimal.
Returns
string The raw key.

◆ key()

M8B\EtherBinder\Wallet\AbstractWallet::key ( )
inherited

Returns the underlying private key object stored in the wallet.

Returns
Key The Key object.

The documentation for this class was generated from the following file: