Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/sdk/python/human_protocol_sdk.escrow.escrow_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Adds an array of addresses to the trusted handlers list.
)
```

#### bulk_payout(escrow_address, recipients, amounts, final_results_url, final_results_hash, txId, force_complete=False, tx_options=None)
#### bulk_payout(escrow_address, recipients, amounts, final_results_url, final_results_hash, payout_id, force_complete=False, tx_options=None)

Pays out the amounts specified to the workers and sets the URL of the final results file.

Expand All @@ -131,7 +131,7 @@ Pays out the amounts specified to the workers and sets the URL of the final resu
* **amounts** (`List`[`Decimal`]) – Array of amounts the recipients will receive
* **final_results_url** (`str`) – Final results file URL
* **final_results_hash** (`str`) – Final results file hash
* **txId** (`Decimal`) – Serial number of the bulks
* **payout_id** (`str`) – Payout ID for the transaction
* **force_complete** (`Optional`[`bool`]) – (Optional) Indicates if remaining balance should be transferred to the escrow creator
* **tx_options** (`Optional`[`TxParams`]) – (Optional) Additional transaction parameters
* **Return type:**
Expand Down Expand Up @@ -268,7 +268,7 @@ Sets the status of an escrow to completed.
escrow_client.complete("0x62dD51230A30401C455c8398d06F85e4EaB6309f")
```

#### create_bulk_payout_transaction(escrow_address, recipients, amounts, final_results_url, final_results_hash, txId, force_complete=False, tx_options=None)
#### create_bulk_payout_transaction(escrow_address, recipients, amounts, final_results_url, final_results_hash, payout_id, force_complete=False, tx_options=None)

Creates a prepared transaction for bulk payout without signing or sending it.

Expand All @@ -278,7 +278,8 @@ Creates a prepared transaction for bulk payout without signing or sending it.
* **amounts** (`List`[`Decimal`]) – Array of amounts the recipients will receive
* **final_results_url** (`str`) – Final results file URL
* **final_results_hash** (`str`) – Final results file hash
* **txId** (`Decimal`) – Serial number of the bulks
* **payout_id** (`str`) – Payout ID for the transaction
* **force_complete** (`Optional`[`bool`]) – (Optional) Indicates if remaining balance should be transferred to the escrow
* **tx_options** (`Optional`[`TxParams`]) – (Optional) Additional transaction parameters
* **Return type:**
`TxParams`
Expand Down
8 changes: 4 additions & 4 deletions docs/sdk/typescript/base/classes/BaseEthersClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: `abstract` BaseEthersClient

Defined in: [base.ts:10](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L10)
Defined in: [base.ts:10](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L10)

## Introduction

Expand All @@ -24,7 +24,7 @@ This class is used as a base class for other clients making on-chain calls.

> **new BaseEthersClient**(`runner`, `networkData`): `BaseEthersClient`

Defined in: [base.ts:20](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
Defined in: [base.ts:20](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)

**BaseClient constructor**

Expand Down Expand Up @@ -52,12 +52,12 @@ The network information required to connect to the contracts

> **networkData**: [`NetworkData`](../../types/type-aliases/NetworkData.md)

Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)

***

### runner

> `protected` **runner**: `ContractRunner`

Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)
Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)
12 changes: 6 additions & 6 deletions docs/sdk/typescript/encryption/classes/Encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: Encryption

Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58)
Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58)

## Introduction

Expand Down Expand Up @@ -53,7 +53,7 @@ const encryption = await Encryption.build(privateKey, passphrase);

> **new Encryption**(`privateKey`): `Encryption`

Defined in: [encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)
Defined in: [encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)

Constructor for the Encryption class.

Expand All @@ -75,7 +75,7 @@ The private key.

> **decrypt**(`message`, `publicKey?`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>

Defined in: [encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194)
Defined in: [encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194)

This function decrypts messages using the private key. In addition, the public key can be added for signature verification.

Expand Down Expand Up @@ -129,7 +129,7 @@ const resultMessage = await encryption.decrypt('message');

> **sign**(`message`): `Promise`\<`string`\>

Defined in: [encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251)
Defined in: [encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251)

This function signs a message using the private key used to initialize the client.

Expand Down Expand Up @@ -165,7 +165,7 @@ const resultMessage = await encryption.sign('message');

> **signAndEncrypt**(`message`, `publicKeys`): `Promise`\<`string`\>

Defined in: [encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142)
Defined in: [encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142)

This function signs and encrypts a message using the private key used to initialize the client and the specified public keys.

Expand Down Expand Up @@ -232,7 +232,7 @@ const resultMessage = await encryption.signAndEncrypt('message', publicKeys);

> `static` **build**(`privateKeyArmored`, `passphrase?`): `Promise`\<`Encryption`\>

Defined in: [encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77)
Defined in: [encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77)

Builds an Encryption instance by decrypting the private key from an encrypted private key and passphrase.

Expand Down
12 changes: 6 additions & 6 deletions docs/sdk/typescript/encryption/classes/EncryptionUtils.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Class: EncryptionUtils

Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290)
Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290)

## Introduction

Expand Down Expand Up @@ -48,7 +48,7 @@ const keyPair = await EncryptionUtils.generateKeyPair('Human', 'human@hmt.ai');

> `static` **encrypt**(`message`, `publicKeys`): `Promise`\<`string`\>

Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)
Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)

This function encrypts a message using the specified public keys.

Expand Down Expand Up @@ -111,7 +111,7 @@ const result = await EncryptionUtils.encrypt('message', publicKeys);

> `static` **generateKeyPair**(`name`, `email`, `passphrase`): `Promise`\<[`IKeyPair`](../../interfaces/interfaces/IKeyPair.md)\>

Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)
Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)

This function generates a key pair for encryption and decryption.

Expand Down Expand Up @@ -158,7 +158,7 @@ const result = await EncryptionUtils.generateKeyPair(name, email, passphrase);

> `static` **getSignedData**(`message`): `Promise`\<`string`\>

Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)
Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)

This function gets signed data from a signed message.

Expand Down Expand Up @@ -190,7 +190,7 @@ const signedData = await EncryptionUtils.getSignedData('message');

> `static` **isEncrypted**(`message`): `boolean`

Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)
Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)

Verifies if a message appears to be encrypted with OpenPGP.

Expand Down Expand Up @@ -238,7 +238,7 @@ if (isEncrypted) {

> `static` **verify**(`message`, `publicKey`): `Promise`\<`boolean`\>

Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318)
Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318)

This function verifies the signature of a signed message using the public key.

Expand Down
18 changes: 9 additions & 9 deletions docs/sdk/typescript/enums/enumerations/ChainId.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,68 @@

# Enumeration: ChainId

Defined in: [enums.ts:1](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L1)
Defined in: [enums.ts:1](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L1)

## Enumeration Members

### ALL

> **ALL**: `-1`

Defined in: [enums.ts:2](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L2)
Defined in: [enums.ts:2](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L2)

***

### BSC\_MAINNET

> **BSC\_MAINNET**: `56`

Defined in: [enums.ts:5](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L5)
Defined in: [enums.ts:5](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L5)

***

### BSC\_TESTNET

> **BSC\_TESTNET**: `97`

Defined in: [enums.ts:6](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L6)
Defined in: [enums.ts:6](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L6)

***

### LOCALHOST

> **LOCALHOST**: `1338`

Defined in: [enums.ts:9](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L9)
Defined in: [enums.ts:9](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L9)

***

### MAINNET

> **MAINNET**: `1`

Defined in: [enums.ts:3](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L3)
Defined in: [enums.ts:3](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L3)

***

### POLYGON

> **POLYGON**: `137`

Defined in: [enums.ts:7](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L7)
Defined in: [enums.ts:7](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L7)

***

### POLYGON\_AMOY

> **POLYGON\_AMOY**: `80002`

Defined in: [enums.ts:8](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L8)
Defined in: [enums.ts:8](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L8)

***

### SEPOLIA

> **SEPOLIA**: `11155111`

Defined in: [enums.ts:4](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L4)
Defined in: [enums.ts:4](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L4)
6 changes: 3 additions & 3 deletions docs/sdk/typescript/enums/enumerations/OperatorCategory.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@

# Enumeration: OperatorCategory

Defined in: [enums.ts:17](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L17)
Defined in: [enums.ts:17](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L17)

## Enumeration Members

### MACHINE\_LEARNING

> **MACHINE\_LEARNING**: `"machine_learning"`

Defined in: [enums.ts:18](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L18)
Defined in: [enums.ts:18](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L18)

***

### MARKET\_MAKING

> **MARKET\_MAKING**: `"market_making"`

Defined in: [enums.ts:19](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L19)
Defined in: [enums.ts:19](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L19)
6 changes: 3 additions & 3 deletions docs/sdk/typescript/enums/enumerations/OrderDirection.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@

# Enumeration: OrderDirection

Defined in: [enums.ts:12](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L12)
Defined in: [enums.ts:12](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L12)

## Enumeration Members

### ASC

> **ASC**: `"asc"`

Defined in: [enums.ts:13](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L13)
Defined in: [enums.ts:13](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L13)

***

### DESC

> **DESC**: `"desc"`

Defined in: [enums.ts:14](https://github.com/humanprotocol/human-protocol/blob/47f5da5838a126d0f0ff22cdaa7719befd2657b4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L14)
Defined in: [enums.ts:14](https://github.com/humanprotocol/human-protocol/blob/890e8aa80cd5bbbfe3a95428dff3a4f25dbb5c8b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L14)
Loading
Loading