copay-crown
Version:
A Secure Crown Wallet
17 lines (13 loc) • 405 B
text/typescript
import { InjectionToken } from '@angular/core';
export interface IStorage {
get(k: string): Promise<any>;
set(k: string, v: any): Promise<void>;
remove(k: string): Promise<void>;
create(k: string, v: any): Promise<void>;
}
export class KeyAlreadyExistsError extends Error {
constructor() {
super('Key already exists');
}
}
export let ISTORAGE = new InjectionToken<IStorage>('storage');