-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (26 loc) · 1.48 KB
/
index.js
File metadata and controls
30 lines (26 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// managers
import AssertionOperationsManager from './managers/assertion-operations-manager.js';
import AssetOperationsManager from './managers/asset-operations-manager.js';
import BlockchainOperationsManager from './managers/blockchain-operations-manager.js';
import GraphOperationsManager from './managers/graph-operations-manager.js';
import NetworkOperationsManager from './managers/network-operations-manager.js';
import NodeOperationsManager from './managers/node-operations-manager.js';
import ParanetOperationsManager from './managers/paranet-operations-manager.js';
import BaseServiceManager from './services/base-service-manager.js';
export default class DkgClient {
constructor(config) {
const baseServiceManager = new BaseServiceManager(config);
const services = baseServiceManager.getServices();
this.assertion = new AssertionOperationsManager(services);
this.asset = new AssetOperationsManager(services);
this.blockchain = new BlockchainOperationsManager(services);
this.node = new NodeOperationsManager(services);
this.graph = new GraphOperationsManager(services);
this.network = new NetworkOperationsManager(services);
this.paranet = new ParanetOperationsManager(services);
// Backwards compatibility
this.graph.get = this.asset.get.bind(this.asset);
this.graph.create = this.asset.create.bind(this.asset);
this.graph.publishFinality = this.asset.publishFinality.bind(this.asset);
}
}