/** * Shared helpers for education commands. * * EducationHub facts (verified contracts origin/main src/EducationHub.sol): * - getModule(id) returns (uint256 payout, bool exists) and REVERTS * ModuleUnknown for unknown ids — so a failed eth_call means "does not * exist", not an RPC problem, in checkModuleExists. * - hasCompleted(learner, id) is the per-account completion bitmap; * completeModule reverts AlreadyCompleted on a second attempt. * - Module metadata (title bytes + contentHash) is EVENT-ONLY — the chain * stores just {answerHash, payout, exists}, so current title/metadata * must come from the subgraph/IPFS. */ import { ethers } from 'ethers'; import type { PreflightCheck } from '../../lib/preflight'; export declare const EDU_READ_IFACE: ethers.utils.Interface; /** * Module exists on-chain. getModule reverts ModuleUnknown for unknown ids, * so an unsuccessful call IS the "not found" signal. */ export declare function checkModuleExists(educationHubAddr: string, moduleId: ethers.BigNumberish): PreflightCheck; /** * Learner has NOT already completed the module (completeModule reverts * AlreadyCompleted otherwise — each module pays out once per account). */ export declare function checkNotCompleted(educationHubAddr: string, learner: string, moduleId: ethers.BigNumberish): PreflightCheck;