import { Address, Hash } from 'viem'; import { P as PublicClient, W as WalletClient } from './doc-types-471vSmPO.js'; /** * Check if user holds MySBT token (identity verification). * * Does NOT swallow read errors: `balanceOf` returns 0 for a non-holder, so any * thrown error is an RPC/transport/contract failure — masking it as * `{ hasSBT: false }` would turn a transient RPC blip into a false "no SBT" and * wrongly fail eligibility checks. The error propagates so the caller can retry * or surface "couldn't determine" rather than "no SBT". */ declare function checkMySBT(client: any, sbtAddress: Address, user: Address): Promise<{ hasSBT: boolean; balance: bigint; }>; /** * Fetch MySBT token ID for a specific user. * MySBT exposes `getUserSBT(address) -> uint256` (alias of the `userToSBT` * mapping), which returns the user's tokenId or 0 when they hold no SBT. * * Returns the tokenId, or `null` ONLY for the genuine "no SBT" sentinel (id == 0). * Read errors are NOT swallowed (see {@link checkMySBT}): a transient RPC failure * must not be reported as "no SBT" (a false negative for eligibility). The error * propagates to the caller. */ declare function getMySBTId(client: any, sbtAddress: Address, user: Address): Promise; declare class ReputationClient { private client; private reputationAddress; /** @internal */ private walletClient?; /** * Initialize ReputationClient * @param client The public client for queries * @param reputationAddress The address of the reputation system contract * @param walletClient Optional wallet client for write operations */ constructor(client: PublicClient, reputationAddress: Address, walletClient?: WalletClient); /** * Compute reputation score for a user */ computeScore(user: Address, communities: Address[], ruleIds: `0x${string}`[][], activities: bigint[][]): Promise; /** * Get global reputation score for a user * @param user User address * @returns Reputation score */ getGlobalReputation(user: Address): Promise; /** * Get credit limit based on reputation * @param user User address * @returns Credit limit in wei (Mock logic closely tied to Reputation) */ getCreditLimit(user: Address): Promise; /** * Get reputation score breakdown * @param user User address * @returns Detailed reputation breakdown (Mock implementation awaiting contract V4) */ getReputationBreakdown(user: Address): Promise<{ baseScore: number; stakingBonus: number; activityBonus: number; penaltyDeduction: number; total: number; }>; /** * Submit reputation proof (off-chain data to on-chain) * @param params Proof parameters * @returns Transaction hash */ submitReputationProof(params: { proofType: 'github' | 'twitter' | 'on-chain-activity'; proofData: string; signature: Hash; }): Promise; } export { ReputationClient, checkMySBT, getMySBTId };