[**@sodot/sodot-react-native-sdk**](/rn/api-ref) • **Docs**

***

[@sodot/sodot-react-native-sdk](/rn/api-ref) / EcdsaSignature

# Class: EcdsaSignature

An ECDSA signature, generated by the `ECDSA.sign` function.
You can get the [DER](https://en.wikipedia.org/wiki/X.690#DER_encoding) encoded signature via the `der` property,
or the r,s,v form via the  `r`, `s` and `v` properties.

## Constructors

### new EcdsaSignature()

> **new EcdsaSignature**(`r`, `s`, `v`, `DERencoding`): [`EcdsaSignature`](/rn/api-ref/classes/EcdsaSignature)

#### Parameters

• **r**: `Uint8Array`

The r component of the signature (32 bytes)

• **s**: `Uint8Array`

The s component of the signature (32 bytes)

• **v**: `number`

The v component of the signature (integer, with possible values 27/28/29/30)

• **DERencoding**: `Uint8Array`

#### Returns

[`EcdsaSignature`](/rn/api-ref/classes/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`

## Methods

### fromBuffer()

> `static` **fromBuffer**(`expandedSignature`): [`EcdsaSignature`](/rn/api-ref/classes/EcdsaSignature)

#### Parameters

• **expandedSignature**: `string` | `Uint8Array`

#### Returns

[`EcdsaSignature`](/rn/api-ref/classes/EcdsaSignature)
