@human-protocol/sdk 3.0.7 → 4.0.0
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/dist/constants.d.ts +2 -25
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +25 -66
- package/dist/decorators.js +1 -1
- package/dist/encryption.d.ts +21 -29
- package/dist/encryption.d.ts.map +1 -1
- package/dist/encryption.js +34 -36
- package/dist/error.d.ts +31 -28
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +36 -33
- package/dist/escrow.d.ts +118 -112
- package/dist/escrow.d.ts.map +1 -1
- package/dist/escrow.js +254 -180
- package/dist/graphql/queries/operator.d.ts.map +1 -1
- package/dist/graphql/queries/operator.js +15 -7
- package/dist/graphql/queries/statistics.d.ts.map +1 -1
- package/dist/graphql/queries/statistics.js +0 -2
- package/dist/graphql/queries/transaction.d.ts.map +1 -1
- package/dist/graphql/queries/transaction.js +23 -10
- package/dist/graphql/types.d.ts +0 -2
- package/dist/graphql/types.d.ts.map +1 -1
- package/dist/interfaces.d.ts +29 -12
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/kvstore.d.ts +16 -16
- package/dist/kvstore.d.ts.map +1 -1
- package/dist/kvstore.js +16 -16
- package/dist/operator.d.ts +11 -10
- package/dist/operator.d.ts.map +1 -1
- package/dist/operator.js +36 -11
- package/dist/staking.d.ts +26 -118
- package/dist/staking.d.ts.map +1 -1
- package/dist/staking.js +46 -173
- package/dist/statistics.d.ts +10 -29
- package/dist/statistics.d.ts.map +1 -1
- package/dist/statistics.js +13 -30
- package/dist/storage.d.ts +13 -18
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +30 -25
- package/dist/transaction.js +1 -1
- package/dist/types.d.ts +23 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/utils.d.ts +0 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +0 -1
- package/package.json +8 -4
- package/src/constants.ts +25 -66
- package/src/decorators.ts +1 -1
- package/src/encryption.ts +21 -29
- package/src/error.ts +39 -37
- package/src/escrow.ts +360 -216
- package/src/graphql/queries/operator.ts +15 -7
- package/src/graphql/queries/statistics.ts +0 -2
- package/src/graphql/queries/transaction.ts +23 -13
- package/src/graphql/types.ts +0 -2
- package/src/interfaces.ts +30 -13
- package/src/kvstore.ts +17 -17
- package/src/operator.ts +47 -12
- package/src/staking.ts +53 -187
- package/src/statistics.ts +13 -30
- package/src/storage.ts +13 -18
- package/src/transaction.ts +2 -2
- package/src/types.ts +24 -6
- package/src/utils.ts +0 -1
package/dist/storage.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { UploadFile, StorageCredentials, StorageParams } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* ## Introduction
|
|
7
7
|
*
|
|
8
|
-
* This client enables
|
|
8
|
+
* This client enables interacting with S3 cloud storage services like Amazon S3 Bucket, Google Cloud Storage, and others.
|
|
9
9
|
*
|
|
10
10
|
* The instance creation of `StorageClient` should be made using its constructor:
|
|
11
11
|
*
|
|
@@ -13,7 +13,7 @@ import { UploadFile, StorageCredentials, StorageParams } from './types';
|
|
|
13
13
|
* constructor(params: StorageParams, credentials?: StorageCredentials)
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
-
* > If credentials
|
|
16
|
+
* > If credentials are not provided, it uses anonymous access to the bucket for downloading files.
|
|
17
17
|
*
|
|
18
18
|
* ## Installation
|
|
19
19
|
*
|
|
@@ -53,7 +53,7 @@ export declare class StorageClient {
|
|
|
53
53
|
* **Storage client constructor**
|
|
54
54
|
*
|
|
55
55
|
* @param {StorageParams} params - Cloud storage params
|
|
56
|
-
* @param {StorageCredentials} credentials - Optional. Cloud storage access data. If credentials
|
|
56
|
+
* @param {StorageCredentials} credentials - Optional. Cloud storage access data. If credentials are not provided - use anonymous access to the bucket
|
|
57
57
|
*/
|
|
58
58
|
constructor(params: StorageParams, credentials?: StorageCredentials);
|
|
59
59
|
/**
|
|
@@ -61,8 +61,7 @@ export declare class StorageClient {
|
|
|
61
61
|
*
|
|
62
62
|
* @param {string[]} keys Array of filenames to download.
|
|
63
63
|
* @param {string} bucket Bucket name.
|
|
64
|
-
* @returns {any[]} Returns an array of
|
|
65
|
-
*
|
|
64
|
+
* @returns {Promise<any[]>} Returns an array of JSON files downloaded and parsed into objects.
|
|
66
65
|
*
|
|
67
66
|
* **Code example**
|
|
68
67
|
*
|
|
@@ -84,28 +83,26 @@ export declare class StorageClient {
|
|
|
84
83
|
*/
|
|
85
84
|
downloadFiles(keys: string[], bucket: string): Promise<any[]>;
|
|
86
85
|
/**
|
|
87
|
-
* This function downloads files from a
|
|
88
|
-
*
|
|
89
|
-
* @param {string} url Url of the file to download.
|
|
90
|
-
* @returns {any} Returns the JSON file downloaded and parsed into object.
|
|
86
|
+
* This function downloads files from a URL.
|
|
91
87
|
*
|
|
88
|
+
* @param {string} url URL of the file to download.
|
|
89
|
+
* @returns {Promise<any>} Returns the JSON file downloaded and parsed into an object.
|
|
92
90
|
*
|
|
93
91
|
* **Code example**
|
|
94
92
|
*
|
|
95
93
|
* ```ts
|
|
96
94
|
* import { StorageClient } from '@human-protocol/sdk';
|
|
97
95
|
*
|
|
98
|
-
* const file = await
|
|
96
|
+
* const file = await StorageClient.downloadFileFromUrl('http://localhost/file.json');
|
|
99
97
|
* ```
|
|
100
98
|
*/
|
|
101
99
|
static downloadFileFromUrl(url: string): Promise<any>;
|
|
102
100
|
/**
|
|
103
101
|
* This function uploads files to a bucket.
|
|
104
102
|
*
|
|
105
|
-
* @param {any[]} files Array of objects to upload serialized into
|
|
103
|
+
* @param {any[]} files Array of objects to upload serialized into JSON.
|
|
106
104
|
* @param {string} bucket Bucket name.
|
|
107
|
-
* @returns {UploadFile[]} Returns an array of
|
|
108
|
-
*
|
|
105
|
+
* @returns {Promise<UploadFile[]>} Returns an array of uploaded file metadata.
|
|
109
106
|
*
|
|
110
107
|
* **Code example**
|
|
111
108
|
*
|
|
@@ -135,8 +132,7 @@ export declare class StorageClient {
|
|
|
135
132
|
* This function checks if a bucket exists.
|
|
136
133
|
*
|
|
137
134
|
* @param {string} bucket Bucket name.
|
|
138
|
-
* @returns {boolean} Returns `true` if exists, `false` if it doesn't.
|
|
139
|
-
*
|
|
135
|
+
* @returns {Promise<boolean>} Returns `true` if exists, `false` if it doesn't.
|
|
140
136
|
*
|
|
141
137
|
* **Code example**
|
|
142
138
|
*
|
|
@@ -160,11 +156,10 @@ export declare class StorageClient {
|
|
|
160
156
|
*/
|
|
161
157
|
bucketExists(bucket: string): Promise<boolean>;
|
|
162
158
|
/**
|
|
163
|
-
* This function
|
|
159
|
+
* This function lists all file names contained in the bucket.
|
|
164
160
|
*
|
|
165
161
|
* @param {string} bucket Bucket name.
|
|
166
|
-
* @returns {
|
|
167
|
-
*
|
|
162
|
+
* @returns {Promise<string[]>} Returns the list of file names contained in the bucket.
|
|
168
163
|
*
|
|
169
164
|
* **Code example**
|
|
170
165
|
*
|
package/dist/storage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,YAAY,CAAgB;IAEpC;;;;;OAKG;gBACS,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,kBAAkB;IAcnE
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,YAAY,CAAgB;IAEpC;;;;;OAKG;gBACS,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,kBAAkB;IAcnE;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACU,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAoB1E;;;;;;;;;;;;;OAaG;WACiB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAsBlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACU,WAAW,CACtB,KAAK,EAAE,GAAG,EAAE,EACZ,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,UAAU,EAAE,CAAC;IAmCxB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAqB5D"}
|
package/dist/storage.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -40,7 +50,7 @@ const constants_1 = require("./constants");
|
|
|
40
50
|
*
|
|
41
51
|
* ## Introduction
|
|
42
52
|
*
|
|
43
|
-
* This client enables
|
|
53
|
+
* This client enables interacting with S3 cloud storage services like Amazon S3 Bucket, Google Cloud Storage, and others.
|
|
44
54
|
*
|
|
45
55
|
* The instance creation of `StorageClient` should be made using its constructor:
|
|
46
56
|
*
|
|
@@ -48,7 +58,7 @@ const constants_1 = require("./constants");
|
|
|
48
58
|
* constructor(params: StorageParams, credentials?: StorageCredentials)
|
|
49
59
|
* ```
|
|
50
60
|
*
|
|
51
|
-
* > If credentials
|
|
61
|
+
* > If credentials are not provided, it uses anonymous access to the bucket for downloading files.
|
|
52
62
|
*
|
|
53
63
|
* ## Installation
|
|
54
64
|
*
|
|
@@ -86,7 +96,7 @@ class StorageClient {
|
|
|
86
96
|
* **Storage client constructor**
|
|
87
97
|
*
|
|
88
98
|
* @param {StorageParams} params - Cloud storage params
|
|
89
|
-
* @param {StorageCredentials} credentials - Optional. Cloud storage access data. If credentials
|
|
99
|
+
* @param {StorageCredentials} credentials - Optional. Cloud storage access data. If credentials are not provided - use anonymous access to the bucket
|
|
90
100
|
*/
|
|
91
101
|
constructor(params, credentials) {
|
|
92
102
|
try {
|
|
@@ -106,8 +116,7 @@ class StorageClient {
|
|
|
106
116
|
*
|
|
107
117
|
* @param {string[]} keys Array of filenames to download.
|
|
108
118
|
* @param {string} bucket Bucket name.
|
|
109
|
-
* @returns {any[]} Returns an array of
|
|
110
|
-
*
|
|
119
|
+
* @returns {Promise<any[]>} Returns an array of JSON files downloaded and parsed into objects.
|
|
111
120
|
*
|
|
112
121
|
* **Code example**
|
|
113
122
|
*
|
|
@@ -144,18 +153,17 @@ class StorageClient {
|
|
|
144
153
|
}));
|
|
145
154
|
}
|
|
146
155
|
/**
|
|
147
|
-
* This function downloads files from a
|
|
148
|
-
*
|
|
149
|
-
* @param {string} url Url of the file to download.
|
|
150
|
-
* @returns {any} Returns the JSON file downloaded and parsed into object.
|
|
156
|
+
* This function downloads files from a URL.
|
|
151
157
|
*
|
|
158
|
+
* @param {string} url URL of the file to download.
|
|
159
|
+
* @returns {Promise<any>} Returns the JSON file downloaded and parsed into an object.
|
|
152
160
|
*
|
|
153
161
|
* **Code example**
|
|
154
162
|
*
|
|
155
163
|
* ```ts
|
|
156
164
|
* import { StorageClient } from '@human-protocol/sdk';
|
|
157
165
|
*
|
|
158
|
-
* const file = await
|
|
166
|
+
* const file = await StorageClient.downloadFileFromUrl('http://localhost/file.json');
|
|
159
167
|
* ```
|
|
160
168
|
*/
|
|
161
169
|
static async downloadFileFromUrl(url) {
|
|
@@ -180,10 +188,9 @@ class StorageClient {
|
|
|
180
188
|
/**
|
|
181
189
|
* This function uploads files to a bucket.
|
|
182
190
|
*
|
|
183
|
-
* @param {any[]} files Array of objects to upload serialized into
|
|
191
|
+
* @param {any[]} files Array of objects to upload serialized into JSON.
|
|
184
192
|
* @param {string} bucket Bucket name.
|
|
185
|
-
* @returns {UploadFile[]} Returns an array of
|
|
186
|
-
*
|
|
193
|
+
* @returns {Promise<UploadFile[]>} Returns an array of uploaded file metadata.
|
|
187
194
|
*
|
|
188
195
|
* **Code example**
|
|
189
196
|
*
|
|
@@ -237,8 +244,7 @@ class StorageClient {
|
|
|
237
244
|
* This function checks if a bucket exists.
|
|
238
245
|
*
|
|
239
246
|
* @param {string} bucket Bucket name.
|
|
240
|
-
* @returns {boolean} Returns `true` if exists, `false` if it doesn't.
|
|
241
|
-
*
|
|
247
|
+
* @returns {Promise<boolean>} Returns `true` if exists, `false` if it doesn't.
|
|
242
248
|
*
|
|
243
249
|
* **Code example**
|
|
244
250
|
*
|
|
@@ -264,11 +270,10 @@ class StorageClient {
|
|
|
264
270
|
return this.client.bucketExists(bucket);
|
|
265
271
|
}
|
|
266
272
|
/**
|
|
267
|
-
* This function
|
|
273
|
+
* This function lists all file names contained in the bucket.
|
|
268
274
|
*
|
|
269
275
|
* @param {string} bucket Bucket name.
|
|
270
|
-
* @returns {
|
|
271
|
-
*
|
|
276
|
+
* @returns {Promise<string[]>} Returns the list of file names contained in the bucket.
|
|
272
277
|
*
|
|
273
278
|
* **Code example**
|
|
274
279
|
*
|
package/dist/transaction.js
CHANGED
|
@@ -30,7 +30,7 @@ class TransactionUtils {
|
|
|
30
30
|
*/
|
|
31
31
|
static async getTransaction(chainId, hash) {
|
|
32
32
|
if (!ethers_1.ethers.isHexString(hash)) {
|
|
33
|
-
throw error_1.
|
|
33
|
+
throw error_1.ErrorInvalidHashProvided;
|
|
34
34
|
}
|
|
35
35
|
const networkData = constants_1.NETWORKS[chainId];
|
|
36
36
|
if (!networkData) {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TransactionLike } from 'ethers';
|
|
1
2
|
/**
|
|
2
3
|
* Enum for escrow statuses.
|
|
3
4
|
* @readonly
|
|
@@ -21,7 +22,7 @@ export declare enum EscrowStatus {
|
|
|
21
22
|
*/
|
|
22
23
|
Paid = 3,
|
|
23
24
|
/**
|
|
24
|
-
* Escrow is finished
|
|
25
|
+
* Escrow is finished.
|
|
25
26
|
*/
|
|
26
27
|
Complete = 4,
|
|
27
28
|
/**
|
|
@@ -111,10 +112,6 @@ export type NetworkData = {
|
|
|
111
112
|
* Staking contract address
|
|
112
113
|
*/
|
|
113
114
|
stakingAddress: string;
|
|
114
|
-
/**
|
|
115
|
-
* RewardPool contract address
|
|
116
|
-
*/
|
|
117
|
-
rewardPoolAddress: string;
|
|
118
115
|
/**
|
|
119
116
|
* KVStore contract address
|
|
120
117
|
*/
|
|
@@ -124,7 +121,7 @@ export type NetworkData = {
|
|
|
124
121
|
*/
|
|
125
122
|
subgraphUrl: string;
|
|
126
123
|
/**
|
|
127
|
-
* Subgraph URL
|
|
124
|
+
* Subgraph URL API key
|
|
128
125
|
*/
|
|
129
126
|
subgraphUrlApiKey: string;
|
|
130
127
|
/**
|
|
@@ -149,4 +146,24 @@ export type EscrowCancel = {
|
|
|
149
146
|
*/
|
|
150
147
|
amountRefunded: bigint;
|
|
151
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* Represents the response data for an escrow withdrawal.
|
|
151
|
+
*/
|
|
152
|
+
export type EscrowWithdraw = {
|
|
153
|
+
/**
|
|
154
|
+
* The hash of the transaction associated with the escrow withdrawal.
|
|
155
|
+
*/
|
|
156
|
+
txHash: string;
|
|
157
|
+
/**
|
|
158
|
+
* The address of the token used for the withdrawal.
|
|
159
|
+
*/
|
|
160
|
+
tokenAddress: string;
|
|
161
|
+
/**
|
|
162
|
+
* The amount withdrawn from the escrow.
|
|
163
|
+
*/
|
|
164
|
+
amountWithdrawn: bigint;
|
|
165
|
+
};
|
|
166
|
+
export type TransactionLikeWithNonce = TransactionLike & {
|
|
167
|
+
nonce: number;
|
|
168
|
+
};
|
|
152
169
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,SAAS,IAAA;CACV;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;GAIG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,SAAS,IAAA;CACV;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/dist/types.js
CHANGED
package/dist/utils.d.ts
CHANGED
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,MAAO,GAAG,UAgBhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,YAOrC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,MAAO,GAAG,UAgBhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,YAOrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,gBAAiB,WAAW,WAatD,CAAC"}
|
package/dist/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@human-protocol/sdk",
|
|
3
3
|
"description": "Human Protocol SDK",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
7
7
|
"dist"
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"graphql-tag": "^2.12.6",
|
|
47
47
|
"minio": "7.1.3",
|
|
48
48
|
"openpgp": "^5.11.2",
|
|
49
|
-
"secp256k1": "^
|
|
49
|
+
"secp256k1": "^5.0.1",
|
|
50
50
|
"vitest": "^1.6.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"typedoc": "^0.
|
|
53
|
+
"typedoc": "^0.27.5",
|
|
54
54
|
"typedoc-plugin-markdown": "^4.2.3"
|
|
55
55
|
},
|
|
56
56
|
"typedocOptions": {
|
|
@@ -63,7 +63,11 @@
|
|
|
63
63
|
"./src/staking.ts",
|
|
64
64
|
"./src/storage.ts",
|
|
65
65
|
"./src/statistics.ts",
|
|
66
|
-
"./src/transaction.ts"
|
|
66
|
+
"./src/transaction.ts",
|
|
67
|
+
"./src/enums.ts",
|
|
68
|
+
"./src/graphql/types.ts",
|
|
69
|
+
"./src/interfaces.ts",
|
|
70
|
+
"./src/types.ts"
|
|
67
71
|
]
|
|
68
72
|
}
|
|
69
73
|
}
|
package/src/constants.ts
CHANGED
|
@@ -1,39 +1,16 @@
|
|
|
1
1
|
import { ChainId } from './enums';
|
|
2
2
|
import { NetworkData } from './types';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* @constant Default public bucket name
|
|
6
|
-
*/
|
|
7
4
|
export const DEFAULT_PUBLIC_BUCKET = 'escrow-public-results';
|
|
8
5
|
|
|
9
|
-
/**
|
|
10
|
-
* @constant Default storage endpoint
|
|
11
|
-
*/
|
|
12
6
|
export const DEFAULT_ENDPOINT = 'localhost';
|
|
13
7
|
|
|
14
|
-
/**
|
|
15
|
-
* @constant Default storage region
|
|
16
|
-
*/
|
|
17
8
|
export const DEFAULT_REGION = 'eu';
|
|
18
9
|
|
|
19
|
-
/**
|
|
20
|
-
* @constant Default storage port
|
|
21
|
-
*/
|
|
22
10
|
export const DEFAULT_PORT = 9000;
|
|
23
11
|
|
|
24
|
-
/**
|
|
25
|
-
* @constant Default storage port
|
|
26
|
-
*/
|
|
27
12
|
export const DEFAULT_USE_SSL = false;
|
|
28
13
|
|
|
29
|
-
/**
|
|
30
|
-
* @constant Default tx Id
|
|
31
|
-
*/
|
|
32
|
-
export const DEFAULT_TX_ID = 1;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @constant Default Enum for escrow statuses.
|
|
36
|
-
*/
|
|
37
14
|
export enum HttpStatus {
|
|
38
15
|
OK = 200,
|
|
39
16
|
CREATED = 201,
|
|
@@ -45,9 +22,6 @@ export enum HttpStatus {
|
|
|
45
22
|
INTERNAL_SERVER_ERROR = 500,
|
|
46
23
|
}
|
|
47
24
|
|
|
48
|
-
/**
|
|
49
|
-
* @constant Default network parameters
|
|
50
|
-
*/
|
|
51
25
|
export const NETWORKS: {
|
|
52
26
|
[chainId in ChainId]?: NetworkData;
|
|
53
27
|
} = {
|
|
@@ -57,13 +31,12 @@ export const NETWORKS: {
|
|
|
57
31
|
scanUrl: 'https://etherscan.io',
|
|
58
32
|
factoryAddress: '0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a',
|
|
59
33
|
hmtAddress: '0xd1ba9BAC957322D6e8c07a160a3A8dA11A0d2867',
|
|
60
|
-
stakingAddress: '
|
|
61
|
-
rewardPoolAddress: '0x4A5963Dd6792692e9147EdC7659936b96251917a',
|
|
34
|
+
stakingAddress: '0xEf6Da3aB52c33925Be3F84038193a7e1331F51E6',
|
|
62
35
|
kvstoreAddress: '0xB6d36B1CDaD50302BCB3DB43bAb0D349458e1b8D',
|
|
63
36
|
subgraphUrl:
|
|
64
37
|
'https://api.studio.thegraph.com/query/74256/ethereum/version/latest',
|
|
65
38
|
subgraphUrlApiKey:
|
|
66
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
39
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmNTdYHpQLW4sbrCxihXNdQwhxa2zdyu1yPkCUuTbqESba',
|
|
67
40
|
oldSubgraphUrl: '',
|
|
68
41
|
oldFactoryAddress: '',
|
|
69
42
|
},
|
|
@@ -74,7 +47,6 @@ export const NETWORKS: {
|
|
|
74
47
|
factoryAddress: '0x925B24444511c86F4d4E63141D8Be0A025E2dca4',
|
|
75
48
|
hmtAddress: '0x4dCf5ac4509888714dd43A5cCc46d7ab389D9c23',
|
|
76
49
|
stakingAddress: '',
|
|
77
|
-
rewardPoolAddress: '',
|
|
78
50
|
kvstoreAddress: '',
|
|
79
51
|
subgraphUrl: '',
|
|
80
52
|
subgraphUrlApiKey: '',
|
|
@@ -88,7 +60,6 @@ export const NETWORKS: {
|
|
|
88
60
|
factoryAddress: '0x87469B4f2Fcf37cBd34E54244c0BD4Fa0603664c',
|
|
89
61
|
hmtAddress: '0xd3A31D57FDD790725d0F6B78095F62E8CD4ab317',
|
|
90
62
|
stakingAddress: '0xf46B45Df3d956369726d8Bd93Ba33963Ab692920',
|
|
91
|
-
rewardPoolAddress: '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4',
|
|
92
63
|
kvstoreAddress: '0x19Fc3e859C1813ac9427a7a78BeB9ae102CE96d3',
|
|
93
64
|
subgraphUrl:
|
|
94
65
|
'https://api.thegraph.com/subgraphs/name/humanprotocol/goerli-v2',
|
|
@@ -101,15 +72,14 @@ export const NETWORKS: {
|
|
|
101
72
|
chainId: ChainId.SEPOLIA,
|
|
102
73
|
title: 'Ethereum Sepolia',
|
|
103
74
|
scanUrl: 'https://sepolia.etherscan.io/',
|
|
104
|
-
factoryAddress: '
|
|
75
|
+
factoryAddress: '0x5987A5558d961ee674efe4A8c8eB7B1b5495D3bf',
|
|
105
76
|
hmtAddress: '0x792abbcC99c01dbDec49c9fa9A828a186Da45C33',
|
|
106
|
-
stakingAddress: '
|
|
107
|
-
rewardPoolAddress: '0xAFf5a986A530ff839d49325A5dF69F96627E8D29',
|
|
77
|
+
stakingAddress: '0x2163e3A40032Af1C359ac731deaB48258b317890',
|
|
108
78
|
kvstoreAddress: '0xCc0AF0635aa19fE799B6aFDBe28fcFAeA7f00a60',
|
|
109
79
|
subgraphUrl:
|
|
110
80
|
'https://api.studio.thegraph.com/query/74256/sepolia/version/latest',
|
|
111
81
|
subgraphUrlApiKey:
|
|
112
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
82
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmXVFVCLm2XxupxdKgnLRzvmkPJnpRbcoe4RNXoTqSRHsg',
|
|
113
83
|
oldSubgraphUrl: '',
|
|
114
84
|
oldFactoryAddress: '',
|
|
115
85
|
},
|
|
@@ -119,13 +89,12 @@ export const NETWORKS: {
|
|
|
119
89
|
scanUrl: 'https://bscscan.com',
|
|
120
90
|
factoryAddress: '0x92FD968AcBd521c232f5fB8c33b342923cC72714',
|
|
121
91
|
hmtAddress: '0x711Fd6ab6d65A98904522d4e3586F492B989c527',
|
|
122
|
-
stakingAddress: '
|
|
123
|
-
rewardPoolAddress: '0xf376443BCc6d4d4D63eeC086bc4A9E4a83878e0e',
|
|
92
|
+
stakingAddress: '0xE24e5C08E28331D24758b69A5E9f383D2bDD1c98',
|
|
124
93
|
kvstoreAddress: '0x21A0C4CED7aE447fCf87D9FE3A29FA9B3AB20Ff1',
|
|
125
94
|
subgraphUrl:
|
|
126
95
|
'https://api.studio.thegraph.com/query/74256/bsc/version/latest',
|
|
127
96
|
subgraphUrlApiKey:
|
|
128
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
97
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmPMS6G5evLm5ZpbnmpCfUy8bHJPwzPkZTv9DgfNdFfrCM',
|
|
129
98
|
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc',
|
|
130
99
|
oldFactoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4',
|
|
131
100
|
},
|
|
@@ -135,13 +104,12 @@ export const NETWORKS: {
|
|
|
135
104
|
scanUrl: 'https://testnet.bscscan.com',
|
|
136
105
|
factoryAddress: '0x2bfA592DBDaF434DDcbb893B1916120d181DAD18',
|
|
137
106
|
hmtAddress: '0xE3D74BBFa45B4bCa69FF28891fBE392f4B4d4e4d',
|
|
138
|
-
stakingAddress: '
|
|
139
|
-
rewardPoolAddress: '0xB0A0500103eCEc431b73F6BAd923F0a2774E6e29',
|
|
107
|
+
stakingAddress: '0xD6D347ba6987519B4e42EcED43dF98eFf5465a23',
|
|
140
108
|
kvstoreAddress: '0x32e27177BA6Ea91cf28dfd91a0Da9822A4b74EcF',
|
|
141
109
|
subgraphUrl:
|
|
142
110
|
'https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest',
|
|
143
111
|
subgraphUrlApiKey:
|
|
144
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
112
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmW6JqXvhDnhRVHU6ixKVSD65U1GKWUf3xwJo8E6mTBsAu',
|
|
145
113
|
oldSubgraphUrl:
|
|
146
114
|
'https://api.thegraph.com/subgraphs/name/humanprotocol/bsctest',
|
|
147
115
|
oldFactoryAddress: '0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f',
|
|
@@ -152,13 +120,12 @@ export const NETWORKS: {
|
|
|
152
120
|
scanUrl: 'https://polygonscan.com',
|
|
153
121
|
factoryAddress: '0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB',
|
|
154
122
|
hmtAddress: '0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF',
|
|
155
|
-
stakingAddress: '
|
|
156
|
-
rewardPoolAddress: '0xa8e32d777a3839440cc7c24D591A64B9481753B3',
|
|
123
|
+
stakingAddress: '0x01D115E9E8bF0C58318793624CC662a030D07F1D',
|
|
157
124
|
kvstoreAddress: '0xbcB28672F826a50B03EE91B28145EAbddA73B2eD',
|
|
158
125
|
subgraphUrl:
|
|
159
126
|
'https://api.studio.thegraph.com/query/74256/polygon/version/latest',
|
|
160
127
|
subgraphUrlApiKey:
|
|
161
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
128
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmTyCQMQd5QtogeTEuiqxnGQZa2PtgpUBsWLYwPCCFPbUe',
|
|
162
129
|
oldSubgraphUrl:
|
|
163
130
|
'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
|
|
164
131
|
oldFactoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
|
|
@@ -170,7 +137,6 @@ export const NETWORKS: {
|
|
|
170
137
|
factoryAddress: '0xA8D927C4DA17A6b71675d2D49dFda4E9eBE58f2d',
|
|
171
138
|
hmtAddress: '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4',
|
|
172
139
|
stakingAddress: '0x7Fd3dF914E7b6Bd96B4c744Df32183b51368Bfac',
|
|
173
|
-
rewardPoolAddress: '0xf0145eD99AC3c4f877aDa7dA4D1E059ec9116BAE',
|
|
174
140
|
kvstoreAddress: '0xD96158c7267Ea658a4688F4aEf1c85659851625d',
|
|
175
141
|
subgraphUrl:
|
|
176
142
|
'https://api.thegraph.com/subgraphs/name/humanprotocol/mumbai-v2',
|
|
@@ -185,13 +151,12 @@ export const NETWORKS: {
|
|
|
185
151
|
scanUrl: 'https://amoy.polygonscan.com/',
|
|
186
152
|
factoryAddress: '0xAFf5a986A530ff839d49325A5dF69F96627E8D29',
|
|
187
153
|
hmtAddress: '0x792abbcC99c01dbDec49c9fa9A828a186Da45C33',
|
|
188
|
-
stakingAddress: '
|
|
189
|
-
rewardPoolAddress: '0xd866bCEFf6D0F77E1c3EAE28230AE6C79b03fDa7',
|
|
154
|
+
stakingAddress: '0xffE496683F842a923110415b7278ded3F265f2C5',
|
|
190
155
|
kvstoreAddress: '0x724AeFC243EdacCA27EAB86D3ec5a76Af4436Fc7',
|
|
191
156
|
subgraphUrl:
|
|
192
157
|
'https://api.studio.thegraph.com/query/74256/amoy/version/latest',
|
|
193
158
|
subgraphUrlApiKey:
|
|
194
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
159
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmawobiPUYsGNK9chtb5PvicUtaa8Jsjpwvv8dNyMVXQ9r',
|
|
195
160
|
oldSubgraphUrl: '',
|
|
196
161
|
oldFactoryAddress: '',
|
|
197
162
|
},
|
|
@@ -202,7 +167,6 @@ export const NETWORKS: {
|
|
|
202
167
|
factoryAddress: '0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a',
|
|
203
168
|
hmtAddress: '0x3b25BC1dC591D24d60560d0135D6750A561D4764',
|
|
204
169
|
stakingAddress: '0x05398211bA2046E296fBc9a9D3EB49e3F15C3123',
|
|
205
|
-
rewardPoolAddress: '0x4A5963Dd6792692e9147EdC7659936b96251917a',
|
|
206
170
|
kvstoreAddress: '0x2B95bEcb6EBC4589f64CB000dFCF716b4aeF8aA6',
|
|
207
171
|
subgraphUrl:
|
|
208
172
|
'https://api.studio.thegraph.com/query/74256/moonbeam/version/latest',
|
|
@@ -218,13 +182,12 @@ export const NETWORKS: {
|
|
|
218
182
|
scanUrl: 'https://moonbase.moonscan.io/',
|
|
219
183
|
factoryAddress: '0x5e622FF522D81aa426f082bDD95210BC25fCA7Ed',
|
|
220
184
|
hmtAddress: '0x2dd72db2bBA65cE663e476bA8b84A1aAF802A8e3',
|
|
221
|
-
stakingAddress: '
|
|
222
|
-
rewardPoolAddress: '0xf46B45Df3d956369726d8Bd93Ba33963Ab692920',
|
|
185
|
+
stakingAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940',
|
|
223
186
|
kvstoreAddress: '0xcC561f4482f4Ff051D2Dcc65c2cE1A0f291bbA46',
|
|
224
187
|
subgraphUrl:
|
|
225
188
|
'https://api.studio.thegraph.com/query/74256/moonbase-alpha/version/latest',
|
|
226
189
|
subgraphUrlApiKey:
|
|
227
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
190
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmSDPbm5xxMvYVSJzHFVsRiMekvJVYSJ7UfZw17DhPMdaH',
|
|
228
191
|
oldSubgraphUrl: '',
|
|
229
192
|
oldFactoryAddress: '',
|
|
230
193
|
},
|
|
@@ -234,13 +197,12 @@ export const NETWORKS: {
|
|
|
234
197
|
scanUrl: 'https://testnet.snowtrace.io',
|
|
235
198
|
factoryAddress: '0x56C2ba540726ED4f46E7a134b6b9Ee9C867FcF92',
|
|
236
199
|
hmtAddress: '0x9406d5c635AD22b0d76c75E52De57A2177919ca3',
|
|
237
|
-
stakingAddress: '
|
|
238
|
-
rewardPoolAddress: '0x5517fE916Fe9F8dB15B0DDc76ebDf0BdDCd4ed18',
|
|
200
|
+
stakingAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940',
|
|
239
201
|
kvstoreAddress: '0x3aD4B091E054f192a822D1406f4535eAd38580e4',
|
|
240
202
|
subgraphUrl:
|
|
241
203
|
'https://api.studio.thegraph.com/query/74256/fuji/version/latest',
|
|
242
204
|
subgraphUrlApiKey:
|
|
243
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
205
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYXwNPwC5DcitK1SLVUR6gPANmEn3UsVvGeTbjCv1tTb2',
|
|
244
206
|
oldSubgraphUrl:
|
|
245
207
|
'https://api.thegraph.com/subgraphs/name/humanprotocol/fuji',
|
|
246
208
|
oldFactoryAddress: '0xfb4469201951C3B9a7F1996c477cb7BDBEcE0A88',
|
|
@@ -252,7 +214,6 @@ export const NETWORKS: {
|
|
|
252
214
|
factoryAddress: '0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a',
|
|
253
215
|
hmtAddress: '0x12365293cb6477d4fc2686e46BB97E3Fb64f1550',
|
|
254
216
|
stakingAddress: '0x05398211bA2046E296fBc9a9D3EB49e3F15C3123',
|
|
255
|
-
rewardPoolAddress: '0x4A5963Dd6792692e9147EdC7659936b96251917a',
|
|
256
217
|
kvstoreAddress: '0x9Bc7bff35B2Be2413708d48c3B0aEF5c43646728',
|
|
257
218
|
subgraphUrl:
|
|
258
219
|
'https://api.studio.thegraph.com/query/74256/avalanche/version/latest',
|
|
@@ -269,7 +230,6 @@ export const NETWORKS: {
|
|
|
269
230
|
factoryAddress: '0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569',
|
|
270
231
|
hmtAddress: '0x2736B33455A872dC478E1E004106D04c35472468',
|
|
271
232
|
stakingAddress: '0x003548Df34be8836cF0F9673403a1E40ba449a0F',
|
|
272
|
-
rewardPoolAddress: '0xA9545C2530BD5bdb464d5E274F59ACceAa73eD86',
|
|
273
233
|
kvstoreAddress: '0x938335006ea6F9Eb0e8020969cFF94404425e298',
|
|
274
234
|
subgraphUrl:
|
|
275
235
|
'https://api.studio.thegraph.com/query/74256/celo-alfajores/version/latest',
|
|
@@ -285,7 +245,6 @@ export const NETWORKS: {
|
|
|
285
245
|
factoryAddress: '0xc90B43a5d576D9d8026c48904dfbaED50C15Fa08',
|
|
286
246
|
hmtAddress: '0x19Ead835951493A763c96910255d5eeF147E914F',
|
|
287
247
|
stakingAddress: '0x34cD3Bd6B16c559f321799b516dE61E12017fFd1',
|
|
288
|
-
rewardPoolAddress: '0xb9344bAD98E3d26a4d83900922baf395a2Ec154c',
|
|
289
248
|
kvstoreAddress: '0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569',
|
|
290
249
|
subgraphUrl:
|
|
291
250
|
'https://api.studio.thegraph.com/query/74256/celo/version/latest',
|
|
@@ -301,7 +260,6 @@ export const NETWORKS: {
|
|
|
301
260
|
factoryAddress: '0x4949C9DFFD83F0D5Ab0AB24C57C4D403D5c20C15',
|
|
302
261
|
hmtAddress: '0x10acbe3b9e6a2ff7f341e5cbf4b6617741ff44aa',
|
|
303
262
|
stakingAddress: '0x01D115E9E8bF0C58318793624CC662a030D07F1D',
|
|
304
|
-
rewardPoolAddress: '0x7ABa5F75b2b530cB0c8927C86591c21dF44f06b6',
|
|
305
263
|
kvstoreAddress: '0x6512d894cc3d3FE93Da9d0420430136fA889FaB9',
|
|
306
264
|
subgraphUrl:
|
|
307
265
|
'https://api.studio.thegraph.com/query/74256/xlayer/version/latest',
|
|
@@ -316,13 +274,12 @@ export const NETWORKS: {
|
|
|
316
274
|
scanUrl: 'https://www.okx.com/explorer/xlayer-test',
|
|
317
275
|
factoryAddress: '0x6Cd3ecAD36ee88E9ef3665CF381D9dAE0FE0a32e',
|
|
318
276
|
hmtAddress: '0x792abbcC99c01dbDec49c9fa9A828a186Da45C33',
|
|
319
|
-
stakingAddress: '
|
|
320
|
-
rewardPoolAddress: '0x6daccd1f3a68945f8a7ac6d20260953f7a97fae4',
|
|
277
|
+
stakingAddress: '0xeF9849a904dF0d494D69ac0B0a6860a3A7936114',
|
|
321
278
|
kvstoreAddress: '0xdE8BE9E3C12E9F546309A429cd88d026a25EaF8C',
|
|
322
279
|
subgraphUrl:
|
|
323
280
|
'https://api.studio.thegraph.com/query/74256/xlayer-testnet/version/latest',
|
|
324
281
|
subgraphUrlApiKey:
|
|
325
|
-
'https://gateway-testnet-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
282
|
+
'https://gateway-testnet-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmNoRyqZtJTRrkbKAmWMZQUHuah7YSs8U9R3nzPu8WEhtY',
|
|
326
283
|
oldSubgraphUrl: '',
|
|
327
284
|
oldFactoryAddress: '',
|
|
328
285
|
},
|
|
@@ -330,11 +287,10 @@ export const NETWORKS: {
|
|
|
330
287
|
chainId: ChainId.LOCALHOST,
|
|
331
288
|
title: 'Localhost',
|
|
332
289
|
scanUrl: '',
|
|
333
|
-
factoryAddress: '
|
|
290
|
+
factoryAddress: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9',
|
|
334
291
|
hmtAddress: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
|
|
335
|
-
stakingAddress: '
|
|
336
|
-
|
|
337
|
-
kvstoreAddress: '0x5FC8d32690cc91D4c39d9d3abcBD16989F875707',
|
|
292
|
+
stakingAddress: '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512',
|
|
293
|
+
kvstoreAddress: '0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9',
|
|
338
294
|
subgraphUrl: 'http://localhost:8000/subgraphs/name/humanprotocol/localhost',
|
|
339
295
|
subgraphUrlApiKey: '',
|
|
340
296
|
oldSubgraphUrl: '',
|
|
@@ -347,6 +303,7 @@ export const KVStoreKeys = {
|
|
|
347
303
|
fee: 'fee',
|
|
348
304
|
publicKey: 'public_key',
|
|
349
305
|
webhookUrl: 'webhook_url',
|
|
306
|
+
website: 'website',
|
|
350
307
|
url: 'url',
|
|
351
308
|
jobTypes: 'job_types',
|
|
352
309
|
registrationNeeded: 'registration_needed',
|
|
@@ -361,3 +318,5 @@ export const Role = {
|
|
|
361
318
|
};
|
|
362
319
|
|
|
363
320
|
export const SUBGRAPH_API_KEY_PLACEHOLDER = '[SUBGRAPH_API_KEY]';
|
|
321
|
+
|
|
322
|
+
export const ESCROW_BULK_PAYOUT_MAX_ITEMS = 99;
|