Skip to main content
Version: 1.2.1

Class: EcdsaSignature

An ECDSA signature, generated by the ECDSA.sign function. You can get the DER encoded signature via the der property, or the r,s,v form via the r, s and v properties.

Constructors

constructor

new EcdsaSignature(r, s, v, DERencoding): EcdsaSignature

Parameters

NameTypeDescription
rUint8ArrayThe r component of the signature (32 bytes)
sUint8ArrayThe s component of the signature (32 bytes)
vnumberThe v component of the signature (integer, with possible values 27/28/29/30)
DERencodingUint8Array-

Returns

EcdsaSignature

A new EcdsaSignature object

Throws

If the r, s or v values are invalid.

Properties

der

Readonly der: Uint8Array


r

Readonly r: Uint8Array


s

Readonly s: Uint8Array


v

Readonly v: number


FIELD_SIZE

Static Private Readonly FIELD_SIZE: any


MAX_DER_LEN

Static Private Readonly MAX_DER_LEN: any


MIN_DER_LEN

Static Private Readonly MIN_DER_LEN: any

Methods

fromBuffer

fromBuffer(expandedSignature): EcdsaSignature

Parameters

NameType
expandedSignaturestring | Uint8Array

Returns

EcdsaSignature