import { Feed , Observable } from '../feed/feed' ; import { WebClient } from '../http/web-client' ; import { Query } from '../query/query' ; import { FactEnvelope , FactRecord , FactReference } from '../storage' ; import { Authentication } from './authentication' ; export class Principal { } export class AuthenticationImpl implements Authentication { private principal : Principal ; constructor ( private inner , private client ) { } login ( ) { return this . client . login ( ) ; } local ( ) { throw new Error ( 'Local device has no persistence.' ) ; } async save ( envelopes ) { const saved = await this . inner . save ( envelopes ) ; return saved ; } query ( start , query ) { return this . inner . query ( start , query ) ; } exists ( fact ) { throw new Error ( "Exists method not implemented on AuthenticationImpl." ) ; } load ( references ) { return this . inner . load ( references ) ; } from ( fact , query ) { return this . inner . from ( fact , query ) ; } }