diff --git a/src/herumi/signature.ts b/src/herumi/signature.ts index a07e253..aadf193 100644 --- a/src/herumi/signature.ts +++ b/src/herumi/signature.ts @@ -2,7 +2,7 @@ import {SignatureType, multiVerify} from "bls-eth-wasm"; import {getContext} from "./context"; import {PublicKey} from "./publicKey"; import {bytesToHex, concatUint8Arrays, hexToBytes, isZeroUint8Array} from "../helpers"; -import {PointFormat, Signature as ISignature} from "../interface"; +import {PointFormat, Signature as ISignature, CoordType} from "../interface"; import {EmptyAggregateError, InvalidLengthError, InvalidOrderError} from "../errors"; import {SIGNATURE_LENGTH_COMPRESSED, SIGNATURE_LENGTH_UNCOMPRESSED} from "../constants"; @@ -17,7 +17,11 @@ export class Signature implements ISignature { this.value = value; } - static fromBytes(bytes: Uint8Array): Signature { + /** + * @param type Does not affect `herumi` implementation, always de-serializes to `jacobian` + * @param validate With `herumi` implementation signature validation is always on regardless of this flag. + */ + static fromBytes(bytes: Uint8Array, _type?: CoordType, _validate = true): Signature { const context = getContext(); const signature = new context.Signature(); if (!isZeroUint8Array(bytes)) {