EcdsaSignature
@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<ArrayBufferLike>
The r component of the signature (32 bytes)
• s: Uint8Array<ArrayBufferLike>
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<ArrayBufferLike>
Returns
A new EcdsaSignature object
Throws
If the r, s or v values are invalid.
Properties
der
readonlyder:Uint8Array<ArrayBufferLike>
r
readonlyr:Uint8Array<ArrayBufferLike>
s
readonlys:Uint8Array<ArrayBufferLike>
v
readonlyv:number
Methods
fromBuffer()
staticfromBuffer(expandedSignature):EcdsaSignature
Parameters
• expandedSignature: string | Uint8Array<ArrayBufferLike>