@sodot/sodot-web-sdk • Docs
@sodot/sodot-web-sdk / EcdsaSignature
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
new EcdsaSignature()
new EcdsaSignature(
r
,s
,v
,DERencoding
):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
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
Parameters
• expandedSignature: string
| Uint8Array