UNPKG

test-ic-wallet-middleware-icrc

Version:
22 lines (21 loc) 1.1 kB
import { BaseCacheDataHandlerV2, CacheDataError, IInfo, ILogger, IdentifierService, LoadType } from "@ic-wallet-middleware/common"; import { AssetLocalCache } from "../../../../repositories"; import { SubAccountId } from "../../../../types"; export interface SubAccountBalanceInfo extends IInfo { ledgerAddress: string; subAccountId: SubAccountId; } export interface SubAccountBalance { subAccountId: SubAccountId; balance: bigint; } export declare class SubAccountBalanceHandler extends BaseCacheDataHandlerV2<SubAccountBalanceInfo, SubAccountBalance> { private identifierService; private localCacheRepository; constructor(logger: ILogger, identifierService: IdentifierService, localCacheRepository: AssetLocalCache); getLoadForceType(): LoadType[]; getCacheDataError(info: SubAccountBalanceInfo): CacheDataError; getExternalData(info: SubAccountBalanceInfo): Promise<SubAccountBalance>; updateField(info: SubAccountBalanceInfo, data: SubAccountBalance): void; getLocalCacheData(info: SubAccountBalanceInfo): Promise<SubAccountBalance | undefined>; }