src/app/_services/registry.service.ts
Properties |
Methods |
constructor()
|
Defined in src/app/_services/registry.service.ts:14
|
getRegistry |
getRegistry()
|
Defined in src/app/_services/registry.service.ts:21
|
Returns :
any
|
getWeb3 |
getWeb3()
|
Defined in src/app/_services/registry.service.ts:25
|
Returns :
any
|
fileGetter |
Type : FileGetter
|
Default value : new HttpGetter()
|
Defined in src/app/_services/registry.service.ts:12
|
registry |
Type : CICRegistry
|
Default value : new CICRegistry(this.web3, environment.registryAddress, 'CICRegistry', this.fileGetter,
['../../assets/js/block-sync/data'])
|
Defined in src/app/_services/registry.service.ts:13
|
web3 |
Type : Web3
|
Default value : new Web3(environment.web3Provider)
|
Defined in src/app/_services/registry.service.ts:11
|
import { Injectable } from '@angular/core';
import Web3 from 'web3';
import {environment} from '@src/environments/environment';
import {CICRegistry, FileGetter} from 'cic-client';
import {HttpGetter} from '@app/_helpers';
@Injectable({
providedIn: 'root'
})
export class RegistryService {
web3: Web3 = new Web3(environment.web3Provider);
fileGetter: FileGetter = new HttpGetter();
registry: CICRegistry = 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;
}
}