UNPKG

test-ic-wallet-middleware-icrc

Version:
23 lines (22 loc) 1.36 kB
import { ILogger, IStorage, IdentifierService } from "@ic-wallet-middleware/common"; import { AllowanceCacheModel } from "../../../types/allowances/allowanceCacheModel"; import { AllowanceContactCacheModel } from "../../../types/allowances/allowanceContactCacheModel"; import { AllowanceDataModel } from "../../../types/allowances/allowanceDataModel"; export declare class AllowanceLocalCache { private identifierService; private logger; private storage; constructor(logger: ILogger, identifierService: IdentifierService, storage: IStorage); getAllowance(spenderPrincipal: string, ledgerAddress: string, subAccountId: string, spenderSubId: string): AllowanceCacheModel | undefined; addAllowance(info: AllowanceDataModel): AllowanceCacheModel; updateOrAddAllowance(allowance: AllowanceCacheModel): AllowanceCacheModel; removeAllowance(spenderPrincipal: string, ledgerAddress: string, subAccountId: string, spenderSubId: string): void; getAllowanceForContact(senderPrincipal: string, ledgerAddress: string, subAccountId: string): AllowanceContactCacheModel | undefined; updateAllowanceForContact(allowance: AllowanceContactCacheModel): AllowanceContactCacheModel; private getItems; private getItemsForContact; private setItem; private setItemForContact; private getKey; private getKeyForContact; }