File

src/app/_services/registry.service.ts

Index

Properties
Methods

Constructor

constructor()

Methods

getRegistry
getRegistry()
Returns : any
getWeb3
getWeb3()
Returns : any

Properties

fileGetter
Type : FileGetter
Default value : new HttpGetter()
registry
Type : CICRegistry
Default value : new CICRegistry(this.web3, environment.registryAddress, 'CICRegistry', this.fileGetter, ['../../assets/js/block-sync/data'])
web3
Type : Web3
Default value : new Web3(environment.web3Provider)
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;
  }
}

result-matching ""

    No results matching ""