From d61970aa9ef1d1eb8324ba59e330041762b6e3a0 Mon Sep 17 00:00:00 2001 From: matthewkeil Date: Thu, 11 Apr 2024 12:36:05 +0700 Subject: [PATCH] refactor: move helper functions to end of file --- src/functional.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/functional.ts b/src/functional.ts index 8f503f9..65e12c9 100644 --- a/src/functional.ts +++ b/src/functional.ts @@ -165,16 +165,6 @@ export function functionalInterfaceFactory({ } } - function convertToBlstPublicKeyArg(publicKey: PublicKeyArg): blst.PublicKeyArg { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return publicKey instanceof PublicKey ? ((publicKey as any).value as blst.PublicKey) : publicKey; - } - - function convertToBlstSignatureArg(signature: SignatureArg): blst.SignatureArg { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return signature instanceof Signature ? ((signature as any).value as blst.Signature) : signature; - } - /** * Verifies if signature is message signed with given public key. */ @@ -260,6 +250,16 @@ export function functionalInterfaceFactory({ return SecretKey.fromBytes(secretKey).toPublicKey().toBytes(); } + function convertToBlstPublicKeyArg(publicKey: PublicKeyArg): blst.PublicKeyArg { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return publicKey instanceof PublicKey ? ((publicKey as any).value as blst.PublicKey) : publicKey; + } + + function convertToBlstSignatureArg(signature: SignatureArg): blst.SignatureArg { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return signature instanceof Signature ? ((signature as any).value as blst.Signature) : signature; + } + return { sign, aggregateSignatures,