dkg.js 6.1.2 → 6.2.1
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/constants.js +44 -1
- package/dist/dkg.min.js +1 -1
- package/managers/network-operations-manager.js +22 -14
- package/package.json +2 -2
- package/services/blockchain-service/blockchain-service-base.js +44 -18
- package/services/input-service.js +16 -6
- package/services/node-api-service/implementations/http-service.js +13 -8
- package/services/validation-service.js +13 -0
package/constants.js
CHANGED
|
@@ -56,6 +56,11 @@ const BLOCKCHAINS = {
|
|
|
56
56
|
rpc: 'https://astrosat-parachain-rpc.origin-trail.network',
|
|
57
57
|
hubContract: '0x5fA7916c48Fe6D5F1738d12Ad234b78c90B4cAdA',
|
|
58
58
|
},
|
|
59
|
+
'gnosis:100': {
|
|
60
|
+
rpc: 'https://rpc.gnosischain.com/',
|
|
61
|
+
hubContract: '0xbEF14fc04F870c2dD65c13Df4faB6ba01A9c746b',
|
|
62
|
+
gasPriceOracleLink: 'https://api.gnosisscan.io/api?module=proxy&action=eth_gasPrice',
|
|
63
|
+
},
|
|
59
64
|
},
|
|
60
65
|
};
|
|
61
66
|
|
|
@@ -157,13 +162,28 @@ const OPERATIONS_STEP_STATUS = {
|
|
|
157
162
|
|
|
158
163
|
const DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY = 0.5;
|
|
159
164
|
|
|
165
|
+
const DEFAULT_PROXIMITY_SCORE_FUNCTIONS_PAIR_IDS = {
|
|
166
|
+
development: { 'hardhat1:31337': 1, 'hardhat2:31337': 2, 'otp:2043': 1 },
|
|
167
|
+
devnet: {
|
|
168
|
+
'otp:2160': 1,
|
|
169
|
+
'gnosis:10200': 2,
|
|
170
|
+
},
|
|
171
|
+
testnet: {
|
|
172
|
+
'otp:20430': 1,
|
|
173
|
+
'gnosis:10200': 2,
|
|
174
|
+
},
|
|
175
|
+
mainnet: {
|
|
176
|
+
'otp:2043': 1,
|
|
177
|
+
'gnosis:100': 2,
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
|
|
160
181
|
const DEFAULT_PARAMETERS = {
|
|
161
182
|
ENVIRONMENT: 'mainnet',
|
|
162
183
|
PORT: 8900,
|
|
163
184
|
FREQUENCY: 5,
|
|
164
185
|
MAX_NUMBER_OF_RETRIES: 5,
|
|
165
186
|
HASH_FUNCTION_ID: 1,
|
|
166
|
-
SCORE_FUNCTION_ID: 1,
|
|
167
187
|
IMMUTABLE: false,
|
|
168
188
|
VALIDATE: true,
|
|
169
189
|
OUTPUT_FORMAT: GET_OUTPUT_FORMATS.JSON_LD,
|
|
@@ -174,6 +194,22 @@ const DEFAULT_PARAMETERS = {
|
|
|
174
194
|
HANDLE_NOT_MINED_ERROR: false,
|
|
175
195
|
};
|
|
176
196
|
|
|
197
|
+
const DEFAULT_GAS_PRICE = {
|
|
198
|
+
GNOSIS: '20',
|
|
199
|
+
OTP: '1',
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const LOW_BID_SUGGESTION = 'low';
|
|
203
|
+
const MED_BID_SUGGESTION = 'med';
|
|
204
|
+
const HIGH_BID_SUGGESTION = 'high';
|
|
205
|
+
const ALL_BID_SUGGESTION = 'all';
|
|
206
|
+
const BID_SUGGESTION_RANGE_ENUM = [
|
|
207
|
+
LOW_BID_SUGGESTION,
|
|
208
|
+
MED_BID_SUGGESTION,
|
|
209
|
+
HIGH_BID_SUGGESTION,
|
|
210
|
+
ALL_BID_SUGGESTION,
|
|
211
|
+
];
|
|
212
|
+
|
|
177
213
|
module.exports = {
|
|
178
214
|
MAX_FILE_SIZE,
|
|
179
215
|
DID_PREFIX,
|
|
@@ -197,5 +233,12 @@ module.exports = {
|
|
|
197
233
|
QUERY_TYPES,
|
|
198
234
|
OPERATIONS_STEP_STATUS,
|
|
199
235
|
DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY,
|
|
236
|
+
DEFAULT_PROXIMITY_SCORE_FUNCTIONS_PAIR_IDS,
|
|
200
237
|
DEFAULT_PARAMETERS,
|
|
238
|
+
DEFAULT_GAS_PRICE,
|
|
239
|
+
LOW_BID_SUGGESTION,
|
|
240
|
+
MED_BID_SUGGESTION,
|
|
241
|
+
HIGH_BID_SUGGESTION,
|
|
242
|
+
ALL_BID_SUGGESTION,
|
|
243
|
+
BID_SUGGESTION_RANGE_ENUM,
|
|
201
244
|
};
|