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\RLP\Decoder Class Reference

Static Public Member Functions

static decodeRLPHex (string $hex)
 
static decodeRLPBin (string $bin)
 

Protected Member Functions

 __construct (string $dataBin)
 
 decode ()
 
 getByteStr (int $len)
 
 getByte (int $len=1)
 
 decodeEntry ()
 
 decodeArray (int $size)
 

Detailed Description

Decoder class for handling the RLP decoding process. Operates on binary data internally. Expects the RLP data to be well-formed or will throw EthBinderLogicException

Author
DubbaThony

Member Function Documentation

◆ decode()

M8B\EtherBinder\RLP\Decoder::decode ( )
protected
Exceptions
EthBinderLogicException

◆ decodeArray()

M8B\EtherBinder\RLP\Decoder::decodeArray ( int $size)
protected
Exceptions
EthBinderLogicException

◆ decodeEntry()

M8B\EtherBinder\RLP\Decoder::decodeEntry ( )
protected
Exceptions
EthBinderLogicException

◆ decodeRLPBin()

static M8B\EtherBinder\RLP\Decoder::decodeRLPBin ( string $bin)
static

Decodes RLP-encoded data provided in binary form. It wraps output in array.

Parameters
string$binBinary RLP-encoded data.
Returns
array Decoded data, presented as an array.
Exceptions
EthBinderLogicException

◆ decodeRLPHex()

static M8B\EtherBinder\RLP\Decoder::decodeRLPHex ( string $hex)
static

Decodes RLP-encoded data provided in hexadecimal form. It wraps output in array.

Parameters
string$hexHexadecimal RLP-encoded data.
Returns
array Decoded data, presented as an array.
Exceptions
EthBinderLogicException

◆ getByte()

M8B\EtherBinder\RLP\Decoder::getByte ( int $len = 1)
protected
Exceptions
EthBinderLogicException

◆ getByteStr()

M8B\EtherBinder\RLP\Decoder::getByteStr ( int $len)
protected
Exceptions
EthBinderLogicException

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