import { ArianeeWallet } from '../../../src/core/wallet' ; import { CertificateSummary } from '../../../src/core/wallet/certificateSummary' ; export class CCStore { private users : ArianeeWallet [ ] = [ ] ; private tokens : number [ ] = [ ] ; private events : number [ ] = [ ] ; private cache = { } ; private certificateSummaries = { } ; public getUserWallet ( userIndex ) { return this . users [ userIndex ] ; } public storeWallet ( userIndex , wallet ) { this . users [ userIndex ] = wallet ; } public getEvent ( eventIndex ) { return this . events [ eventIndex ] ; } public storeEvent ( eventIndex , eventId ) { this . events [ eventIndex ] = eventId ; } public getToken ( tokenIndex ) { return this . tokens [ tokenIndex ] ; } public storeToken ( tokenIndex , certificateId ) { this . tokens [ tokenIndex ] = certificateId ; } public storeCustom ( key , value ) { this . cache [ key ] = value ; } public getCustom ( key ) { return this . cache [ key ] ; } public getCertificateSummary ( certificateId ) { return this . certificateSummaries [ certificateId ] ; } public storeCertificateSummary ( certificateId , certificateSummary ) { this . certificateSummaries [ certificateId ] = certificateSummary ; } }