Ether Binder
Set of utilities for interacting with Ethereum and it's smart contracts with PHP, with generating ABI bindings and Ethereum-related types
|
Public Member Functions | |
toHex (bool $with0x=true) | |
toBin () | |
eq (Hash $b) | |
isNull () | |
toHex () | |
toHex () | |
Static Public Member Functions | |
static | fromHex (string $hex) |
static | fromBin (string $bin) |
static | NULL () |
Protected Attributes | |
const | dataSizeBytes = 32 |
string | $bytes |
Hash is a class for representing Ethereum hashes and sets structure and method for another single value data types such as Ethereum Address.
M8B\EtherBinder\Common\Hash::eq | ( | Hash | $b | ) |
Checks for equality with another Hash or Hash-derivative object.
static | $b | Another object to compare against. |
|
static |
Initializes from a binary string.
string | $bin | Binary data. |
InvalidLengthException |
Implements M8B\EtherBinder\Common\BinarySerializableInterface.
|
static |
Initializes from a hexadecimal string.
string | $hex | Hexadecimal data. |
InvalidHexLengthException | |
InvalidHexException |
Implements M8B\EtherBinder\Common\BinarySerializableInterface.
Reimplemented in M8B\EtherBinder\Common\Address.
M8B\EtherBinder\Common\Hash::isNull | ( | ) |
Checks if inner data contains only zeroes (equals to static::NULL()
)
|
static |
Initializes object with all zeros.
M8B\EtherBinder\Common\Hash::toBin | ( | ) |
Converts the internal data into to a binary string.
Implements M8B\EtherBinder\Common\BinarySerializableInterface.
|
inherited |
Implemented in M8B\EtherBinder\Common\Transaction, and M8B\EtherBinder\Crypto\Signature.
M8B\EtherBinder\Common\Hash::toHex | ( | bool | $with0x = true | ) |
Converts the internal data into to a hexadecimal string.
bool | $with0x | Flag to include "0x" prefix or not. |
|
inherited |
Implemented in M8B\EtherBinder\Utils\OOGmp.