Skip to content

Commit 8b13e58

Browse files
committed
update docs
1 parent 06afdec commit 8b13e58

File tree

78 files changed

+510
-1952
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+510
-1952
lines changed

docs/sdk/python/human_protocol_sdk.constants.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ Enum for KVStore keys
3232

3333
#### job_types *= 'job_types'*
3434

35-
<<<<<<< HEAD
36-
=======
3735
#### operator_name *= 'name'*
3836

39-
>>>>>>> develop
4037
#### public_key *= 'public_key'*
4138

4239
#### public_key_hash *= 'public_key_hash'*
@@ -53,11 +50,7 @@ Enum for KVStore keys
5350

5451
#### website *= 'website'*
5552

56-
<<<<<<< HEAD
5753
### *class* human_protocol_sdk.constants.OperatorCategory(value)
58-
=======
59-
### *class* human_protocol_sdk.constants.LeaderCategory(value)
60-
>>>>>>> develop
6154

6255
Bases: `Enum`
6356

docs/sdk/python/human_protocol_sdk.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@
129129
* [`KVStoreKeys.category`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.category)
130130
* [`KVStoreKeys.fee`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.fee)
131131
* [`KVStoreKeys.job_types`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.job_types)
132-
<<<<<<< HEAD
133-
=======
134132
* [`KVStoreKeys.operator_name`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.operator_name)
135-
>>>>>>> develop
136133
* [`KVStoreKeys.public_key`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.public_key)
137134
* [`KVStoreKeys.public_key_hash`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.public_key_hash)
138135
* [`KVStoreKeys.registration_instructions`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.registration_instructions)
@@ -141,15 +138,9 @@
141138
* [`KVStoreKeys.url`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.url)
142139
* [`KVStoreKeys.webhook_url`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.webhook_url)
143140
* [`KVStoreKeys.website`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.KVStoreKeys.website)
144-
<<<<<<< HEAD
145141
* [`OperatorCategory`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.OperatorCategory)
146142
* [`OperatorCategory.MACHINE_LEARNING`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.OperatorCategory.MACHINE_LEARNING)
147143
* [`OperatorCategory.MARKET_MAKING`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.OperatorCategory.MARKET_MAKING)
148-
=======
149-
* [`LeaderCategory`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.LeaderCategory)
150-
* [`LeaderCategory.MACHINE_LEARNING`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.LeaderCategory.MACHINE_LEARNING)
151-
* [`LeaderCategory.MARKET_MAKING`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.LeaderCategory.MARKET_MAKING)
152-
>>>>>>> develop
153144
* [`OrderDirection`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.OrderDirection)
154145
* [`OrderDirection.ASC`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.OrderDirection.ASC)
155146
* [`OrderDirection.DESC`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.OrderDirection.DESC)

docs/sdk/typescript/base/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
# base
88

9-
## Index
10-
11-
### Classes
9+
## Classes
1210

1311
- [BaseEthersClient](classes/BaseEthersClient.md)

docs/sdk/typescript/base/classes/BaseEthersClient.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
# Class: `abstract` BaseEthersClient
88

9+
Defined in: [base.ts:10](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L10)
10+
911
## Introduction
1012

1113
This class is used as a base class for other clients making on-chain calls.
@@ -22,6 +24,8 @@ This class is used as a base class for other clients making on-chain calls.
2224

2325
> **new BaseEthersClient**(`runner`, `networkData`): [`BaseEthersClient`](BaseEthersClient.md)
2426
27+
Defined in: [base.ts:20](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
28+
2529
**BaseClient constructor**
2630

2731
#### Parameters
@@ -42,38 +46,18 @@ The network information required to connect to the contracts
4246

4347
[`BaseEthersClient`](BaseEthersClient.md)
4448

45-
#### Defined in
46-
47-
<<<<<<< HEAD
48-
[base.ts:20](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
49-
=======
50-
[base.ts:20](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
51-
>>>>>>> develop
52-
5349
## Properties
5450

5551
### networkData
5652

5753
> **networkData**: [`NetworkData`](../../types/type-aliases/NetworkData.md)
5854
59-
#### Defined in
60-
61-
<<<<<<< HEAD
62-
[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
63-
=======
64-
[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
65-
>>>>>>> develop
55+
Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
6656

6757
***
6858

6959
### runner
7060

7161
> `protected` **runner**: `ContractRunner`
7262
73-
#### Defined in
74-
75-
<<<<<<< HEAD
76-
[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)
77-
=======
78-
[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)
79-
>>>>>>> develop
63+
Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)

docs/sdk/typescript/encryption/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
# encryption
88

9-
## Index
10-
11-
### Classes
9+
## Classes
1210

1311
- [Encryption](classes/Encryption.md)
1412
- [EncryptionUtils](classes/EncryptionUtils.md)

docs/sdk/typescript/encryption/classes/Encryption.md

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
# Class: Encryption
88

9+
Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58)
10+
911
## Introduction
1012

1113
Class for signing and decrypting messages.
@@ -51,6 +53,8 @@ const encryption = await Encryption.build(privateKey, passphrase);
5153

5254
> **new Encryption**(`privateKey`): [`Encryption`](Encryption.md)
5355
56+
Defined in: [encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)
57+
5458
Constructor for the Encryption class.
5559

5660
#### Parameters
@@ -65,20 +69,14 @@ The private key.
6569

6670
[`Encryption`](Encryption.md)
6771

68-
#### Defined in
69-
70-
<<<<<<< HEAD
71-
[encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)
72-
=======
73-
[encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)
74-
>>>>>>> develop
75-
7672
## Methods
7773

7874
### decrypt()
7975

8076
> **decrypt**(`message`, `publicKey`?): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
8177
78+
Defined in: [encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194)
79+
8280
This function decrypts messages using the private key. In addition, the public key can be added for signature verification.
8381

8482
#### Parameters
@@ -125,20 +123,14 @@ UYLqAQDfdym4kiUvKO1+REKASt0Gwykndl7hra9txqlUL5DXBQ===Vwgv
125123
const resultMessage = await encryption.decrypt('message');
126124
```
127125

128-
#### Defined in
129-
130-
<<<<<<< HEAD
131-
[encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194)
132-
=======
133-
[encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194)
134-
>>>>>>> develop
135-
136126
***
137127

138128
### sign()
139129

140130
> **sign**(`message`): `Promise`\<`string`\>
141131
132+
Defined in: [encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251)
133+
142134
This function signs a message using the private key used to initialize the client.
143135

144136
#### Parameters
@@ -167,20 +159,14 @@ const encryption = await Encryption.build(privateKey, passphrase);
167159
const resultMessage = await encryption.sign('message');
168160
```
169161

170-
#### Defined in
171-
172-
<<<<<<< HEAD
173-
[encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251)
174-
=======
175-
[encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251)
176-
>>>>>>> develop
177-
178162
***
179163

180164
### signAndEncrypt()
181165

182166
> **signAndEncrypt**(`message`, `publicKeys`): `Promise`\<`string`\>
183167
168+
Defined in: [encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142)
169+
184170
This function signs and encrypts a message using the private key used to initialize the client and the specified public keys.
185171

186172
#### Parameters
@@ -240,20 +226,14 @@ const publicKeys = [publicKey1, publicKey2];
240226
const resultMessage = await encryption.signAndEncrypt('message', publicKeys);
241227
```
242228

243-
#### Defined in
244-
245-
<<<<<<< HEAD
246-
[encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142)
247-
=======
248-
[encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142)
249-
>>>>>>> develop
250-
251229
***
252230

253231
### build()
254232

255233
> `static` **build**(`privateKeyArmored`, `passphrase`?): `Promise`\<[`Encryption`](Encryption.md)\>
256234
235+
Defined in: [encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77)
236+
257237
Builds an Encryption instance by decrypting the private key from an encrypted private key and passphrase.
258238

259239
#### Parameters
@@ -275,11 +255,3 @@ Optional: The passphrase for the private key.
275255
`Promise`\<[`Encryption`](Encryption.md)\>
276256

277257
- The Encryption instance.
278-
279-
#### Defined in
280-
281-
<<<<<<< HEAD
282-
[encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77)
283-
=======
284-
[encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77)
285-
>>>>>>> develop

docs/sdk/typescript/encryption/classes/EncryptionUtils.md

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
# Class: EncryptionUtils
88

9+
Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290)
10+
911
## Introduction
1012

1113
Utility class for encryption-related operations.
@@ -46,6 +48,8 @@ const keyPair = await EncryptionUtils.generateKeyPair('Human', 'human@hmt.ai');
4648

4749
> `static` **encrypt**(`message`, `publicKeys`): `Promise`\<`string`\>
4850
51+
Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)
52+
4953
This function encrypts a message using the specified public keys.
5054

5155
#### Parameters
@@ -101,20 +105,14 @@ const publicKeys = [publicKey1, publicKey2]
101105
const result = await EncryptionUtils.encrypt('message', publicKeys);
102106
```
103107

104-
#### Defined in
105-
106-
<<<<<<< HEAD
107-
[encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)
108-
=======
109-
[encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)
110-
>>>>>>> develop
111-
112108
***
113109

114110
### generateKeyPair()
115111

116112
> `static` **generateKeyPair**(`name`, `email`, `passphrase`): `Promise`\<[`IKeyPair`](../../interfaces/interfaces/IKeyPair.md)\>
117113
114+
Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)
115+
118116
This function generates a key pair for encryption and decryption.
119117

120118
#### Parameters
@@ -154,20 +152,14 @@ const passphrase = 'YOUR_PASSPHRASE';
154152
const result = await EncryptionUtils.generateKeyPair(name, email, passphrase);
155153
```
156154

157-
#### Defined in
158-
159-
<<<<<<< HEAD
160-
[encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)
161-
=======
162-
[encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)
163-
>>>>>>> develop
164-
165155
***
166156

167157
### getSignedData()
168158

169159
> `static` **getSignedData**(`message`): `Promise`\<`string`\>
170160
161+
Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)
162+
171163
This function gets signed data from a signed message.
172164

173165
#### Parameters
@@ -192,20 +184,14 @@ import { EncryptionUtils } from '@human-protocol/sdk';
192184
const signedData = await EncryptionUtils.getSignedData('message');
193185
```
194186

195-
#### Defined in
196-
197-
<<<<<<< HEAD
198-
[encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)
199-
=======
200-
[encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)
201-
>>>>>>> develop
202-
203187
***
204188

205189
### isEncrypted()
206190

207191
> `static` **isEncrypted**(`message`): `boolean`
208192
193+
Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)
194+
209195
Verifies if a message appears to be encrypted with OpenPGP.
210196

211197
#### Parameters
@@ -246,20 +232,14 @@ if (isEncrypted) {
246232
}
247233
```
248234

249-
#### Defined in
250-
251-
<<<<<<< HEAD
252-
[encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)
253-
=======
254-
[encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)
255-
>>>>>>> develop
256-
257235
***
258236

259237
### verify()
260238

261239
> `static` **verify**(`message`, `publicKey`): `Promise`\<`boolean`\>
262240
241+
Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/06afdec15d4185a13ccdd98fd231f6651db0e480/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318)
242+
263243
This function verifies the signature of a signed message using the public key.
264244

265245
#### Parameters
@@ -301,11 +281,3 @@ UYLqAQDfdym4kiUvKO1+REKASt0Gwykndl7hra9txqlUL5DXBQ===Vwgv
301281

302282
const result = await EncryptionUtils.verify('message', publicKey);
303283
```
304-
305-
#### Defined in
306-
307-
<<<<<<< HEAD
308-
[encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/9a36dcc76397ebaf05988194a5c5bf379999302c/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318)
309-
=======
310-
[encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/b718aa9d178d605c5b27fec98a4e6afa6f1db599/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318)
311-
>>>>>>> develop

docs/sdk/typescript/enums/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66

77
# enums
88

9-
## Index
10-
11-
### Enumerations
9+
## Enumerations
1210

1311
- [ChainId](enumerations/ChainId.md)
1412
- [OperatorCategory](enumerations/OperatorCategory.md)

0 commit comments

Comments
 (0)