dkg.js 6.0.1 → 6.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -1,5 +1,6 @@
1
1
  module.exports = {
2
2
  env: {
3
+ es2020: true,
3
4
  es6: true,
4
5
  browser: true,
5
6
  node: true,
@@ -11,7 +12,7 @@ module.exports = {
11
12
  },
12
13
  rules: {
13
14
  'linebreak-style': ['error', 'unix'],
14
- 'camelcase': 0,
15
+ camelcase: 0,
15
16
  'class-methods-use-this': 0,
16
17
  'consistent-return': 1,
17
18
  'no-restricted-syntax': 0,
@@ -29,4 +30,5 @@ module.exports = {
29
30
  },
30
31
  },
31
32
  ],
33
+ ignorePatterns: ['/dist/*'],
32
34
  };
package/constants.js CHANGED
@@ -18,10 +18,22 @@ module.exports.BLOCKCHAINS = {
18
18
  rpc: 'http://localhost:7545',
19
19
  hubContract: '0x209679fA3B658Cd0fC74473aF28243bfe78a9b12',
20
20
  },
21
+ hardhat: {
22
+ rpc: 'http://localhost:8545',
23
+ hubContract: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
24
+ },
21
25
  polygon: {
22
26
  rpc: 'https://matic-mumbai.chainstacklabs.com',
23
27
  hubContract: '0xdaa16AC171CfE8Df6F79C06E7EEAb2249E2C9Ec8', // TODO: change to Asset Contract
24
28
  },
29
+ 'otp::alphanet': {
30
+ rpc: 'http://parachain-alphanet-02.origin-trail.network:9933',
31
+ hubContract: '0x7585a99C5C150a08f5CDeFD16465C6De8D41EbbD',
32
+ },
33
+ 'otp::devnet': {
34
+ rpc: 'https://lofar-tm-rpc.origin-trail.network',
35
+ hubContract: '0x833048F6e6BEa78E0AAdedeCd2Dc2231dda443FB',
36
+ },
25
37
  'otp::testnet': {
26
38
  rpc: 'https://lofar-testnet.origin-trail.network',
27
39
  hubContract: '0xBbfF7Ea6b2Addc1f38A0798329e12C08f03750A6',
@@ -47,6 +59,7 @@ module.exports.WEBSOCKET_PROVIDER_OPTIONS = {
47
59
  module.exports.OPERATIONS = {
48
60
  PUBLISH: 'publish',
49
61
  GET: 'get',
62
+ UPDATE: 'update',
50
63
  LOCAL_STORE: 'local-store',
51
64
  QUERY: 'query',
52
65
  };
@@ -74,8 +87,30 @@ module.exports.GET_OUTPUT_FORMATS = {
74
87
  };
75
88
 
76
89
  module.exports.ASSET_STATES = {
77
- LATEST: 'latest',
78
- FINALIZED: 'finalized',
90
+ LATEST: 'LATEST',
91
+ FINALIZED: 'LATEST_FINALIZED',
92
+ };
93
+
94
+ module.exports.STORE_TYPES = {
95
+ TRIPLE: 'TRIPLE',
96
+ PENDING: 'PENDING',
97
+ };
98
+
99
+ module.exports.GRAPH_LOCATIONS = {
100
+ PUBLIC_KG: 'PUBLIC_KG',
101
+ LOCAL_KG: 'LOCAL_KG',
102
+ };
103
+
104
+ module.exports.GRAPH_STATES = {
105
+ CURRENT: 'CURRENT',
106
+ HISTORICAL: 'HISTORICAL',
107
+ };
108
+
109
+ module.exports.OT_NODE_TRIPLE_STORE_REPOSITORIES = {
110
+ PUBLIC_CURRENT: 'publicCurrent',
111
+ PUBLIC_HISTORY: 'publicHistory',
112
+ PRIVATE_CURRENT: 'privateCurrent',
113
+ PRIVATE_HISTORY: 'privateHistory',
79
114
  };
80
115
 
81
116
  module.exports.QUERY_TYPES = {
@@ -90,6 +125,7 @@ module.exports.OPERATIONS_STEP_STATUS = {
90
125
  };
91
126
 
92
127
  module.exports.DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY = 0.5;
128
+
93
129
  module.exports.DEFAULT_PARAMETERS = {
94
130
  PORT: 8900,
95
131
  FREQUENCY: 5,
@@ -101,4 +137,6 @@ module.exports.DEFAULT_PARAMETERS = {
101
137
  OUTPUT_FORMAT: this.GET_OUTPUT_FORMATS.JSON_LD,
102
138
  STATE: this.ASSET_STATES.LATEST,
103
139
  CONTENT_TYPE: this.CONTENT_TYPES.PUBLIC,
140
+ GRAPH_LOCATION: this.GRAPH_LOCATIONS.LOCAL_KG,
141
+ GRAPH_STATE: this.GRAPH_STATES.CURRENT,
104
142
  };