Class: Signature

Hierarchy

  • Signature

Index

Constructors

Methods

Constructors

constructor

+ new Signature(signature: Key, ec: EC): Signature

Parameters:

Name Type
signature Key
ec EC

Returns: Signature

Methods

getType

getType(): KeyType

Returns: KeyType


recover

recover(data: BNInput, shouldHash: boolean, encoding: BufferEncoding): PublicKey

Parameters:

Name Type Default
data BNInput -
shouldHash boolean true
encoding BufferEncoding "utf8"

Returns: PublicKey


toBinary

toBinary(): Uint8Array

Returns: Uint8Array


toElliptic

toElliptic(): any

Returns: any


toString

toString(): string

Returns: string


verify

verify(data: BNInput, publicKey: PublicKey, shouldHash: boolean, encoding: BufferEncoding): boolean

Parameters:

Name Type Default
data BNInput -
publicKey PublicKey -
shouldHash boolean true
encoding BufferEncoding "utf8"

Returns: boolean


Static fromElliptic

fromElliptic(ellipticSig: EC.Signature, keyType: KeyType, ec?: EC): Signature

Parameters:

Name Type
ellipticSig EC.Signature
keyType KeyType
ec? EC

Returns: Signature


Static fromString

fromString(sig: string, ec?: EC): Signature

Parameters:

Name Type
sig string
ec? EC

Returns: Signature