RawKeyWallet
extends AbstractWallet
in package
RawKeyWallet extends the AbstractWallet to allow wallet creation using raw keys.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor to create a RawKeyWallet.
- getAddress() : Address
- Returns the wallet's associated Ethereum address.
- getKeyRaw() : string
- Returns the raw private key in binary or hexadecimal format.
- key() : Key
- Returns the underlying private key object stored in the wallet.
Properties
$key
protected
Key
$key
Methods
__construct()
Constructor to create a RawKeyWallet.
public
__construct(string|Key $key) : mixed
Parameters
- $key : string|Key
-
Either a Key object or a raw key as a hex string.
getAddress()
Returns the wallet's associated Ethereum address.
public
getAddress() : Address
Tags
Return values
Address —The Ethereum address.
getKeyRaw()
Returns the raw private key in binary or hexadecimal format.
public
getKeyRaw([bool $bin = false ]) : string
Parameters
- $bin : bool = false
-
If true, returns in binary. Otherwise, returns in hexadecimal.
Return values
string —The raw key.
key()
Returns the underlying private key object stored in the wallet.
public
key() : Key
Return values
Key —The Key object.