PHP Class Bitpay\PublicKey

Inheritance: extends bitpay\Key
Show file Open project: bitpay/php-client Class Usage Examples

Protected Properties

Property Type Description
$privateKey PrivateKey
$sin SinKey

Public Methods

Method Description
__toString ( ) : string Returns the compressed public key value
createFromPrivateKey ( PrivateKey $private )
generate ( PrivateKey $privateKey = null ) : Bitpay\PublicKey Generates an uncompressed and compressed EC public key.
getSin ( ) : SinKey
isValid ( ) : boolean Checks to see if the public key is not blank and contains valid decimal and hex valules for this->hex & this->dec
setPrivateKey ( PrivateKey $privateKey ) : bitpay\KeyInterface

Method Details

__toString() public method

Returns the compressed public key value
public __toString ( ) : string
return string

createFromPrivateKey() public static method

public static createFromPrivateKey ( PrivateKey $private )
$private PrivateKey

generate() public method

Generates an uncompressed and compressed EC public key.
public generate ( PrivateKey $privateKey = null ) : Bitpay\PublicKey
$privateKey PrivateKey
return Bitpay\PublicKey

getSin() public method

public getSin ( ) : SinKey
return SinKey

isValid() public method

Checks to see if the public key is not blank and contains valid decimal and hex valules for this->hex & this->dec
public isValid ( ) : boolean
return boolean

setPrivateKey() public method

public setPrivateKey ( PrivateKey $privateKey ) : bitpay\KeyInterface
$privateKey PrivateKey
return bitpay\KeyInterface

Property Details

$privateKey protected property

protected PrivateKey,bitpay $privateKey
return PrivateKey

$sin protected property

protected SinKey,bitpay $sin
return SinKey