Static Public Member Functions | |
static | personalEcRecover (string $message, EthD $signature) |
static | valueArray (array $values, string $typeClass) |
Static Public Member Functions inherited from EthereumStatic | |
static | getMethodSignature ($input) |
static | phpKeccak256 ($string) |
static | sha3 ($string) |
static | isValidFunction ($input) |
static | getDefinition () |
static | isValidHexQuantity ($str) |
static | isValidHexData ($str) |
static | isValidAddress ($address, $throw=false) |
static | hasHexPrefix ($str) |
static | removeHexPrefix ($str) |
static | ensureHexPrefix ($str) |
static | convertCurrency (float $amount, string $from='wei', string $to='ether') |
Public Attributes | |
$client | |
$debugHtml = '' | |
Static Protected Member Functions | |
static | isArrayType (string $type) |
static | handleFilterChangeValues (array $values) |
Ethereum Web3 API for PHP.
Definition at line 39 of file Ethereum.php.
__construct | ( | string | $url = 'http://localhost:8545' | ) |
Constructing Ethereum Class.
Remarks: Ethereum class is based on ethjs-schema.json file.
string | $url | Connection to Ethereum node. E.g: http://localhost:8545 or https://mainnet.infura.io/drupal. |
Definition at line 69 of file Ethereum.php.
References EthD\typeMap().
__call | ( | string | $method, |
array | $args | ||
) |
Method call wrapper.
string | $method | |
array | $args |
Definition at line 234 of file Ethereum.php.
References EthDataType\getTypeClass().
debug | ( | string | $title, |
$content = null |
|||
) |
Debug Helper.
string | $title | Any HTML. Will be printed bold. |
string | object | array | $content | Content will be printed in appropriate format. |
Definition at line 385 of file Ethereum.php.
etherRequest | ( | string | $method, |
array | $params = [] |
||
) |
Ethereum request.
string | $method | |
array | $params |
Definition at line 356 of file Ethereum.php.
|
staticprotected |
The return values for getFilterChange are not consistently implemented in the schema.
See also https://github.com/ethereum/wiki/wiki/JSON-RPC#returns-42
$values | array |
Definition at line 420 of file Ethereum.php.
References FilterChange\getTypeArray(), and EthDataType\getTypeClass().
|
staticprotected |
Note if there are still Arrays passed here we crash. Array types should be insicated by "[TYPE]" or type[].
string | $type |
Definition at line 326 of file Ethereum.php.
|
static |
PersonalEcRecover function.
string | $message | UTF-8 text. |
EthD | $signature | Hex value of the Message Signature. |
Exception |
Definition at line 551 of file Ethereum.php.
References EthD\hexVal().
request | ( | string | $method, |
array | $params = [] |
||
) |
Request().
string | $method | JsonRPC method to be called. |
array | $params | Request parameters. See Guzzle doc. |
Definition at line 339 of file Ethereum.php.
|
static |
Create value array.
Turns a array('0x56789...', ...) into array(EthD32(0x56789...), ...)
array | $values | Array of values of a unique data type. |
string | $typeClass | Class name for the data type. |
Exception |
Definition at line 571 of file Ethereum.php.
Referenced by SHHFilter\toArray(), Filter\toArray(), SHHPost\toArray(), SHHFilterChange\toArray(), Receipt\toArray(), SHHMessage\toArray(), FilterChange\toArray(), and Block\toArray().
$client |
Definition at line 48 of file Ethereum.php.
$debugHtml = '' |
Definition at line 49 of file Ethereum.php.