test-ic-wallet-middleware-icrc
Version:
Ic middleware wallet ICRC protocol
23 lines (22 loc) • 1.24 kB
TypeScript
import { BaseCacheDataHandlerV2, CacheDataError, IInfo, ILogger, IdentifierService, LoadType } from "@ic-wallet-middleware/common";
import { AssetLocalCache } from "../../../../repositories";
import { SubAccountId } from "../../../../types";
export interface AllowanceSubAccountBalanceInfo extends IInfo {
principal: string;
ledgerAddress: string;
subAccountId: SubAccountId;
}
export interface AllowanceSubAccountBalance {
subAccountId: SubAccountId;
balance: bigint;
}
export declare class GetAllowanceSubAccountBalanceCacheHandler extends BaseCacheDataHandlerV2<AllowanceSubAccountBalanceInfo, AllowanceSubAccountBalance> {
private identifierService;
private localCacheRepository;
constructor(logger: ILogger, identifierService: IdentifierService, localCacheRepository: AssetLocalCache);
getCacheDataError(info: AllowanceSubAccountBalanceInfo): CacheDataError;
getLoadForceType(): LoadType[];
getExternalData(info: AllowanceSubAccountBalanceInfo): Promise<AllowanceSubAccountBalance>;
updateField(info: AllowanceSubAccountBalanceInfo, data: AllowanceSubAccountBalance): void;
getLocalCacheData(info: AllowanceSubAccountBalanceInfo): Promise<AllowanceSubAccountBalance | undefined>;
}