Home Reference Source
import PublicKey from 'bitsharesjs/lib/ecc/src/PublicKey.js'
public class | source

PublicKey

Static Method Summary

Static Public Methods
public static

fromBinary(bin: *): *

public static

fromBuffer(buffer: *): *

public static

fromHex(hex: *): *

public static

fromPoint(point: *): *

public static

fromPublicKeyString(public_key: *, address_prefix: *): *

public static
public static

fromStringOrThrow(public_key: *, address_prefix: *): *

Constructor Summary

Public Constructor
public

constructor(public: Point)

Member Summary

Public Members
public

Q: *

Method Summary

Public Methods
public

child(offset: *): *

public

toAddressString(address_prefix: *): *

public

bts::blockchain::address (unique but not a full public key)

public

toBuffer(compressed: *): *

public
public

toHex(): *

public

toPtsAddy(): *

public

toPublicKeyString(address_prefix: *): *

Full public key {return} string

public

toString(address_prefix: *): *

public

Static Public Methods

public static fromBinary(bin: *): * source

Params:

NameTypeAttributeDescription
bin *

Return:

*

public static fromBuffer(buffer: *): * source

Params:

NameTypeAttributeDescription
buffer *

Return:

*

public static fromHex(hex: *): * source

Params:

NameTypeAttributeDescription
hex *

Return:

*

public static fromPoint(point: *): * source

Params:

NameTypeAttributeDescription
point *

Return:

*

public static fromPublicKeyString(public_key: *, address_prefix: *): * source

Params:

NameTypeAttributeDescription
public_key *
address_prefix *
  • optional

Return:

*

PublicKey or null (if the public_key string is invalid)

public static fromPublicKeyStringHex(hex: *): * source

Params:

NameTypeAttributeDescription
hex *

Return:

*

public static fromStringOrThrow(public_key: *, address_prefix: *): * source

Params:

NameTypeAttributeDescription
public_key *
address_prefix *
  • optional

Return:

*

PublicKey

Throw:

Error

if public key is invalid

Public Constructors

public constructor(public: Point) source

Params:

NameTypeAttributeDescription
public Point

key

Public Members

public Q: * source

Public Methods

public child(offset: *): * source

Params:

NameTypeAttributeDescription
offset *

Return:

*

public toAddressString(address_prefix: *): * source

Params:

NameTypeAttributeDescription
address_prefix *
  • optional

Return:

*

public toBlockchainAddress(): * source

bts::blockchain::address (unique but not a full public key)

Return:

*

public toBuffer(compressed: *): * source

Params:

NameTypeAttributeDescription
compressed *
  • optional

Return:

*

public toByteBuffer(): * source

Return:

*

public toHex(): * source

Return:

*

public toPtsAddy(): * source

Return:

*

public toPublicKeyString(address_prefix: *): * source

Full public key {return} string

Params:

NameTypeAttributeDescription
address_prefix *
  • optional

Return:

*

public toString(address_prefix: *): * source

Alias for toPublicKeyString

Params:

NameTypeAttributeDescription
address_prefix *
  • optional

Return:

*

public toUncompressed(): * source

Return:

*