import { ContractTransaction } from 'ethers'; import { UserLending } from '../services/UserLending/user-lending'; import { DepositParams, KycParams, WithdrawParams } from './types'; /** * High-level facade for deposit and withdrawal operations. * * Integrators use this to submit on-chain transactions without * worrying about internal encoding details. */ export declare class DepositsFacade { private _userLending; private _chainId; /** * True when the SDK holds a Provider rather than a Signer. Optional and * defaulting to false so constructing this facade directly keeps * working; `Kasu` always passes it. */ private _isReadOnly; constructor(_userLending: UserLending, _chainId: string, /** * True when the SDK holds a Provider rather than a Signer. Optional and * defaulting to false so constructing this facade directly keeps * working; `Kasu` always passes it. */ _isReadOnly?: boolean); /** * Refuse a write BEFORE touching the contract. * * ethers would throw its own "sending a transaction requires a signer" a * few frames deeper, after the params have been encoded — a message that * says nothing about how to get a signer onto THIS object. Failing here * names the fix. */ private assertWritable; /** * Submit a deposit request. * * The integrator must first obtain a KYC signature via the Nexera flow * using the params from `buildKycParams()`. * * ```ts * const kycParams = kasu.deposits.buildKycParams('0xUser...'); * // ... obtain kycSignature from your backend via Nexera ... * const tx = await kasu.deposits.deposit({ * poolId: '0x...', * trancheId: '0x...', * amount: parseUnits('1000', 6), // 6 decimals for USDC/AUDD; use token's actual decimals * kycSignature: { blockExpiration, signature }, * }); * ``` */ deposit(params: DepositParams): Promise; /** * Submit a withdrawal request for a specific stable asset amount. */ withdraw(params: WithdrawParams): Promise; /** * Withdraw the entire balance from a tranche. */ withdrawMax(poolId: string, trancheId: string, userAddress: string): Promise; /** * Build KYC signature parameters for the Nexera verification flow. * * The integrator is responsible for sending these to their backend, * which obtains the signature from Nexera's signing service. */ buildKycParams(userAddress: `0x${string}`): KycParams; /** * Check whether the pool is currently in a clearing period * (deposits/withdrawals are temporarily paused). */ isClearingPending(poolId: string): Promise; /** * Get the current epoch number. */ getCurrentEpoch(): Promise; }