import { API , DEFAULT_API_OPTIONS } from '../core/api' ; import { ApiOptions , Contact } from '../models' ; import Snapshots from './snapshots' ; extends API export default class Account extends API { private snapshots : Snapshots ; constructor ( opts = DEFAULT_API_OPTIONS ) { super ( opts ) ; this . snapshots = new Snapshots ( opts ) ; } returns async address ( ) { const response = await this . sendGet ( 'account/address' ) ; return response . text ( ) ; } returns async seed ( ) { const response = await this . sendGet ( 'account/seed' ) ; return response . text ( ) ; } returns async contact ( ) { const response = await this . sendGet ( 'account' ) ; return response . json ( ) ; } param apply param wait sync ( apply ? , wait ? ) { if ( apply ) { return this . snapshots . apply ( undefined , wait ) ; } return this . snapshots . search ( wait ) ; } }