import { Injectable } from '@angular/core'; import Web3 from 'web3'; import {environment} from '@src/environments/environment'; import {CICRegistry} from 'cic-client'; import {HttpGetter} from '@app/_helpers'; @Injectable({ providedIn: 'root' }) export class RegistryService { web3 = new Web3(environment.web3Provider); fileGetter = new HttpGetter(); registry = new CICRegistry(this.web3, environment.registryAddress, 'CICRegistry', this.fileGetter, ['../../assets/js/block-sync/data']); constructor() { this.registry.declaratorHelper.addTrust(environment.trustedDeclaratorAddress); this.registry.load(); } getRegistry(): any { return this.registry; } getWeb3(): any { return this.web3; } }