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

Signature

Static Method Summary

Static Public Methods
public static

fromBuffer(buf: *): *

public static

fromHex(hex: *): *

public static

sign(string: *, private_key: *): *

public static

signBuffer(buf: Buffer, private_key: PrivateKey): Signature

public static

signBufferSha256(buf: Buffer, private_key: PrivateKey): Signature

Sign a buffer of exactally 32 bytes in size (sha256(text))

public static

signHex(hex: *, private_key: *): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

i: *

public

r: *

public

s: *

Method Summary

Public Methods
public

recoverPublicKey(sha256_buffer: *): PublicKey

public
public

toBuffer(): *

public
public

toHex(): *

public

verifyBuffer(un-hashed: Buffer): boolean

public

verifyHash(hash: *, public_key: *): *

public

verifyHex(hex: *, public_key: *): *

Static Public Methods

public static fromBuffer(buf: *): * source

Params:

NameTypeAttributeDescription
buf *

Return:

*

public static fromHex(hex: *): * source

Params:

NameTypeAttributeDescription
hex *

Return:

*

public static sign(string: *, private_key: *): * source

Params:

NameTypeAttributeDescription
string *
private_key *

Return:

*

public static signBuffer(buf: Buffer, private_key: PrivateKey): Signature source

Params:

NameTypeAttributeDescription
buf Buffer
private_key PrivateKey

Return:

Signature

public static signBufferSha256(buf: Buffer, private_key: PrivateKey): Signature source

Sign a buffer of exactally 32 bytes in size (sha256(text))

Params:

NameTypeAttributeDescription
buf Buffer

32 bytes binary

private_key PrivateKey

Return:

Signature

public static signHex(hex: *, private_key: *): * source

Params:

NameTypeAttributeDescription
hex *
private_key *

Return:

*

Public Constructors

public constructor() source

Public Members

public i: * source

public r: * source

public s: * source

Public Methods

public recoverPublicKey(sha256_buffer: *): PublicKey source

Params:

NameTypeAttributeDescription
sha256_buffer *

Return:

PublicKey

public recoverPublicKeyFromBuffer(buffer: *): * source

Params:

NameTypeAttributeDescription
buffer *

Return:

*

public toBuffer(): * source

Return:

*

public toByteBuffer(): * source

Return:

*

public toHex(): * source

Return:

*

public verifyBuffer(un-hashed: Buffer): boolean source

Params:

NameTypeAttributeDescription
un-hashed Buffer

Return:

boolean

public verifyHash(hash: *, public_key: *): * source

Params:

NameTypeAttributeDescription
hash *
public_key *

Return:

*

public verifyHex(hex: *, public_key: *): * source

Params:

NameTypeAttributeDescription
hex *
public_key *

Return:

*