Documentation

EC
in package

EC is a wrapper class for Elliptic Curve operations, specifically secp256k1 which is one specifically used for Ethereum. Internally it statically caches EC object, as it's instantiation has high runtime cost.

Tags
author

DubbaThony

Table of Contents

Properties

$ec  : EC

Methods

EC()  : EC
Returns the underlying cached Elliptic\EC context.
keyFromPrivate()  : KeyPair
Creates a KeyPair object from a private key.
Recover()  : Address
Recovers the Ethereum Address from a hash and signature parameters.
init()  : void
Initializes the Elliptic Curve context. Safe to call multiple times.

Properties

$ec

private static EC $ec

Methods

EC()

Returns the underlying cached Elliptic\EC context.

public static EC() : EC
Return values
EC

The Elliptic\EC context.

keyFromPrivate()

Creates a KeyPair object from a private key.

public static keyFromPrivate(string $key) : KeyPair
Parameters
$key : string

Hex-encoded private key.

Return values
KeyPair

Elliptic Curve KeyPair.

init()

Initializes the Elliptic Curve context. Safe to call multiple times.

private static init() : void

        
On this page

Search results