@ic-wallet-kit/hpl
Version:
Ic middleware wallet HPL protocol
54 lines (53 loc) • 3.68 kB
TypeScript
import { HplFtSuppliesCacheModel } from "../../../types/cache/hplFtSuppliesCacheModel";
import { HplStateAccountsCacheModel } from "../../../types/cache/hplStateAccountsCacheModel";
import { HplStateCacheModel } from "../../../types/cache/hplStateCacheModel";
import { HplStateRemoteAccountsCacheModel } from "../../../types/cache/hplStateRemoteAccountsCacheModel";
import { HplStateVirtualAccountsCacheModel } from "../../../types/cache/hplStateVirtualAccountsCacheModel";
import { IdentifierService, ILocalCacheStorage, ILogger, IStorage } from "@ic-wallet-kit/common";
import "reflect-metadata";
export interface IHplStateCacheRepository extends ILocalCacheStorage {
getHplFtSuppliesState(canisterId: string): HplFtSuppliesCacheModel[] | undefined;
setHplFtSuppliesState(canisterId: string, hplState: HplFtSuppliesCacheModel[]): void;
removeHplFtSuppliesState(canisterId: string): void;
getHplAccountState(canisterId: string): HplStateAccountsCacheModel[] | undefined;
setHplAccountState(canisterId: string, hplState: HplStateAccountsCacheModel[]): void;
getHplRemoteAccountState(canisterId: string): HplStateRemoteAccountsCacheModel[] | undefined;
setHplRemoteAccountState(canisterId: string, hplState: HplStateRemoteAccountsCacheModel[]): void;
removeHplAccountState(canisterId: string): void;
getHplVirtualAccountState(canisterId: string): HplStateVirtualAccountsCacheModel[] | undefined;
setHplVirtualAccountState(canisterId: string, hplState: HplStateVirtualAccountsCacheModel[]): void;
removeHplVirtualAccountState(canisterId: string): void;
getHplAdminState(canisterId: string): HplStateCacheModel | undefined;
setHplAdminState(canisterId: string, hplState: HplStateCacheModel): void;
removeAdminState(canisterId: string): void;
}
export declare class HplStateCacheRepository implements IHplStateCacheRepository {
private identifierService;
private logger;
private storage;
constructor(logger: ILogger, identifierService: IdentifierService, storage: IStorage);
getHplRemotesToLookState(canisterId: string): HplStateRemoteAccountsCacheModel[] | undefined;
setHplRemotesToLookState(canisterId: string, hplAsset: HplStateRemoteAccountsCacheModel[]): void;
removeHplRemotesToLookState(canisterId: string): void;
getHplVirtualAccountState(canisterId: string): HplStateVirtualAccountsCacheModel[] | undefined;
setHplVirtualAccountState(canisterId: string, hplVirtualAccount: HplStateVirtualAccountsCacheModel[]): void;
removeHplVirtualAccountState(canisterId: string): void;
getHplAccountState(canisterId: string): HplStateAccountsCacheModel[] | undefined;
setHplAccountState(canisterId: string, hplAccounts: HplStateAccountsCacheModel[]): void;
getHplRemoteAccountState(canisterId: string): HplStateRemoteAccountsCacheModel[] | undefined;
setHplRemoteAccountState(canisterId: string, hplAccounts: HplStateRemoteAccountsCacheModel[]): void;
removeHplAccountState(canisterId: string): void;
getHplFtSuppliesState(canisterId: string): HplFtSuppliesCacheModel[] | undefined;
setHplFtSuppliesState(canisterId: string, hplAsset: HplFtSuppliesCacheModel[]): void;
removeHplFtSuppliesState(canisterId: string): void;
getHplAdminState(canisterId: string): HplStateCacheModel | undefined;
setHplAdminState(canisterId: string, hplAsset: HplStateCacheModel): void;
removeAdminState(canisterId: string): void;
private getInternalState;
private getStateKey;
private getAccountStateKey;
private getRemoteAccountStateKey;
private getVirtualAccountStateKey;
private getRemotesToLookStateKey;
private getAdminStateKey;
}