EthereumRPC
extends BaseRPCService
in package
Uses
GettersToFields
Class BaseRPCService
Table of Contents
- RPC_VERSION = "2.0"
- $credentials : ConnectionInterface
- $curl : CurlHandle|resource
- __construct() : mixed
- EthereumRPC constructor.
- __get() : void
- __isset() : mixed
- __set() : mixed
- apiVersion() : string|null
- baseHeaders() : array<string|int, mixed>
- baseUrl() : string
- ethCall() : string
- getHost() : string
- getPort() : int|null
- getSsl() : bool
- jsonRPC() : array<string|int, mixed>
- sendNodeRequest() : array<string|int, mixed>
- url() : string
Constants
RPC_VERSION
public
mixed
RPC_VERSION
= "2.0"
Properties
$credentials
protected
ConnectionInterface
$credentials
$curl
protected
CurlHandle|resource
$curl
Methods
__construct()
EthereumRPC constructor.
public
__construct(ConnectionInterface $credentials) : mixed
Parameters
- $credentials : ConnectionInterface
Return values
mixed —__get()
public
__get(string $name) : void
Parameters
- $name : string
Tags
Return values
void —__isset()
public
__isset(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
Return values
mixed —apiVersion()
public
apiVersion() : string|null
Return values
string|null —baseHeaders()
public
baseHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed> —baseUrl()
public
baseUrl() : string
Return values
string —ethCall()
public
ethCall( $tx[, string|int $block = "latest" ][, mixed $functionName = '' ]) : string
Parameters
Tags
Return values
string —getHost()
public
getHost() : string
Return values
string —getPort()
public
getPort() : int|null
Return values
int|null —getSsl()
public
getSsl() : bool
Return values
bool —jsonRPC()
public
jsonRPC(string $command[, string|null $endpoint = null ][, array<string|int, mixed>|null $params = null ][, mixed $functionName = '' ]) : array<string|int, mixed>
Parameters
- $command : string
- $endpoint : string|null = null
- $params : array<string|int, mixed>|null = null
- $functionName : mixed = ''
Return values
array<string|int, mixed> —sendNodeRequest()
public
sendNodeRequest([null $data = null ][, null $method = null ][, false $need_encode = true ][, false $is_put = false ][, mixed $functionName = '' ]) : array<string|int, mixed>
Parameters
- $data : null = null
- $method : null = null
- $need_encode : false = true
- $is_put : false = false
- $functionName : mixed = ''
Tags
Return values
array<string|int, mixed> —url()
private
url([null|string $endPoint = null ]) : string
Parameters
- $endPoint : null|string = null