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\Crypto\Signature Class Reference
Inheritance diagram for M8B\EtherBinder\Crypto\Signature:
M8B\EtherBinder\Common\BinarySerializableInterface

Public Member Functions

 toHex ()
 
 toBin ()
 

Static Public Member Functions

static fromHex (string $hex)
 
static fromBin (string $bin)
 

Public Attributes

OOGmp $v
 
OOGmp $r
 
OOGmp $s
 

Detailed Description

Signature is a class for handling and representing Ethereum signatures.

Author
DubbaThony

Member Function Documentation

◆ fromBin()

static M8B\EtherBinder\Crypto\Signature::fromBin ( string $bin)
static

Instantiates signature from binary data. Required order of signature is r, s, v

Parameters
string$binBinary blob of signature
Returns
static Signature object

Implements M8B\EtherBinder\Common\BinarySerializableInterface.

◆ fromHex()

static M8B\EtherBinder\Crypto\Signature::fromHex ( string $hex)
static

Instantiates signature from hex representation. Required order of signature is r, s, v

Parameters
string$hexHex-encoded signature
Returns
static Signature object
Exceptions
InvalidHexException

Implements M8B\EtherBinder\Common\BinarySerializableInterface.

◆ toBin()

M8B\EtherBinder\Crypto\Signature::toBin ( )

Converts the signature to a binary string. The output has a constant length of 33 bytes, ordered 'r', 's', and 'v'.

Returns
string The signature as a binary blob string.

Implements M8B\EtherBinder\Common\BinarySerializableInterface.

◆ toHex()

M8B\EtherBinder\Crypto\Signature::toHex ( )

Converts the signature to a hexadecimal string. The output has a constant length of 66 nibbles, ordered 'r', 's', and 'v'. The output is NOT '0x' prefixed.

Returns
string The signature as a hexadecimal string.

Implements M8B\EtherBinder\Common\BinarySerializableInterface.


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