import {Actions, ActionType} from "../actions" export interface Storage { put(action: Actions): Promise //TODO make more extensive filtering for now hoist this to the user get(): Promise> // Clears database in memory representation state clear(): Promise // Not all storage will or can use this but it allows for the user to have more granular control over writing to permanent storage flush( filter?:(x:Actions)=>boolean): Promise origin(): string } export interface RemoteStorage { getForeign(appKey:string, pubKey: string): Promise> }