@human-protocol/sdk 6.0.0 → 7.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/CHANGELOG.md +34 -0
- package/dist/base.d.ts +4 -2
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +14 -0
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +27 -16
- package/dist/encryption/encryption.d.ts +84 -0
- package/dist/encryption/encryption.d.ts.map +1 -0
- package/dist/{encryption.js → encryption/encryption.js} +3 -161
- package/dist/encryption/encryption_utils.d.ts +101 -0
- package/dist/encryption/encryption_utils.d.ts.map +1 -0
- package/dist/encryption/encryption_utils.js +191 -0
- package/dist/encryption/index.d.ts +4 -0
- package/dist/encryption/index.d.ts.map +1 -0
- package/dist/encryption/index.js +7 -0
- package/dist/encryption/types.d.ts +9 -0
- package/dist/encryption/types.d.ts.map +1 -0
- package/dist/encryption/types.js +9 -0
- package/dist/error.d.ts +6 -10
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +12 -14
- package/dist/{escrow.d.ts → escrow/escrow_client.d.ts} +16 -196
- package/dist/escrow/escrow_client.d.ts.map +1 -0
- package/dist/{escrow.js → escrow/escrow_client.js} +50 -430
- package/dist/escrow/escrow_utils.d.ts +172 -0
- package/dist/escrow/escrow_utils.d.ts.map +1 -0
- package/dist/escrow/escrow_utils.js +388 -0
- package/dist/escrow/index.d.ts +3 -0
- package/dist/escrow/index.d.ts.map +1 -0
- package/dist/escrow/index.js +7 -0
- package/dist/graphql/queries/statistics.d.ts +1 -0
- package/dist/graphql/queries/statistics.d.ts.map +1 -1
- package/dist/graphql/queries/statistics.js +36 -2
- package/dist/graphql/types.d.ts +3 -1
- package/dist/graphql/types.d.ts.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -22
- package/dist/interfaces.d.ts +2 -7
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/kvstore/index.d.ts +3 -0
- package/dist/kvstore/index.d.ts.map +1 -0
- package/dist/kvstore/index.js +7 -0
- package/dist/{kvstore.d.ts → kvstore/kvstore_client.d.ts} +7 -112
- package/dist/kvstore/kvstore_client.d.ts.map +1 -0
- package/dist/{kvstore.js → kvstore/kvstore_client.js} +25 -187
- package/dist/kvstore/kvstore_utils.d.ts +105 -0
- package/dist/kvstore/kvstore_utils.d.ts.map +1 -0
- package/dist/kvstore/kvstore_utils.js +184 -0
- package/dist/operator/index.d.ts +2 -0
- package/dist/operator/index.d.ts.map +1 -0
- package/dist/operator/index.js +5 -0
- package/dist/{operator.d.ts → operator/operator_utils.d.ts} +3 -3
- package/dist/operator/operator_utils.d.ts.map +1 -0
- package/dist/{operator.js → operator/operator_utils.js} +6 -6
- package/dist/staking/index.d.ts +3 -0
- package/dist/staking/index.d.ts.map +1 -0
- package/dist/staking/index.js +7 -0
- package/dist/{staking.d.ts → staking/staking_client.d.ts} +10 -71
- package/dist/staking/staking_client.d.ts.map +1 -0
- package/dist/{staking.js → staking/staking_client.js} +11 -141
- package/dist/staking/staking_utils.d.ts +63 -0
- package/dist/staking/staking_utils.d.ts.map +1 -0
- package/dist/staking/staking_utils.js +137 -0
- package/dist/statistics/index.d.ts +2 -0
- package/dist/statistics/index.d.ts.map +1 -0
- package/dist/statistics/index.js +5 -0
- package/dist/{statistics.d.ts → statistics/statistics_utils.d.ts} +4 -13
- package/dist/statistics/statistics_utils.d.ts.map +1 -0
- package/dist/{statistics.js → statistics/statistics_utils.js} +8 -22
- package/dist/transaction/index.d.ts +2 -0
- package/dist/transaction/index.d.ts.map +1 -0
- package/dist/transaction/index.js +5 -0
- package/dist/{transaction.d.ts → transaction/transaction_utils.d.ts} +5 -5
- package/dist/transaction/transaction_utils.d.ts.map +1 -0
- package/dist/{transaction.js → transaction/transaction_utils.js} +9 -9
- package/dist/types.d.ts +22 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +16 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +72 -6
- package/dist/worker/index.d.ts +2 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/dist/worker/index.js +5 -0
- package/dist/{worker.d.ts → worker/worker_utils.d.ts} +3 -3
- package/dist/worker/worker_utils.d.ts.map +1 -0
- package/dist/{worker.js → worker/worker_utils.js} +5 -5
- package/package.json +5 -5
- package/src/base.ts +38 -2
- package/src/constants.ts +38 -16
- package/src/{encryption.ts → encryption/encryption.ts} +1 -193
- package/src/encryption/encryption_utils.ts +179 -0
- package/src/encryption/index.ts +3 -0
- package/src/encryption/types.ts +15 -0
- package/src/error.ts +11 -17
- package/src/{escrow.ts → escrow/escrow_client.ts} +151 -659
- package/src/escrow/escrow_utils.ts +510 -0
- package/src/escrow/index.ts +2 -0
- package/src/graphql/queries/statistics.ts +37 -1
- package/src/graphql/types.ts +4 -1
- package/src/index.ts +11 -25
- package/src/interfaces.ts +2 -7
- package/src/kvstore/index.ts +2 -0
- package/src/kvstore/kvstore_client.ts +291 -0
- package/src/kvstore/kvstore_utils.ts +244 -0
- package/src/operator/index.ts +1 -0
- package/src/{operator.ts → operator/operator_utils.ts} +8 -8
- package/src/staking/index.ts +2 -0
- package/src/{staking.ts → staking/staking_client.ts} +49 -199
- package/src/staking/staking_utils.ts +170 -0
- package/src/statistics/index.ts +1 -0
- package/src/{statistics.ts → statistics/statistics_utils.ts} +14 -26
- package/src/transaction/index.ts +1 -0
- package/src/{transaction.ts → transaction/transaction_utils.ts} +11 -11
- package/src/types.ts +24 -1
- package/src/utils.ts +82 -9
- package/src/worker/index.ts +1 -0
- package/src/{worker.ts → worker/worker_utils.ts} +7 -7
- package/dist/encryption.d.ts +0 -189
- package/dist/encryption.d.ts.map +0 -1
- package/dist/escrow.d.ts.map +0 -1
- package/dist/kvstore.d.ts.map +0 -1
- package/dist/operator.d.ts.map +0 -1
- package/dist/staking.d.ts.map +0 -1
- package/dist/statistics.d.ts.map +0 -1
- package/dist/transaction.d.ts.map +0 -1
- package/dist/worker.d.ts.map +0 -1
- package/src/kvstore.ts +0 -497
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransactionLike } from 'ethers';
|
|
1
|
+
import { Overrides, TransactionLike } from 'ethers';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Enum for escrow statuses.
|
|
@@ -76,6 +76,14 @@ export type NetworkData = {
|
|
|
76
76
|
* Subgraph URL API key
|
|
77
77
|
*/
|
|
78
78
|
subgraphUrlApiKey: string;
|
|
79
|
+
/**
|
|
80
|
+
* HMT statistics subgraph URL
|
|
81
|
+
*/
|
|
82
|
+
hmtSubgraphUrl?: string;
|
|
83
|
+
/**
|
|
84
|
+
* HMT statistics subgraph URL API key
|
|
85
|
+
*/
|
|
86
|
+
hmtSubgraphUrlApiKey?: string;
|
|
79
87
|
/**
|
|
80
88
|
* Old subgraph URL
|
|
81
89
|
*/
|
|
@@ -86,4 +94,19 @@ export type NetworkData = {
|
|
|
86
94
|
oldFactoryAddress: string;
|
|
87
95
|
};
|
|
88
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Options that configure how long to wait for transaction confirmations.
|
|
99
|
+
*/
|
|
100
|
+
export type WaitOptions = {
|
|
101
|
+
/** Number of block confirmations to wait for. */
|
|
102
|
+
confirmations?: number;
|
|
103
|
+
/** Milliseconds to wait before aborting `tx.wait()`. */
|
|
104
|
+
timeoutMs?: number;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Extends ethers overrides with `wait()` options that control confirmation count and timeout.
|
|
109
|
+
*/
|
|
110
|
+
export type TransactionOverrides = Overrides & WaitOptions;
|
|
111
|
+
|
|
89
112
|
export type TransactionLikeWithNonce = TransactionLike & { nonce: number };
|
package/src/utils.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ethers } from 'ethers';
|
|
|
3
3
|
import gqlFetch from 'graphql-request';
|
|
4
4
|
|
|
5
5
|
import { isURL } from 'validator';
|
|
6
|
-
import { SUBGRAPH_API_KEY_PLACEHOLDER } from './constants';
|
|
7
6
|
import { ChainId } from './enums';
|
|
8
7
|
import {
|
|
9
8
|
ContractExecutionError,
|
|
@@ -14,11 +13,13 @@ import {
|
|
|
14
13
|
NonceExpired,
|
|
15
14
|
NumericFault,
|
|
16
15
|
ReplacementUnderpriced,
|
|
16
|
+
SubgraphBadIndexerError,
|
|
17
|
+
SubgraphRequestError,
|
|
17
18
|
TransactionReplaced,
|
|
18
19
|
WarnSubgraphApiKeyNotProvided,
|
|
19
20
|
} from './error';
|
|
20
|
-
import { NetworkData } from './types';
|
|
21
21
|
import { SubgraphOptions } from './interfaces';
|
|
22
|
+
import { NetworkData } from './types';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Handles and throws appropriate error types based on the Ethereum error.
|
|
@@ -79,6 +80,24 @@ export const isValidJson = (input: string): boolean => {
|
|
|
79
80
|
}
|
|
80
81
|
};
|
|
81
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Extracts a readable message from unknown error values.
|
|
85
|
+
*
|
|
86
|
+
* @param error - Unknown error value
|
|
87
|
+
* @returns Human-readable error message
|
|
88
|
+
*/
|
|
89
|
+
export const getErrorMessage = (error: unknown): string => {
|
|
90
|
+
if (error instanceof Error) {
|
|
91
|
+
return error.message;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
return JSON.stringify(error);
|
|
96
|
+
} catch {
|
|
97
|
+
return String(error);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
82
101
|
/**
|
|
83
102
|
* Gets the subgraph URL for the given network, using API key if available.
|
|
84
103
|
*
|
|
@@ -88,10 +107,27 @@ export const isValidJson = (input: string): boolean => {
|
|
|
88
107
|
export const getSubgraphUrl = (networkData: NetworkData) => {
|
|
89
108
|
let subgraphUrl = networkData.subgraphUrl;
|
|
90
109
|
if (process.env.SUBGRAPH_API_KEY) {
|
|
91
|
-
subgraphUrl = networkData.subgraphUrlApiKey
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
);
|
|
110
|
+
subgraphUrl = networkData.subgraphUrlApiKey;
|
|
111
|
+
} else if (networkData.chainId !== ChainId.LOCALHOST) {
|
|
112
|
+
// eslint-disable-next-line no-console
|
|
113
|
+
console.warn(WarnSubgraphApiKeyNotProvided);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return subgraphUrl;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Gets the HMT statistics subgraph URL for the given network.
|
|
121
|
+
* Falls back to the default subgraph URL when a dedicated HMT endpoint is not configured.
|
|
122
|
+
*
|
|
123
|
+
* @param networkData - The network data containing subgraph URLs
|
|
124
|
+
* @returns The HMT statistics subgraph URL with API key if available
|
|
125
|
+
*/
|
|
126
|
+
export const getHMTSubgraphUrl = (networkData: NetworkData) => {
|
|
127
|
+
let subgraphUrl = networkData.hmtSubgraphUrl || networkData.subgraphUrl;
|
|
128
|
+
if (process.env.SUBGRAPH_API_KEY) {
|
|
129
|
+
subgraphUrl =
|
|
130
|
+
networkData.hmtSubgraphUrlApiKey || networkData.subgraphUrlApiKey;
|
|
95
131
|
} else if (networkData.chainId !== ChainId.LOCALHOST) {
|
|
96
132
|
// eslint-disable-next-line no-console
|
|
97
133
|
console.warn(WarnSubgraphApiKeyNotProvided);
|
|
@@ -121,6 +157,38 @@ export const isIndexerError = (error: any): boolean => {
|
|
|
121
157
|
return errorMessage.toLowerCase().includes('bad indexers');
|
|
122
158
|
};
|
|
123
159
|
|
|
160
|
+
const getSubgraphErrorMessage = (error: any): string => {
|
|
161
|
+
return (
|
|
162
|
+
error?.response?.errors?.[0]?.message ||
|
|
163
|
+
error?.message ||
|
|
164
|
+
error?.toString?.() ||
|
|
165
|
+
'Subgraph request failed'
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const getSubgraphStatusCode = (error: any): number | undefined => {
|
|
170
|
+
if (typeof error?.response?.status === 'number') {
|
|
171
|
+
return error.response.status;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (typeof error?.status === 'number') {
|
|
175
|
+
return error.status;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return undefined;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const toSubgraphError = (error: any, url: string): Error => {
|
|
182
|
+
const message = getSubgraphErrorMessage(error);
|
|
183
|
+
const statusCode = getSubgraphStatusCode(error);
|
|
184
|
+
|
|
185
|
+
if (isIndexerError(error)) {
|
|
186
|
+
return new SubgraphBadIndexerError(message, url, statusCode);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return new SubgraphRequestError(message, url, statusCode);
|
|
190
|
+
};
|
|
191
|
+
|
|
124
192
|
const sleep = (ms: number): Promise<void> => {
|
|
125
193
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
126
194
|
};
|
|
@@ -158,7 +226,11 @@ export const customGqlFetch = async <T = any>(
|
|
|
158
226
|
: undefined;
|
|
159
227
|
|
|
160
228
|
if (!options) {
|
|
161
|
-
|
|
229
|
+
try {
|
|
230
|
+
return await gqlFetch<T>(url, query, variables, headers);
|
|
231
|
+
} catch (error) {
|
|
232
|
+
throw toSubgraphError(error, url);
|
|
233
|
+
}
|
|
162
234
|
}
|
|
163
235
|
|
|
164
236
|
const hasMaxRetries = options.maxRetries !== undefined;
|
|
@@ -181,10 +253,11 @@ export const customGqlFetch = async <T = any>(
|
|
|
181
253
|
try {
|
|
182
254
|
return await gqlFetch<T>(targetUrl, query, variables, headers);
|
|
183
255
|
} catch (error) {
|
|
184
|
-
|
|
256
|
+
const wrappedError = toSubgraphError(error, targetUrl);
|
|
257
|
+
lastError = wrappedError;
|
|
185
258
|
|
|
186
259
|
if (attempt === maxRetries || !isIndexerError(error)) {
|
|
187
|
-
throw
|
|
260
|
+
throw wrappedError;
|
|
188
261
|
}
|
|
189
262
|
|
|
190
263
|
const delay = baseDelay * attempt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WorkerUtils } from './worker_utils';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import { NETWORKS } from '
|
|
3
|
-
import { ChainId, OrderDirection } from '
|
|
4
|
-
import { ErrorInvalidAddress, ErrorUnsupportedChainID } from '
|
|
5
|
-
import { WorkerData } from '
|
|
6
|
-
import { GET_WORKER_QUERY, GET_WORKERS_QUERY } from '
|
|
7
|
-
import { IWorker, IWorkersFilter, SubgraphOptions } from '
|
|
8
|
-
import { getSubgraphUrl, customGqlFetch } from '
|
|
2
|
+
import { NETWORKS } from '../constants';
|
|
3
|
+
import { ChainId, OrderDirection } from '../enums';
|
|
4
|
+
import { ErrorInvalidAddress, ErrorUnsupportedChainID } from '../error';
|
|
5
|
+
import { WorkerData } from '../graphql';
|
|
6
|
+
import { GET_WORKER_QUERY, GET_WORKERS_QUERY } from '../graphql/queries/worker';
|
|
7
|
+
import { IWorker, IWorkersFilter, SubgraphOptions } from '../interfaces';
|
|
8
|
+
import { getSubgraphUrl, customGqlFetch } from '../utils';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Utility class for worker-related operations.
|
package/dist/encryption.d.ts
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import * as openpgp from 'openpgp';
|
|
2
|
-
import { IKeyPair } from './interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* Type representing the data type of a message.
|
|
5
|
-
* It can be either a string or a Uint8Array.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export type MessageDataType = string | Uint8Array;
|
|
10
|
-
/**
|
|
11
|
-
* Class for signing and decrypting messages.
|
|
12
|
-
*
|
|
13
|
-
* The algorithm includes the implementation of the [PGP encryption algorithm](https://github.com/openpgpjs/openpgpjs) multi-public key encryption on typescript, and uses the vanilla [ed25519](https://en.wikipedia.org/wiki/EdDSA#Ed25519) implementation Schnorr signature for signatures and [curve25519](https://en.wikipedia.org/wiki/Curve25519) for encryption. [Learn more](https://wiki.polkadot.network/docs/learn-cryptography).
|
|
14
|
-
*
|
|
15
|
-
* To get an instance of this class, initialization is recommended using the static [`build`](/ts/classes/Encryption/#build) method.
|
|
16
|
-
*/
|
|
17
|
-
export declare class Encryption {
|
|
18
|
-
private privateKey;
|
|
19
|
-
/**
|
|
20
|
-
* Constructor for the Encryption class.
|
|
21
|
-
*
|
|
22
|
-
* @param privateKey - The private key.
|
|
23
|
-
*/
|
|
24
|
-
constructor(privateKey: openpgp.PrivateKey);
|
|
25
|
-
/**
|
|
26
|
-
* Builds an Encryption instance by decrypting the private key from an encrypted private key and passphrase.
|
|
27
|
-
*
|
|
28
|
-
* @param privateKeyArmored - The encrypted private key in armored format.
|
|
29
|
-
* @param passphrase - The passphrase for the private key (optional).
|
|
30
|
-
* @returns The Encryption instance.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* import { Encryption } from '@human-protocol/sdk';
|
|
35
|
-
*
|
|
36
|
-
* const privateKey = 'Armored_priv_key';
|
|
37
|
-
* const passphrase = 'example_passphrase';
|
|
38
|
-
* const encryption = await Encryption.build(privateKey, passphrase);
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
static build(privateKeyArmored: string, passphrase?: string): Promise<Encryption>;
|
|
42
|
-
/**
|
|
43
|
-
* This function signs and encrypts a message using the private key used to initialize the client and the specified public keys.
|
|
44
|
-
*
|
|
45
|
-
* @param message - Message to sign and encrypt.
|
|
46
|
-
* @param publicKeys - Array of public keys to use for encryption.
|
|
47
|
-
* @returns Message signed and encrypted.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const publicKey1 = '-----BEGIN PGP PUBLIC KEY BLOCK-----...';
|
|
52
|
-
* const publicKey2 = '-----BEGIN PGP PUBLIC KEY BLOCK-----...';
|
|
53
|
-
*
|
|
54
|
-
* const publicKeys = [publicKey1, publicKey2];
|
|
55
|
-
* const resultMessage = await encryption.signAndEncrypt('message', publicKeys);
|
|
56
|
-
* console.log('Encrypted message:', resultMessage);
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
signAndEncrypt(message: MessageDataType, publicKeys: string[]): Promise<string>;
|
|
60
|
-
/**
|
|
61
|
-
* This function decrypts messages using the private key. In addition, the public key can be added for signature verification.
|
|
62
|
-
*
|
|
63
|
-
* @param message - Message to decrypt.
|
|
64
|
-
* @param publicKey - Public key used to verify signature if needed (optional).
|
|
65
|
-
* @returns Message decrypted.
|
|
66
|
-
* @throws Error If signature could not be verified when public key is provided
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* const publicKey = '-----BEGIN PGP PUBLIC KEY BLOCK-----...';
|
|
71
|
-
*
|
|
72
|
-
* const resultMessage = await encryption.decrypt('message', publicKey);
|
|
73
|
-
* console.log('Decrypted message:', resultMessage);
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
decrypt(message: string, publicKey?: string): Promise<Uint8Array>;
|
|
77
|
-
/**
|
|
78
|
-
* This function signs a message using the private key used to initialize the client.
|
|
79
|
-
*
|
|
80
|
-
* @param message - Message to sign.
|
|
81
|
-
* @returns Message signed.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```ts
|
|
85
|
-
* const resultMessage = await encryption.sign('message');
|
|
86
|
-
* console.log('Signed message:', resultMessage);
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
sign(message: string): Promise<string>;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Utility class for encryption-related operations.
|
|
93
|
-
*/
|
|
94
|
-
export declare class EncryptionUtils {
|
|
95
|
-
/**
|
|
96
|
-
* This function verifies the signature of a signed message using the public key.
|
|
97
|
-
*
|
|
98
|
-
* @param message - Message to verify.
|
|
99
|
-
* @param publicKey - Public key to verify that the message was signed by a specific source.
|
|
100
|
-
* @returns True if verified. False if not verified.
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```ts
|
|
104
|
-
* import { EncryptionUtils } from '@human-protocol/sdk';
|
|
105
|
-
*
|
|
106
|
-
* const publicKey = '-----BEGIN PGP PUBLIC KEY BLOCK-----...';
|
|
107
|
-
* const result = await EncryptionUtils.verify('message', publicKey);
|
|
108
|
-
* console.log('Verification result:', result);
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
static verify(message: string, publicKey: string): Promise<boolean>;
|
|
112
|
-
/**
|
|
113
|
-
* This function gets signed data from a signed message.
|
|
114
|
-
*
|
|
115
|
-
* @param message - Message.
|
|
116
|
-
* @returns Signed data.
|
|
117
|
-
* @throws Error If data could not be extracted from the message
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```ts
|
|
121
|
-
* import { EncryptionUtils } from '@human-protocol/sdk';
|
|
122
|
-
*
|
|
123
|
-
* const signedData = await EncryptionUtils.getSignedData('message');
|
|
124
|
-
* console.log('Signed data:', signedData);
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
|
-
static getSignedData(message: string): Promise<string>;
|
|
128
|
-
/**
|
|
129
|
-
* This function generates a key pair for encryption and decryption.
|
|
130
|
-
*
|
|
131
|
-
* @param name - Name for the key pair.
|
|
132
|
-
* @param email - Email for the key pair.
|
|
133
|
-
* @param passphrase - Passphrase to encrypt the private key (optional, defaults to empty string).
|
|
134
|
-
* @returns Key pair generated.
|
|
135
|
-
*
|
|
136
|
-
* @example
|
|
137
|
-
* ```ts
|
|
138
|
-
* import { EncryptionUtils } from '@human-protocol/sdk';
|
|
139
|
-
*
|
|
140
|
-
* const name = 'YOUR_NAME';
|
|
141
|
-
* const email = 'YOUR_EMAIL';
|
|
142
|
-
* const passphrase = 'YOUR_PASSPHRASE';
|
|
143
|
-
* const keyPair = await EncryptionUtils.generateKeyPair(name, email, passphrase);
|
|
144
|
-
* console.log('Public key:', keyPair.publicKey);
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
static generateKeyPair(name: string, email: string, passphrase?: string): Promise<IKeyPair>;
|
|
148
|
-
/**
|
|
149
|
-
* This function encrypts a message using the specified public keys.
|
|
150
|
-
*
|
|
151
|
-
* @param message - Message to encrypt.
|
|
152
|
-
* @param publicKeys - Array of public keys to use for encryption.
|
|
153
|
-
* @returns Message encrypted.
|
|
154
|
-
*
|
|
155
|
-
* @example
|
|
156
|
-
* ```ts
|
|
157
|
-
* import { EncryptionUtils } from '@human-protocol/sdk';
|
|
158
|
-
*
|
|
159
|
-
* const publicKey1 = '-----BEGIN PGP PUBLIC KEY BLOCK-----...';
|
|
160
|
-
* const publicKey2 = '-----BEGIN PGP PUBLIC KEY BLOCK-----...';
|
|
161
|
-
* const publicKeys = [publicKey1, publicKey2];
|
|
162
|
-
* const encryptedMessage = await EncryptionUtils.encrypt('message', publicKeys);
|
|
163
|
-
* console.log('Encrypted message:', encryptedMessage);
|
|
164
|
-
* ```
|
|
165
|
-
*/
|
|
166
|
-
static encrypt(message: MessageDataType, publicKeys: string[]): Promise<string>;
|
|
167
|
-
/**
|
|
168
|
-
* Verifies if a message appears to be encrypted with OpenPGP.
|
|
169
|
-
*
|
|
170
|
-
* @param message - Message to verify.
|
|
171
|
-
* @returns `true` if the message appears to be encrypted, `false` if not.
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* ```ts
|
|
175
|
-
* import { EncryptionUtils } from '@human-protocol/sdk';
|
|
176
|
-
*
|
|
177
|
-
* const message = '-----BEGIN PGP MESSAGE-----...';
|
|
178
|
-
* const isEncrypted = EncryptionUtils.isEncrypted(message);
|
|
179
|
-
*
|
|
180
|
-
* if (isEncrypted) {
|
|
181
|
-
* console.log('The message is encrypted with OpenPGP.');
|
|
182
|
-
* } else {
|
|
183
|
-
* console.log('The message is not encrypted with OpenPGP.');
|
|
184
|
-
* }
|
|
185
|
-
* ```
|
|
186
|
-
*/
|
|
187
|
-
static isEncrypted(message: string): boolean;
|
|
188
|
-
}
|
|
189
|
-
//# sourceMappingURL=encryption.d.ts.map
|
package/dist/encryption.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../src/encryption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,UAAU,CAAC;AAUlD;;;;;;GAMG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,UAAU,CAAqB;IAEvC;;;;OAIG;gBACS,UAAU,EAAE,OAAO,CAAC,UAAU;IAI1C;;;;;;;;;;;;;;;OAeG;WACiB,KAAK,CACvB,iBAAiB,EAAE,MAAM,EACzB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,UAAU,CAAC;IAkBtB;;;;;;;;;;;;;;;;OAgBG;IACU,cAAc,CACzB,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,MAAM,CAAC;IAkBlB;;;;;;;;;;;;;;;OAeG;IACU,OAAO,CAClB,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,UAAU,CAAC;IAoCtB;;;;;;;;;;;OAWG;IACU,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAYpD;AAED;;GAEG;AACH,qBAAa,eAAe;IAC1B;;;;;;;;;;;;;;;OAeG;WACiB,MAAM,CACxB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC;IAgBnB;;;;;;;;;;;;;;OAcG;WACiB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAYnE;;;;;;;;;;;;;;;;;;OAkBG;W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GAAE,SAAc,GACxB,OAAO,CAAC,IAAI,CAAC;IAuBhB;;;;;;;;;;;;;;;OAeG;IACU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAYhE;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,YAAY;IACvB;;;;;;;;;;;;;;;;;;OAkBG;WACiB,cAAc,CAChC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,QAAQ,EAAE,CAAC;IA0BtB;;;;;;;;;;;;;;;;;;;;;;OAsBG;WACiB,GAAG,CACrB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC;IAwBlB;;;;;;;;;;;;;;;;;;;;OAoBG;WACiB,uBAAuB,CACzC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,MAAM,SAAQ,EACd,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC;IAqClB;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,YAAY,CAC9B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC;CAgBnB"}
|
package/dist/operator.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../src/operator.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,OAAO,EACP,eAAe,EAChB,MAAM,cAAc,CAAC;AAmBtB,OAAO,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAC;AAGlD;;;;;;;;;;;;;GAaG;AACH,qBAAa,aAAa;IACxB;;;;;;;;;;;;;;;;;;;;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E,MAAM,EACrB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,OAAO,CAAC;IAwBnB;;;;;;;;;;;;;;;;;;;OAmBG;WACiB,UAAU,CAC5B,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC;CAqDtB"}
|
package/dist/statistics.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../src/statistics.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAQtC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAe;IAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqDG;WACU,mBAAmB,CAC9B,WAAW,EAAE,WAAW,EACxB,MAAM,GAAE,iBAAsB,EAC9B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,iBAAiB,CAAC;IA6C7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgDG;WACU,mBAAmB,CAC9B,WAAW,EAAE,WAAW,EACxB,MAAM,GAAE,iBAAsB,EAC9B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,iBAAiB,CAAC;IAkC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyDG;WACU,oBAAoB,CAC/B,WAAW,EAAE,WAAW,EACxB,MAAM,GAAE,iBAAsB,EAC9B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,kBAAkB,CAAC;IAwC9B;;;;;;;;;;;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