Skip to content
Merged
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: 7 additions & 2 deletions docs/sdk/python/human_protocol_sdk.escrow.escrow_utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Represents a cancellation refund event.

#### \_\_init_\_(id, escrow_address, receiver, amount, block, timestamp, tx_hash)

### *class* human_protocol_sdk.escrow.escrow_utils.EscrowData(chain_id, id, address, amount_paid, balance, count, factory_address, launcher, status, token, total_funded_amount, created_at, final_results_url=None, intermediate_results_url=None, manifest_hash=None, manifest=None, recording_oracle=None, reputation_oracle=None, exchange_oracle=None)
### *class* human_protocol_sdk.escrow.escrow_utils.EscrowData(chain_id, id, address, amount_paid, balance, count, factory_address, launcher, status, token, total_funded_amount, created_at, final_results_url=None, final_results_hash=None, intermediate_results_url=None, intermediate_results_hash=None, manifest_hash=None, manifest=None, recording_oracle=None, reputation_oracle=None, exchange_oracle=None, recording_oracle_fee=None, reputation_oracle_fee=None, exchange_oracle_fee=None)

Bases: `object`

#### \_\_init_\_(chain_id, id, address, amount_paid, balance, count, factory_address, launcher, status, token, total_funded_amount, created_at, final_results_url=None, intermediate_results_url=None, manifest_hash=None, manifest=None, recording_oracle=None, reputation_oracle=None, exchange_oracle=None)
#### \_\_init_\_(chain_id, id, address, amount_paid, balance, count, factory_address, launcher, status, token, total_funded_amount, created_at, final_results_url=None, final_results_hash=None, intermediate_results_url=None, intermediate_results_hash=None, manifest_hash=None, manifest=None, recording_oracle=None, reputation_oracle=None, exchange_oracle=None, recording_oracle_fee=None, reputation_oracle_fee=None, exchange_oracle_fee=None)

Initializes an EscrowData instance.

Expand All @@ -61,12 +61,17 @@ Initializes an EscrowData instance.
* **total_funded_amount** (`int`) – Total funded amount
* **created_at** (`datetime`) – Creation date
* **final_results_url** (`Optional`[`str`]) – URL for final results.
* **final_results_hash** (`Optional`[`str`]) – Hash for final results.
* **intermediate_results_url** (`Optional`[`str`]) – URL for intermediate results.
* **intermediate_results_hash** (`Optional`[`str`]) – Hash for intermediate results.
* **manifest_hash** (`Optional`[`str`]) – Manifest hash.
* **manifest** (`Optional`[`str`]) – Manifest data (JSON/URL).
* **recording_oracle** (`Optional`[`str`]) – Recording Oracle address.
* **reputation_oracle** (`Optional`[`str`]) – Reputation Oracle address.
* **exchange_oracle** (`Optional`[`str`]) – Exchange Oracle address.
* **recording_oracle_fee** (`Optional`[`int`]) – Fee for the Recording Oracle.
* **reputation_oracle_fee** (`Optional`[`int`]) – Fee for the Reputation Oracle.
* **exchange_oracle_fee** (`Optional`[`int`]) – Fee for the Exchange Oracle.

### *class* human_protocol_sdk.escrow.escrow_utils.EscrowUtils

Expand Down
49 changes: 29 additions & 20 deletions docs/sdk/typescript/base/classes/BaseEthersClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@

# Abstract Class: BaseEthersClient

<<<<<<< HEAD
Defined in: [base.ts:10](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L10)
=======
Defined in: [base.ts:10](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L10)
>>>>>>> develop
Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)

## Introduction

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

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

<<<<<<< HEAD
Defined in: [base.ts:20](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
=======
Defined in: [base.ts:20](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20)
>>>>>>> develop
Defined in: [base.ts:22](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L22)

**BaseClient constructor**

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

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

<<<<<<< HEAD
Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
=======
Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12)
>>>>>>> develop
Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L14)

***

### runner

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

<<<<<<< HEAD
Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)
=======
Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11)
>>>>>>> develop
Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13)

## Methods

### applyTxDefaults()

> `protected` **applyTxDefaults**(`txOptions`): `Overrides`

Defined in: [base.ts:35](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L35)

Internal helper to enrich transaction overrides with network specific defaults.

Aurora networks use a fixed gas price. We always override any user provided
gasPrice with the canonical DEFAULT_AURORA_GAS_PRICE to avoid mismatches
or tx failures due to an unexpected value. For other networks the user
supplied fee parameters are left untouched.

#### Parameters

##### txOptions

`Overrides` = `{}`

#### Returns

`Overrides`
36 changes: 6 additions & 30 deletions docs/sdk/typescript/encryption/classes/Encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@

# Class: Encryption

<<<<<<< HEAD
Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58)
=======
Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58)
>>>>>>> develop
Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58)

## Introduction

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

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

<<<<<<< HEAD
Defined in: [encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)
=======
Defined in: [encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)
>>>>>>> develop
Defined in: [encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66)

Constructor for the Encryption class.

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

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

<<<<<<< HEAD
Defined in: [encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194)
=======
Defined in: [encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194)
>>>>>>> develop
Defined in: [encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/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 @@ -141,11 +129,7 @@ const resultMessage = await encryption.decrypt('message');

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

<<<<<<< HEAD
Defined in: [encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251)
=======
Defined in: [encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251)
>>>>>>> develop
Defined in: [encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/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 @@ -181,11 +165,7 @@ const resultMessage = await encryption.sign('message');

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

<<<<<<< HEAD
Defined in: [encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142)
=======
Defined in: [encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142)
>>>>>>> develop
Defined in: [encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/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 @@ -252,11 +232,7 @@ const resultMessage = await encryption.signAndEncrypt('message', publicKeys);

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

<<<<<<< HEAD
Defined in: [encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77)
=======
Defined in: [encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77)
>>>>>>> develop
Defined in: [encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/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
36 changes: 6 additions & 30 deletions docs/sdk/typescript/encryption/classes/EncryptionUtils.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@

# Class: EncryptionUtils

<<<<<<< HEAD
Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290)
=======
Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290)
>>>>>>> develop
Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290)

## Introduction

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

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

<<<<<<< HEAD
Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)
=======
Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)
>>>>>>> develop
Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444)

This function encrypts a message using the specified public keys.

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

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

<<<<<<< HEAD
Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)
=======
Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)
>>>>>>> develop
Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382)

This function generates a key pair for encryption and decryption.

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

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

<<<<<<< HEAD
Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)
=======
Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)
>>>>>>> develop
Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351)

This function gets signed data from a signed message.

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

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

<<<<<<< HEAD
Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)
=======
Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)
>>>>>>> develop
Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494)

Verifies if a message appears to be encrypted with OpenPGP.

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

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

<<<<<<< HEAD
Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/daa33ac30e8a8fd3dd7bbd077ced2e0ab16f7bab/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318)
=======
Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/8c6afbe01e352b593635124b575731df11c509c7/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318)
>>>>>>> develop
Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/8551ddf36370251a82fddadc0d28c34592acebaf/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
Loading
Loading