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. */