From 41407ba7f5f09dab1dd7ad700740fd0fd2da07b5 Mon Sep 17 00:00:00 2001 From: Danielodingz Date: Fri, 26 Jun 2026 11:19:47 +0100 Subject: [PATCH] chore: remove unused signing and auth token functions from crypto utils --- src/utils/crypto.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index e262459..c5d7c04 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -1,15 +1,7 @@ import * as StellarSdk from "@stellar/stellar-sdk"; -import { getPlatformKeypair, getNetworkPassphrase } from "../config/stellar.js"; import crypto from "node:crypto"; -/** - * Sign an arbitrary message hash with the platform keypair. - * Used for quiz proof signatures and reward authorization. - */ -export function signWithPlatformKey(message: Buffer): string { - const keypair = getPlatformKeypair(); - return keypair.sign(message).toString("base64"); -} + /** * Verify a Stellar signature against a public key. @@ -27,15 +19,6 @@ export function verifyStellarSignature( } } -/** - * Generate a deterministic challenge token for SEP-10 auth. - */ -export function generateChallengeToken(account: string): string { - const nonce = crypto.randomBytes(32).toString("base64"); - const timestamp = Date.now(); - return JSON.stringify({ account, nonce, timestamp }); -} - /** * Hash data for on-chain content references. */