diff --git a/.github/workflows/cd-subgraph.yaml b/.github/workflows/cd-subgraph.yaml index 0ee17ea219..095a97c23e 100644 --- a/.github/workflows/cd-subgraph.yaml +++ b/.github/workflows/cd-subgraph.yaml @@ -22,7 +22,6 @@ jobs: - name: ethereum - name: polygon - name: sepolia - - name: aurora-testnet fail-fast: true max-parallel: 3 steps: diff --git a/docs/sdk/changelog.md b/docs/sdk/changelog.md index 7b88845485..1050ceae31 100644 --- a/docs/sdk/changelog.md +++ b/docs/sdk/changelog.md @@ -1,12 +1,10 @@ # Changelog ### Added +- new optional config for querying subgraph with retries when failuers are due to bad indexers errors ### Changed -- Relaxed several SDK return types (EscrowUtils, OperatorUtils, TransactionUtils, WorkerUtils) to allow `null` when a subgraph entity does not exist. -- EscrowUtils.getEscrow now includes `chainId` in the returned object. - ### Deprecated ### Removed diff --git a/docs/sdk/python/human_protocol_sdk.constants.md b/docs/sdk/python/human_protocol_sdk.constants.md index 54960e9341..976fd18248 100644 --- a/docs/sdk/python/human_protocol_sdk.constants.md +++ b/docs/sdk/python/human_protocol_sdk.constants.md @@ -6,8 +6,6 @@ Bases: `Enum` Enum for chain IDs. -#### AURORA_TESTNET *= 1313161555* - #### BSC_MAINNET *= 56* #### BSC_TESTNET *= 97* diff --git a/docs/sdk/python/human_protocol_sdk.escrow.escrow_utils.md b/docs/sdk/python/human_protocol_sdk.escrow.escrow_utils.md index 523d05dd8d..09ca8d4543 100644 --- a/docs/sdk/python/human_protocol_sdk.escrow.escrow_utils.md +++ b/docs/sdk/python/human_protocol_sdk.escrow.escrow_utils.md @@ -80,13 +80,14 @@ Bases: `object` A utility class that provides additional escrow-related functionalities. -#### *static* get_cancellation_refund(chain_id, escrow_address) +#### *static* get_cancellation_refund(chain_id, escrow_address, options=None) Returns the cancellation refund for a given escrow address. * **Parameters:** * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the escrow has been deployed * **escrow_address** (`str`) – Address of the escrow + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** [`CancellationRefund`](#human_protocol_sdk.escrow.escrow_utils.CancellationRefund) * **Returns:** @@ -104,12 +105,13 @@ Returns the cancellation refund for a given escrow address. ) ``` -#### *static* get_cancellation_refunds(filter) +#### *static* get_cancellation_refunds(filter, options=None) Fetch cancellation refunds from the subgraph based on the provided filter. * **Parameters:** - **filter** ([`CancellationRefundFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.CancellationRefundFilter)) – Object containing all the necessary parameters to filter cancellation refunds. + * **filter** ([`CancellationRefundFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.CancellationRefundFilter)) – Object containing all the necessary parameters to filter cancellation refunds. + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return List[CancellationRefund]:** List of cancellation refunds matching the query parameters. * **Raises:** @@ -117,13 +119,14 @@ Fetch cancellation refunds from the subgraph based on the provided filter. * **Return type:** `List`[[`CancellationRefund`](#human_protocol_sdk.escrow.escrow_utils.CancellationRefund)] -#### *static* get_escrow(chain_id, escrow_address) +#### *static* get_escrow(chain_id, escrow_address, options=None) Returns the escrow for a given address. * **Parameters:** * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the escrow has been deployed * **escrow_address** (`str`) – Address of the escrow + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `Optional`[[`EscrowData`](#human_protocol_sdk.escrow.escrow_utils.EscrowData)] * **Returns:** @@ -141,12 +144,13 @@ Returns the escrow for a given address. ) ``` -#### *static* get_escrows(filter) +#### *static* get_escrows(filter, options=None) Get an array of escrow addresses based on the specified filter parameters. * **Parameters:** - **filter** ([`EscrowFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.EscrowFilter)) – Object containing all the necessary parameters to filter + * **filter** ([`EscrowFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.EscrowFilter)) – Object containing all the necessary parameters to filter + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`EscrowData`](#human_protocol_sdk.escrow.escrow_utils.EscrowData)] * **Returns:** @@ -168,12 +172,13 @@ Get an array of escrow addresses based on the specified filter parameters. ) ``` -#### *static* get_payouts(filter) +#### *static* get_payouts(filter, options=None) Fetch payouts from the subgraph based on the provided filter. * **Parameters:** - **filter** ([`PayoutFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.PayoutFilter)) – Object containing all the necessary parameters to filter payouts. + * **filter** ([`PayoutFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.PayoutFilter)) – Object containing all the necessary parameters to filter payouts. + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return List[Payout]:** List of payouts matching the query parameters. * **Raises:** @@ -181,12 +186,13 @@ Fetch payouts from the subgraph based on the provided filter. * **Return type:** `List`[[`Payout`](#human_protocol_sdk.escrow.escrow_utils.Payout)] -#### *static* get_status_events(filter) +#### *static* get_status_events(filter, options=None) Retrieve status events for specified networks and statuses within a date range. * **Parameters:** - **filter** ([`StatusEventFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatusEventFilter)) – Object containing all the necessary parameters to filter status events. + * **filter** ([`StatusEventFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatusEventFilter)) – Object containing all the necessary parameters to filter status events. + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return List[StatusEvent]:** List of status events matching the query parameters. * **Raises:** diff --git a/docs/sdk/python/human_protocol_sdk.kvstore.kvstore_utils.md b/docs/sdk/python/human_protocol_sdk.kvstore.kvstore_utils.md index fa1434be9e..1eac319852 100644 --- a/docs/sdk/python/human_protocol_sdk.kvstore.kvstore_utils.md +++ b/docs/sdk/python/human_protocol_sdk.kvstore.kvstore_utils.md @@ -36,7 +36,7 @@ Bases: `object` A utility class that provides additional KVStore-related functionalities. -#### *static* get(chain_id, address, key) +#### *static* get(chain_id, address, key, options=None) Gets the value of a key-value pair in the contract. @@ -44,6 +44,7 @@ Gets the value of a key-value pair in the contract. * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the KVStore data has been deployed * **address** (`str`) – The Ethereum address associated with the key-value pair * **key** (`str`) – The key of the key-value pair to get + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `str` * **Returns:** @@ -61,7 +62,7 @@ Gets the value of a key-value pair in the contract. print(result) ``` -#### *static* get_file_url_and_verify_hash(chain_id, address, key='url') +#### *static* get_file_url_and_verify_hash(chain_id, address, key='url', options=None) Gets the URL value of the given entity, and verify its hash. @@ -69,6 +70,7 @@ Gets the URL value of the given entity, and verify its hash. * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the KVStore data has been deployed * **address** (`str`) – Address from which to get the URL value. * **key** (`Optional`[`str`]) – Configurable URL key. url by default. + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return url:** The URL value of the given address if exists, and the content is valid * **Example:** @@ -85,13 +87,14 @@ Gets the URL value of the given entity, and verify its hash. * **Return type:** `str` -#### *static* get_kvstore_data(chain_id, address) +#### *static* get_kvstore_data(chain_id, address, options=None) Returns the KVStore data for a given address. * **Parameters:** * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the KVStore data has been deployed * **address** (`str`) – Address of the KVStore + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `Optional`[`List`[[`KVStoreData`](#human_protocol_sdk.kvstore.kvstore_utils.KVStoreData)]] * **Returns:** diff --git a/docs/sdk/python/human_protocol_sdk.md b/docs/sdk/python/human_protocol_sdk.md index f9b2b46775..65c44efcce 100644 --- a/docs/sdk/python/human_protocol_sdk.md +++ b/docs/sdk/python/human_protocol_sdk.md @@ -132,7 +132,6 @@ * [human_protocol_sdk.constants module](human_protocol_sdk.constants.md) * [`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId) - * [`ChainId.AURORA_TESTNET`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId.AURORA_TESTNET) * [`ChainId.BSC_MAINNET`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId.BSC_MAINNET) * [`ChainId.BSC_TESTNET`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId.BSC_TESTNET) * [`ChainId.LOCALHOST`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId.LOCALHOST) @@ -205,9 +204,12 @@ * [`Encryption.is_encrypted()`](human_protocol_sdk.legacy_encryption.md#human_protocol_sdk.legacy_encryption.Encryption.is_encrypted) * [`InvalidPublicKey`](human_protocol_sdk.legacy_encryption.md#human_protocol_sdk.legacy_encryption.InvalidPublicKey) * [human_protocol_sdk.utils module](human_protocol_sdk.utils.md) - * [`apply_tx_defaults()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.apply_tx_defaults) + * [`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions) + * [`SubgraphOptions.__init__()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions.__init__) + * [`SubgraphOptions.base_delay`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions.base_delay) + * [`SubgraphOptions.max_retries`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions.max_retries) + * [`custom_gql_fetch()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.custom_gql_fetch) * [`get_contract_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_contract_interface) - * [`get_data_from_subgraph()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_data_from_subgraph) * [`get_erc20_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_erc20_interface) * [`get_escrow_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_escrow_interface) * [`get_factory_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_factory_interface) @@ -215,7 +217,7 @@ * [`get_kvstore_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_kvstore_interface) * [`get_staking_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_staking_interface) * [`handle_error()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.handle_error) + * [`is_indexer_error()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.is_indexer_error) * [`parse_transfer_transaction()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.parse_transfer_transaction) * [`validate_json()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.validate_json) * [`validate_url()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.validate_url) - * [`with_retry()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.with_retry) diff --git a/docs/sdk/python/human_protocol_sdk.operator.operator_utils.md b/docs/sdk/python/human_protocol_sdk.operator.operator_utils.md index 84b76cac89..8a1a1cab2c 100644 --- a/docs/sdk/python/human_protocol_sdk.operator.operator_utils.md +++ b/docs/sdk/python/human_protocol_sdk.operator.operator_utils.md @@ -73,13 +73,14 @@ Bases: `object` A utility class that provides additional operator-related functionalities. -#### *static* get_operator(chain_id, operator_address) +#### *static* get_operator(chain_id, operator_address, options=None) Gets the operator details. * **Parameters:** * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the operator exists * **operator_address** (`str`) – Address of the operator + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `Optional`[[`OperatorData`](#human_protocol_sdk.operator.operator_utils.OperatorData)] * **Returns:** @@ -96,12 +97,13 @@ Gets the operator details. print(operator_data) ``` -#### *static* get_operators(filter) +#### *static* get_operators(filter, options=None) Get operators data of the protocol. * **Parameters:** - **filter** ([`OperatorFilter`](#human_protocol_sdk.operator.operator_utils.OperatorFilter)) – Operator filter + * **filter** ([`OperatorFilter`](#human_protocol_sdk.operator.operator_utils.OperatorFilter)) – Operator filter + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`OperatorData`](#human_protocol_sdk.operator.operator_utils.OperatorData)] * **Returns:** @@ -118,7 +120,7 @@ Get operators data of the protocol. ) ``` -#### *static* get_reputation_network_operators(chain_id, address, role=None) +#### *static* get_reputation_network_operators(chain_id, address, role=None, options=None) Get the reputation network operators of the specified address. @@ -126,6 +128,7 @@ Get the reputation network operators of the specified address. * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the reputation network exists * **address** (`str`) – Address of the reputation oracle * **role** (`Optional`[`str`]) – (Optional) Role of the operator + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`OperatorData`](#human_protocol_sdk.operator.operator_utils.OperatorData)] * **Returns:** @@ -142,13 +145,14 @@ Get the reputation network operators of the specified address. print(operators) ``` -#### *static* get_rewards_info(chain_id, slasher) +#### *static* get_rewards_info(chain_id, slasher, options=None) Get rewards of the given slasher. * **Parameters:** * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the slasher exists * **slasher** (`str`) – Address of the slasher + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`RewardData`](#human_protocol_sdk.operator.operator_utils.RewardData)] * **Returns:** diff --git a/docs/sdk/python/human_protocol_sdk.staking.staking_utils.md b/docs/sdk/python/human_protocol_sdk.staking.staking_utils.md index a22d644195..86d2a79482 100644 --- a/docs/sdk/python/human_protocol_sdk.staking.staking_utils.md +++ b/docs/sdk/python/human_protocol_sdk.staking.staking_utils.md @@ -34,12 +34,12 @@ Bases: `object` Bases: `object` -#### *static* get_staker(chain_id, address) +#### *static* get_staker(chain_id, address, options=None) * **Return type:** `Optional`[[`StakerData`](#human_protocol_sdk.staking.staking_utils.StakerData)] -#### *static* get_stakers(filter) +#### *static* get_stakers(filter, options=None) * **Return type:** `List`[[`StakerData`](#human_protocol_sdk.staking.staking_utils.StakerData)] diff --git a/docs/sdk/python/human_protocol_sdk.statistics.statistics_client.md b/docs/sdk/python/human_protocol_sdk.statistics.statistics_client.md index 8430d38ff3..5d7b6396c0 100644 --- a/docs/sdk/python/human_protocol_sdk.statistics.statistics_client.md +++ b/docs/sdk/python/human_protocol_sdk.statistics.statistics_client.md @@ -161,12 +161,13 @@ Initializes a Statistics instance * **Parameters:** **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Chain ID to get statistical data from -#### get_escrow_statistics(filter=) +#### get_escrow_statistics(filter=, options=None) Get escrow statistics data for the given date range. * **Parameters:** - **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** [`EscrowStatistics`](#human_protocol_sdk.statistics.statistics_client.EscrowStatistics) * **Returns:** @@ -190,12 +191,13 @@ Get escrow statistics data for the given date range. ) ``` -#### get_hmt_daily_data(filter=) +#### get_hmt_daily_data(filter=, options=None) Get HMT daily statistics data for the given date range. * **Parameters:** - **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`DailyHMTData`](#human_protocol_sdk.statistics.statistics_client.DailyHMTData)] * **Returns:** @@ -218,12 +220,13 @@ Get HMT daily statistics data for the given date range. ) ``` -#### get_hmt_holders(param=) +#### get_hmt_holders(param=, options=None) Get HMT holders data with optional filters and ordering. * **Parameters:** - **param** ([`HMTHoldersParam`](#human_protocol_sdk.statistics.statistics_client.HMTHoldersParam)) – Object containing filter and order parameters + * **param** ([`HMTHoldersParam`](#human_protocol_sdk.statistics.statistics_client.HMTHoldersParam)) – Object containing filter and order parameters + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`HMTHolder`](#human_protocol_sdk.statistics.statistics_client.HMTHolder)] * **Returns:** @@ -246,10 +249,12 @@ Get HMT holders data with optional filters and ordering. ) ``` -#### get_hmt_statistics() +#### get_hmt_statistics(options=None) Get HMT statistics data. +* **Parameters:** + **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** [`HMTStatistics`](#human_protocol_sdk.statistics.statistics_client.HMTStatistics) * **Returns:** @@ -264,12 +269,13 @@ Get HMT statistics data. print(statistics_client.get_hmt_statistics()) ``` -#### get_payment_statistics(filter=) +#### get_payment_statistics(filter=, options=None) Get payment statistics data for the given date range. * **Parameters:** - **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** [`PaymentStatistics`](#human_protocol_sdk.statistics.statistics_client.PaymentStatistics) * **Returns:** @@ -293,12 +299,13 @@ Get payment statistics data for the given date range. ) ``` -#### get_worker_statistics(filter=) +#### get_worker_statistics(filter=, options=None) Get worker statistics data for the given date range. * **Parameters:** - **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **filter** ([`StatisticsFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.StatisticsFilter)) – Object containing the date range + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** [`WorkerStatistics`](#human_protocol_sdk.statistics.statistics_client.WorkerStatistics) * **Returns:** diff --git a/docs/sdk/python/human_protocol_sdk.transaction.transaction_utils.md b/docs/sdk/python/human_protocol_sdk.transaction.transaction_utils.md index b982ca0071..e2138632d9 100644 --- a/docs/sdk/python/human_protocol_sdk.transaction.transaction_utils.md +++ b/docs/sdk/python/human_protocol_sdk.transaction.transaction_utils.md @@ -41,13 +41,14 @@ Bases: `object` A utility class that provides additional transaction-related functionalities. -#### *static* get_transaction(chain_id, hash) +#### *static* get_transaction(chain_id, hash, options=None) Returns the transaction for a given hash. * **Parameters:** * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the transaction was executed * **hash** (`str`) – Hash of the transaction + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `Optional`[[`TransactionData`](#human_protocol_sdk.transaction.transaction_utils.TransactionData)] * **Returns:** @@ -65,13 +66,14 @@ Returns the transaction for a given hash. ) ``` -#### *static* get_transactions(filter) +#### *static* get_transactions(filter, options=None) Get an array of transactions based on the specified filter parameters. * **Parameters:** - **filter** ([`TransactionFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.TransactionFilter)) – Object containing all the necessary parameters to filter - (chain_id, from_address, to_address, start_date, end_date, start_block, end_block, method, escrow, token, first, skip, order_direction) + * **filter** ([`TransactionFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.TransactionFilter)) – Object containing all the necessary parameters to filter + (chain_id, from_address, to_address, start_date, end_date, start_block, end_block, method, escrow, token, first, skip, order_direction) + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`TransactionData`](#human_protocol_sdk.transaction.transaction_utils.TransactionData)] * **Returns:** diff --git a/docs/sdk/python/human_protocol_sdk.utils.md b/docs/sdk/python/human_protocol_sdk.utils.md index 80251be352..497c686849 100644 --- a/docs/sdk/python/human_protocol_sdk.utils.md +++ b/docs/sdk/python/human_protocol_sdk.utils.md @@ -1,43 +1,40 @@ # human_protocol_sdk.utils module -### human_protocol_sdk.utils.apply_tx_defaults(w3, tx_options) +### *class* human_protocol_sdk.utils.SubgraphOptions(max_retries=None, base_delay=None) -Apply network specific default transaction parameters. +Bases: `object` -Aurora networks enforce a fixed gas price. We always override any user supplied -gasPrice with DEFAULT_AURORA_GAS_PRICE when on Aurora Testnet. -EIP-1559 fields are removed to avoid conflicts. +Configuration for subgraph logic. -* **Parameters:** - * **w3** (`Web3`) – Web3 instance (used to read chain id) - * **tx_options** (`Optional`[`TxParams`]) – Original transaction options (can be None) -* **Return type:** - `TxParams` -* **Returns:** - Mutated tx options with enforced defaults - -### human_protocol_sdk.utils.get_contract_interface(contract_entrypoint) +#### \_\_init_\_(max_retries=None, base_delay=None) -Retrieve the contract interface of a given contract. +#### base_delay *: `Optional`[`int`]* *= None* -* **Parameters:** - **contract_entrypoint** – the entrypoint of the JSON. -* **Returns:** - The contract interface containing the contract abi. +#### max_retries *: `Optional`[`int`]* *= None* -### human_protocol_sdk.utils.get_data_from_subgraph(network, query, params=None) +### human_protocol_sdk.utils.custom_gql_fetch(network, query, params=None, options=None) -Fetch data from the subgraph. +Fetch data from the subgraph with optional logic. * **Parameters:** * **network** (`dict`) – Network configuration dictionary * **query** (`str`) – GraphQL query string * **params** (`Optional`[`dict`]) – Query parameters + * **options** (`Optional`[[`SubgraphOptions`](#human_protocol_sdk.utils.SubgraphOptions)]) – Optional subgraph configuration * **Returns:** JSON response from the subgraph * **Raises:** **Exception** – If the subgraph query fails +### human_protocol_sdk.utils.get_contract_interface(contract_entrypoint) + +Retrieve the contract interface of a given contract. + +* **Parameters:** + **contract_entrypoint** – the entrypoint of the JSON. +* **Returns:** + The contract interface containing the contract abi. + ### human_protocol_sdk.utils.get_erc20_interface() Retrieve the ERC20 interface. @@ -105,6 +102,18 @@ a custom exception with a clear message for SDK users. except Exception as e: : handle_error(e, EscrowClientError) +### human_protocol_sdk.utils.is_indexer_error(error) + +Check if an error indicates that the indexer is down or not synced. +This function specifically checks for “bad indexers” errors from The Graph. + +* **Parameters:** + **error** (`Exception`) – The error to check +* **Return type:** + `bool` +* **Returns:** + True if the error indicates indexer issues + ### human_protocol_sdk.utils.parse_transfer_transaction(hmtoken_contract, tx_receipt) Parse a transfer transaction receipt. @@ -137,22 +146,3 @@ Validates the given URL. True if URL is valid, False otherwise * **Raises:** **ValidationFailure** – If the URL is invalid - -### human_protocol_sdk.utils.with_retry(fn, retries=3, delay=5, backoff=2) - -Retry a function - -Mainly used with handle_transaction to retry on case of failure. -Uses exponential backoff. - -* **Parameters:** - * **fn** – to run with retry logic. - * **retries** – number of times to retry the transaction - * **delay** – time to wait (exponentially) - * **backoff** – defines the rate of grow for the exponential wait. -* **Returns:** - False if transaction never succeeded, - otherwise the return of the function -* **Note:** - If the partial returns a Boolean and it happens to be False, - we would not know if the tx succeeded and it will retry. diff --git a/docs/sdk/python/human_protocol_sdk.worker.worker_utils.md b/docs/sdk/python/human_protocol_sdk.worker.worker_utils.md index 7a5660d332..7c574445ad 100644 --- a/docs/sdk/python/human_protocol_sdk.worker.worker_utils.md +++ b/docs/sdk/python/human_protocol_sdk.worker.worker_utils.md @@ -20,24 +20,26 @@ Bases: `object` A utility class that provides additional worker-related functionalities. -#### *static* get_worker(chain_id, worker_address) +#### *static* get_worker(chain_id, worker_address, options=None) Gets the worker details. * **Parameters:** * **chain_id** ([`ChainId`](human_protocol_sdk.constants.md#human_protocol_sdk.constants.ChainId)) – Network in which the worker exists * **worker_address** (`str`) – Address of the worker + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `Optional`[[`WorkerData`](#human_protocol_sdk.worker.worker_utils.WorkerData)] * **Returns:** Worker data if exists, otherwise None -#### *static* get_workers(filter) +#### *static* get_workers(filter, options=None) Get workers data of the protocol. * **Parameters:** - **filter** ([`WorkerFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.WorkerFilter)) – Worker filter + * **filter** ([`WorkerFilter`](human_protocol_sdk.filter.md#human_protocol_sdk.filter.WorkerFilter)) – Worker filter + * **options** (`Optional`[[`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions)]) – Optional config for subgraph requests * **Return type:** `List`[[`WorkerData`](#human_protocol_sdk.worker.worker_utils.WorkerData)] * **Returns:** diff --git a/docs/sdk/python/index.md b/docs/sdk/python/index.md index 7fd6c6bd8f..a8dc40c404 100644 --- a/docs/sdk/python/index.md +++ b/docs/sdk/python/index.md @@ -67,9 +67,9 @@ pip install human-protocol-sdk[agreement] * [`Encryption`](human_protocol_sdk.legacy_encryption.md#human_protocol_sdk.legacy_encryption.Encryption) * [`InvalidPublicKey`](human_protocol_sdk.legacy_encryption.md#human_protocol_sdk.legacy_encryption.InvalidPublicKey) * [human_protocol_sdk.utils module](human_protocol_sdk.utils.md) - * [`apply_tx_defaults()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.apply_tx_defaults) + * [`SubgraphOptions`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.SubgraphOptions) + * [`custom_gql_fetch()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.custom_gql_fetch) * [`get_contract_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_contract_interface) - * [`get_data_from_subgraph()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_data_from_subgraph) * [`get_erc20_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_erc20_interface) * [`get_escrow_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_escrow_interface) * [`get_factory_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_factory_interface) @@ -77,7 +77,7 @@ pip install human-protocol-sdk[agreement] * [`get_kvstore_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_kvstore_interface) * [`get_staking_interface()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.get_staking_interface) * [`handle_error()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.handle_error) + * [`is_indexer_error()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.is_indexer_error) * [`parse_transfer_transaction()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.parse_transfer_transaction) * [`validate_json()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.validate_json) * [`validate_url()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.validate_url) - * [`with_retry()`](human_protocol_sdk.utils.md#human_protocol_sdk.utils.with_retry) diff --git a/docs/sdk/typescript/base/classes/BaseEthersClient.md b/docs/sdk/typescript/base/classes/BaseEthersClient.md index 0edcb18a15..60d7959b0e 100644 --- a/docs/sdk/typescript/base/classes/BaseEthersClient.md +++ b/docs/sdk/typescript/base/classes/BaseEthersClient.md @@ -6,7 +6,7 @@ # Abstract Class: BaseEthersClient -Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) +Defined in: [base.ts:10](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L10) ## Introduction @@ -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:22](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L22) +Defined in: [base.ts:20](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20) **BaseClient constructor** @@ -52,7 +52,7 @@ The network information required to connect to the contracts > **networkData**: [`NetworkData`](../../types/type-aliases/NetworkData.md) -Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L14) +Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) *** @@ -60,29 +60,4 @@ Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d0 > `protected` **runner**: `ContractRunner` -Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/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/d055cfd598260e2e29b8b12885f1ee350eef64a4/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` +Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) diff --git a/docs/sdk/typescript/encryption/classes/Encryption.md b/docs/sdk/typescript/encryption/classes/Encryption.md index b681701bd4..8aa3c68e40 100644 --- a/docs/sdk/typescript/encryption/classes/Encryption.md +++ b/docs/sdk/typescript/encryption/classes/Encryption.md @@ -6,7 +6,7 @@ # Class: Encryption -Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58) +Defined in: [encryption.ts:58](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L58) ## Introduction @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66) +Defined in: [encryption.ts:66](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L66) Constructor for the Encryption class. @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L194) +Defined in: [encryption.ts:194](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/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. @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251) +Defined in: [encryption.ts:251](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L251) This function signs a message using the private key used to initialize the client. @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L142) +Defined in: [encryption.ts:142](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/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. @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L77) +Defined in: [encryption.ts:77](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/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. diff --git a/docs/sdk/typescript/encryption/classes/EncryptionUtils.md b/docs/sdk/typescript/encryption/classes/EncryptionUtils.md index 01aabb7515..1e7f4f6b06 100644 --- a/docs/sdk/typescript/encryption/classes/EncryptionUtils.md +++ b/docs/sdk/typescript/encryption/classes/EncryptionUtils.md @@ -6,7 +6,7 @@ # Class: EncryptionUtils -Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290) +Defined in: [encryption.ts:290](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L290) ## Introduction @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444) +Defined in: [encryption.ts:444](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L444) This function encrypts a message using the specified public keys. @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382) +Defined in: [encryption.ts:382](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L382) This function generates a key pair for encryption and decryption. @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351) +Defined in: [encryption.ts:351](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L351) This function gets signed data from a signed message. @@ -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/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494) +Defined in: [encryption.ts:494](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L494) Verifies if a message appears to be encrypted with OpenPGP. @@ -238,7 +238,7 @@ if (isEncrypted) { > `static` **verify**(`message`, `publicKey`): `Promise`\<`boolean`\> -Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318) +Defined in: [encryption.ts:318](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L318) This function verifies the signature of a signed message using the public key. diff --git a/docs/sdk/typescript/enums/enumerations/ChainId.md b/docs/sdk/typescript/enums/enumerations/ChainId.md index a57c0378dc..f509f60efe 100644 --- a/docs/sdk/typescript/enums/enumerations/ChainId.md +++ b/docs/sdk/typescript/enums/enumerations/ChainId.md @@ -6,7 +6,7 @@ # Enumeration: ChainId -Defined in: [enums.ts:1](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L1) +Defined in: [enums.ts:1](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L1) ## Enumeration Members @@ -14,15 +14,7 @@ Defined in: [enums.ts:1](https://github.com/humanprotocol/human-protocol/blob/d0 > **ALL**: `-1` -Defined in: [enums.ts:2](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L2) - -*** - -### AURORA\_TESTNET - -> **AURORA\_TESTNET**: `1313161555` - -Defined in: [enums.ts:9](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L9) +Defined in: [enums.ts:2](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L2) *** @@ -30,7 +22,7 @@ Defined in: [enums.ts:9](https://github.com/humanprotocol/human-protocol/blob/d0 > **BSC\_MAINNET**: `56` -Defined in: [enums.ts:5](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L5) +Defined in: [enums.ts:5](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L5) *** @@ -38,7 +30,7 @@ Defined in: [enums.ts:5](https://github.com/humanprotocol/human-protocol/blob/d0 > **BSC\_TESTNET**: `97` -Defined in: [enums.ts:6](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L6) +Defined in: [enums.ts:6](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L6) *** @@ -46,7 +38,7 @@ Defined in: [enums.ts:6](https://github.com/humanprotocol/human-protocol/blob/d0 > **LOCALHOST**: `1338` -Defined in: [enums.ts:10](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L10) +Defined in: [enums.ts:9](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L9) *** @@ -54,7 +46,7 @@ Defined in: [enums.ts:10](https://github.com/humanprotocol/human-protocol/blob/d > **MAINNET**: `1` -Defined in: [enums.ts:3](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L3) +Defined in: [enums.ts:3](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L3) *** @@ -62,7 +54,7 @@ Defined in: [enums.ts:3](https://github.com/humanprotocol/human-protocol/blob/d0 > **POLYGON**: `137` -Defined in: [enums.ts:7](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L7) +Defined in: [enums.ts:7](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L7) *** @@ -70,7 +62,7 @@ Defined in: [enums.ts:7](https://github.com/humanprotocol/human-protocol/blob/d0 > **POLYGON\_AMOY**: `80002` -Defined in: [enums.ts:8](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L8) +Defined in: [enums.ts:8](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L8) *** @@ -78,4 +70,4 @@ Defined in: [enums.ts:8](https://github.com/humanprotocol/human-protocol/blob/d0 > **SEPOLIA**: `11155111` -Defined in: [enums.ts:4](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L4) +Defined in: [enums.ts:4](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L4) diff --git a/docs/sdk/typescript/enums/enumerations/OperatorCategory.md b/docs/sdk/typescript/enums/enumerations/OperatorCategory.md index fd875d3c82..6619d45f18 100644 --- a/docs/sdk/typescript/enums/enumerations/OperatorCategory.md +++ b/docs/sdk/typescript/enums/enumerations/OperatorCategory.md @@ -6,7 +6,7 @@ # Enumeration: OperatorCategory -Defined in: [enums.ts:18](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L18) +Defined in: [enums.ts:17](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L17) ## Enumeration Members @@ -14,7 +14,7 @@ Defined in: [enums.ts:18](https://github.com/humanprotocol/human-protocol/blob/d > **MACHINE\_LEARNING**: `"machine_learning"` -Defined in: [enums.ts:19](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L19) +Defined in: [enums.ts:18](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L18) *** @@ -22,4 +22,4 @@ Defined in: [enums.ts:19](https://github.com/humanprotocol/human-protocol/blob/d > **MARKET\_MAKING**: `"market_making"` -Defined in: [enums.ts:20](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L20) +Defined in: [enums.ts:19](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L19) diff --git a/docs/sdk/typescript/enums/enumerations/OrderDirection.md b/docs/sdk/typescript/enums/enumerations/OrderDirection.md index 125560b6c5..41709226b7 100644 --- a/docs/sdk/typescript/enums/enumerations/OrderDirection.md +++ b/docs/sdk/typescript/enums/enumerations/OrderDirection.md @@ -6,7 +6,7 @@ # Enumeration: OrderDirection -Defined in: [enums.ts:13](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L13) +Defined in: [enums.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L12) ## Enumeration Members @@ -14,7 +14,7 @@ Defined in: [enums.ts:13](https://github.com/humanprotocol/human-protocol/blob/d > **ASC**: `"asc"` -Defined in: [enums.ts:14](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L14) +Defined in: [enums.ts:13](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L13) *** @@ -22,4 +22,4 @@ Defined in: [enums.ts:14](https://github.com/humanprotocol/human-protocol/blob/d > **DESC**: `"desc"` -Defined in: [enums.ts:15](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L15) +Defined in: [enums.ts:14](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/enums.ts#L14) diff --git a/docs/sdk/typescript/escrow/classes/EscrowClient.md b/docs/sdk/typescript/escrow/classes/EscrowClient.md index dc58c016a1..cf42422acb 100644 --- a/docs/sdk/typescript/escrow/classes/EscrowClient.md +++ b/docs/sdk/typescript/escrow/classes/EscrowClient.md @@ -6,7 +6,7 @@ # Class: EscrowClient -Defined in: [escrow.ts:146](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L146) +Defined in: [escrow.ts:148](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L148) ## Introduction @@ -86,7 +86,7 @@ const escrowClient = await EscrowClient.build(provider); > **new EscrowClient**(`runner`, `networkData`): `EscrowClient` -Defined in: [escrow.ts:155](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L155) +Defined in: [escrow.ts:157](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L157) **EscrowClient constructor** @@ -118,7 +118,7 @@ The network information required to connect to the Escrow contract > **networkData**: [`NetworkData`](../../types/type-aliases/NetworkData.md) -Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L14) +Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) #### Inherited from @@ -130,7 +130,7 @@ Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d0 > `protected` **runner**: `ContractRunner` -Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13) +Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) #### Inherited from @@ -138,42 +138,13 @@ Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/d0 ## Methods -### applyTxDefaults() - -> `protected` **applyTxDefaults**(`txOptions`): `Overrides` - -Defined in: [base.ts:35](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/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` - -#### Inherited from - -[`BaseEthersClient`](../../base/classes/BaseEthersClient.md).[`applyTxDefaults`](../../base/classes/BaseEthersClient.md#applytxdefaults) - -*** - ### bulkPayOut() #### Call Signature > **bulkPayOut**(`escrowAddress`, `recipients`, `amounts`, `finalResultsUrl`, `finalResultsHash`, `txId`, `forceComplete`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:806](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L806) +Defined in: [escrow.ts:802](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L802) This function pays out the amounts specified to the workers and sets the URL of the final results file. @@ -261,7 +232,7 @@ await escrowClient.bulkPayOut('0x62dD51230A30401C455c8398d06F85e4EaB6309f', reci > **bulkPayOut**(`escrowAddress`, `recipients`, `amounts`, `finalResultsUrl`, `finalResultsHash`, `payoutId`, `forceComplete`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:856](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L856) +Defined in: [escrow.ts:852](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L852) This function pays out the amounts specified to the workers and sets the URL of the final results file. @@ -352,7 +323,7 @@ await escrowClient.bulkPayOut('0x62dD51230A30401C455c8398d06F85e4EaB6309f', reci > **cancel**(`escrowAddress`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:955](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L955) +Defined in: [escrow.ts:951](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L951) This function cancels the specified escrow and sends the balance to the canceler. @@ -398,7 +369,7 @@ await escrowClient.cancel('0x62dD51230A30401C455c8398d06F85e4EaB6309f'); > **complete**(`escrowAddress`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:744](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L744) +Defined in: [escrow.ts:742](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L742) This function sets the status of an escrow to completed. @@ -446,7 +417,7 @@ await escrowClient.complete('0x62dD51230A30401C455c8398d06F85e4EaB6309f'); > **createBulkPayoutTransaction**(`escrowAddress`, `recipients`, `amounts`, `finalResultsUrl`, `finalResultsHash`, `payoutId`, `forceComplete`, `txOptions?`): `Promise`\<[`TransactionLikeWithNonce`](../../types/type-aliases/TransactionLikeWithNonce.md)\> -Defined in: [escrow.ts:1162](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1162) +Defined in: [escrow.ts:1149](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1149) Creates a prepared transaction for bulk payout without immediately sending it. @@ -540,7 +511,7 @@ console.log('Tx hash:', ethers.keccak256(signedTransaction)); > **createEscrow**(`tokenAddress`, `jobRequesterId`, `txOptions?`): `Promise`\<`string`\> -Defined in: [escrow.ts:233](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L233) +Defined in: [escrow.ts:235](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L235) This function creates an escrow contract that uses the token passed to pay oracle fees and reward workers. @@ -596,7 +567,7 @@ const escrowAddress = await escrowClient.createEscrow(tokenAddress, jobRequester > **createFundAndSetupEscrow**(`tokenAddress`, `amount`, `jobRequesterId`, `escrowConfig`, `txOptions?`): `Promise`\<`string`\> -Defined in: [escrow.ts:370](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L370) +Defined in: [escrow.ts:372](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L372) Creates, funds, and sets up a new escrow contract in a single transaction. @@ -693,7 +664,7 @@ console.log('Escrow created at:', escrowAddress); > **fund**(`escrowAddress`, `amount`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:543](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L543) +Defined in: [escrow.ts:545](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L545) This function adds funds of the chosen token to the escrow. @@ -746,7 +717,7 @@ await escrowClient.fund('0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount); > **getBalance**(`escrowAddress`): `Promise`\<`bigint`\> -Defined in: [escrow.ts:1308](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1308) +Defined in: [escrow.ts:1294](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1294) This function returns the balance for a specified escrow address. @@ -784,7 +755,7 @@ const balance = await escrowClient.getBalance('0x62dD51230A30401C455c8398d06F85e > **getExchangeOracleAddress**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1769](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1769) +Defined in: [escrow.ts:1755](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1755) This function returns the exchange oracle address for a given escrow. @@ -822,7 +793,7 @@ const oracleAddress = await escrowClient.getExchangeOracleAddress('0x62dD51230A3 > **getFactoryAddress**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1807](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1807) +Defined in: [escrow.ts:1793](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1793) This function returns the escrow factory address for a given escrow. @@ -860,7 +831,7 @@ const factoryAddress = await escrowClient.getFactoryAddress('0x62dD51230A30401C4 > **getIntermediateResultsHash**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1541](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1541) +Defined in: [escrow.ts:1527](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1527) This function returns the intermediate results hash. @@ -898,7 +869,7 @@ const intermediateResultsHash = await escrowClient.getIntermediateResultsHash('0 > **getIntermediateResultsUrl**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1503](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1503) +Defined in: [escrow.ts:1489](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1489) This function returns the intermediate results file URL. @@ -936,7 +907,7 @@ const intermediateResultsUrl = await escrowClient.getIntermediateResultsUrl('0x6 > **getJobLauncherAddress**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1693](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1693) +Defined in: [escrow.ts:1679](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1679) This function returns the job launcher address for a given escrow. @@ -974,7 +945,7 @@ const jobLauncherAddress = await escrowClient.getJobLauncherAddress('0x62dD51230 > **getManifest**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1427](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1427) +Defined in: [escrow.ts:1413](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1413) This function returns the manifest. Could be a URL or a JSON string. @@ -1012,7 +983,7 @@ const manifest = await escrowClient.getManifest('0x62dD51230A30401C455c8398d06F8 > **getManifestHash**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1389](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1389) +Defined in: [escrow.ts:1375](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1375) This function returns the manifest file hash. @@ -1050,7 +1021,7 @@ const manifestHash = await escrowClient.getManifestHash('0x62dD51230A30401C455c8 > **getRecordingOracleAddress**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1655](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1655) +Defined in: [escrow.ts:1641](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1641) This function returns the recording oracle address for a given escrow. @@ -1088,7 +1059,7 @@ const oracleAddress = await escrowClient.getRecordingOracleAddress('0x62dD51230A > **getReputationOracleAddress**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1731](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1731) +Defined in: [escrow.ts:1717](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1717) This function returns the reputation oracle address for a given escrow. @@ -1126,7 +1097,7 @@ const oracleAddress = await escrowClient.getReputationOracleAddress('0x62dD51230 > **getReservedFunds**(`escrowAddress`): `Promise`\<`bigint`\> -Defined in: [escrow.ts:1352](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1352) +Defined in: [escrow.ts:1338](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1338) This function returns the reserved funds for a specified escrow address. @@ -1164,7 +1135,7 @@ const reservedFunds = await escrowClient.getReservedFunds('0x62dD51230A30401C455 > **getResultsUrl**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1465](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1465) +Defined in: [escrow.ts:1451](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1451) This function returns the results file URL. @@ -1202,7 +1173,7 @@ const resultsUrl = await escrowClient.getResultsUrl('0x62dD51230A30401C455c8398d > **getStatus**(`escrowAddress`): `Promise`\<[`EscrowStatus`](../../types/enumerations/EscrowStatus.md)\> -Defined in: [escrow.ts:1617](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1617) +Defined in: [escrow.ts:1603](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1603) This function returns the current status of the escrow. @@ -1240,7 +1211,7 @@ const status = await escrowClient.getStatus('0x62dD51230A30401C455c8398d06F85e4E > **getTokenAddress**(`escrowAddress`): `Promise`\<`string`\> -Defined in: [escrow.ts:1579](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1579) +Defined in: [escrow.ts:1565](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1565) This function returns the token address used for funding the escrow. @@ -1278,7 +1249,7 @@ const tokenAddress = await escrowClient.getTokenAddress('0x62dD51230A30401C455c8 > **requestCancellation**(`escrowAddress`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:1003](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1003) +Defined in: [escrow.ts:997](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L997) This function requests the cancellation of the specified escrow (moves status to ToCancel or finalizes if expired). @@ -1326,7 +1297,7 @@ await escrowClient.requestCancellation('0x62dD51230A30401C455c8398d06F85e4EaB630 > **setup**(`escrowAddress`, `escrowConfig`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:467](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L467) +Defined in: [escrow.ts:469](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L469) This function sets up the parameters of the escrow. @@ -1393,7 +1364,7 @@ await escrowClient.setup(escrowAddress, escrowConfig); > **storeResults**(`escrowAddress`, `url`, `hash`, `fundsToReserve`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:613](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L613) +Defined in: [escrow.ts:611](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L611) This function stores the results URL and hash. @@ -1457,7 +1428,7 @@ await escrowClient.storeResults('0x62dD51230A30401C455c8398d06F85e4EaB6309f', 'h > **storeResults**(`escrowAddress`, `url`, `hash`, `txOptions?`): `Promise`\<`void`\> -Defined in: [escrow.ts:649](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L649) +Defined in: [escrow.ts:647](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L647) This function stores the results URL and hash. @@ -1517,7 +1488,7 @@ await escrowClient.storeResults('0x62dD51230A30401C455c8398d06F85e4EaB6309f', 'h > **withdraw**(`escrowAddress`, `tokenAddress`, `txOptions?`): `Promise`\<[`IEscrowWithdraw`](../../interfaces/interfaces/IEscrowWithdraw.md)\> -Defined in: [escrow.ts:1058](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1058) +Defined in: [escrow.ts:1048](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1048) This function withdraws additional tokens in the escrow to the canceler. @@ -1574,7 +1545,7 @@ await escrowClient.withdraw( > `static` **build**(`runner`): `Promise`\<`EscrowClient`\> -Defined in: [escrow.ts:173](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L173) +Defined in: [escrow.ts:175](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L175) Creates an instance of EscrowClient from a Runner. diff --git a/docs/sdk/typescript/escrow/classes/EscrowUtils.md b/docs/sdk/typescript/escrow/classes/EscrowUtils.md index 93519093ae..6c1d187a70 100644 --- a/docs/sdk/typescript/escrow/classes/EscrowUtils.md +++ b/docs/sdk/typescript/escrow/classes/EscrowUtils.md @@ -6,7 +6,7 @@ # Class: EscrowUtils -Defined in: [escrow.ts:1856](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1856) +Defined in: [escrow.ts:1842](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1842) ## Introduction @@ -52,9 +52,9 @@ const escrowAddresses = new EscrowUtils.getEscrows({ ### getCancellationRefund() -> `static` **getCancellationRefund**(`chainId`, `escrowAddress`): `Promise`\<[`ICancellationRefund`](../../interfaces/interfaces/ICancellationRefund.md) \| `null`\> +> `static` **getCancellationRefund**(`chainId`, `escrowAddress`, `options?`): `Promise`\<[`ICancellationRefund`](../../interfaces/interfaces/ICancellationRefund.md) \| `null`\> -Defined in: [escrow.ts:2431](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2431) +Defined in: [escrow.ts:2434](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2434) This function returns the cancellation refund for a given escrow address. @@ -101,6 +101,12 @@ Network in which the escrow has been deployed Address of the escrow +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`ICancellationRefund`](../../interfaces/interfaces/ICancellationRefund.md) \| `null`\> @@ -119,9 +125,9 @@ const cancellationRefund = await EscrowUtils.getCancellationRefund(ChainId.POLYG ### getCancellationRefunds() -> `static` **getCancellationRefunds**(`filter`): `Promise`\<[`ICancellationRefund`](../../interfaces/interfaces/ICancellationRefund.md)[]\> +> `static` **getCancellationRefunds**(`filter`, `options?`): `Promise`\<[`ICancellationRefund`](../../interfaces/interfaces/ICancellationRefund.md)[]\> -Defined in: [escrow.ts:2335](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2335) +Defined in: [escrow.ts:2338](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2338) This function returns the cancellation refunds for a given set of networks. @@ -158,39 +164,15 @@ interface ICancellationRefund { ##### filter -Filter parameters. - -###### chainId - -[`ChainId`](../../enums/enumerations/ChainId.md) - -###### escrowAddress? - -`string` - -###### first? - -`number` - -###### from? - -`Date` - -###### orderDirection? - -[`OrderDirection`](../../enums/enumerations/OrderDirection.md) +[`ICancellationRefundFilter`](../../interfaces/interfaces/ICancellationRefundFilter.md) -###### receiver? - -`string` - -###### skip? +Filter parameters. -`number` +##### options? -###### to? +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) -`Date` +Optional configuration for subgraph requests. #### Returns @@ -214,9 +196,9 @@ console.log(cancellationRefunds); ### getEscrow() -> `static` **getEscrow**(`chainId`, `escrowAddress`): `Promise`\<[`IEscrow`](../../interfaces/interfaces/IEscrow.md) \| `null`\> +> `static` **getEscrow**(`chainId`, `escrowAddress`, `options?`): `Promise`\<[`IEscrow`](../../interfaces/interfaces/IEscrow.md) \| `null`\> -Defined in: [escrow.ts:2075](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2075) +Defined in: [escrow.ts:2067](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2067) This function returns the escrow data for a given address. @@ -281,6 +263,12 @@ Network in which the escrow has been deployed Address of the escrow +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IEscrow`](../../interfaces/interfaces/IEscrow.md) \| `null`\> @@ -299,9 +287,9 @@ const escrow = new EscrowUtils.getEscrow(ChainId.POLYGON_AMOY, "0x12345678901234 ### getEscrows() -> `static` **getEscrows**(`filter`): `Promise`\<[`IEscrow`](../../interfaces/interfaces/IEscrow.md)[]\> +> `static` **getEscrows**(`filter`, `options?`): `Promise`\<[`IEscrow`](../../interfaces/interfaces/IEscrow.md)[]\> -Defined in: [escrow.ts:1959](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1959) +Defined in: [escrow.ts:1946](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1946) This function returns an array of escrows based on the specified filter parameters. @@ -393,6 +381,12 @@ interface IEscrow { Filter parameters. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IEscrow`](../../interfaces/interfaces/IEscrow.md)[]\> @@ -417,9 +411,9 @@ const escrows = await EscrowUtils.getEscrows(filters); ### getPayouts() -> `static` **getPayouts**(`filter`): `Promise`\<[`IPayout`](../../interfaces/interfaces/IPayout.md)[]\> +> `static` **getPayouts**(`filter`, `options?`): `Promise`\<[`IPayout`](../../interfaces/interfaces/IPayout.md)[]\> -Defined in: [escrow.ts:2244](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2244) +Defined in: [escrow.ts:2242](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2242) This function returns the payouts for a given set of networks. @@ -436,6 +430,12 @@ Fetch payouts from the subgraph. Filter parameters. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IPayout`](../../interfaces/interfaces/IPayout.md)[]\> @@ -461,9 +461,9 @@ console.log(payouts); ### getStatusEvents() -> `static` **getStatusEvents**(`filter`): `Promise`\<[`IStatusEvent`](../../interfaces/interfaces/IStatusEvent.md)[]\> +> `static` **getStatusEvents**(`filter`, `options?`): `Promise`\<[`IStatusEvent`](../../interfaces/interfaces/IStatusEvent.md)[]\> -Defined in: [escrow.ts:2155](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2155) +Defined in: [escrow.ts:2150](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L2150) This function returns the status events for a given set of networks within an optional date range. @@ -507,6 +507,12 @@ type Status = { Filter parameters. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IStatusEvent`](../../interfaces/interfaces/IStatusEvent.md)[]\> diff --git a/docs/sdk/typescript/graphql/types/interfaces/IOperatorSubgraph.md b/docs/sdk/typescript/graphql/types/interfaces/IOperatorSubgraph.md index c89f6a65b2..fde9259f62 100644 --- a/docs/sdk/typescript/graphql/types/interfaces/IOperatorSubgraph.md +++ b/docs/sdk/typescript/graphql/types/interfaces/IOperatorSubgraph.md @@ -6,7 +6,7 @@ # Interface: IOperatorSubgraph -Defined in: [graphql/types.ts:143](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L143) +Defined in: [graphql/types.ts:143](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L143) ## Properties @@ -14,7 +14,7 @@ Defined in: [graphql/types.ts:143](https://github.com/humanprotocol/human-protoc > **address**: `string` -Defined in: [graphql/types.ts:145](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L145) +Defined in: [graphql/types.ts:145](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L145) *** @@ -22,7 +22,7 @@ Defined in: [graphql/types.ts:145](https://github.com/humanprotocol/human-protoc > **amountJobsProcessed**: `string` -Defined in: [graphql/types.ts:146](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L146) +Defined in: [graphql/types.ts:146](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L146) *** @@ -30,7 +30,7 @@ Defined in: [graphql/types.ts:146](https://github.com/humanprotocol/human-protoc > **category**: `string` \| `null` -Defined in: [graphql/types.ts:156](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L156) +Defined in: [graphql/types.ts:156](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L156) *** @@ -38,7 +38,7 @@ Defined in: [graphql/types.ts:156](https://github.com/humanprotocol/human-protoc > **fee**: `string` \| `null` -Defined in: [graphql/types.ts:148](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L148) +Defined in: [graphql/types.ts:148](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L148) *** @@ -46,7 +46,7 @@ Defined in: [graphql/types.ts:148](https://github.com/humanprotocol/human-protoc > **id**: `string` -Defined in: [graphql/types.ts:144](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L144) +Defined in: [graphql/types.ts:144](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L144) *** @@ -54,7 +54,7 @@ Defined in: [graphql/types.ts:144](https://github.com/humanprotocol/human-protoc > **jobTypes**: `string` \| `string`[] \| `null` -Defined in: [graphql/types.ts:157](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L157) +Defined in: [graphql/types.ts:157](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L157) *** @@ -62,7 +62,7 @@ Defined in: [graphql/types.ts:157](https://github.com/humanprotocol/human-protoc > **name**: `string` \| `null` -Defined in: [graphql/types.ts:155](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L155) +Defined in: [graphql/types.ts:155](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L155) *** @@ -70,7 +70,7 @@ Defined in: [graphql/types.ts:155](https://github.com/humanprotocol/human-protoc > **publicKey**: `string` \| `null` -Defined in: [graphql/types.ts:149](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L149) +Defined in: [graphql/types.ts:149](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L149) *** @@ -78,7 +78,7 @@ Defined in: [graphql/types.ts:149](https://github.com/humanprotocol/human-protoc > **registrationInstructions**: `string` \| `null` -Defined in: [graphql/types.ts:154](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L154) +Defined in: [graphql/types.ts:154](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L154) *** @@ -86,7 +86,7 @@ Defined in: [graphql/types.ts:154](https://github.com/humanprotocol/human-protoc > **registrationNeeded**: `boolean` \| `null` -Defined in: [graphql/types.ts:153](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L153) +Defined in: [graphql/types.ts:153](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L153) *** @@ -94,7 +94,7 @@ Defined in: [graphql/types.ts:153](https://github.com/humanprotocol/human-protoc > **reputationNetworks**: `object`[] -Defined in: [graphql/types.ts:158](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L158) +Defined in: [graphql/types.ts:158](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L158) #### address @@ -106,7 +106,7 @@ Defined in: [graphql/types.ts:158](https://github.com/humanprotocol/human-protoc > **role**: `string` \| `null` -Defined in: [graphql/types.ts:147](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L147) +Defined in: [graphql/types.ts:147](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L147) *** @@ -114,7 +114,7 @@ Defined in: [graphql/types.ts:147](https://github.com/humanprotocol/human-protoc > **staker**: \{ `lastDepositTimestamp`: `string`; `lockedAmount`: `string`; `lockedUntilTimestamp`: `string`; `slashedAmount`: `string`; `stakedAmount`: `string`; `withdrawnAmount`: `string`; \} \| `null` -Defined in: [graphql/types.ts:159](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L159) +Defined in: [graphql/types.ts:159](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L159) *** @@ -122,7 +122,7 @@ Defined in: [graphql/types.ts:159](https://github.com/humanprotocol/human-protoc > **url**: `string` \| `null` -Defined in: [graphql/types.ts:152](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L152) +Defined in: [graphql/types.ts:152](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L152) *** @@ -130,7 +130,7 @@ Defined in: [graphql/types.ts:152](https://github.com/humanprotocol/human-protoc > **webhookUrl**: `string` \| `null` -Defined in: [graphql/types.ts:150](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L150) +Defined in: [graphql/types.ts:150](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L150) *** @@ -138,4 +138,4 @@ Defined in: [graphql/types.ts:150](https://github.com/humanprotocol/human-protoc > **website**: `string` \| `null` -Defined in: [graphql/types.ts:151](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L151) +Defined in: [graphql/types.ts:151](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L151) diff --git a/docs/sdk/typescript/graphql/types/interfaces/IReputationNetworkSubgraph.md b/docs/sdk/typescript/graphql/types/interfaces/IReputationNetworkSubgraph.md index 078f8968ca..3aa1d49877 100644 --- a/docs/sdk/typescript/graphql/types/interfaces/IReputationNetworkSubgraph.md +++ b/docs/sdk/typescript/graphql/types/interfaces/IReputationNetworkSubgraph.md @@ -6,7 +6,7 @@ # Interface: IReputationNetworkSubgraph -Defined in: [graphql/types.ts:169](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L169) +Defined in: [graphql/types.ts:169](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L169) ## Extends @@ -18,7 +18,7 @@ Defined in: [graphql/types.ts:169](https://github.com/humanprotocol/human-protoc > **address**: `string` -Defined in: [interfaces.ts:42](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L42) +Defined in: [interfaces.ts:42](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L42) #### Inherited from @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:42](https://github.com/humanprotocol/human-protocol/b > **id**: `string` -Defined in: [interfaces.ts:41](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L41) +Defined in: [interfaces.ts:41](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L41) #### Inherited from @@ -42,4 +42,4 @@ Defined in: [interfaces.ts:41](https://github.com/humanprotocol/human-protocol/b > **operators**: [`IOperatorSubgraph`](IOperatorSubgraph.md)[] -Defined in: [graphql/types.ts:171](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L171) +Defined in: [graphql/types.ts:171](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L171) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/CancellationRefundData.md b/docs/sdk/typescript/graphql/types/type-aliases/CancellationRefundData.md index ba79d3208a..83dcc92dc4 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/CancellationRefundData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/CancellationRefundData.md @@ -8,7 +8,7 @@ > **CancellationRefundData** = `object` -Defined in: [graphql/types.ts:182](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L182) +Defined in: [graphql/types.ts:182](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L182) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:182](https://github.com/humanprotocol/human-protoc > **amount**: `string` -Defined in: [graphql/types.ts:186](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L186) +Defined in: [graphql/types.ts:186](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L186) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:186](https://github.com/humanprotocol/human-protoc > **block**: `string` -Defined in: [graphql/types.ts:187](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L187) +Defined in: [graphql/types.ts:187](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L187) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:187](https://github.com/humanprotocol/human-protoc > **escrowAddress**: `string` -Defined in: [graphql/types.ts:184](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L184) +Defined in: [graphql/types.ts:184](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L184) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:184](https://github.com/humanprotocol/human-protoc > **id**: `string` -Defined in: [graphql/types.ts:183](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L183) +Defined in: [graphql/types.ts:183](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L183) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:183](https://github.com/humanprotocol/human-protoc > **receiver**: `string` -Defined in: [graphql/types.ts:185](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L185) +Defined in: [graphql/types.ts:185](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L185) *** @@ -56,7 +56,7 @@ Defined in: [graphql/types.ts:185](https://github.com/humanprotocol/human-protoc > **timestamp**: `string` -Defined in: [graphql/types.ts:188](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L188) +Defined in: [graphql/types.ts:188](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L188) *** @@ -64,4 +64,4 @@ Defined in: [graphql/types.ts:188](https://github.com/humanprotocol/human-protoc > **txHash**: `string` -Defined in: [graphql/types.ts:189](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L189) +Defined in: [graphql/types.ts:189](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L189) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/EscrowData.md b/docs/sdk/typescript/graphql/types/type-aliases/EscrowData.md index 5b8896b3fd..59bcce6f27 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/EscrowData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/EscrowData.md @@ -8,7 +8,7 @@ > **EscrowData** = `object` -Defined in: [graphql/types.ts:3](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L3) +Defined in: [graphql/types.ts:3](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L3) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:3](https://github.com/humanprotocol/human-protocol > **address**: `string` -Defined in: [graphql/types.ts:5](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L5) +Defined in: [graphql/types.ts:5](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L5) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:5](https://github.com/humanprotocol/human-protocol > **amountPaid**: `string` -Defined in: [graphql/types.ts:6](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L6) +Defined in: [graphql/types.ts:6](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L6) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:6](https://github.com/humanprotocol/human-protocol > **balance**: `string` -Defined in: [graphql/types.ts:7](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L7) +Defined in: [graphql/types.ts:7](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L7) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:7](https://github.com/humanprotocol/human-protocol > **count**: `string` -Defined in: [graphql/types.ts:8](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L8) +Defined in: [graphql/types.ts:8](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L8) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:8](https://github.com/humanprotocol/human-protocol > **createdAt**: `string` -Defined in: [graphql/types.ts:27](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L27) +Defined in: [graphql/types.ts:27](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L27) *** @@ -56,7 +56,7 @@ Defined in: [graphql/types.ts:27](https://github.com/humanprotocol/human-protoco > **exchangeOracle**: `string` \| `null` -Defined in: [graphql/types.ts:20](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L20) +Defined in: [graphql/types.ts:20](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L20) *** @@ -64,7 +64,7 @@ Defined in: [graphql/types.ts:20](https://github.com/humanprotocol/human-protoco > **exchangeOracleFee**: `string` \| `null` -Defined in: [graphql/types.ts:23](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L23) +Defined in: [graphql/types.ts:23](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L23) *** @@ -72,7 +72,7 @@ Defined in: [graphql/types.ts:23](https://github.com/humanprotocol/human-protoco > **factoryAddress**: `string` -Defined in: [graphql/types.ts:9](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L9) +Defined in: [graphql/types.ts:9](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L9) *** @@ -80,7 +80,7 @@ Defined in: [graphql/types.ts:9](https://github.com/humanprotocol/human-protocol > **finalResultsHash**: `string` \| `null` -Defined in: [graphql/types.ts:11](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L11) +Defined in: [graphql/types.ts:11](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L11) *** @@ -88,7 +88,7 @@ Defined in: [graphql/types.ts:11](https://github.com/humanprotocol/human-protoco > **finalResultsUrl**: `string` \| `null` -Defined in: [graphql/types.ts:10](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L10) +Defined in: [graphql/types.ts:10](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L10) *** @@ -96,7 +96,7 @@ Defined in: [graphql/types.ts:10](https://github.com/humanprotocol/human-protoco > **id**: `string` -Defined in: [graphql/types.ts:4](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L4) +Defined in: [graphql/types.ts:4](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L4) *** @@ -104,7 +104,7 @@ Defined in: [graphql/types.ts:4](https://github.com/humanprotocol/human-protocol > **intermediateResultsHash**: `string` \| `null` -Defined in: [graphql/types.ts:13](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L13) +Defined in: [graphql/types.ts:13](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L13) *** @@ -112,7 +112,7 @@ Defined in: [graphql/types.ts:13](https://github.com/humanprotocol/human-protoco > **intermediateResultsUrl**: `string` \| `null` -Defined in: [graphql/types.ts:12](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L12) +Defined in: [graphql/types.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L12) *** @@ -120,7 +120,7 @@ Defined in: [graphql/types.ts:12](https://github.com/humanprotocol/human-protoco > **jobRequesterId**: `string` \| `null` -Defined in: [graphql/types.ts:15](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L15) +Defined in: [graphql/types.ts:15](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L15) *** @@ -128,7 +128,7 @@ Defined in: [graphql/types.ts:15](https://github.com/humanprotocol/human-protoco > **launcher**: `string` -Defined in: [graphql/types.ts:14](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L14) +Defined in: [graphql/types.ts:14](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L14) *** @@ -136,7 +136,7 @@ Defined in: [graphql/types.ts:14](https://github.com/humanprotocol/human-protoco > **manifest**: `string` \| `null` -Defined in: [graphql/types.ts:17](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L17) +Defined in: [graphql/types.ts:17](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L17) *** @@ -144,7 +144,7 @@ Defined in: [graphql/types.ts:17](https://github.com/humanprotocol/human-protoco > **manifestHash**: `string` \| `null` -Defined in: [graphql/types.ts:16](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L16) +Defined in: [graphql/types.ts:16](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L16) *** @@ -152,7 +152,7 @@ Defined in: [graphql/types.ts:16](https://github.com/humanprotocol/human-protoco > **recordingOracle**: `string` \| `null` -Defined in: [graphql/types.ts:18](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L18) +Defined in: [graphql/types.ts:18](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L18) *** @@ -160,7 +160,7 @@ Defined in: [graphql/types.ts:18](https://github.com/humanprotocol/human-protoco > **recordingOracleFee**: `string` \| `null` -Defined in: [graphql/types.ts:21](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L21) +Defined in: [graphql/types.ts:21](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L21) *** @@ -168,7 +168,7 @@ Defined in: [graphql/types.ts:21](https://github.com/humanprotocol/human-protoco > **reputationOracle**: `string` \| `null` -Defined in: [graphql/types.ts:19](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L19) +Defined in: [graphql/types.ts:19](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L19) *** @@ -176,7 +176,7 @@ Defined in: [graphql/types.ts:19](https://github.com/humanprotocol/human-protoco > **reputationOracleFee**: `string` \| `null` -Defined in: [graphql/types.ts:22](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L22) +Defined in: [graphql/types.ts:22](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L22) *** @@ -184,7 +184,7 @@ Defined in: [graphql/types.ts:22](https://github.com/humanprotocol/human-protoco > **status**: `string` -Defined in: [graphql/types.ts:24](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L24) +Defined in: [graphql/types.ts:24](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L24) *** @@ -192,7 +192,7 @@ Defined in: [graphql/types.ts:24](https://github.com/humanprotocol/human-protoco > **token**: `string` -Defined in: [graphql/types.ts:25](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L25) +Defined in: [graphql/types.ts:25](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L25) *** @@ -200,4 +200,4 @@ Defined in: [graphql/types.ts:25](https://github.com/humanprotocol/human-protoco > **totalFundedAmount**: `string` -Defined in: [graphql/types.ts:26](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L26) +Defined in: [graphql/types.ts:26](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L26) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/EscrowStatisticsData.md b/docs/sdk/typescript/graphql/types/type-aliases/EscrowStatisticsData.md index 364720af4e..0f40d779cd 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/EscrowStatisticsData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/EscrowStatisticsData.md @@ -8,7 +8,7 @@ > **EscrowStatisticsData** = `object` -Defined in: [graphql/types.ts:71](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L71) +Defined in: [graphql/types.ts:71](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L71) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:71](https://github.com/humanprotocol/human-protoco > **bulkPayoutEventCount**: `string` -Defined in: [graphql/types.ts:74](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L74) +Defined in: [graphql/types.ts:74](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L74) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:74](https://github.com/humanprotocol/human-protoco > **cancelledStatusEventCount**: `string` -Defined in: [graphql/types.ts:76](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L76) +Defined in: [graphql/types.ts:76](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L76) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:76](https://github.com/humanprotocol/human-protoco > **completedStatusEventCount**: `string` -Defined in: [graphql/types.ts:79](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L79) +Defined in: [graphql/types.ts:79](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L79) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:79](https://github.com/humanprotocol/human-protoco > **fundEventCount**: `string` -Defined in: [graphql/types.ts:72](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L72) +Defined in: [graphql/types.ts:72](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L72) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:72](https://github.com/humanprotocol/human-protoco > **paidStatusEventCount**: `string` -Defined in: [graphql/types.ts:78](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L78) +Defined in: [graphql/types.ts:78](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L78) *** @@ -56,7 +56,7 @@ Defined in: [graphql/types.ts:78](https://github.com/humanprotocol/human-protoco > **partialStatusEventCount**: `string` -Defined in: [graphql/types.ts:77](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L77) +Defined in: [graphql/types.ts:77](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L77) *** @@ -64,7 +64,7 @@ Defined in: [graphql/types.ts:77](https://github.com/humanprotocol/human-protoco > **pendingStatusEventCount**: `string` -Defined in: [graphql/types.ts:75](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L75) +Defined in: [graphql/types.ts:75](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L75) *** @@ -72,7 +72,7 @@ Defined in: [graphql/types.ts:75](https://github.com/humanprotocol/human-protoco > **storeResultsEventCount**: `string` -Defined in: [graphql/types.ts:73](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L73) +Defined in: [graphql/types.ts:73](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L73) *** @@ -80,7 +80,7 @@ Defined in: [graphql/types.ts:73](https://github.com/humanprotocol/human-protoco > **totalEscrowCount**: `string` -Defined in: [graphql/types.ts:81](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L81) +Defined in: [graphql/types.ts:81](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L81) *** @@ -88,4 +88,4 @@ Defined in: [graphql/types.ts:81](https://github.com/humanprotocol/human-protoco > **totalEventCount**: `string` -Defined in: [graphql/types.ts:80](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L80) +Defined in: [graphql/types.ts:80](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L80) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/EventDayData.md b/docs/sdk/typescript/graphql/types/type-aliases/EventDayData.md index 7f794500a3..7d9021d6d7 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/EventDayData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/EventDayData.md @@ -8,7 +8,7 @@ > **EventDayData** = `object` -Defined in: [graphql/types.ts:84](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L84) +Defined in: [graphql/types.ts:84](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L84) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:84](https://github.com/humanprotocol/human-protoco > **dailyBulkPayoutEventCount**: `string` -Defined in: [graphql/types.ts:88](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L88) +Defined in: [graphql/types.ts:88](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L88) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:88](https://github.com/humanprotocol/human-protoco > **dailyCancelledStatusEventCount**: `string` -Defined in: [graphql/types.ts:90](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L90) +Defined in: [graphql/types.ts:90](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L90) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:90](https://github.com/humanprotocol/human-protoco > **dailyCompletedStatusEventCount**: `string` -Defined in: [graphql/types.ts:93](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L93) +Defined in: [graphql/types.ts:93](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L93) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:93](https://github.com/humanprotocol/human-protoco > **dailyEscrowCount**: `string` -Defined in: [graphql/types.ts:95](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L95) +Defined in: [graphql/types.ts:95](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L95) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:95](https://github.com/humanprotocol/human-protoco > **dailyFundEventCount**: `string` -Defined in: [graphql/types.ts:86](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L86) +Defined in: [graphql/types.ts:86](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L86) *** @@ -56,7 +56,7 @@ Defined in: [graphql/types.ts:86](https://github.com/humanprotocol/human-protoco > **dailyHMTPayoutAmount**: `string` -Defined in: [graphql/types.ts:98](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L98) +Defined in: [graphql/types.ts:98](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L98) *** @@ -64,7 +64,7 @@ Defined in: [graphql/types.ts:98](https://github.com/humanprotocol/human-protoco > **dailyHMTTransferAmount**: `string` -Defined in: [graphql/types.ts:100](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L100) +Defined in: [graphql/types.ts:100](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L100) *** @@ -72,7 +72,7 @@ Defined in: [graphql/types.ts:100](https://github.com/humanprotocol/human-protoc > **dailyHMTTransferCount**: `string` -Defined in: [graphql/types.ts:99](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L99) +Defined in: [graphql/types.ts:99](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L99) *** @@ -80,7 +80,7 @@ Defined in: [graphql/types.ts:99](https://github.com/humanprotocol/human-protoco > **dailyPaidStatusEventCount**: `string` -Defined in: [graphql/types.ts:92](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L92) +Defined in: [graphql/types.ts:92](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L92) *** @@ -88,7 +88,7 @@ Defined in: [graphql/types.ts:92](https://github.com/humanprotocol/human-protoco > **dailyPartialStatusEventCount**: `string` -Defined in: [graphql/types.ts:91](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L91) +Defined in: [graphql/types.ts:91](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L91) *** @@ -96,7 +96,7 @@ Defined in: [graphql/types.ts:91](https://github.com/humanprotocol/human-protoco > **dailyPayoutCount**: `string` -Defined in: [graphql/types.ts:97](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L97) +Defined in: [graphql/types.ts:97](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L97) *** @@ -104,7 +104,7 @@ Defined in: [graphql/types.ts:97](https://github.com/humanprotocol/human-protoco > **dailyPendingStatusEventCount**: `string` -Defined in: [graphql/types.ts:89](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L89) +Defined in: [graphql/types.ts:89](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L89) *** @@ -112,7 +112,7 @@ Defined in: [graphql/types.ts:89](https://github.com/humanprotocol/human-protoco > **dailyStoreResultsEventCount**: `string` -Defined in: [graphql/types.ts:87](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L87) +Defined in: [graphql/types.ts:87](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L87) *** @@ -120,7 +120,7 @@ Defined in: [graphql/types.ts:87](https://github.com/humanprotocol/human-protoco > **dailyTotalEventCount**: `string` -Defined in: [graphql/types.ts:94](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L94) +Defined in: [graphql/types.ts:94](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L94) *** @@ -128,7 +128,7 @@ Defined in: [graphql/types.ts:94](https://github.com/humanprotocol/human-protoco > **dailyUniqueReceivers**: `string` -Defined in: [graphql/types.ts:102](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L102) +Defined in: [graphql/types.ts:102](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L102) *** @@ -136,7 +136,7 @@ Defined in: [graphql/types.ts:102](https://github.com/humanprotocol/human-protoc > **dailyUniqueSenders**: `string` -Defined in: [graphql/types.ts:101](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L101) +Defined in: [graphql/types.ts:101](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L101) *** @@ -144,7 +144,7 @@ Defined in: [graphql/types.ts:101](https://github.com/humanprotocol/human-protoc > **dailyWorkerCount**: `string` -Defined in: [graphql/types.ts:96](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L96) +Defined in: [graphql/types.ts:96](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L96) *** @@ -152,4 +152,4 @@ Defined in: [graphql/types.ts:96](https://github.com/humanprotocol/human-protoco > **timestamp**: `string` -Defined in: [graphql/types.ts:85](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L85) +Defined in: [graphql/types.ts:85](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L85) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/HMTHolderData.md b/docs/sdk/typescript/graphql/types/type-aliases/HMTHolderData.md index f511b64ce3..c91399eb6e 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/HMTHolderData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/HMTHolderData.md @@ -8,7 +8,7 @@ > **HMTHolderData** = `object` -Defined in: [graphql/types.ts:112](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L112) +Defined in: [graphql/types.ts:112](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L112) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:112](https://github.com/humanprotocol/human-protoc > **address**: `string` -Defined in: [graphql/types.ts:113](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L113) +Defined in: [graphql/types.ts:113](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L113) *** @@ -24,4 +24,4 @@ Defined in: [graphql/types.ts:113](https://github.com/humanprotocol/human-protoc > **balance**: `string` -Defined in: [graphql/types.ts:114](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L114) +Defined in: [graphql/types.ts:114](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L114) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/HMTStatisticsData.md b/docs/sdk/typescript/graphql/types/type-aliases/HMTStatisticsData.md index 1840464b19..3fe9a477b8 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/HMTStatisticsData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/HMTStatisticsData.md @@ -8,7 +8,7 @@ > **HMTStatisticsData** = `object` -Defined in: [graphql/types.ts:62](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L62) +Defined in: [graphql/types.ts:62](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L62) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:62](https://github.com/humanprotocol/human-protoco > **holders**: `string` -Defined in: [graphql/types.ts:68](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L68) +Defined in: [graphql/types.ts:68](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L68) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:68](https://github.com/humanprotocol/human-protoco > **totalApprovalEventCount**: `string` -Defined in: [graphql/types.ts:65](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L65) +Defined in: [graphql/types.ts:65](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L65) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:65](https://github.com/humanprotocol/human-protoco > **totalBulkApprovalEventCount**: `string` -Defined in: [graphql/types.ts:66](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L66) +Defined in: [graphql/types.ts:66](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L66) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:66](https://github.com/humanprotocol/human-protoco > **totalBulkTransferEventCount**: `string` -Defined in: [graphql/types.ts:64](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L64) +Defined in: [graphql/types.ts:64](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L64) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:64](https://github.com/humanprotocol/human-protoco > **totalTransferEventCount**: `string` -Defined in: [graphql/types.ts:63](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L63) +Defined in: [graphql/types.ts:63](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L63) *** @@ -56,4 +56,4 @@ Defined in: [graphql/types.ts:63](https://github.com/humanprotocol/human-protoco > **totalValueTransfered**: `string` -Defined in: [graphql/types.ts:67](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L67) +Defined in: [graphql/types.ts:67](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L67) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/InternalTransactionData.md b/docs/sdk/typescript/graphql/types/type-aliases/InternalTransactionData.md index 875e0e6819..ba5c11d9d9 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/InternalTransactionData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/InternalTransactionData.md @@ -8,7 +8,7 @@ > **InternalTransactionData** = `object` -Defined in: [graphql/types.ts:37](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L37) +Defined in: [graphql/types.ts:37](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L37) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:37](https://github.com/humanprotocol/human-protoco > **escrow**: `string` \| `null` -Defined in: [graphql/types.ts:43](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L43) +Defined in: [graphql/types.ts:43](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L43) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:43](https://github.com/humanprotocol/human-protoco > **from**: `string` -Defined in: [graphql/types.ts:38](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L38) +Defined in: [graphql/types.ts:38](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L38) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:38](https://github.com/humanprotocol/human-protoco > **id**: `string` \| `null` -Defined in: [graphql/types.ts:45](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L45) +Defined in: [graphql/types.ts:45](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L45) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:45](https://github.com/humanprotocol/human-protoco > **method**: `string` -Defined in: [graphql/types.ts:41](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L41) +Defined in: [graphql/types.ts:41](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L41) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:41](https://github.com/humanprotocol/human-protoco > **receiver**: `string` \| `null` -Defined in: [graphql/types.ts:42](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L42) +Defined in: [graphql/types.ts:42](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L42) *** @@ -56,7 +56,7 @@ Defined in: [graphql/types.ts:42](https://github.com/humanprotocol/human-protoco > **to**: `string` -Defined in: [graphql/types.ts:39](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L39) +Defined in: [graphql/types.ts:39](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L39) *** @@ -64,7 +64,7 @@ Defined in: [graphql/types.ts:39](https://github.com/humanprotocol/human-protoco > **token**: `string` \| `null` -Defined in: [graphql/types.ts:44](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L44) +Defined in: [graphql/types.ts:44](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L44) *** @@ -72,4 +72,4 @@ Defined in: [graphql/types.ts:44](https://github.com/humanprotocol/human-protoco > **value**: `string` -Defined in: [graphql/types.ts:40](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L40) +Defined in: [graphql/types.ts:40](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L40) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/KVStoreData.md b/docs/sdk/typescript/graphql/types/type-aliases/KVStoreData.md index 5319d67ffd..c9f44939aa 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/KVStoreData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/KVStoreData.md @@ -8,7 +8,7 @@ > **KVStoreData** = `object` -Defined in: [graphql/types.ts:123](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L123) +Defined in: [graphql/types.ts:123](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L123) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:123](https://github.com/humanprotocol/human-protoc > **address**: `string` -Defined in: [graphql/types.ts:125](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L125) +Defined in: [graphql/types.ts:125](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L125) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:125](https://github.com/humanprotocol/human-protoc > **block**: `string` -Defined in: [graphql/types.ts:129](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L129) +Defined in: [graphql/types.ts:129](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L129) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:129](https://github.com/humanprotocol/human-protoc > **id**: `string` -Defined in: [graphql/types.ts:124](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L124) +Defined in: [graphql/types.ts:124](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L124) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:124](https://github.com/humanprotocol/human-protoc > **key**: `string` -Defined in: [graphql/types.ts:126](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L126) +Defined in: [graphql/types.ts:126](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L126) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:126](https://github.com/humanprotocol/human-protoc > **timestamp**: `Date` -Defined in: [graphql/types.ts:128](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L128) +Defined in: [graphql/types.ts:128](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L128) *** @@ -56,4 +56,4 @@ Defined in: [graphql/types.ts:128](https://github.com/humanprotocol/human-protoc > **value**: `string` -Defined in: [graphql/types.ts:127](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L127) +Defined in: [graphql/types.ts:127](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L127) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/PayoutData.md b/docs/sdk/typescript/graphql/types/type-aliases/PayoutData.md index 566111dec8..59706d5da3 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/PayoutData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/PayoutData.md @@ -8,7 +8,7 @@ > **PayoutData** = `object` -Defined in: [graphql/types.ts:174](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L174) +Defined in: [graphql/types.ts:174](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L174) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:174](https://github.com/humanprotocol/human-protoc > **amount**: `string` -Defined in: [graphql/types.ts:178](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L178) +Defined in: [graphql/types.ts:178](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L178) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:178](https://github.com/humanprotocol/human-protoc > **createdAt**: `string` -Defined in: [graphql/types.ts:179](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L179) +Defined in: [graphql/types.ts:179](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L179) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:179](https://github.com/humanprotocol/human-protoc > **escrowAddress**: `string` -Defined in: [graphql/types.ts:176](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L176) +Defined in: [graphql/types.ts:176](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L176) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:176](https://github.com/humanprotocol/human-protoc > **id**: `string` -Defined in: [graphql/types.ts:175](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L175) +Defined in: [graphql/types.ts:175](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L175) *** @@ -48,4 +48,4 @@ Defined in: [graphql/types.ts:175](https://github.com/humanprotocol/human-protoc > **recipient**: `string` -Defined in: [graphql/types.ts:177](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L177) +Defined in: [graphql/types.ts:177](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L177) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/RewardAddedEventData.md b/docs/sdk/typescript/graphql/types/type-aliases/RewardAddedEventData.md index 287b724a8a..b2e1c660a5 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/RewardAddedEventData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/RewardAddedEventData.md @@ -8,7 +8,7 @@ > **RewardAddedEventData** = `object` -Defined in: [graphql/types.ts:105](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L105) +Defined in: [graphql/types.ts:105](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L105) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:105](https://github.com/humanprotocol/human-protoc > **amount**: `string` -Defined in: [graphql/types.ts:109](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L109) +Defined in: [graphql/types.ts:109](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L109) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:109](https://github.com/humanprotocol/human-protoc > **escrowAddress**: `string` -Defined in: [graphql/types.ts:106](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L106) +Defined in: [graphql/types.ts:106](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L106) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:106](https://github.com/humanprotocol/human-protoc > **slasher**: `string` -Defined in: [graphql/types.ts:108](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L108) +Defined in: [graphql/types.ts:108](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L108) *** @@ -40,4 +40,4 @@ Defined in: [graphql/types.ts:108](https://github.com/humanprotocol/human-protoc > **staker**: `string` -Defined in: [graphql/types.ts:107](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L107) +Defined in: [graphql/types.ts:107](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L107) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/StakerData.md b/docs/sdk/typescript/graphql/types/type-aliases/StakerData.md index c2dc41fd43..bd2ff925a8 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/StakerData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/StakerData.md @@ -8,7 +8,7 @@ > **StakerData** = `object` -Defined in: [graphql/types.ts:132](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L132) +Defined in: [graphql/types.ts:132](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L132) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:132](https://github.com/humanprotocol/human-protoc > **address**: `string` -Defined in: [graphql/types.ts:134](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L134) +Defined in: [graphql/types.ts:134](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L134) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:134](https://github.com/humanprotocol/human-protoc > **id**: `string` -Defined in: [graphql/types.ts:133](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L133) +Defined in: [graphql/types.ts:133](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L133) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:133](https://github.com/humanprotocol/human-protoc > **lastDepositTimestamp**: `string` -Defined in: [graphql/types.ts:140](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L140) +Defined in: [graphql/types.ts:140](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L140) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:140](https://github.com/humanprotocol/human-protoc > **lockedAmount**: `string` -Defined in: [graphql/types.ts:136](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L136) +Defined in: [graphql/types.ts:136](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L136) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:136](https://github.com/humanprotocol/human-protoc > **lockedUntilTimestamp**: `string` -Defined in: [graphql/types.ts:139](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L139) +Defined in: [graphql/types.ts:139](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L139) *** @@ -56,7 +56,7 @@ Defined in: [graphql/types.ts:139](https://github.com/humanprotocol/human-protoc > **slashedAmount**: `string` -Defined in: [graphql/types.ts:138](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L138) +Defined in: [graphql/types.ts:138](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L138) *** @@ -64,7 +64,7 @@ Defined in: [graphql/types.ts:138](https://github.com/humanprotocol/human-protoc > **stakedAmount**: `string` -Defined in: [graphql/types.ts:135](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L135) +Defined in: [graphql/types.ts:135](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L135) *** @@ -72,4 +72,4 @@ Defined in: [graphql/types.ts:135](https://github.com/humanprotocol/human-protoc > **withdrawnAmount**: `string` -Defined in: [graphql/types.ts:137](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L137) +Defined in: [graphql/types.ts:137](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L137) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/StatusEvent.md b/docs/sdk/typescript/graphql/types/type-aliases/StatusEvent.md index 9a86d3081b..3548911365 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/StatusEvent.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/StatusEvent.md @@ -8,7 +8,7 @@ > **StatusEvent** = `object` -Defined in: [graphql/types.ts:117](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L117) +Defined in: [graphql/types.ts:117](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L117) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:117](https://github.com/humanprotocol/human-protoc > **escrowAddress**: `string` -Defined in: [graphql/types.ts:119](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L119) +Defined in: [graphql/types.ts:119](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L119) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:119](https://github.com/humanprotocol/human-protoc > **status**: `string` -Defined in: [graphql/types.ts:120](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L120) +Defined in: [graphql/types.ts:120](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L120) *** @@ -32,4 +32,4 @@ Defined in: [graphql/types.ts:120](https://github.com/humanprotocol/human-protoc > **timestamp**: `string` -Defined in: [graphql/types.ts:118](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L118) +Defined in: [graphql/types.ts:118](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L118) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/TransactionData.md b/docs/sdk/typescript/graphql/types/type-aliases/TransactionData.md index 85ac5eacd5..5977b6f575 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/TransactionData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/TransactionData.md @@ -8,7 +8,7 @@ > **TransactionData** = `object` -Defined in: [graphql/types.ts:48](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L48) +Defined in: [graphql/types.ts:48](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L48) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:48](https://github.com/humanprotocol/human-protoco > **block**: `string` -Defined in: [graphql/types.ts:49](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L49) +Defined in: [graphql/types.ts:49](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L49) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:49](https://github.com/humanprotocol/human-protoco > **escrow**: `string` \| `null` -Defined in: [graphql/types.ts:57](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L57) +Defined in: [graphql/types.ts:57](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L57) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:57](https://github.com/humanprotocol/human-protoco > **from**: `string` -Defined in: [graphql/types.ts:51](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L51) +Defined in: [graphql/types.ts:51](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L51) *** @@ -40,7 +40,7 @@ Defined in: [graphql/types.ts:51](https://github.com/humanprotocol/human-protoco > **internalTransactions**: [`InternalTransactionData`](InternalTransactionData.md)[] -Defined in: [graphql/types.ts:59](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L59) +Defined in: [graphql/types.ts:59](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L59) *** @@ -48,7 +48,7 @@ Defined in: [graphql/types.ts:59](https://github.com/humanprotocol/human-protoco > **method**: `string` -Defined in: [graphql/types.ts:55](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L55) +Defined in: [graphql/types.ts:55](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L55) *** @@ -56,7 +56,7 @@ Defined in: [graphql/types.ts:55](https://github.com/humanprotocol/human-protoco > **receiver**: `string` \| `null` -Defined in: [graphql/types.ts:56](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L56) +Defined in: [graphql/types.ts:56](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L56) *** @@ -64,7 +64,7 @@ Defined in: [graphql/types.ts:56](https://github.com/humanprotocol/human-protoco > **timestamp**: `string` -Defined in: [graphql/types.ts:53](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L53) +Defined in: [graphql/types.ts:53](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L53) *** @@ -72,7 +72,7 @@ Defined in: [graphql/types.ts:53](https://github.com/humanprotocol/human-protoco > **to**: `string` -Defined in: [graphql/types.ts:52](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L52) +Defined in: [graphql/types.ts:52](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L52) *** @@ -80,7 +80,7 @@ Defined in: [graphql/types.ts:52](https://github.com/humanprotocol/human-protoco > **token**: `string` \| `null` -Defined in: [graphql/types.ts:58](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L58) +Defined in: [graphql/types.ts:58](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L58) *** @@ -88,7 +88,7 @@ Defined in: [graphql/types.ts:58](https://github.com/humanprotocol/human-protoco > **txHash**: `string` -Defined in: [graphql/types.ts:50](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L50) +Defined in: [graphql/types.ts:50](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L50) *** @@ -96,4 +96,4 @@ Defined in: [graphql/types.ts:50](https://github.com/humanprotocol/human-protoco > **value**: `string` -Defined in: [graphql/types.ts:54](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L54) +Defined in: [graphql/types.ts:54](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L54) diff --git a/docs/sdk/typescript/graphql/types/type-aliases/WorkerData.md b/docs/sdk/typescript/graphql/types/type-aliases/WorkerData.md index 1eca0e3e1a..6ecc58e9a0 100644 --- a/docs/sdk/typescript/graphql/types/type-aliases/WorkerData.md +++ b/docs/sdk/typescript/graphql/types/type-aliases/WorkerData.md @@ -8,7 +8,7 @@ > **WorkerData** = `object` -Defined in: [graphql/types.ts:30](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L30) +Defined in: [graphql/types.ts:30](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L30) ## Properties @@ -16,7 +16,7 @@ Defined in: [graphql/types.ts:30](https://github.com/humanprotocol/human-protoco > **address**: `string` -Defined in: [graphql/types.ts:32](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L32) +Defined in: [graphql/types.ts:32](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L32) *** @@ -24,7 +24,7 @@ Defined in: [graphql/types.ts:32](https://github.com/humanprotocol/human-protoco > **id**: `string` -Defined in: [graphql/types.ts:31](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L31) +Defined in: [graphql/types.ts:31](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L31) *** @@ -32,7 +32,7 @@ Defined in: [graphql/types.ts:31](https://github.com/humanprotocol/human-protoco > **payoutCount**: `string` -Defined in: [graphql/types.ts:34](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L34) +Defined in: [graphql/types.ts:34](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L34) *** @@ -40,4 +40,4 @@ Defined in: [graphql/types.ts:34](https://github.com/humanprotocol/human-protoco > **totalHMTAmountReceived**: `string` -Defined in: [graphql/types.ts:33](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L33) +Defined in: [graphql/types.ts:33](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts#L33) diff --git a/docs/sdk/typescript/interfaces/README.md b/docs/sdk/typescript/interfaces/README.md index 3d3934d7e2..8c3ffb229b 100644 --- a/docs/sdk/typescript/interfaces/README.md +++ b/docs/sdk/typescript/interfaces/README.md @@ -44,3 +44,4 @@ - [IWorkersFilter](interfaces/IWorkersFilter.md) - [IWorkerStatistics](interfaces/IWorkerStatistics.md) - [StakerInfo](interfaces/StakerInfo.md) +- [SubgraphOptions](interfaces/SubgraphOptions.md) diff --git a/docs/sdk/typescript/interfaces/interfaces/ICancellationRefund.md b/docs/sdk/typescript/interfaces/interfaces/ICancellationRefund.md index e042209610..b2d5d3351e 100644 --- a/docs/sdk/typescript/interfaces/interfaces/ICancellationRefund.md +++ b/docs/sdk/typescript/interfaces/interfaces/ICancellationRefund.md @@ -6,7 +6,7 @@ # Interface: ICancellationRefund -Defined in: [interfaces.ts:292](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L292) +Defined in: [interfaces.ts:292](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L292) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:292](https://github.com/humanprotocol/human-protocol/ > **amount**: `bigint` -Defined in: [interfaces.ts:296](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L296) +Defined in: [interfaces.ts:296](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L296) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:296](https://github.com/humanprotocol/human-protocol/ > **block**: `number` -Defined in: [interfaces.ts:297](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L297) +Defined in: [interfaces.ts:297](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L297) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:297](https://github.com/humanprotocol/human-protocol/ > **escrowAddress**: `string` -Defined in: [interfaces.ts:294](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L294) +Defined in: [interfaces.ts:294](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L294) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:294](https://github.com/humanprotocol/human-protocol/ > **id**: `string` -Defined in: [interfaces.ts:293](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L293) +Defined in: [interfaces.ts:293](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L293) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:293](https://github.com/humanprotocol/human-protocol/ > **receiver**: `string` -Defined in: [interfaces.ts:295](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L295) +Defined in: [interfaces.ts:295](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L295) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:295](https://github.com/humanprotocol/human-protocol/ > **timestamp**: `number` -Defined in: [interfaces.ts:298](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L298) +Defined in: [interfaces.ts:298](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L298) *** @@ -62,4 +62,4 @@ Defined in: [interfaces.ts:298](https://github.com/humanprotocol/human-protocol/ > **txHash**: `string` -Defined in: [interfaces.ts:299](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L299) +Defined in: [interfaces.ts:299](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L299) diff --git a/docs/sdk/typescript/interfaces/interfaces/ICancellationRefundFilter.md b/docs/sdk/typescript/interfaces/interfaces/ICancellationRefundFilter.md index cb58c8298c..e4cc99c668 100644 --- a/docs/sdk/typescript/interfaces/interfaces/ICancellationRefundFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/ICancellationRefundFilter.md @@ -6,7 +6,7 @@ # Interface: ICancellationRefundFilter -Defined in: [interfaces.ts:224](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L224) +Defined in: [interfaces.ts:224](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L224) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:224](https://github.com/humanprotocol/human-protocol/ > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:225](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L225) +Defined in: [interfaces.ts:225](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L225) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:225](https://github.com/humanprotocol/human-protocol/ > `optional` **escrowAddress**: `string` -Defined in: [interfaces.ts:226](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L226) +Defined in: [interfaces.ts:226](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L226) *** @@ -34,7 +34,7 @@ Defined in: [interfaces.ts:226](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **from**: `Date` -Defined in: [interfaces.ts:228](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L228) +Defined in: [interfaces.ts:228](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L228) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:228](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -66,7 +66,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **receiver**: `string` -Defined in: [interfaces.ts:227](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L227) +Defined in: [interfaces.ts:227](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L227) *** @@ -74,7 +74,7 @@ Defined in: [interfaces.ts:227](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from @@ -86,4 +86,4 @@ Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/ > `optional` **to**: `Date` -Defined in: [interfaces.ts:229](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L229) +Defined in: [interfaces.ts:229](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L229) diff --git a/docs/sdk/typescript/interfaces/interfaces/IDailyEscrow.md b/docs/sdk/typescript/interfaces/interfaces/IDailyEscrow.md index 7f82a8a956..55a4afcd05 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IDailyEscrow.md +++ b/docs/sdk/typescript/interfaces/interfaces/IDailyEscrow.md @@ -6,7 +6,7 @@ # Interface: IDailyEscrow -Defined in: [interfaces.ts:232](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L232) +Defined in: [interfaces.ts:232](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L232) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:232](https://github.com/humanprotocol/human-protocol/ > **escrowsCancelled**: `number` -Defined in: [interfaces.ts:238](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L238) +Defined in: [interfaces.ts:238](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L238) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:238](https://github.com/humanprotocol/human-protocol/ > **escrowsPaid**: `number` -Defined in: [interfaces.ts:237](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L237) +Defined in: [interfaces.ts:237](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L237) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:237](https://github.com/humanprotocol/human-protocol/ > **escrowsPending**: `number` -Defined in: [interfaces.ts:235](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L235) +Defined in: [interfaces.ts:235](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L235) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:235](https://github.com/humanprotocol/human-protocol/ > **escrowsSolved**: `number` -Defined in: [interfaces.ts:236](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L236) +Defined in: [interfaces.ts:236](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L236) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:236](https://github.com/humanprotocol/human-protocol/ > **escrowsTotal**: `number` -Defined in: [interfaces.ts:234](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L234) +Defined in: [interfaces.ts:234](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L234) *** @@ -54,4 +54,4 @@ Defined in: [interfaces.ts:234](https://github.com/humanprotocol/human-protocol/ > **timestamp**: `number` -Defined in: [interfaces.ts:233](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L233) +Defined in: [interfaces.ts:233](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L233) diff --git a/docs/sdk/typescript/interfaces/interfaces/IDailyHMT.md b/docs/sdk/typescript/interfaces/interfaces/IDailyHMT.md index 3a4e468d09..9822fb2712 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IDailyHMT.md +++ b/docs/sdk/typescript/interfaces/interfaces/IDailyHMT.md @@ -6,7 +6,7 @@ # Interface: IDailyHMT -Defined in: [interfaces.ts:277](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L277) +Defined in: [interfaces.ts:277](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L277) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:277](https://github.com/humanprotocol/human-protocol/ > **dailyUniqueReceivers**: `number` -Defined in: [interfaces.ts:282](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L282) +Defined in: [interfaces.ts:282](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L282) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:282](https://github.com/humanprotocol/human-protocol/ > **dailyUniqueSenders**: `number` -Defined in: [interfaces.ts:281](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L281) +Defined in: [interfaces.ts:281](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L281) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:281](https://github.com/humanprotocol/human-protocol/ > **timestamp**: `number` -Defined in: [interfaces.ts:278](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L278) +Defined in: [interfaces.ts:278](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L278) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:278](https://github.com/humanprotocol/human-protocol/ > **totalTransactionAmount**: `bigint` -Defined in: [interfaces.ts:279](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L279) +Defined in: [interfaces.ts:279](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L279) *** @@ -46,4 +46,4 @@ Defined in: [interfaces.ts:279](https://github.com/humanprotocol/human-protocol/ > **totalTransactionCount**: `number` -Defined in: [interfaces.ts:280](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L280) +Defined in: [interfaces.ts:280](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L280) diff --git a/docs/sdk/typescript/interfaces/interfaces/IDailyPayment.md b/docs/sdk/typescript/interfaces/interfaces/IDailyPayment.md index 4569acc3b7..940fb1c6fa 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IDailyPayment.md +++ b/docs/sdk/typescript/interfaces/interfaces/IDailyPayment.md @@ -6,7 +6,7 @@ # Interface: IDailyPayment -Defined in: [interfaces.ts:255](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L255) +Defined in: [interfaces.ts:255](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L255) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:255](https://github.com/humanprotocol/human-protocol/ > **averageAmountPerWorker**: `bigint` -Defined in: [interfaces.ts:259](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L259) +Defined in: [interfaces.ts:259](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L259) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:259](https://github.com/humanprotocol/human-protocol/ > **timestamp**: `number` -Defined in: [interfaces.ts:256](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L256) +Defined in: [interfaces.ts:256](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L256) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:256](https://github.com/humanprotocol/human-protocol/ > **totalAmountPaid**: `bigint` -Defined in: [interfaces.ts:257](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L257) +Defined in: [interfaces.ts:257](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L257) *** @@ -38,4 +38,4 @@ Defined in: [interfaces.ts:257](https://github.com/humanprotocol/human-protocol/ > **totalCount**: `number` -Defined in: [interfaces.ts:258](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L258) +Defined in: [interfaces.ts:258](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L258) diff --git a/docs/sdk/typescript/interfaces/interfaces/IDailyWorker.md b/docs/sdk/typescript/interfaces/interfaces/IDailyWorker.md index 3ea26d5246..240090aea0 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IDailyWorker.md +++ b/docs/sdk/typescript/interfaces/interfaces/IDailyWorker.md @@ -6,7 +6,7 @@ # Interface: IDailyWorker -Defined in: [interfaces.ts:246](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L246) +Defined in: [interfaces.ts:246](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L246) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:246](https://github.com/humanprotocol/human-protocol/ > **activeWorkers**: `number` -Defined in: [interfaces.ts:248](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L248) +Defined in: [interfaces.ts:248](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L248) *** @@ -22,4 +22,4 @@ Defined in: [interfaces.ts:248](https://github.com/humanprotocol/human-protocol/ > **timestamp**: `number` -Defined in: [interfaces.ts:247](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L247) +Defined in: [interfaces.ts:247](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L247) diff --git a/docs/sdk/typescript/interfaces/interfaces/IEscrow.md b/docs/sdk/typescript/interfaces/interfaces/IEscrow.md index bbbe7aa882..751be00b4d 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IEscrow.md +++ b/docs/sdk/typescript/interfaces/interfaces/IEscrow.md @@ -6,7 +6,7 @@ # Interface: IEscrow -Defined in: [interfaces.ts:46](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L46) +Defined in: [interfaces.ts:46](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L46) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:46](https://github.com/humanprotocol/human-protocol/b > **address**: `string` -Defined in: [interfaces.ts:48](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L48) +Defined in: [interfaces.ts:48](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L48) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:48](https://github.com/humanprotocol/human-protocol/b > **amountPaid**: `bigint` -Defined in: [interfaces.ts:49](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L49) +Defined in: [interfaces.ts:49](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L49) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:49](https://github.com/humanprotocol/human-protocol/b > **balance**: `bigint` -Defined in: [interfaces.ts:50](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L50) +Defined in: [interfaces.ts:50](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L50) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:50](https://github.com/humanprotocol/human-protocol/b > **chainId**: `number` -Defined in: [interfaces.ts:71](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L71) +Defined in: [interfaces.ts:71](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L71) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:71](https://github.com/humanprotocol/human-protocol/b > **count**: `number` -Defined in: [interfaces.ts:51](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L51) +Defined in: [interfaces.ts:51](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L51) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:51](https://github.com/humanprotocol/human-protocol/b > **createdAt**: `number` -Defined in: [interfaces.ts:70](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L70) +Defined in: [interfaces.ts:70](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L70) *** @@ -62,7 +62,7 @@ Defined in: [interfaces.ts:70](https://github.com/humanprotocol/human-protocol/b > **exchangeOracle**: `string` \| `null` -Defined in: [interfaces.ts:63](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L63) +Defined in: [interfaces.ts:63](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L63) *** @@ -70,7 +70,7 @@ Defined in: [interfaces.ts:63](https://github.com/humanprotocol/human-protocol/b > **exchangeOracleFee**: `number` \| `null` -Defined in: [interfaces.ts:66](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L66) +Defined in: [interfaces.ts:66](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L66) *** @@ -78,7 +78,7 @@ Defined in: [interfaces.ts:66](https://github.com/humanprotocol/human-protocol/b > **factoryAddress**: `string` -Defined in: [interfaces.ts:52](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L52) +Defined in: [interfaces.ts:52](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L52) *** @@ -86,7 +86,7 @@ Defined in: [interfaces.ts:52](https://github.com/humanprotocol/human-protocol/b > **finalResultsHash**: `string` \| `null` -Defined in: [interfaces.ts:54](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L54) +Defined in: [interfaces.ts:54](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L54) *** @@ -94,7 +94,7 @@ Defined in: [interfaces.ts:54](https://github.com/humanprotocol/human-protocol/b > **finalResultsUrl**: `string` \| `null` -Defined in: [interfaces.ts:53](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L53) +Defined in: [interfaces.ts:53](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L53) *** @@ -102,7 +102,7 @@ Defined in: [interfaces.ts:53](https://github.com/humanprotocol/human-protocol/b > **id**: `string` -Defined in: [interfaces.ts:47](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L47) +Defined in: [interfaces.ts:47](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L47) *** @@ -110,7 +110,7 @@ Defined in: [interfaces.ts:47](https://github.com/humanprotocol/human-protocol/b > **intermediateResultsHash**: `string` \| `null` -Defined in: [interfaces.ts:56](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L56) +Defined in: [interfaces.ts:56](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L56) *** @@ -118,7 +118,7 @@ Defined in: [interfaces.ts:56](https://github.com/humanprotocol/human-protocol/b > **intermediateResultsUrl**: `string` \| `null` -Defined in: [interfaces.ts:55](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L55) +Defined in: [interfaces.ts:55](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L55) *** @@ -126,7 +126,7 @@ Defined in: [interfaces.ts:55](https://github.com/humanprotocol/human-protocol/b > **jobRequesterId**: `string` \| `null` -Defined in: [interfaces.ts:58](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L58) +Defined in: [interfaces.ts:58](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L58) *** @@ -134,7 +134,7 @@ Defined in: [interfaces.ts:58](https://github.com/humanprotocol/human-protocol/b > **launcher**: `string` -Defined in: [interfaces.ts:57](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L57) +Defined in: [interfaces.ts:57](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L57) *** @@ -142,7 +142,7 @@ Defined in: [interfaces.ts:57](https://github.com/humanprotocol/human-protocol/b > **manifest**: `string` \| `null` -Defined in: [interfaces.ts:60](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L60) +Defined in: [interfaces.ts:60](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L60) *** @@ -150,7 +150,7 @@ Defined in: [interfaces.ts:60](https://github.com/humanprotocol/human-protocol/b > **manifestHash**: `string` \| `null` -Defined in: [interfaces.ts:59](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L59) +Defined in: [interfaces.ts:59](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L59) *** @@ -158,7 +158,7 @@ Defined in: [interfaces.ts:59](https://github.com/humanprotocol/human-protocol/b > **recordingOracle**: `string` \| `null` -Defined in: [interfaces.ts:61](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L61) +Defined in: [interfaces.ts:61](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L61) *** @@ -166,7 +166,7 @@ Defined in: [interfaces.ts:61](https://github.com/humanprotocol/human-protocol/b > **recordingOracleFee**: `number` \| `null` -Defined in: [interfaces.ts:64](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L64) +Defined in: [interfaces.ts:64](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L64) *** @@ -174,7 +174,7 @@ Defined in: [interfaces.ts:64](https://github.com/humanprotocol/human-protocol/b > **reputationOracle**: `string` \| `null` -Defined in: [interfaces.ts:62](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L62) +Defined in: [interfaces.ts:62](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L62) *** @@ -182,7 +182,7 @@ Defined in: [interfaces.ts:62](https://github.com/humanprotocol/human-protocol/b > **reputationOracleFee**: `number` \| `null` -Defined in: [interfaces.ts:65](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L65) +Defined in: [interfaces.ts:65](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L65) *** @@ -190,7 +190,7 @@ Defined in: [interfaces.ts:65](https://github.com/humanprotocol/human-protocol/b > **status**: `string` -Defined in: [interfaces.ts:67](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L67) +Defined in: [interfaces.ts:67](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L67) *** @@ -198,7 +198,7 @@ Defined in: [interfaces.ts:67](https://github.com/humanprotocol/human-protocol/b > **token**: `string` -Defined in: [interfaces.ts:68](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L68) +Defined in: [interfaces.ts:68](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L68) *** @@ -206,4 +206,4 @@ Defined in: [interfaces.ts:68](https://github.com/humanprotocol/human-protocol/b > **totalFundedAmount**: `bigint` -Defined in: [interfaces.ts:69](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L69) +Defined in: [interfaces.ts:69](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L69) diff --git a/docs/sdk/typescript/interfaces/interfaces/IEscrowConfig.md b/docs/sdk/typescript/interfaces/interfaces/IEscrowConfig.md index 90150c5871..195135a8ef 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IEscrowConfig.md +++ b/docs/sdk/typescript/interfaces/interfaces/IEscrowConfig.md @@ -6,7 +6,7 @@ # Interface: IEscrowConfig -Defined in: [interfaces.ts:86](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L86) +Defined in: [interfaces.ts:86](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L86) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:86](https://github.com/humanprotocol/human-protocol/b > **exchangeOracle**: `string` -Defined in: [interfaces.ts:89](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L89) +Defined in: [interfaces.ts:89](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L89) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:89](https://github.com/humanprotocol/human-protocol/b > **exchangeOracleFee**: `bigint` -Defined in: [interfaces.ts:92](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L92) +Defined in: [interfaces.ts:92](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L92) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:92](https://github.com/humanprotocol/human-protocol/b > **manifest**: `string` -Defined in: [interfaces.ts:93](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L93) +Defined in: [interfaces.ts:93](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L93) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:93](https://github.com/humanprotocol/human-protocol/b > **manifestHash**: `string` -Defined in: [interfaces.ts:94](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L94) +Defined in: [interfaces.ts:94](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L94) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:94](https://github.com/humanprotocol/human-protocol/b > **recordingOracle**: `string` -Defined in: [interfaces.ts:87](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L87) +Defined in: [interfaces.ts:87](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L87) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:87](https://github.com/humanprotocol/human-protocol/b > **recordingOracleFee**: `bigint` -Defined in: [interfaces.ts:90](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L90) +Defined in: [interfaces.ts:90](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L90) *** @@ -62,7 +62,7 @@ Defined in: [interfaces.ts:90](https://github.com/humanprotocol/human-protocol/b > **reputationOracle**: `string` -Defined in: [interfaces.ts:88](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L88) +Defined in: [interfaces.ts:88](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L88) *** @@ -70,4 +70,4 @@ Defined in: [interfaces.ts:88](https://github.com/humanprotocol/human-protocol/b > **reputationOracleFee**: `bigint` -Defined in: [interfaces.ts:91](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L91) +Defined in: [interfaces.ts:91](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L91) diff --git a/docs/sdk/typescript/interfaces/interfaces/IEscrowStatistics.md b/docs/sdk/typescript/interfaces/interfaces/IEscrowStatistics.md index b2669677ab..8cf72764f1 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IEscrowStatistics.md +++ b/docs/sdk/typescript/interfaces/interfaces/IEscrowStatistics.md @@ -6,7 +6,7 @@ # Interface: IEscrowStatistics -Defined in: [interfaces.ts:241](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L241) +Defined in: [interfaces.ts:241](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L241) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:241](https://github.com/humanprotocol/human-protocol/ > **dailyEscrowsData**: [`IDailyEscrow`](IDailyEscrow.md)[] -Defined in: [interfaces.ts:243](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L243) +Defined in: [interfaces.ts:243](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L243) *** @@ -22,4 +22,4 @@ Defined in: [interfaces.ts:243](https://github.com/humanprotocol/human-protocol/ > **totalEscrows**: `number` -Defined in: [interfaces.ts:242](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L242) +Defined in: [interfaces.ts:242](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L242) diff --git a/docs/sdk/typescript/interfaces/interfaces/IEscrowWithdraw.md b/docs/sdk/typescript/interfaces/interfaces/IEscrowWithdraw.md index 1fb5938306..b30d119514 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IEscrowWithdraw.md +++ b/docs/sdk/typescript/interfaces/interfaces/IEscrowWithdraw.md @@ -6,7 +6,7 @@ # Interface: IEscrowWithdraw -Defined in: [interfaces.ts:310](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L310) +Defined in: [interfaces.ts:310](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L310) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:310](https://github.com/humanprotocol/human-protocol/ > **tokenAddress**: `string` -Defined in: [interfaces.ts:312](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L312) +Defined in: [interfaces.ts:312](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L312) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:312](https://github.com/humanprotocol/human-protocol/ > **txHash**: `string` -Defined in: [interfaces.ts:311](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L311) +Defined in: [interfaces.ts:311](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L311) *** @@ -30,4 +30,4 @@ Defined in: [interfaces.ts:311](https://github.com/humanprotocol/human-protocol/ > **withdrawnAmount**: `bigint` -Defined in: [interfaces.ts:313](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L313) +Defined in: [interfaces.ts:313](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L313) diff --git a/docs/sdk/typescript/interfaces/interfaces/IEscrowsFilter.md b/docs/sdk/typescript/interfaces/interfaces/IEscrowsFilter.md index 862fe1c95f..584f3b20da 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IEscrowsFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/IEscrowsFilter.md @@ -6,7 +6,7 @@ # Interface: IEscrowsFilter -Defined in: [interfaces.ts:74](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L74) +Defined in: [interfaces.ts:74](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L74) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:74](https://github.com/humanprotocol/human-protocol/b > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:83](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L83) +Defined in: [interfaces.ts:83](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L83) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:83](https://github.com/humanprotocol/human-protocol/b > `optional` **exchangeOracle**: `string` -Defined in: [interfaces.ts:78](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L78) +Defined in: [interfaces.ts:78](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L78) *** @@ -34,7 +34,7 @@ Defined in: [interfaces.ts:78](https://github.com/humanprotocol/human-protocol/b > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **from**: `Date` -Defined in: [interfaces.ts:81](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L81) +Defined in: [interfaces.ts:81](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L81) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:81](https://github.com/humanprotocol/human-protocol/b > `optional` **jobRequesterId**: `string` -Defined in: [interfaces.ts:79](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L79) +Defined in: [interfaces.ts:79](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L79) *** @@ -62,7 +62,7 @@ Defined in: [interfaces.ts:79](https://github.com/humanprotocol/human-protocol/b > `optional` **launcher**: `string` -Defined in: [interfaces.ts:75](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L75) +Defined in: [interfaces.ts:75](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L75) *** @@ -70,7 +70,7 @@ Defined in: [interfaces.ts:75](https://github.com/humanprotocol/human-protocol/b > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -82,7 +82,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **recordingOracle**: `string` -Defined in: [interfaces.ts:77](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L77) +Defined in: [interfaces.ts:77](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L77) *** @@ -90,7 +90,7 @@ Defined in: [interfaces.ts:77](https://github.com/humanprotocol/human-protocol/b > `optional` **reputationOracle**: `string` -Defined in: [interfaces.ts:76](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L76) +Defined in: [interfaces.ts:76](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L76) *** @@ -98,7 +98,7 @@ Defined in: [interfaces.ts:76](https://github.com/humanprotocol/human-protocol/b > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from @@ -110,7 +110,7 @@ Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/ > `optional` **status**: [`EscrowStatus`](../../types/enumerations/EscrowStatus.md) \| [`EscrowStatus`](../../types/enumerations/EscrowStatus.md)[] -Defined in: [interfaces.ts:80](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L80) +Defined in: [interfaces.ts:80](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L80) *** @@ -118,4 +118,4 @@ Defined in: [interfaces.ts:80](https://github.com/humanprotocol/human-protocol/b > `optional` **to**: `Date` -Defined in: [interfaces.ts:82](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L82) +Defined in: [interfaces.ts:82](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L82) diff --git a/docs/sdk/typescript/interfaces/interfaces/IHMTHolder.md b/docs/sdk/typescript/interfaces/interfaces/IHMTHolder.md index bc9bf1ae09..766e505f02 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IHMTHolder.md +++ b/docs/sdk/typescript/interfaces/interfaces/IHMTHolder.md @@ -6,7 +6,7 @@ # Interface: IHMTHolder -Defined in: [interfaces.ts:272](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L272) +Defined in: [interfaces.ts:272](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L272) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:272](https://github.com/humanprotocol/human-protocol/ > **address**: `string` -Defined in: [interfaces.ts:273](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L273) +Defined in: [interfaces.ts:273](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L273) *** @@ -22,4 +22,4 @@ Defined in: [interfaces.ts:273](https://github.com/humanprotocol/human-protocol/ > **balance**: `bigint` -Defined in: [interfaces.ts:274](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L274) +Defined in: [interfaces.ts:274](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L274) diff --git a/docs/sdk/typescript/interfaces/interfaces/IHMTHoldersParams.md b/docs/sdk/typescript/interfaces/interfaces/IHMTHoldersParams.md index e4452de58a..963e907ee5 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IHMTHoldersParams.md +++ b/docs/sdk/typescript/interfaces/interfaces/IHMTHoldersParams.md @@ -6,7 +6,7 @@ # Interface: IHMTHoldersParams -Defined in: [interfaces.ts:109](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L109) +Defined in: [interfaces.ts:109](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L109) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:109](https://github.com/humanprotocol/human-protocol/ > `optional` **address**: `string` -Defined in: [interfaces.ts:110](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L110) +Defined in: [interfaces.ts:110](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L110) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:110](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -50,7 +50,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from diff --git a/docs/sdk/typescript/interfaces/interfaces/IHMTStatistics.md b/docs/sdk/typescript/interfaces/interfaces/IHMTStatistics.md index ce311a5adf..04ed19e75b 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IHMTStatistics.md +++ b/docs/sdk/typescript/interfaces/interfaces/IHMTStatistics.md @@ -6,7 +6,7 @@ # Interface: IHMTStatistics -Defined in: [interfaces.ts:266](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L266) +Defined in: [interfaces.ts:266](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L266) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:266](https://github.com/humanprotocol/human-protocol/ > **totalHolders**: `number` -Defined in: [interfaces.ts:269](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L269) +Defined in: [interfaces.ts:269](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L269) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:269](https://github.com/humanprotocol/human-protocol/ > **totalTransferAmount**: `bigint` -Defined in: [interfaces.ts:267](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L267) +Defined in: [interfaces.ts:267](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L267) *** @@ -30,4 +30,4 @@ Defined in: [interfaces.ts:267](https://github.com/humanprotocol/human-protocol/ > **totalTransferCount**: `number` -Defined in: [interfaces.ts:268](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L268) +Defined in: [interfaces.ts:268](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L268) diff --git a/docs/sdk/typescript/interfaces/interfaces/IKVStore.md b/docs/sdk/typescript/interfaces/interfaces/IKVStore.md index 46479abcb1..d43315bb6e 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IKVStore.md +++ b/docs/sdk/typescript/interfaces/interfaces/IKVStore.md @@ -6,7 +6,7 @@ # Interface: IKVStore -Defined in: [interfaces.ts:121](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L121) +Defined in: [interfaces.ts:121](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L121) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:121](https://github.com/humanprotocol/human-protocol/ > **key**: `string` -Defined in: [interfaces.ts:122](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L122) +Defined in: [interfaces.ts:122](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L122) *** @@ -22,4 +22,4 @@ Defined in: [interfaces.ts:122](https://github.com/humanprotocol/human-protocol/ > **value**: `string` -Defined in: [interfaces.ts:123](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L123) +Defined in: [interfaces.ts:123](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L123) diff --git a/docs/sdk/typescript/interfaces/interfaces/IKeyPair.md b/docs/sdk/typescript/interfaces/interfaces/IKeyPair.md index 4d02aed387..e5a76c6cbf 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IKeyPair.md +++ b/docs/sdk/typescript/interfaces/interfaces/IKeyPair.md @@ -6,7 +6,7 @@ # Interface: IKeyPair -Defined in: [interfaces.ts:97](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L97) +Defined in: [interfaces.ts:97](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L97) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:97](https://github.com/humanprotocol/human-protocol/b > **passphrase**: `string` -Defined in: [interfaces.ts:100](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L100) +Defined in: [interfaces.ts:100](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L100) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:100](https://github.com/humanprotocol/human-protocol/ > **privateKey**: `string` -Defined in: [interfaces.ts:98](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L98) +Defined in: [interfaces.ts:98](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L98) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:98](https://github.com/humanprotocol/human-protocol/b > **publicKey**: `string` -Defined in: [interfaces.ts:99](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L99) +Defined in: [interfaces.ts:99](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L99) *** @@ -38,4 +38,4 @@ Defined in: [interfaces.ts:99](https://github.com/humanprotocol/human-protocol/b > `optional` **revocationCertificate**: `string` -Defined in: [interfaces.ts:101](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L101) +Defined in: [interfaces.ts:101](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L101) diff --git a/docs/sdk/typescript/interfaces/interfaces/IOperator.md b/docs/sdk/typescript/interfaces/interfaces/IOperator.md index d5efa4b39a..2b1350f9ce 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IOperator.md +++ b/docs/sdk/typescript/interfaces/interfaces/IOperator.md @@ -6,7 +6,7 @@ # Interface: IOperator -Defined in: [interfaces.ts:9](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L9) +Defined in: [interfaces.ts:9](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L9) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:9](https://github.com/humanprotocol/human-protocol/bl > **address**: `string` -Defined in: [interfaces.ts:12](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L12) +Defined in: [interfaces.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L12) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:12](https://github.com/humanprotocol/human-protocol/b > **amountJobsProcessed**: `bigint` \| `null` -Defined in: [interfaces.ts:18](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L18) +Defined in: [interfaces.ts:18](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L18) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:18](https://github.com/humanprotocol/human-protocol/b > **category**: `string` \| `null` -Defined in: [interfaces.ts:30](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L30) +Defined in: [interfaces.ts:30](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L30) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:30](https://github.com/humanprotocol/human-protocol/b > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:11](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L11) +Defined in: [interfaces.ts:11](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L11) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:11](https://github.com/humanprotocol/human-protocol/b > **fee**: `bigint` \| `null` -Defined in: [interfaces.ts:20](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L20) +Defined in: [interfaces.ts:20](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L20) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:20](https://github.com/humanprotocol/human-protocol/b > **id**: `string` -Defined in: [interfaces.ts:10](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L10) +Defined in: [interfaces.ts:10](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L10) *** @@ -62,7 +62,7 @@ Defined in: [interfaces.ts:10](https://github.com/humanprotocol/human-protocol/b > **jobTypes**: `string`[] \| `null` -Defined in: [interfaces.ts:25](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L25) +Defined in: [interfaces.ts:25](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L25) *** @@ -70,7 +70,7 @@ Defined in: [interfaces.ts:25](https://github.com/humanprotocol/human-protocol/b > **lockedAmount**: `bigint` \| `null` -Defined in: [interfaces.ts:14](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L14) +Defined in: [interfaces.ts:14](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L14) *** @@ -78,7 +78,7 @@ Defined in: [interfaces.ts:14](https://github.com/humanprotocol/human-protocol/b > **lockedUntilTimestamp**: `number` \| `null` -Defined in: [interfaces.ts:15](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L15) +Defined in: [interfaces.ts:15](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L15) *** @@ -86,7 +86,7 @@ Defined in: [interfaces.ts:15](https://github.com/humanprotocol/human-protocol/b > **name**: `string` \| `null` -Defined in: [interfaces.ts:29](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L29) +Defined in: [interfaces.ts:29](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L29) *** @@ -94,7 +94,7 @@ Defined in: [interfaces.ts:29](https://github.com/humanprotocol/human-protocol/b > **publicKey**: `string` \| `null` -Defined in: [interfaces.ts:21](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L21) +Defined in: [interfaces.ts:21](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L21) *** @@ -102,7 +102,7 @@ Defined in: [interfaces.ts:21](https://github.com/humanprotocol/human-protocol/b > **registrationInstructions**: `string` \| `null` -Defined in: [interfaces.ts:27](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L27) +Defined in: [interfaces.ts:27](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L27) *** @@ -110,7 +110,7 @@ Defined in: [interfaces.ts:27](https://github.com/humanprotocol/human-protocol/b > **registrationNeeded**: `boolean` \| `null` -Defined in: [interfaces.ts:26](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L26) +Defined in: [interfaces.ts:26](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L26) *** @@ -118,7 +118,7 @@ Defined in: [interfaces.ts:26](https://github.com/humanprotocol/human-protocol/b > **reputationNetworks**: `string`[] -Defined in: [interfaces.ts:28](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L28) +Defined in: [interfaces.ts:28](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L28) *** @@ -126,7 +126,7 @@ Defined in: [interfaces.ts:28](https://github.com/humanprotocol/human-protocol/b > **role**: `string` \| `null` -Defined in: [interfaces.ts:19](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L19) +Defined in: [interfaces.ts:19](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L19) *** @@ -134,7 +134,7 @@ Defined in: [interfaces.ts:19](https://github.com/humanprotocol/human-protocol/b > **slashedAmount**: `bigint` \| `null` -Defined in: [interfaces.ts:17](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L17) +Defined in: [interfaces.ts:17](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L17) *** @@ -142,7 +142,7 @@ Defined in: [interfaces.ts:17](https://github.com/humanprotocol/human-protocol/b > **stakedAmount**: `bigint` \| `null` -Defined in: [interfaces.ts:13](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L13) +Defined in: [interfaces.ts:13](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L13) *** @@ -150,7 +150,7 @@ Defined in: [interfaces.ts:13](https://github.com/humanprotocol/human-protocol/b > **url**: `string` \| `null` -Defined in: [interfaces.ts:24](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L24) +Defined in: [interfaces.ts:24](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L24) *** @@ -158,7 +158,7 @@ Defined in: [interfaces.ts:24](https://github.com/humanprotocol/human-protocol/b > **webhookUrl**: `string` \| `null` -Defined in: [interfaces.ts:22](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L22) +Defined in: [interfaces.ts:22](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L22) *** @@ -166,7 +166,7 @@ Defined in: [interfaces.ts:22](https://github.com/humanprotocol/human-protocol/b > **website**: `string` \| `null` -Defined in: [interfaces.ts:23](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L23) +Defined in: [interfaces.ts:23](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L23) *** @@ -174,4 +174,4 @@ Defined in: [interfaces.ts:23](https://github.com/humanprotocol/human-protocol/b > **withdrawnAmount**: `bigint` \| `null` -Defined in: [interfaces.ts:16](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L16) +Defined in: [interfaces.ts:16](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L16) diff --git a/docs/sdk/typescript/interfaces/interfaces/IOperatorsFilter.md b/docs/sdk/typescript/interfaces/interfaces/IOperatorsFilter.md index 152a727547..c00e91d606 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IOperatorsFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/IOperatorsFilter.md @@ -6,7 +6,7 @@ # Interface: IOperatorsFilter -Defined in: [interfaces.ts:33](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L33) +Defined in: [interfaces.ts:33](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L33) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:33](https://github.com/humanprotocol/human-protocol/b > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:34](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L34) +Defined in: [interfaces.ts:34](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L34) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:34](https://github.com/humanprotocol/human-protocol/b > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **minStakedAmount**: `number` -Defined in: [interfaces.ts:36](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L36) +Defined in: [interfaces.ts:36](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L36) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:36](https://github.com/humanprotocol/human-protocol/b > `optional` **orderBy**: `string` -Defined in: [interfaces.ts:37](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L37) +Defined in: [interfaces.ts:37](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L37) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:37](https://github.com/humanprotocol/human-protocol/b > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -66,7 +66,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **roles**: `string`[] -Defined in: [interfaces.ts:35](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L35) +Defined in: [interfaces.ts:35](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L35) *** @@ -74,7 +74,7 @@ Defined in: [interfaces.ts:35](https://github.com/humanprotocol/human-protocol/b > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from diff --git a/docs/sdk/typescript/interfaces/interfaces/IPagination.md b/docs/sdk/typescript/interfaces/interfaces/IPagination.md index 044376aec4..96c747c2cd 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IPagination.md +++ b/docs/sdk/typescript/interfaces/interfaces/IPagination.md @@ -6,7 +6,7 @@ # Interface: IPagination -Defined in: [interfaces.ts:163](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L163) +Defined in: [interfaces.ts:163](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L163) ## Extended by @@ -27,7 +27,7 @@ Defined in: [interfaces.ts:163](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) *** @@ -35,7 +35,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) *** @@ -43,4 +43,4 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) diff --git a/docs/sdk/typescript/interfaces/interfaces/IPaymentStatistics.md b/docs/sdk/typescript/interfaces/interfaces/IPaymentStatistics.md index 2991da5679..afff9a5b84 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IPaymentStatistics.md +++ b/docs/sdk/typescript/interfaces/interfaces/IPaymentStatistics.md @@ -6,7 +6,7 @@ # Interface: IPaymentStatistics -Defined in: [interfaces.ts:262](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L262) +Defined in: [interfaces.ts:262](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L262) ## Properties @@ -14,4 +14,4 @@ Defined in: [interfaces.ts:262](https://github.com/humanprotocol/human-protocol/ > **dailyPaymentsData**: [`IDailyPayment`](IDailyPayment.md)[] -Defined in: [interfaces.ts:263](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L263) +Defined in: [interfaces.ts:263](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L263) diff --git a/docs/sdk/typescript/interfaces/interfaces/IPayout.md b/docs/sdk/typescript/interfaces/interfaces/IPayout.md index dffb7858e4..60c7f7bb5a 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IPayout.md +++ b/docs/sdk/typescript/interfaces/interfaces/IPayout.md @@ -6,7 +6,7 @@ # Interface: IPayout -Defined in: [interfaces.ts:302](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L302) +Defined in: [interfaces.ts:302](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L302) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:302](https://github.com/humanprotocol/human-protocol/ > **amount**: `bigint` -Defined in: [interfaces.ts:306](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L306) +Defined in: [interfaces.ts:306](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L306) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:306](https://github.com/humanprotocol/human-protocol/ > **createdAt**: `number` -Defined in: [interfaces.ts:307](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L307) +Defined in: [interfaces.ts:307](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L307) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:307](https://github.com/humanprotocol/human-protocol/ > **escrowAddress**: `string` -Defined in: [interfaces.ts:304](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L304) +Defined in: [interfaces.ts:304](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L304) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:304](https://github.com/humanprotocol/human-protocol/ > **id**: `string` -Defined in: [interfaces.ts:303](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L303) +Defined in: [interfaces.ts:303](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L303) *** @@ -46,4 +46,4 @@ Defined in: [interfaces.ts:303](https://github.com/humanprotocol/human-protocol/ > **recipient**: `string` -Defined in: [interfaces.ts:305](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L305) +Defined in: [interfaces.ts:305](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L305) diff --git a/docs/sdk/typescript/interfaces/interfaces/IPayoutFilter.md b/docs/sdk/typescript/interfaces/interfaces/IPayoutFilter.md index 05b04f834d..e9512e58c0 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IPayoutFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/IPayoutFilter.md @@ -6,7 +6,7 @@ # Interface: IPayoutFilter -Defined in: [interfaces.ts:113](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L113) +Defined in: [interfaces.ts:113](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L113) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:113](https://github.com/humanprotocol/human-protocol/ > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:114](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L114) +Defined in: [interfaces.ts:114](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L114) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:114](https://github.com/humanprotocol/human-protocol/ > `optional` **escrowAddress**: `string` -Defined in: [interfaces.ts:115](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L115) +Defined in: [interfaces.ts:115](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L115) *** @@ -34,7 +34,7 @@ Defined in: [interfaces.ts:115](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **from**: `Date` -Defined in: [interfaces.ts:117](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L117) +Defined in: [interfaces.ts:117](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L117) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:117](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -66,7 +66,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **recipient**: `string` -Defined in: [interfaces.ts:116](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L116) +Defined in: [interfaces.ts:116](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L116) *** @@ -74,7 +74,7 @@ Defined in: [interfaces.ts:116](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from @@ -86,4 +86,4 @@ Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/ > `optional` **to**: `Date` -Defined in: [interfaces.ts:118](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L118) +Defined in: [interfaces.ts:118](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L118) diff --git a/docs/sdk/typescript/interfaces/interfaces/IReputationNetwork.md b/docs/sdk/typescript/interfaces/interfaces/IReputationNetwork.md index d19b1d2353..295f9a5689 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IReputationNetwork.md +++ b/docs/sdk/typescript/interfaces/interfaces/IReputationNetwork.md @@ -6,7 +6,7 @@ # Interface: IReputationNetwork -Defined in: [interfaces.ts:40](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L40) +Defined in: [interfaces.ts:40](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L40) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:40](https://github.com/humanprotocol/human-protocol/b > **address**: `string` -Defined in: [interfaces.ts:42](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L42) +Defined in: [interfaces.ts:42](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L42) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:42](https://github.com/humanprotocol/human-protocol/b > **id**: `string` -Defined in: [interfaces.ts:41](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L41) +Defined in: [interfaces.ts:41](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L41) *** @@ -30,4 +30,4 @@ Defined in: [interfaces.ts:41](https://github.com/humanprotocol/human-protocol/b > **operators**: [`IOperator`](IOperator.md)[] -Defined in: [interfaces.ts:43](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L43) +Defined in: [interfaces.ts:43](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L43) diff --git a/docs/sdk/typescript/interfaces/interfaces/IReward.md b/docs/sdk/typescript/interfaces/interfaces/IReward.md index cb8bf5a0bf..a9084a901b 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IReward.md +++ b/docs/sdk/typescript/interfaces/interfaces/IReward.md @@ -6,7 +6,7 @@ # Interface: IReward -Defined in: [interfaces.ts:4](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L4) +Defined in: [interfaces.ts:4](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L4) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:4](https://github.com/humanprotocol/human-protocol/bl > **amount**: `bigint` -Defined in: [interfaces.ts:6](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L6) +Defined in: [interfaces.ts:6](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L6) *** @@ -22,4 +22,4 @@ Defined in: [interfaces.ts:6](https://github.com/humanprotocol/human-protocol/bl > **escrowAddress**: `string` -Defined in: [interfaces.ts:5](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L5) +Defined in: [interfaces.ts:5](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L5) diff --git a/docs/sdk/typescript/interfaces/interfaces/IStaker.md b/docs/sdk/typescript/interfaces/interfaces/IStaker.md index b338efdac3..2c2c907145 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IStaker.md +++ b/docs/sdk/typescript/interfaces/interfaces/IStaker.md @@ -6,7 +6,7 @@ # Interface: IStaker -Defined in: [interfaces.ts:197](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L197) +Defined in: [interfaces.ts:197](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L197) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:197](https://github.com/humanprotocol/human-protocol/ > **address**: `string` -Defined in: [interfaces.ts:198](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L198) +Defined in: [interfaces.ts:198](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L198) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:198](https://github.com/humanprotocol/human-protocol/ > **lastDepositTimestamp**: `number` -Defined in: [interfaces.ts:204](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L204) +Defined in: [interfaces.ts:204](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L204) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:204](https://github.com/humanprotocol/human-protocol/ > **lockedAmount**: `bigint` -Defined in: [interfaces.ts:200](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L200) +Defined in: [interfaces.ts:200](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L200) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:200](https://github.com/humanprotocol/human-protocol/ > **lockedUntil**: `number` -Defined in: [interfaces.ts:203](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L203) +Defined in: [interfaces.ts:203](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L203) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:203](https://github.com/humanprotocol/human-protocol/ > **slashedAmount**: `bigint` -Defined in: [interfaces.ts:202](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L202) +Defined in: [interfaces.ts:202](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L202) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:202](https://github.com/humanprotocol/human-protocol/ > **stakedAmount**: `bigint` -Defined in: [interfaces.ts:199](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L199) +Defined in: [interfaces.ts:199](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L199) *** @@ -62,4 +62,4 @@ Defined in: [interfaces.ts:199](https://github.com/humanprotocol/human-protocol/ > **withdrawableAmount**: `bigint` -Defined in: [interfaces.ts:201](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L201) +Defined in: [interfaces.ts:201](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L201) diff --git a/docs/sdk/typescript/interfaces/interfaces/IStakersFilter.md b/docs/sdk/typescript/interfaces/interfaces/IStakersFilter.md index 01ebfab5fe..91bcbd8873 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IStakersFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/IStakersFilter.md @@ -6,7 +6,7 @@ # Interface: IStakersFilter -Defined in: [interfaces.ts:207](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L207) +Defined in: [interfaces.ts:207](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L207) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:207](https://github.com/humanprotocol/human-protocol/ > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:208](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L208) +Defined in: [interfaces.ts:208](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L208) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:208](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **maxLockedAmount**: `string` -Defined in: [interfaces.ts:212](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L212) +Defined in: [interfaces.ts:212](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L212) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:212](https://github.com/humanprotocol/human-protocol/ > `optional` **maxSlashedAmount**: `string` -Defined in: [interfaces.ts:216](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L216) +Defined in: [interfaces.ts:216](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L216) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:216](https://github.com/humanprotocol/human-protocol/ > `optional` **maxStakedAmount**: `string` -Defined in: [interfaces.ts:210](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L210) +Defined in: [interfaces.ts:210](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L210) *** @@ -62,7 +62,7 @@ Defined in: [interfaces.ts:210](https://github.com/humanprotocol/human-protocol/ > `optional` **maxWithdrawnAmount**: `string` -Defined in: [interfaces.ts:214](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L214) +Defined in: [interfaces.ts:214](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L214) *** @@ -70,7 +70,7 @@ Defined in: [interfaces.ts:214](https://github.com/humanprotocol/human-protocol/ > `optional` **minLockedAmount**: `string` -Defined in: [interfaces.ts:211](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L211) +Defined in: [interfaces.ts:211](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L211) *** @@ -78,7 +78,7 @@ Defined in: [interfaces.ts:211](https://github.com/humanprotocol/human-protocol/ > `optional` **minSlashedAmount**: `string` -Defined in: [interfaces.ts:215](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L215) +Defined in: [interfaces.ts:215](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L215) *** @@ -86,7 +86,7 @@ Defined in: [interfaces.ts:215](https://github.com/humanprotocol/human-protocol/ > `optional` **minStakedAmount**: `string` -Defined in: [interfaces.ts:209](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L209) +Defined in: [interfaces.ts:209](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L209) *** @@ -94,7 +94,7 @@ Defined in: [interfaces.ts:209](https://github.com/humanprotocol/human-protocol/ > `optional` **minWithdrawnAmount**: `string` -Defined in: [interfaces.ts:213](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L213) +Defined in: [interfaces.ts:213](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L213) *** @@ -102,7 +102,7 @@ Defined in: [interfaces.ts:213](https://github.com/humanprotocol/human-protocol/ > `optional` **orderBy**: `"stakedAmount"` \| `"lockedAmount"` \| `"withdrawnAmount"` \| `"slashedAmount"` \| `"lastDepositTimestamp"` -Defined in: [interfaces.ts:217](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L217) +Defined in: [interfaces.ts:217](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L217) *** @@ -110,7 +110,7 @@ Defined in: [interfaces.ts:217](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -122,7 +122,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from diff --git a/docs/sdk/typescript/interfaces/interfaces/IStatisticsFilter.md b/docs/sdk/typescript/interfaces/interfaces/IStatisticsFilter.md index 73cf11ad75..27fe68d89b 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IStatisticsFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/IStatisticsFilter.md @@ -6,7 +6,7 @@ # Interface: IStatisticsFilter -Defined in: [interfaces.ts:104](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L104) +Defined in: [interfaces.ts:104](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L104) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:104](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **from**: `Date` -Defined in: [interfaces.ts:105](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L105) +Defined in: [interfaces.ts:105](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L105) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:105](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -50,7 +50,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from @@ -62,4 +62,4 @@ Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/ > `optional` **to**: `Date` -Defined in: [interfaces.ts:106](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L106) +Defined in: [interfaces.ts:106](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L106) diff --git a/docs/sdk/typescript/interfaces/interfaces/IStatusEvent.md b/docs/sdk/typescript/interfaces/interfaces/IStatusEvent.md index b177166479..f577513e47 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IStatusEvent.md +++ b/docs/sdk/typescript/interfaces/interfaces/IStatusEvent.md @@ -6,7 +6,7 @@ # Interface: IStatusEvent -Defined in: [interfaces.ts:285](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L285) +Defined in: [interfaces.ts:285](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L285) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:285](https://github.com/humanprotocol/human-protocol/ > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:289](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L289) +Defined in: [interfaces.ts:289](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L289) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:289](https://github.com/humanprotocol/human-protocol/ > **escrowAddress**: `string` -Defined in: [interfaces.ts:287](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L287) +Defined in: [interfaces.ts:287](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L287) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:287](https://github.com/humanprotocol/human-protocol/ > **status**: [`EscrowStatus`](../../types/enumerations/EscrowStatus.md) -Defined in: [interfaces.ts:288](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L288) +Defined in: [interfaces.ts:288](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L288) *** @@ -38,4 +38,4 @@ Defined in: [interfaces.ts:288](https://github.com/humanprotocol/human-protocol/ > **timestamp**: `number` -Defined in: [interfaces.ts:286](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L286) +Defined in: [interfaces.ts:286](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L286) diff --git a/docs/sdk/typescript/interfaces/interfaces/IStatusEventFilter.md b/docs/sdk/typescript/interfaces/interfaces/IStatusEventFilter.md index 62de067014..a98e743db7 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IStatusEventFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/IStatusEventFilter.md @@ -6,7 +6,7 @@ # Interface: IStatusEventFilter -Defined in: [interfaces.ts:176](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L176) +Defined in: [interfaces.ts:176](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L176) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:176](https://github.com/humanprotocol/human-protocol/ > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:177](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L177) +Defined in: [interfaces.ts:177](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L177) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:177](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **from**: `Date` -Defined in: [interfaces.ts:179](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L179) +Defined in: [interfaces.ts:179](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L179) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:179](https://github.com/humanprotocol/human-protocol/ > `optional` **launcher**: `string` -Defined in: [interfaces.ts:181](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L181) +Defined in: [interfaces.ts:181](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L181) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:181](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -66,7 +66,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from @@ -78,7 +78,7 @@ Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/ > `optional` **statuses**: [`EscrowStatus`](../../types/enumerations/EscrowStatus.md)[] -Defined in: [interfaces.ts:178](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L178) +Defined in: [interfaces.ts:178](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L178) *** @@ -86,4 +86,4 @@ Defined in: [interfaces.ts:178](https://github.com/humanprotocol/human-protocol/ > `optional` **to**: `Date` -Defined in: [interfaces.ts:180](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L180) +Defined in: [interfaces.ts:180](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L180) diff --git a/docs/sdk/typescript/interfaces/interfaces/ITransaction.md b/docs/sdk/typescript/interfaces/interfaces/ITransaction.md index c0a8b57393..e88974ec68 100644 --- a/docs/sdk/typescript/interfaces/interfaces/ITransaction.md +++ b/docs/sdk/typescript/interfaces/interfaces/ITransaction.md @@ -6,7 +6,7 @@ # Interface: ITransaction -Defined in: [interfaces.ts:136](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L136) +Defined in: [interfaces.ts:136](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L136) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:136](https://github.com/humanprotocol/human-protocol/ > **block**: `bigint` -Defined in: [interfaces.ts:137](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L137) +Defined in: [interfaces.ts:137](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L137) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:137](https://github.com/humanprotocol/human-protocol/ > **escrow**: `string` \| `null` -Defined in: [interfaces.ts:145](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L145) +Defined in: [interfaces.ts:145](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L145) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:145](https://github.com/humanprotocol/human-protocol/ > **from**: `string` -Defined in: [interfaces.ts:139](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L139) +Defined in: [interfaces.ts:139](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L139) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:139](https://github.com/humanprotocol/human-protocol/ > **internalTransactions**: [`InternalTransaction`](InternalTransaction.md)[] -Defined in: [interfaces.ts:147](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L147) +Defined in: [interfaces.ts:147](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L147) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:147](https://github.com/humanprotocol/human-protocol/ > **method**: `string` -Defined in: [interfaces.ts:143](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L143) +Defined in: [interfaces.ts:143](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L143) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:143](https://github.com/humanprotocol/human-protocol/ > **receiver**: `string` \| `null` -Defined in: [interfaces.ts:144](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L144) +Defined in: [interfaces.ts:144](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L144) *** @@ -62,7 +62,7 @@ Defined in: [interfaces.ts:144](https://github.com/humanprotocol/human-protocol/ > **timestamp**: `number` -Defined in: [interfaces.ts:141](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L141) +Defined in: [interfaces.ts:141](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L141) *** @@ -70,7 +70,7 @@ Defined in: [interfaces.ts:141](https://github.com/humanprotocol/human-protocol/ > **to**: `string` -Defined in: [interfaces.ts:140](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L140) +Defined in: [interfaces.ts:140](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L140) *** @@ -78,7 +78,7 @@ Defined in: [interfaces.ts:140](https://github.com/humanprotocol/human-protocol/ > **token**: `string` \| `null` -Defined in: [interfaces.ts:146](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L146) +Defined in: [interfaces.ts:146](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L146) *** @@ -86,7 +86,7 @@ Defined in: [interfaces.ts:146](https://github.com/humanprotocol/human-protocol/ > **txHash**: `string` -Defined in: [interfaces.ts:138](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L138) +Defined in: [interfaces.ts:138](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L138) *** @@ -94,4 +94,4 @@ Defined in: [interfaces.ts:138](https://github.com/humanprotocol/human-protocol/ > **value**: `bigint` -Defined in: [interfaces.ts:142](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L142) +Defined in: [interfaces.ts:142](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L142) diff --git a/docs/sdk/typescript/interfaces/interfaces/ITransactionsFilter.md b/docs/sdk/typescript/interfaces/interfaces/ITransactionsFilter.md index cc2730e9b5..5123c9b67f 100644 --- a/docs/sdk/typescript/interfaces/interfaces/ITransactionsFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/ITransactionsFilter.md @@ -6,7 +6,7 @@ # Interface: ITransactionsFilter -Defined in: [interfaces.ts:150](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L150) +Defined in: [interfaces.ts:150](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L150) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:150](https://github.com/humanprotocol/human-protocol/ > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:151](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L151) +Defined in: [interfaces.ts:151](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L151) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:151](https://github.com/humanprotocol/human-protocol/ > `optional` **endBlock**: `number` -Defined in: [interfaces.ts:153](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L153) +Defined in: [interfaces.ts:153](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L153) *** @@ -34,7 +34,7 @@ Defined in: [interfaces.ts:153](https://github.com/humanprotocol/human-protocol/ > `optional` **endDate**: `Date` -Defined in: [interfaces.ts:155](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L155) +Defined in: [interfaces.ts:155](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L155) *** @@ -42,7 +42,7 @@ Defined in: [interfaces.ts:155](https://github.com/humanprotocol/human-protocol/ > `optional` **escrow**: `string` -Defined in: [interfaces.ts:159](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L159) +Defined in: [interfaces.ts:159](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L159) *** @@ -50,7 +50,7 @@ Defined in: [interfaces.ts:159](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -62,7 +62,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **fromAddress**: `string` -Defined in: [interfaces.ts:156](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L156) +Defined in: [interfaces.ts:156](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L156) *** @@ -70,7 +70,7 @@ Defined in: [interfaces.ts:156](https://github.com/humanprotocol/human-protocol/ > `optional` **method**: `string` -Defined in: [interfaces.ts:158](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L158) +Defined in: [interfaces.ts:158](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L158) *** @@ -78,7 +78,7 @@ Defined in: [interfaces.ts:158](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -90,7 +90,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from @@ -102,7 +102,7 @@ Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/ > `optional` **startBlock**: `number` -Defined in: [interfaces.ts:152](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L152) +Defined in: [interfaces.ts:152](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L152) *** @@ -110,7 +110,7 @@ Defined in: [interfaces.ts:152](https://github.com/humanprotocol/human-protocol/ > `optional` **startDate**: `Date` -Defined in: [interfaces.ts:154](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L154) +Defined in: [interfaces.ts:154](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L154) *** @@ -118,7 +118,7 @@ Defined in: [interfaces.ts:154](https://github.com/humanprotocol/human-protocol/ > `optional` **toAddress**: `string` -Defined in: [interfaces.ts:157](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L157) +Defined in: [interfaces.ts:157](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L157) *** @@ -126,4 +126,4 @@ Defined in: [interfaces.ts:157](https://github.com/humanprotocol/human-protocol/ > `optional` **token**: `string` -Defined in: [interfaces.ts:160](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L160) +Defined in: [interfaces.ts:160](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L160) diff --git a/docs/sdk/typescript/interfaces/interfaces/IWorker.md b/docs/sdk/typescript/interfaces/interfaces/IWorker.md index 74bde1a05d..c3d777b095 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IWorker.md +++ b/docs/sdk/typescript/interfaces/interfaces/IWorker.md @@ -6,7 +6,7 @@ # Interface: IWorker -Defined in: [interfaces.ts:184](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L184) +Defined in: [interfaces.ts:184](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L184) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:184](https://github.com/humanprotocol/human-protocol/ > **address**: `string` -Defined in: [interfaces.ts:186](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L186) +Defined in: [interfaces.ts:186](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L186) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:186](https://github.com/humanprotocol/human-protocol/ > **id**: `string` -Defined in: [interfaces.ts:185](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L185) +Defined in: [interfaces.ts:185](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L185) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:185](https://github.com/humanprotocol/human-protocol/ > **payoutCount**: `number` -Defined in: [interfaces.ts:188](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L188) +Defined in: [interfaces.ts:188](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L188) *** @@ -38,4 +38,4 @@ Defined in: [interfaces.ts:188](https://github.com/humanprotocol/human-protocol/ > **totalHMTAmountReceived**: `bigint` -Defined in: [interfaces.ts:187](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L187) +Defined in: [interfaces.ts:187](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L187) diff --git a/docs/sdk/typescript/interfaces/interfaces/IWorkerStatistics.md b/docs/sdk/typescript/interfaces/interfaces/IWorkerStatistics.md index 13cf73390b..1e33d4d353 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IWorkerStatistics.md +++ b/docs/sdk/typescript/interfaces/interfaces/IWorkerStatistics.md @@ -6,7 +6,7 @@ # Interface: IWorkerStatistics -Defined in: [interfaces.ts:251](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L251) +Defined in: [interfaces.ts:251](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L251) ## Properties @@ -14,4 +14,4 @@ Defined in: [interfaces.ts:251](https://github.com/humanprotocol/human-protocol/ > **dailyWorkersData**: [`IDailyWorker`](IDailyWorker.md)[] -Defined in: [interfaces.ts:252](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L252) +Defined in: [interfaces.ts:252](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L252) diff --git a/docs/sdk/typescript/interfaces/interfaces/IWorkersFilter.md b/docs/sdk/typescript/interfaces/interfaces/IWorkersFilter.md index 6be2e3d765..5c5f3849a8 100644 --- a/docs/sdk/typescript/interfaces/interfaces/IWorkersFilter.md +++ b/docs/sdk/typescript/interfaces/interfaces/IWorkersFilter.md @@ -6,7 +6,7 @@ # Interface: IWorkersFilter -Defined in: [interfaces.ts:191](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L191) +Defined in: [interfaces.ts:191](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L191) ## Extends @@ -18,7 +18,7 @@ Defined in: [interfaces.ts:191](https://github.com/humanprotocol/human-protocol/ > `optional` **address**: `string` -Defined in: [interfaces.ts:193](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L193) +Defined in: [interfaces.ts:193](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L193) *** @@ -26,7 +26,7 @@ Defined in: [interfaces.ts:193](https://github.com/humanprotocol/human-protocol/ > **chainId**: [`ChainId`](../../enums/enumerations/ChainId.md) -Defined in: [interfaces.ts:192](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L192) +Defined in: [interfaces.ts:192](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L192) *** @@ -34,7 +34,7 @@ Defined in: [interfaces.ts:192](https://github.com/humanprotocol/human-protocol/ > `optional` **first**: `number` -Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) +Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L164) #### Inherited from @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:164](https://github.com/humanprotocol/human-protocol/ > `optional` **orderBy**: `string` -Defined in: [interfaces.ts:194](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L194) +Defined in: [interfaces.ts:194](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L194) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:194](https://github.com/humanprotocol/human-protocol/ > `optional` **orderDirection**: [`OrderDirection`](../../enums/enumerations/OrderDirection.md) -Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) +Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L166) #### Inherited from @@ -66,7 +66,7 @@ Defined in: [interfaces.ts:166](https://github.com/humanprotocol/human-protocol/ > `optional` **skip**: `number` -Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) +Defined in: [interfaces.ts:165](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L165) #### Inherited from diff --git a/docs/sdk/typescript/interfaces/interfaces/InternalTransaction.md b/docs/sdk/typescript/interfaces/interfaces/InternalTransaction.md index 4e4fe51572..f7b64eb07e 100644 --- a/docs/sdk/typescript/interfaces/interfaces/InternalTransaction.md +++ b/docs/sdk/typescript/interfaces/interfaces/InternalTransaction.md @@ -6,7 +6,7 @@ # Interface: InternalTransaction -Defined in: [interfaces.ts:126](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L126) +Defined in: [interfaces.ts:126](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L126) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:126](https://github.com/humanprotocol/human-protocol/ > **escrow**: `string` \| `null` -Defined in: [interfaces.ts:132](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L132) +Defined in: [interfaces.ts:132](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L132) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:132](https://github.com/humanprotocol/human-protocol/ > **from**: `string` -Defined in: [interfaces.ts:127](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L127) +Defined in: [interfaces.ts:127](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L127) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:127](https://github.com/humanprotocol/human-protocol/ > **method**: `string` -Defined in: [interfaces.ts:130](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L130) +Defined in: [interfaces.ts:130](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L130) *** @@ -38,7 +38,7 @@ Defined in: [interfaces.ts:130](https://github.com/humanprotocol/human-protocol/ > **receiver**: `string` \| `null` -Defined in: [interfaces.ts:131](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L131) +Defined in: [interfaces.ts:131](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L131) *** @@ -46,7 +46,7 @@ Defined in: [interfaces.ts:131](https://github.com/humanprotocol/human-protocol/ > **to**: `string` -Defined in: [interfaces.ts:128](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L128) +Defined in: [interfaces.ts:128](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L128) *** @@ -54,7 +54,7 @@ Defined in: [interfaces.ts:128](https://github.com/humanprotocol/human-protocol/ > **token**: `string` \| `null` -Defined in: [interfaces.ts:133](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L133) +Defined in: [interfaces.ts:133](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L133) *** @@ -62,4 +62,4 @@ Defined in: [interfaces.ts:133](https://github.com/humanprotocol/human-protocol/ > **value**: `bigint` -Defined in: [interfaces.ts:129](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L129) +Defined in: [interfaces.ts:129](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L129) diff --git a/docs/sdk/typescript/interfaces/interfaces/StakerInfo.md b/docs/sdk/typescript/interfaces/interfaces/StakerInfo.md index 64a3ed5d67..37bd6b0c99 100644 --- a/docs/sdk/typescript/interfaces/interfaces/StakerInfo.md +++ b/docs/sdk/typescript/interfaces/interfaces/StakerInfo.md @@ -6,7 +6,7 @@ # Interface: StakerInfo -Defined in: [interfaces.ts:169](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L169) +Defined in: [interfaces.ts:169](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L169) ## Properties @@ -14,7 +14,7 @@ Defined in: [interfaces.ts:169](https://github.com/humanprotocol/human-protocol/ > **lockedAmount**: `bigint` -Defined in: [interfaces.ts:171](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L171) +Defined in: [interfaces.ts:171](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L171) *** @@ -22,7 +22,7 @@ Defined in: [interfaces.ts:171](https://github.com/humanprotocol/human-protocol/ > **lockedUntil**: `bigint` -Defined in: [interfaces.ts:172](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L172) +Defined in: [interfaces.ts:172](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L172) *** @@ -30,7 +30,7 @@ Defined in: [interfaces.ts:172](https://github.com/humanprotocol/human-protocol/ > **stakedAmount**: `bigint` -Defined in: [interfaces.ts:170](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L170) +Defined in: [interfaces.ts:170](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L170) *** @@ -38,4 +38,4 @@ Defined in: [interfaces.ts:170](https://github.com/humanprotocol/human-protocol/ > **withdrawableAmount**: `bigint` -Defined in: [interfaces.ts:173](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L173) +Defined in: [interfaces.ts:173](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L173) diff --git a/docs/sdk/typescript/interfaces/interfaces/SubgraphOptions.md b/docs/sdk/typescript/interfaces/interfaces/SubgraphOptions.md new file mode 100644 index 0000000000..841e50b8cf --- /dev/null +++ b/docs/sdk/typescript/interfaces/interfaces/SubgraphOptions.md @@ -0,0 +1,31 @@ +[**@human-protocol/sdk**](../../README.md) + +*** + +[@human-protocol/sdk](../../modules.md) / [interfaces](../README.md) / SubgraphOptions + +# Interface: SubgraphOptions + +Defined in: [interfaces.ts:319](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L319) + +Configuration options for subgraph requests with retry logic. + +## Properties + +### baseDelay? + +> `optional` **baseDelay**: `number` + +Defined in: [interfaces.ts:323](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L323) + +Base delay between retries in milliseconds + +*** + +### maxRetries? + +> `optional` **maxRetries**: `number` + +Defined in: [interfaces.ts:321](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts#L321) + +Maximum number of retry attempts diff --git a/docs/sdk/typescript/kvstore/classes/KVStoreClient.md b/docs/sdk/typescript/kvstore/classes/KVStoreClient.md index a7267f4c1c..5e9f0a5bb4 100644 --- a/docs/sdk/typescript/kvstore/classes/KVStoreClient.md +++ b/docs/sdk/typescript/kvstore/classes/KVStoreClient.md @@ -6,7 +6,7 @@ # Class: KVStoreClient -Defined in: [kvstore.ts:99](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L99) +Defined in: [kvstore.ts:98](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L98) ## Introduction @@ -86,7 +86,7 @@ const kvstoreClient = await KVStoreClient.build(provider); > **new KVStoreClient**(`runner`, `networkData`): `KVStoreClient` -Defined in: [kvstore.ts:108](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L108) +Defined in: [kvstore.ts:107](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L107) **KVStoreClient constructor** @@ -118,7 +118,7 @@ The network information required to connect to the KVStore contract > **networkData**: [`NetworkData`](../../types/type-aliases/NetworkData.md) -Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L14) +Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) #### Inherited from @@ -130,7 +130,7 @@ Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d0 > `protected` **runner**: `ContractRunner` -Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13) +Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) #### Inherited from @@ -138,40 +138,11 @@ Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/d0 ## Methods -### applyTxDefaults() - -> `protected` **applyTxDefaults**(`txOptions`): `Overrides` - -Defined in: [base.ts:35](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/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` - -#### Inherited from - -[`BaseEthersClient`](../../base/classes/BaseEthersClient.md).[`applyTxDefaults`](../../base/classes/BaseEthersClient.md#applytxdefaults) - -*** - ### get() > **get**(`address`, `key`): `Promise`\<`string`\> -Defined in: [kvstore.ts:316](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L316) +Defined in: [kvstore.ts:308](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L308) Gets the value of a key-value pair in the contract. @@ -217,7 +188,7 @@ const value = await kvstoreClient.get('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb9226 > **set**(`key`, `value`, `txOptions?`): `Promise`\<`void`\> -Defined in: [kvstore.ts:171](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L171) +Defined in: [kvstore.ts:170](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L170) This function sets a key-value pair associated with the address that submits the transaction. @@ -271,7 +242,7 @@ await kvstoreClient.set('Role', 'RecordingOracle'); > **setBulk**(`keys`, `values`, `txOptions?`): `Promise`\<`void`\> -Defined in: [kvstore.ts:216](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L216) +Defined in: [kvstore.ts:213](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L213) This function sets key-value pairs in bulk associated with the address that submits the transaction. @@ -327,7 +298,7 @@ await kvstoreClient.setBulk(keys, values); > **setFileUrlAndHash**(`url`, `urlKey`, `txOptions?`): `Promise`\<`void`\> -Defined in: [kvstore.ts:265](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L265) +Defined in: [kvstore.ts:256](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L256) Sets a URL value for the address that submits the transaction, and its hash. @@ -380,7 +351,7 @@ await kvstoreClient.setFileUrlAndHash('linkedin.com/example', 'linkedin_url'); > `static` **build**(`runner`): `Promise`\<`KVStoreClient`\> -Defined in: [kvstore.ts:126](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L126) +Defined in: [kvstore.ts:125](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L125) Creates an instance of KVStoreClient from a runner. diff --git a/docs/sdk/typescript/kvstore/classes/KVStoreUtils.md b/docs/sdk/typescript/kvstore/classes/KVStoreUtils.md index 6625411212..ef3b59967b 100644 --- a/docs/sdk/typescript/kvstore/classes/KVStoreUtils.md +++ b/docs/sdk/typescript/kvstore/classes/KVStoreUtils.md @@ -6,7 +6,7 @@ # Class: KVStoreUtils -Defined in: [kvstore.ts:362](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L362) +Defined in: [kvstore.ts:354](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L354) ## Introduction @@ -53,9 +53,9 @@ const KVStoreAddresses = await KVStoreUtils.getKVStoreData( ### get() -> `static` **get**(`chainId`, `address`, `key`): `Promise`\<`string`\> +> `static` **get**(`chainId`, `address`, `key`, `options?`): `Promise`\<`string`\> -Defined in: [kvstore.ts:433](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L433) +Defined in: [kvstore.ts:429](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L429) Gets the value of a key-value pair in the KVStore using the subgraph. @@ -79,6 +79,12 @@ Address from which to get the key value. Key to obtain the value. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<`string`\> @@ -114,9 +120,9 @@ console.log(value); ### getFileUrlAndVerifyHash() -> `static` **getFileUrlAndVerifyHash**(`chainId`, `address`, `urlKey`): `Promise`\<`string`\> +> `static` **getFileUrlAndVerifyHash**(`chainId`, `address`, `urlKey`, `options?`): `Promise`\<`string`\> -Defined in: [kvstore.ts:480](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L480) +Defined in: [kvstore.ts:479](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L479) Gets the URL value of the given entity, and verifies its hash. @@ -140,6 +146,12 @@ Address from which to get the URL value. Configurable URL key. `url` by default. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<`string`\> @@ -162,9 +174,9 @@ console.log(url); ### getKVStoreData() -> `static` **getKVStoreData**(`chainId`, `address`): `Promise`\<[`IKVStore`](../../interfaces/interfaces/IKVStore.md)[]\> +> `static` **getKVStoreData**(`chainId`, `address`, `options?`): `Promise`\<[`IKVStore`](../../interfaces/interfaces/IKVStore.md)[]\> -Defined in: [kvstore.ts:381](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L381) +Defined in: [kvstore.ts:374](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L374) This function returns the KVStore data for a given address. @@ -182,6 +194,12 @@ Network in which the KVStore is deployed Address of the KVStore +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IKVStore`](../../interfaces/interfaces/IKVStore.md)[]\> @@ -209,9 +227,9 @@ console.log(kvStoreData); ### getPublicKey() -> `static` **getPublicKey**(`chainId`, `address`): `Promise`\<`string`\> +> `static` **getPublicKey**(`chainId`, `address`, `options?`): `Promise`\<`string`\> -Defined in: [kvstore.ts:540](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L540) +Defined in: [kvstore.ts:540](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L540) Gets the public key of the given entity, and verifies its hash. @@ -229,6 +247,10 @@ Network in which the KVStore is deployed Address from which to get the public key. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + #### Returns `Promise`\<`string`\> diff --git a/docs/sdk/typescript/operator/classes/OperatorUtils.md b/docs/sdk/typescript/operator/classes/OperatorUtils.md index 60644bd19d..1558ef88d9 100644 --- a/docs/sdk/typescript/operator/classes/OperatorUtils.md +++ b/docs/sdk/typescript/operator/classes/OperatorUtils.md @@ -6,7 +6,7 @@ # Class: OperatorUtils -Defined in: [operator.ts:25](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L25) +Defined in: [operator.ts:29](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L29) ## Constructors @@ -22,9 +22,9 @@ Defined in: [operator.ts:25](https://github.com/humanprotocol/human-protocol/blo ### getOperator() -> `static` **getOperator**(`chainId`, `address`): `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md) \| `null`\> +> `static` **getOperator**(`chainId`, `address`, `options?`): `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md) \| `null`\> -Defined in: [operator.ts:41](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L41) +Defined in: [operator.ts:46](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L46) This function returns the operator data for the given address. @@ -42,6 +42,12 @@ Network in which the operator is deployed Operator address. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md) \| `null`\> @@ -60,9 +66,9 @@ const operator = await OperatorUtils.getOperator(ChainId.POLYGON_AMOY, '0x62dD51 ### getOperators() -> `static` **getOperators**(`filter`): `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md)[]\> +> `static` **getOperators**(`filter`, `options?`): `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md)[]\> -Defined in: [operator.ts:84](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L84) +Defined in: [operator.ts:92](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L92) This function returns all the operator details of the protocol. @@ -74,6 +80,12 @@ This function returns all the operator details of the protocol. Filter for the operators. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md)[]\> @@ -95,9 +107,9 @@ const operators = await OperatorUtils.getOperators(filter); ### getReputationNetworkOperators() -> `static` **getReputationNetworkOperators**(`chainId`, `address`, `role?`): `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md)[]\> +> `static` **getReputationNetworkOperators**(`chainId`, `address`, `role?`, `options?`): `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md)[]\> -Defined in: [operator.ts:144](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L144) +Defined in: [operator.ts:159](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L159) Retrieves the reputation network operators of the specified address. @@ -121,6 +133,12 @@ Address of the reputation oracle. (Optional) Role of the operator. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IOperator`](../../interfaces/interfaces/IOperator.md)[]\> @@ -139,9 +157,9 @@ const operators = await OperatorUtils.getReputationNetworkOperators(ChainId.POLY ### getRewards() -> `static` **getRewards**(`chainId`, `slasherAddress`): `Promise`\<[`IReward`](../../interfaces/interfaces/IReward.md)[]\> +> `static` **getRewards**(`chainId`, `slasherAddress`, `options?`): `Promise`\<[`IReward`](../../interfaces/interfaces/IReward.md)[]\> -Defined in: [operator.ts:183](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L183) +Defined in: [operator.ts:205](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/operator.ts#L205) This function returns information about the rewards for a given slasher address. @@ -159,6 +177,12 @@ Network in which the rewards are deployed Slasher address. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IReward`](../../interfaces/interfaces/IReward.md)[]\> diff --git a/docs/sdk/typescript/staking/classes/StakingClient.md b/docs/sdk/typescript/staking/classes/StakingClient.md index 042b3fe248..23f67459ea 100644 --- a/docs/sdk/typescript/staking/classes/StakingClient.md +++ b/docs/sdk/typescript/staking/classes/StakingClient.md @@ -6,7 +6,7 @@ # Class: StakingClient -Defined in: [staking.ts:104](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L104) +Defined in: [staking.ts:108](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L108) ## Introduction @@ -86,7 +86,7 @@ const stakingClient = await StakingClient.build(provider); > **new StakingClient**(`runner`, `networkData`): `StakingClient` -Defined in: [staking.ts:115](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L115) +Defined in: [staking.ts:119](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L119) **StakingClient constructor** @@ -118,7 +118,7 @@ The network information required to connect to the Staking contract > **escrowFactoryContract**: `EscrowFactory` -Defined in: [staking.ts:107](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L107) +Defined in: [staking.ts:111](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L111) *** @@ -126,7 +126,7 @@ Defined in: [staking.ts:107](https://github.com/humanprotocol/human-protocol/blo > **networkData**: [`NetworkData`](../../types/type-aliases/NetworkData.md) -Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L14) +Defined in: [base.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) #### Inherited from @@ -138,7 +138,7 @@ Defined in: [base.ts:14](https://github.com/humanprotocol/human-protocol/blob/d0 > `protected` **runner**: `ContractRunner` -Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13) +Defined in: [base.ts:11](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) #### Inherited from @@ -150,7 +150,7 @@ Defined in: [base.ts:13](https://github.com/humanprotocol/human-protocol/blob/d0 > **stakingContract**: `Staking` -Defined in: [staking.ts:106](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L106) +Defined in: [staking.ts:110](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L110) *** @@ -158,44 +158,15 @@ Defined in: [staking.ts:106](https://github.com/humanprotocol/human-protocol/blo > **tokenContract**: `HMToken` -Defined in: [staking.ts:105](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L105) +Defined in: [staking.ts:109](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L109) ## Methods -### applyTxDefaults() - -> `protected` **applyTxDefaults**(`txOptions`): `Overrides` - -Defined in: [base.ts:35](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/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` - -#### Inherited from - -[`BaseEthersClient`](../../base/classes/BaseEthersClient.md).[`applyTxDefaults`](../../base/classes/BaseEthersClient.md#applytxdefaults) - -*** - ### approveStake() > **approveStake**(`amount`, `txOptions?`): `Promise`\<`void`\> -Defined in: [staking.ts:200](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L200) +Defined in: [staking.ts:204](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L204) This function approves the staking contract to transfer a specified amount of tokens when the user stakes. It increases the allowance for the staking contract. @@ -242,7 +213,7 @@ await stakingClient.approveStake(amount); > **getStakerInfo**(`stakerAddress`): `Promise`\<[`StakerInfo`](../../interfaces/interfaces/StakerInfo.md)\> -Defined in: [staking.ts:454](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L454) +Defined in: [staking.ts:446](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L446) Retrieves comprehensive staking information for a staker. @@ -278,7 +249,7 @@ console.log(stakingInfo.tokensStaked); > **slash**(`slasher`, `staker`, `escrowAddress`, `amount`, `txOptions?`): `Promise`\<`void`\> -Defined in: [staking.ts:392](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L392) +Defined in: [staking.ts:384](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L384) This function reduces the allocated amount by a staker in an escrow and transfers those tokens to the reward pool. This allows the slasher to claim them later. @@ -343,7 +314,7 @@ await stakingClient.slash('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd > **stake**(`amount`, `txOptions?`): `Promise`\<`void`\> -Defined in: [staking.ts:254](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L254) +Defined in: [staking.ts:258](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L258) This function stakes a specified amount of tokens on a specific network. @@ -393,7 +364,7 @@ await stakingClient.stake(amount); > **unstake**(`amount`, `txOptions?`): `Promise`\<`void`\> -Defined in: [staking.ts:303](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L303) +Defined in: [staking.ts:302](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L302) This function unstakes tokens from staking contract. The unstaked tokens stay locked for a period of time. @@ -442,7 +413,7 @@ await stakingClient.unstake(amount); > **withdraw**(`txOptions?`): `Promise`\<`void`\> -Defined in: [staking.ts:353](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L353) +Defined in: [staking.ts:347](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L347) This function withdraws unstaked and non-locked tokens from staking contract to the user wallet. @@ -484,7 +455,7 @@ await stakingClient.withdraw(); > `static` **build**(`runner`): `Promise`\<`StakingClient`\> -Defined in: [staking.ts:143](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L143) +Defined in: [staking.ts:147](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L147) Creates an instance of StakingClient from a Runner. diff --git a/docs/sdk/typescript/staking/classes/StakingUtils.md b/docs/sdk/typescript/staking/classes/StakingUtils.md index 8e072fd858..2fe8961d5a 100644 --- a/docs/sdk/typescript/staking/classes/StakingUtils.md +++ b/docs/sdk/typescript/staking/classes/StakingUtils.md @@ -6,7 +6,7 @@ # Class: StakingUtils -Defined in: [staking.ts:492](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L492) +Defined in: [staking.ts:484](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L484) Utility class for Staking-related subgraph queries. @@ -24,9 +24,9 @@ Utility class for Staking-related subgraph queries. ### getStaker() -> `static` **getStaker**(`chainId`, `stakerAddress`): `Promise`\<[`IStaker`](../../interfaces/interfaces/IStaker.md)\> +> `static` **getStaker**(`chainId`, `stakerAddress`, `options?`): `Promise`\<[`IStaker`](../../interfaces/interfaces/IStaker.md)\> -Defined in: [staking.ts:500](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L500) +Defined in: [staking.ts:493](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L493) Gets staking info for a staker from the subgraph. @@ -44,6 +44,12 @@ Network in which the staking contract is deployed Address of the staker +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IStaker`](../../interfaces/interfaces/IStaker.md)\> @@ -54,9 +60,9 @@ Staker info from subgraph ### getStakers() -> `static` **getStakers**(`filter`): `Promise`\<[`IStaker`](../../interfaces/interfaces/IStaker.md)[]\> +> `static` **getStakers**(`filter`, `options?`): `Promise`\<[`IStaker`](../../interfaces/interfaces/IStaker.md)[]\> -Defined in: [staking.ts:531](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L531) +Defined in: [staking.ts:528](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L528) Gets all stakers from the subgraph with filters, pagination and ordering. @@ -66,6 +72,14 @@ Gets all stakers from the subgraph with filters, pagination and ordering. [`IStakersFilter`](../../interfaces/interfaces/IStakersFilter.md) +Stakers filter with pagination and ordering + +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IStaker`](../../interfaces/interfaces/IStaker.md)[]\> diff --git a/docs/sdk/typescript/statistics/classes/StatisticsClient.md b/docs/sdk/typescript/statistics/classes/StatisticsClient.md index 87322f62c2..ebc2034720 100644 --- a/docs/sdk/typescript/statistics/classes/StatisticsClient.md +++ b/docs/sdk/typescript/statistics/classes/StatisticsClient.md @@ -6,7 +6,7 @@ # Class: StatisticsClient -Defined in: [statistics.ts:60](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L60) +Defined in: [statistics.ts:64](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L64) ## Introduction @@ -45,7 +45,7 @@ const statisticsClient = new StatisticsClient(NETWORKS[ChainId.POLYGON_AMOY]); > **new StatisticsClient**(`networkData`): `StatisticsClient` -Defined in: [statistics.ts:69](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L69) +Defined in: [statistics.ts:73](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L73) **StatisticsClient constructor** @@ -67,7 +67,7 @@ The network information required to connect to the Statistics contract > **networkData**: [`NetworkData`](../../types/type-aliases/NetworkData.md) -Defined in: [statistics.ts:61](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L61) +Defined in: [statistics.ts:65](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L65) *** @@ -75,15 +75,15 @@ Defined in: [statistics.ts:61](https://github.com/humanprotocol/human-protocol/b > **subgraphUrl**: `string` -Defined in: [statistics.ts:62](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L62) +Defined in: [statistics.ts:66](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L66) ## Methods ### getEscrowStatistics() -> **getEscrowStatistics**(`filter`): `Promise`\<[`IEscrowStatistics`](../../interfaces/interfaces/IEscrowStatistics.md)\> +> **getEscrowStatistics**(`filter`, `options?`): `Promise`\<[`IEscrowStatistics`](../../interfaces/interfaces/IEscrowStatistics.md)\> -Defined in: [statistics.ts:122](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L122) +Defined in: [statistics.ts:127](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L127) This function returns the statistical data of escrows. @@ -123,6 +123,12 @@ interface IEscrowStatistics { Statistics params with duration data +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IEscrowStatistics`](../../interfaces/interfaces/IEscrowStatistics.md)\> @@ -147,9 +153,9 @@ const escrowStatisticsApril = await statisticsClient.getEscrowStatistics({ ### getHMTDailyData() -> **getHMTDailyData**(`filter`): `Promise`\<[`IDailyHMT`](../../interfaces/interfaces/IDailyHMT.md)[]\> +> **getHMTDailyData**(`filter`, `options?`): `Promise`\<[`IDailyHMT`](../../interfaces/interfaces/IDailyHMT.md)[]\> -Defined in: [statistics.ts:478](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L478) +Defined in: [statistics.ts:510](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L510) This function returns the statistical data of HMToken day by day. @@ -183,6 +189,12 @@ interface IDailyHMT { Statistics params with duration data +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IDailyHMT`](../../interfaces/interfaces/IDailyHMT.md)[]\> @@ -212,9 +224,9 @@ console.log('HMT statistics from 5/8 - 6/8:', hmtStatisticsRange); ### getHMTHolders() -> **getHMTHolders**(`params`): `Promise`\<[`IHMTHolder`](../../interfaces/interfaces/IHMTHolder.md)[]\> +> **getHMTHolders**(`params`, `options?`): `Promise`\<[`IHMTHolder`](../../interfaces/interfaces/IHMTHolder.md)[]\> -Defined in: [statistics.ts:407](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L407) +Defined in: [statistics.ts:434](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L434) This function returns the holders of the HMToken with optional filters and ordering. @@ -228,6 +240,12 @@ This function returns the holders of the HMToken with optional filters and order HMT Holders params with filters and ordering +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IHMTHolder`](../../interfaces/interfaces/IHMTHolder.md)[]\> @@ -255,9 +273,9 @@ console.log('HMT holders:', hmtHolders.map((h) => ({ ### getHMTStatistics() -> **getHMTStatistics**(): `Promise`\<[`IHMTStatistics`](../../interfaces/interfaces/IHMTStatistics.md)\> +> **getHMTStatistics**(`options?`): `Promise`\<[`IHMTStatistics`](../../interfaces/interfaces/IHMTStatistics.md)\> -Defined in: [statistics.ts:366](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L366) +Defined in: [statistics.ts:392](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L392) This function returns the statistical data of HMToken. @@ -269,6 +287,14 @@ interface IHMTStatistics { }; ``` +#### Parameters + +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IHMTStatistics`](../../interfaces/interfaces/IHMTStatistics.md)\> @@ -294,9 +320,9 @@ console.log('HMT statistics:', { ### getPaymentStatistics() -> **getPaymentStatistics**(`filter`): `Promise`\<[`IPaymentStatistics`](../../interfaces/interfaces/IPaymentStatistics.md)\> +> **getPaymentStatistics**(`filter`, `options?`): `Promise`\<[`IPaymentStatistics`](../../interfaces/interfaces/IPaymentStatistics.md)\> -Defined in: [statistics.ts:302](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L302) +Defined in: [statistics.ts:321](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L321) This function returns the statistical data of payments. @@ -333,6 +359,12 @@ interface IPaymentStatistics { Statistics params with duration data +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IPaymentStatistics`](../../interfaces/interfaces/IPaymentStatistics.md)\> @@ -378,9 +410,9 @@ console.log( ### getWorkerStatistics() -> **getWorkerStatistics**(`filter`): `Promise`\<[`IWorkerStatistics`](../../interfaces/interfaces/IWorkerStatistics.md)\> +> **getWorkerStatistics**(`filter`, `options?`): `Promise`\<[`IWorkerStatistics`](../../interfaces/interfaces/IWorkerStatistics.md)\> -Defined in: [statistics.ts:206](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L206) +Defined in: [statistics.ts:218](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L218) This function returns the statistical data of workers. @@ -415,6 +447,12 @@ interface IWorkerStatistics { Statistics params with duration data +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`IWorkerStatistics`](../../interfaces/interfaces/IWorkerStatistics.md)\> diff --git a/docs/sdk/typescript/storage/classes/StorageClient.md b/docs/sdk/typescript/storage/classes/StorageClient.md index 91b0828126..2cd637a09b 100644 --- a/docs/sdk/typescript/storage/classes/StorageClient.md +++ b/docs/sdk/typescript/storage/classes/StorageClient.md @@ -6,7 +6,7 @@ # ~~Class: StorageClient~~ -Defined in: [storage.ts:63](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L63) +Defined in: [storage.ts:63](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L63) ## Deprecated @@ -61,7 +61,7 @@ const storageClient = new StorageClient(params, credentials); > **new StorageClient**(`params`, `credentials?`): `StorageClient` -Defined in: [storage.ts:73](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L73) +Defined in: [storage.ts:73](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L73) **Storage client constructor** @@ -89,7 +89,7 @@ Optional. Cloud storage access data. If credentials are not provided - use anony > **bucketExists**(`bucket`): `Promise`\<`boolean`\> -Defined in: [storage.ts:262](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L262) +Defined in: [storage.ts:262](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L262) This function checks if a bucket exists. @@ -133,7 +133,7 @@ const exists = await storageClient.bucketExists('bucket-name'); > **downloadFiles**(`keys`, `bucket`): `Promise`\<`any`[]\> -Defined in: [storage.ts:112](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L112) +Defined in: [storage.ts:112](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L112) This function downloads files from a bucket. @@ -181,7 +181,7 @@ const files = await storageClient.downloadFiles(keys, 'bucket-name'); > **listObjects**(`bucket`): `Promise`\<`string`[]\> -Defined in: [storage.ts:292](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L292) +Defined in: [storage.ts:292](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L292) This function lists all file names contained in the bucket. @@ -225,7 +225,7 @@ const fileNames = await storageClient.listObjects('bucket-name'); > **uploadFiles**(`files`, `bucket`): `Promise`\<[`UploadFile`](../../types/type-aliases/UploadFile.md)[]\> -Defined in: [storage.ts:198](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L198) +Defined in: [storage.ts:198](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L198) This function uploads files to a bucket. @@ -278,7 +278,7 @@ const uploadedFiles = await storageClient.uploadFiles(files, 'bucket-name'); > `static` **downloadFileFromUrl**(`url`): `Promise`\<`any`\> -Defined in: [storage.ts:146](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L146) +Defined in: [storage.ts:146](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L146) This function downloads files from a URL. diff --git a/docs/sdk/typescript/transaction/classes/TransactionUtils.md b/docs/sdk/typescript/transaction/classes/TransactionUtils.md index 67155f2b20..4d418a54bb 100644 --- a/docs/sdk/typescript/transaction/classes/TransactionUtils.md +++ b/docs/sdk/typescript/transaction/classes/TransactionUtils.md @@ -6,7 +6,7 @@ # Class: TransactionUtils -Defined in: [transaction.ts:23](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts#L23) +Defined in: [transaction.ts:23](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts#L23) ## Constructors @@ -22,9 +22,9 @@ Defined in: [transaction.ts:23](https://github.com/humanprotocol/human-protocol/ ### getTransaction() -> `static` **getTransaction**(`chainId`, `hash`): `Promise`\<[`ITransaction`](../../interfaces/interfaces/ITransaction.md) \| `null`\> +> `static` **getTransaction**(`chainId`, `hash`, `options?`): `Promise`\<[`ITransaction`](../../interfaces/interfaces/ITransaction.md) \| `null`\> -Defined in: [transaction.ts:67](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts#L67) +Defined in: [transaction.ts:68](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts#L68) This function returns the transaction data for the given hash. @@ -70,6 +70,12 @@ The chain ID. The transaction hash. +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + +Optional configuration for subgraph requests. + #### Returns `Promise`\<[`ITransaction`](../../interfaces/interfaces/ITransaction.md) \| `null`\> @@ -88,9 +94,9 @@ const transaction = await TransactionUtils.getTransaction(ChainId.POLYGON, '0x62 ### getTransactions() -> `static` **getTransactions**(`filter`): `Promise`\<[`ITransaction`](../../interfaces/interfaces/ITransaction.md)[]\> +> `static` **getTransactions**(`filter`, `options?`): `Promise`\<[`ITransaction`](../../interfaces/interfaces/ITransaction.md)[]\> -Defined in: [transaction.ts:162](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts#L162) +Defined in: [transaction.ts:170](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts#L170) This function returns all transaction details based on the provided filter. @@ -144,6 +150,7 @@ type ITransaction = { ``` @param {ITransactionsFilter} filter Filter for the transactions. +@param {SubgraphOptions} options Optional configuration for subgraph requests. @returns {Promise} Returns an array with all the transaction details. **Code example** @@ -168,6 +175,10 @@ const transactions = await TransactionUtils.getTransactions(filter); [`ITransactionsFilter`](../../interfaces/interfaces/ITransactionsFilter.md) +##### options? + +[`SubgraphOptions`](../../interfaces/interfaces/SubgraphOptions.md) + #### Returns `Promise`\<[`ITransaction`](../../interfaces/interfaces/ITransaction.md)[]\> diff --git a/docs/sdk/typescript/types/enumerations/EscrowStatus.md b/docs/sdk/typescript/types/enumerations/EscrowStatus.md index 2b08467171..2edaa0c575 100644 --- a/docs/sdk/typescript/types/enumerations/EscrowStatus.md +++ b/docs/sdk/typescript/types/enumerations/EscrowStatus.md @@ -6,7 +6,7 @@ # Enumeration: EscrowStatus -Defined in: [types.ts:8](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L8) +Defined in: [types.ts:8](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L8) Enum for escrow statuses. @@ -16,7 +16,7 @@ Enum for escrow statuses. > **Cancelled**: `5` -Defined in: [types.ts:32](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L32) +Defined in: [types.ts:32](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L32) Escrow is cancelled. @@ -26,7 +26,7 @@ Escrow is cancelled. > **Complete**: `4` -Defined in: [types.ts:28](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L28) +Defined in: [types.ts:28](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L28) Escrow is finished. @@ -36,7 +36,7 @@ Escrow is finished. > **Launched**: `0` -Defined in: [types.ts:12](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L12) +Defined in: [types.ts:12](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L12) Escrow is launched. @@ -46,7 +46,7 @@ Escrow is launched. > **Paid**: `3` -Defined in: [types.ts:24](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L24) +Defined in: [types.ts:24](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L24) Escrow is fully paid. @@ -56,7 +56,7 @@ Escrow is fully paid. > **Partial**: `2` -Defined in: [types.ts:20](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L20) +Defined in: [types.ts:20](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L20) Escrow is partially paid out. @@ -66,7 +66,7 @@ Escrow is partially paid out. > **Pending**: `1` -Defined in: [types.ts:16](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L16) +Defined in: [types.ts:16](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L16) Escrow is funded, and waiting for the results to be submitted. @@ -76,6 +76,6 @@ Escrow is funded, and waiting for the results to be submitted. > **ToCancel**: `6` -Defined in: [types.ts:36](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L36) +Defined in: [types.ts:36](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L36) Escrow is cancelled. diff --git a/docs/sdk/typescript/types/type-aliases/NetworkData.md b/docs/sdk/typescript/types/type-aliases/NetworkData.md index babf71cda4..bc32ba3450 100644 --- a/docs/sdk/typescript/types/type-aliases/NetworkData.md +++ b/docs/sdk/typescript/types/type-aliases/NetworkData.md @@ -8,7 +8,7 @@ > **NetworkData** = `object` -Defined in: [types.ts:99](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L99) +Defined in: [types.ts:99](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L99) Network data @@ -18,7 +18,7 @@ Network data > **chainId**: `number` -Defined in: [types.ts:103](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L103) +Defined in: [types.ts:103](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L103) Network chain id @@ -28,7 +28,7 @@ Network chain id > **factoryAddress**: `string` -Defined in: [types.ts:119](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L119) +Defined in: [types.ts:119](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L119) Escrow Factory contract address @@ -38,7 +38,7 @@ Escrow Factory contract address > **hmtAddress**: `string` -Defined in: [types.ts:115](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L115) +Defined in: [types.ts:115](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L115) HMT Token contract address @@ -48,7 +48,7 @@ HMT Token contract address > **kvstoreAddress**: `string` -Defined in: [types.ts:127](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L127) +Defined in: [types.ts:127](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L127) KVStore contract address @@ -58,7 +58,7 @@ KVStore contract address > **oldFactoryAddress**: `string` -Defined in: [types.ts:143](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L143) +Defined in: [types.ts:143](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L143) Old Escrow Factory contract address @@ -68,7 +68,7 @@ Old Escrow Factory contract address > **oldSubgraphUrl**: `string` -Defined in: [types.ts:139](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L139) +Defined in: [types.ts:139](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L139) Old subgraph URL @@ -78,7 +78,7 @@ Old subgraph URL > **scanUrl**: `string` -Defined in: [types.ts:111](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L111) +Defined in: [types.ts:111](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L111) Network scanner URL @@ -88,7 +88,7 @@ Network scanner URL > **stakingAddress**: `string` -Defined in: [types.ts:123](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L123) +Defined in: [types.ts:123](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L123) Staking contract address @@ -98,7 +98,7 @@ Staking contract address > **subgraphUrl**: `string` -Defined in: [types.ts:131](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L131) +Defined in: [types.ts:131](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L131) Subgraph URL @@ -108,7 +108,7 @@ Subgraph URL > **subgraphUrlApiKey**: `string` -Defined in: [types.ts:135](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L135) +Defined in: [types.ts:135](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L135) Subgraph URL API key @@ -118,6 +118,6 @@ Subgraph URL API key > **title**: `string` -Defined in: [types.ts:107](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L107) +Defined in: [types.ts:107](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L107) Network title diff --git a/docs/sdk/typescript/types/type-aliases/StorageCredentials.md b/docs/sdk/typescript/types/type-aliases/StorageCredentials.md index 3ccc4d4af9..7e9fdb3b1a 100644 --- a/docs/sdk/typescript/types/type-aliases/StorageCredentials.md +++ b/docs/sdk/typescript/types/type-aliases/StorageCredentials.md @@ -8,7 +8,7 @@ > `readonly` **StorageCredentials** = `object` -Defined in: [types.ts:44](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L44) +Defined in: [types.ts:44](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L44) AWS/GCP cloud storage access data @@ -22,7 +22,7 @@ StorageClient is deprecated. Use Minio.Client directly. > **accessKey**: `string` -Defined in: [types.ts:48](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L48) +Defined in: [types.ts:48](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L48) Access Key @@ -32,6 +32,6 @@ Access Key > **secretKey**: `string` -Defined in: [types.ts:52](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L52) +Defined in: [types.ts:52](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L52) Secret Key diff --git a/docs/sdk/typescript/types/type-aliases/StorageParams.md b/docs/sdk/typescript/types/type-aliases/StorageParams.md index 7ac7fbd2fe..d3407c10c8 100644 --- a/docs/sdk/typescript/types/type-aliases/StorageParams.md +++ b/docs/sdk/typescript/types/type-aliases/StorageParams.md @@ -8,7 +8,7 @@ > **StorageParams** = `object` -Defined in: [types.ts:58](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L58) +Defined in: [types.ts:58](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L58) ## Deprecated @@ -20,7 +20,7 @@ StorageClient is deprecated. Use Minio.Client directly. > **endPoint**: `string` -Defined in: [types.ts:62](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L62) +Defined in: [types.ts:62](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L62) Request endPoint @@ -30,7 +30,7 @@ Request endPoint > `optional` **port**: `number` -Defined in: [types.ts:74](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L74) +Defined in: [types.ts:74](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L74) TCP/IP port number. Default value set to 80 for HTTP and 443 for HTTPs @@ -40,7 +40,7 @@ TCP/IP port number. Default value set to 80 for HTTP and 443 for HTTPs > `optional` **region**: `string` -Defined in: [types.ts:70](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L70) +Defined in: [types.ts:70](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L70) Region @@ -50,6 +50,6 @@ Region > **useSSL**: `boolean` -Defined in: [types.ts:66](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L66) +Defined in: [types.ts:66](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L66) Enable secure (HTTPS) access. Default value set to false diff --git a/docs/sdk/typescript/types/type-aliases/TransactionLikeWithNonce.md b/docs/sdk/typescript/types/type-aliases/TransactionLikeWithNonce.md index 01ebde8c54..3d75569501 100644 --- a/docs/sdk/typescript/types/type-aliases/TransactionLikeWithNonce.md +++ b/docs/sdk/typescript/types/type-aliases/TransactionLikeWithNonce.md @@ -8,7 +8,7 @@ > **TransactionLikeWithNonce** = `TransactionLike` & `object` -Defined in: [types.ts:146](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L146) +Defined in: [types.ts:146](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L146) ## Type Declaration diff --git a/docs/sdk/typescript/types/type-aliases/UploadFile.md b/docs/sdk/typescript/types/type-aliases/UploadFile.md index 32d41fcac1..a5ee434fef 100644 --- a/docs/sdk/typescript/types/type-aliases/UploadFile.md +++ b/docs/sdk/typescript/types/type-aliases/UploadFile.md @@ -8,7 +8,7 @@ > `readonly` **UploadFile** = `object` -Defined in: [types.ts:81](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L81) +Defined in: [types.ts:81](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L81) Upload file data @@ -18,7 +18,7 @@ Upload file data > **hash**: `string` -Defined in: [types.ts:93](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L93) +Defined in: [types.ts:93](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L93) Hash of uploaded object key @@ -28,7 +28,7 @@ Hash of uploaded object key > **key**: `string` -Defined in: [types.ts:85](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L85) +Defined in: [types.ts:85](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L85) Uploaded object key @@ -38,6 +38,6 @@ Uploaded object key > **url**: `string` -Defined in: [types.ts:89](https://github.com/humanprotocol/human-protocol/blob/d055cfd598260e2e29b8b12885f1ee350eef64a4/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L89) +Defined in: [types.ts:89](https://github.com/humanprotocol/human-protocol/blob/61aec7f941934ccbea233e5338eb9fedacd0b20e/packages/sdk/typescript/human-protocol-sdk/src/types.ts#L89) Uploaded object URL diff --git a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx index ac2999cccd..ec953056ea 100644 --- a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx @@ -1,6 +1,5 @@ import type { ChainId } from '@human-protocol/sdk/src/enums'; -import AuroraIcon from '@/shared/ui/icons/AuroraIcon'; import BinanceSmartChainIcon from '@/shared/ui/icons/BinanceSmartChainIcon'; import EthereumIcon from '@/shared/ui/icons/EthereumIcon'; import HumanIcon from '@/shared/ui/icons/HumanIcon'; @@ -18,8 +17,6 @@ export const NetworkIcon = ({ chainId }: { chainId: ChainId }) => { case 137: case 80002: return ; - case 1313161555: - return ; default: return ; } diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/AuroraIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/AuroraIcon.tsx deleted file mode 100644 index 1e8cf89d87..0000000000 --- a/packages/apps/dashboard/client/src/shared/ui/icons/AuroraIcon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import type { FC } from 'react'; - -import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; - -const AuroraIcon: FC = (props) => { - return ( - - - - ); -}; - -export default AuroraIcon; diff --git a/packages/apps/dashboard/server/src/common/config/network-config.service.ts b/packages/apps/dashboard/server/src/common/config/network-config.service.ts index f9b0ab3f08..82805f0fb8 100644 --- a/packages/apps/dashboard/server/src/common/config/network-config.service.ts +++ b/packages/apps/dashboard/server/src/common/config/network-config.service.ts @@ -62,12 +62,6 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), - ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { - auroratest: { - chainId: ChainId.AURORA_TESTNET, - rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), - }, - }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/dashboard/server/src/common/utils/constants.ts b/packages/apps/dashboard/server/src/common/utils/constants.ts index 9bdd75a836..71594d0819 100644 --- a/packages/apps/dashboard/server/src/common/utils/constants.ts +++ b/packages/apps/dashboard/server/src/common/utils/constants.ts @@ -6,7 +6,6 @@ export const TESTNET_CHAIN_IDS = [ ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, - ChainId.AURORA_TESTNET, ]; export const MAINNET_CHAIN_IDS = [ ChainId.MAINNET, diff --git a/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts b/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts index bc3f04e0cd..166370dd98 100644 --- a/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts +++ b/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts @@ -22,7 +22,6 @@ describe('NetworksService', () => { process.env.RPC_URL_POLYGON = 'https://testrpc.com'; process.env.RPC_URL_BSC_MAINNET = 'https://testrpc.com'; process.env.RPC_URL_ETHEREUM = 'https://testrpc.com'; - process.env.RPC_URL_AURORA_TESTNET = 'https://testrpc.com'; process.env.WEB3_ENV = 'mainnet'; }); diff --git a/packages/apps/dashboard/server/src/modules/stats/stats.service.ts b/packages/apps/dashboard/server/src/modules/stats/stats.service.ts index ba54c890d8..47bf4645b3 100644 --- a/packages/apps/dashboard/server/src/modules/stats/stats.service.ts +++ b/packages/apps/dashboard/server/src/modules/stats/stats.service.ts @@ -392,47 +392,66 @@ export class StatsService implements OnModuleInit { return cachedHmtPrice; } - const headers = this.envConfigService.hmtPriceSourceApiKey - ? { 'x-cg-demo-api-key': this.envConfigService.hmtPriceSourceApiKey } - : {}; + try { + const headers = this.envConfigService.hmtPriceSourceApiKey + ? { 'x-cg-demo-api-key': this.envConfigService.hmtPriceSourceApiKey } + : {}; - const { data } = await lastValueFrom( - this.httpService.get(this.envConfigService.hmtPriceSource, { headers }), - ); + const { data } = await lastValueFrom( + this.httpService.get(this.envConfigService.hmtPriceSource, { headers }), + ); - let hmtPrice: number; - - if (this.envConfigService.hmtPriceSource.includes('coingecko')) { - if ( - !data || - !data[this.envConfigService.hmtPriceFromKey] || - !data[this.envConfigService.hmtPriceFromKey][ - this.envConfigService.hmtPriceToKey - ] - ) { - throw new Error('Failed to fetch HMT price from CoinGecko API'); + let hmtPrice: number; + + if (this.envConfigService.hmtPriceSource.includes('coingecko')) { + if ( + !data || + !data[this.envConfigService.hmtPriceFromKey] || + !data[this.envConfigService.hmtPriceFromKey][ + this.envConfigService.hmtPriceToKey + ] + ) { + throw new Error('Failed to fetch HMT price from CoinGecko API'); + } + hmtPrice = parseFloat( + data[this.envConfigService.hmtPriceFromKey][ + this.envConfigService.hmtPriceToKey + ], + ); + } else if (this.envConfigService.hmtPriceSource.includes('coinlore')) { + if ( + !data || + !data[0] || + !data[0].price_usd || + data[0].symbol !== 'HMT' + ) { + throw new Error('Failed to fetch HMT price from Coinlore API'); + } + hmtPrice = parseFloat(data[0].price_usd); + } else { + throw new Error('Unsupported HMT price source'); } - hmtPrice = parseFloat( - data[this.envConfigService.hmtPriceFromKey][ - this.envConfigService.hmtPriceToKey - ], + + await this.cacheManager.set( + this.redisConfigService.hmtPriceCacheKey, + hmtPrice, + this.redisConfigService.cacheHmtPriceTTL, ); - } else if (this.envConfigService.hmtPriceSource.includes('coinlore')) { - if (!data || !data[0] || !data[0].price_usd || data[0].symbol !== 'HMT') { - throw new Error('Failed to fetch HMT price from Coinlore API'); + + return hmtPrice; + } catch (error) { + let formattedError = error; + if (error instanceof AxiosError) { + formattedError = httpUtils.formatAxiosError(error); } - hmtPrice = parseFloat(data[0].price_usd); - } else { - throw new Error('Unsupported HMT price source'); - } - await this.cacheManager.set( - this.redisConfigService.hmtPriceCacheKey, - hmtPrice, - this.redisConfigService.cacheHmtPriceTTL, - ); + this.logger.error('Failed to fetch HMT price', { + source: this.envConfigService.hmtPriceSource, + error: formattedError, + }); - return hmtPrice; + throw error; + } } async hCaptchaStats(from: string, to: string): Promise { diff --git a/packages/apps/faucet/client/src/constants/index.ts b/packages/apps/faucet/client/src/constants/index.ts index 07ba08e013..60ad7fbdfb 100644 --- a/packages/apps/faucet/client/src/constants/index.ts +++ b/packages/apps/faucet/client/src/constants/index.ts @@ -4,5 +4,4 @@ export const FAUCET_CHAIN_IDS = [ ChainId.SEPOLIA, ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, - ChainId.AURORA_TESTNET, ]; diff --git a/packages/apps/faucet/server/.env.example b/packages/apps/faucet/server/.env.example index c7c4b2a028..d8a6758a97 100644 --- a/packages/apps/faucet/server/.env.example +++ b/packages/apps/faucet/server/.env.example @@ -13,7 +13,6 @@ ADDRESS_WAITING_TIME=3600 RPC_URL_SEPOLIA="" RPC_URL_BSC_TESTNET="" RPC_URL_POLYGON_AMOY="" -RPC_URL_AURORA_TESTNET="" # Balance threshold FAUCET_MIN_BALANCE= diff --git a/packages/apps/faucet/server/src/constants/networks.ts b/packages/apps/faucet/server/src/constants/networks.ts index ac5a70a976..e79f7ddb62 100644 --- a/packages/apps/faucet/server/src/constants/networks.ts +++ b/packages/apps/faucet/server/src/constants/networks.ts @@ -16,9 +16,6 @@ export const FAUCET_NETWORKS: { [ChainId.POLYGON_AMOY]: { rpcUrl: process.env.RPC_URL_POLYGON_AMOY || '', }, - [ChainId.AURORA_TESTNET]: { - rpcUrl: process.env.RPC_URL_AURORA_TESTNET || '', - }, [ChainId.LOCALHOST]: { rpcUrl: process.env.RPC_PORT ? `http://127.0.0.1:${process.env.RPC_PORT}` diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts b/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts index 6365d1357a..04641ead7f 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts @@ -22,7 +22,6 @@ export const envValidator = Joi.object({ RPC_URL_POLYGON_AMOY: Joi.string(), RPC_URL_SEPOLIA: Joi.string(), RPC_URL_BSC_TESTNET: Joi.string(), - RPC_URL_AURORA_TESTNET: Joi.string(), RPC_URL_LOCALHOST: Joi.string(), // S3 S3_ENDPOINT: Joi.string(), diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts b/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts index ead16f03c4..416f8f1a67 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts @@ -62,15 +62,6 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), - ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { - auroratest: { - chainId: ChainId.AURORA_TESTNET, - /** - * The RPC URL for the AURORA Testnet network. - */ - rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), - }, - }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts b/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts index 509aca7a57..f68848e847 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts @@ -10,7 +10,6 @@ export const TESTNET_CHAIN_IDS = [ ChainId.POLYGON_AMOY, ChainId.BSC_TESTNET, ChainId.SEPOLIA, - ChainId.AURORA_TESTNET, ]; export const MAINNET_CHAIN_IDS = [ChainId.POLYGON, ChainId.BSC_MAINNET]; diff --git a/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts b/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts index 66bea4e59b..7a1a4d6144 100644 --- a/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts +++ b/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts @@ -12,7 +12,6 @@ export const envValidator = Joi.object({ RPC_URL_SEPOLIA: Joi.string(), RPC_URL_MOONBEAM: Joi.string(), RPC_URL_BSC_TESTNET: Joi.string(), - RPC_URL_AURORA_TESTNET: Joi.string(), RPC_URL_LOCALHOST: Joi.string(), // S3 S3_ENDPOINT: Joi.string(), diff --git a/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts b/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts index ca9d322456..a2571f7619 100644 --- a/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts +++ b/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts @@ -62,15 +62,6 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), - ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { - auroratest: { - chainId: ChainId.AURORA_TESTNET, - /** - * The RPC URL for the AURORA Testnet network. - */ - rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), - }, - }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/human-app/frontend/serve.json b/packages/apps/human-app/frontend/serve.json index 0a1fecd634..fab81ba9fe 100644 --- a/packages/apps/human-app/frontend/serve.json +++ b/packages/apps/human-app/frontend/serve.json @@ -18,7 +18,7 @@ }, { "key": "Content-Security-Policy", - "value": "frame-ancestors: 'none';" + "value": "frame-ancestors 'none';" }, { "key": "Strict-Transport-Security", diff --git a/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx b/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx index 2742866200..96511134cf 100644 --- a/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx +++ b/packages/apps/human-app/frontend/src/modules/auth/context/auth-context.tsx @@ -1,10 +1,11 @@ /* eslint-disable camelcase */ import { z } from 'zod'; import { createAuthProvider } from '@/shared/contexts/generic-auth-context'; +import { KycStatus } from '@/modules/worker/profile/types'; const userDataSchema = z.object({ site_key: z.string().optional().nullable(), - kyc_status: z.string().optional().nullable(), + kyc_status: z.enum(KycStatus).optional().nullable(), wallet_address: z.string().optional().nullable(), status: z.enum(['active', 'pending']), email: z.string(), diff --git a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts index 445fbf86f7..7666fcd23d 100644 --- a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts +++ b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts @@ -27,7 +27,6 @@ export const TestnetChainsIds = [ ChainId.POLYGON_AMOY, ChainId.SEPOLIA, ChainId.BSC_TESTNET, - ChainId.AURORA_TESTNET, ChainId.LOCALHOST, ] as const; diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/index.ts b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/index.ts index d36cf6b6e7..7a439e76d9 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/index.ts +++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/index.ts @@ -1,3 +1,4 @@ export * from './user-stats-accordion'; export * from './user-stats-details'; export * from './user-stats-drawer'; +export * from './user-stats-loading-overlay'; diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx index f5b6e6c725..082157d655 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-accordion.tsx @@ -14,6 +14,7 @@ import { getErrorMessageForError } from '@/shared/errors'; import { useColorMode } from '@/shared/contexts/color-mode'; import { useHCaptchaUserStats } from '../hooks'; import { UserStatsDetails } from './user-stats-details'; +import { LoadingOverlay } from './user-stats-loading-overlay'; const accordionWidth = { width: '284px' }; @@ -25,6 +26,7 @@ export function UserStatsAccordion() { isError: isHcaptchaUserStatsError, error: hcaptchaUserStatsError, refetch: refetchUserStats, + isRefetching: isHcaptchaUserStatsRefetching, } = useHCaptchaUserStats(); const { showNotification } = useNotification(); @@ -40,7 +42,23 @@ export function UserStatsAccordion() { return ( - + + {isHcaptchaUserStatsRefetching && ( + + )} { - void refetchUserStats(); - }} + refetch={() => void refetchUserStats()} stats={hcaptchaUserStats} + isRefetching={isHcaptchaUserStatsRefetching} /> ) : null} diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx index d7d68daa7c..36100f1aab 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-details.tsx @@ -1,128 +1,110 @@ -import { Divider, Grid, Typography } from '@mui/material'; +import { Divider, IconButton, Stack, Typography } from '@mui/material'; import { t } from 'i18next'; import { RefreshIcon } from '@/shared/components/ui/icons'; import { onlyDarkModeColor } from '@/shared/styles/dark-color-palette'; import { useColorMode } from '@/shared/contexts/color-mode'; +import { useIsMobile } from '@/shared/hooks'; import { type HCaptchaUserStatsSuccess } from '../types'; export function UserStatsDetails({ stats, refetch, + isRefetching, }: Readonly<{ stats: HCaptchaUserStatsSuccess; refetch: () => void; + isRefetching: boolean; }>) { const { colorPalette, isDarkMode } = useColorMode(); + const isMobile = useIsMobile(); + const statsColor = isDarkMode ? onlyDarkModeColor.additionalTextColor : colorPalette.primary.light; + return ( - + - - - + + + {t('worker.hcaptchaLabelingStats.allTime')} - - + + {t('worker.hcaptchaLabelingStats.jobsServed')} {stats.served} - - + + {t('worker.hcaptchaLabelingStats.jobsComplete')} {stats.solved} - - + + {t('worker.hcaptchaLabelingStats.hmtEarned')} - {stats.balance.total} + {stats.balance.total}{' '} {t('inputMasks.humanCurrencySuffix')} - - - - - - + + + + + + {t('worker.hcaptchaLabelingStats.lastHour')} - - - - {t('worker.hcaptchaLabelingStats.earnedLastHour')} - - - {stats.balance.recent} - - {t('inputMasks.humanCurrencySuffix')} - - - - - - - - - {t('worker.hcaptchaLabelingStats.statisticsNotLive')} + + + {t('worker.hcaptchaLabelingStats.earnedLastHour')} + + + {stats.balance.recent}{' '} + + {t('inputMasks.humanCurrencySuffix')} + - - { - refetch(); - }} - sx={{ - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - ':hover': { - cursor: 'pointer', - }, - }} + + + + + {t('worker.hcaptchaLabelingStats.statisticsNotLive')} + + - - - - + + + + ); } diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-drawer.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-drawer.tsx index 1551856712..1e584e4322 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-drawer.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-drawer.tsx @@ -1,36 +1,16 @@ -import Box from '@mui/material/Box'; -import Drawer from '@mui/material/Drawer'; -import CssBaseline from '@mui/material/CssBaseline'; -import { Grid, Typography } from '@mui/material'; +import { Box, CssBaseline, Drawer, Stack, Typography } from '@mui/material'; import { t } from 'i18next'; import { Loader } from '@/shared/components/ui/loader'; import { Alert } from '@/shared/components/ui/alert'; import { getErrorMessageForError } from '@/shared/errors'; -import { type HCaptchaUserStatsSuccess } from '../types'; import { useHCaptchaUserStats } from '../hooks'; import { UserStatsDetails } from './user-stats-details'; +import { LoadingOverlay } from './user-stats-loading-overlay'; export interface UserStatsDrawerNavigationProps { isOpen: boolean; } -function UserStatsDrawerContent({ - stats, - refetch, -}: Readonly<{ - stats: HCaptchaUserStatsSuccess; - refetch: () => void; -}>) { - return ( - <> - - {t('worker.hcaptchaLabelingStats.hCapchaStatistics')} - - - - ); -} - export function UserStatsDrawer({ isOpen, }: Readonly) { @@ -39,6 +19,7 @@ export function UserStatsDrawer({ error: hcaptchaUserStatsError, status: hcaptchaUserStatsStatus, refetch: hcaptchaUserStatsRefetch, + isRefetching: isHcaptchaUserStatsRefetching, } = useHCaptchaUserStats(); return ( @@ -46,47 +27,53 @@ export function UserStatsDrawer({ - - {hcaptchaUserStatsStatus === 'success' ? ( - { - void hcaptchaUserStatsRefetch(); + + {isHcaptchaUserStatsRefetching && ( + - ) : null} - {hcaptchaUserStatsStatus === 'error' ? ( - - {getErrorMessageForError(hcaptchaUserStatsError)} - - ) : null} - {hcaptchaUserStatsStatus === 'pending' ? ( - - ) : null} - + )} + + {hcaptchaUserStatsStatus === 'success' ? ( + <> + + {t('worker.hcaptchaLabelingStats.hCapchaStatistics')} + + void hcaptchaUserStatsRefetch()} + stats={hcaptchaUserStats} + isRefetching={isHcaptchaUserStatsRefetching} + /> + + ) : null} + {hcaptchaUserStatsStatus === 'error' ? ( + + {getErrorMessageForError(hcaptchaUserStatsError)} + + ) : null} + {hcaptchaUserStatsStatus === 'pending' ? ( + + ) : null} + + ); diff --git a/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-loading-overlay.tsx b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-loading-overlay.tsx new file mode 100644 index 0000000000..2eb65a9e6c --- /dev/null +++ b/packages/apps/human-app/frontend/src/modules/worker/hcaptcha-labeling/components/user-stats-loading-overlay.tsx @@ -0,0 +1,34 @@ +import { Box, type SxProps, Typography } from '@mui/material'; +import { t } from 'i18next'; +import { useColorMode } from '@/shared/contexts/color-mode'; +import { Loader } from '@/shared/components/ui/loader'; + +export function LoadingOverlay({ sx }: { sx?: SxProps }) { + const { isDarkMode } = useColorMode(); + return ( + + + + {t('worker.hcaptchaLabelingStats.loadingLiveStatistics')} + + + ); +} diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/components/more-button.tsx b/packages/apps/human-app/frontend/src/modules/worker/jobs/components/more-button.tsx index 492459017f..39dc5f758e 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/jobs/components/more-button.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/components/more-button.tsx @@ -6,6 +6,7 @@ import { useParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useModal } from '@/shared/contexts/modal-context'; import { useIsMobile } from '@/shared/hooks/use-is-mobile'; +import { TopNotificationType, useNotification } from '@/shared/hooks'; import { useResignJobMutation } from '../my-jobs/hooks'; import { type MyJob } from '../schemas'; import { ReportAbuseModal } from './report-abuse-modal'; @@ -18,19 +19,28 @@ interface MoreButtonProps { export function MoreButton({ job, isDisabled }: MoreButtonProps) { const [anchorEl, setAnchorEl] = useState(null); const { address: oracleAddress } = useParams<{ address: string }>(); - const { mutate: rejectTaskMutation } = useResignJobMutation(); + const { mutateAsync: rejectTaskMutation } = useResignJobMutation(); const { openModal, closeModal } = useModal(); const isMobile = useIsMobile(); const { t } = useTranslation(); + const { showNotification } = useNotification(); const isOpen = Boolean(anchorEl); - const handleCancelTask = () => { + const handleCancelTask = async () => { setAnchorEl(null); - rejectTaskMutation({ - oracle_address: oracleAddress ?? '', - assignment_id: job.assignment_id, - }); + try { + await rejectTaskMutation({ + oracle_address: oracleAddress ?? '', + assignment_id: job.assignment_id, + }); + } catch (error) { + showNotification({ + message: 'Something went wrong', + type: TopNotificationType.WARNING, + durationMs: 5000, + }); + } }; const handleOpenReportAbuseModal = () => { @@ -90,7 +100,7 @@ export function MoreButton({ job, isDisabled }: MoreButtonProps) { }} > - + void handleCancelTask()}> {t('worker.reportAbuse.cancel')} diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-refresh-jobs.ts b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-refresh-jobs.ts index c1d51ea138..30cec25ba6 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-refresh-jobs.ts +++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-refresh-jobs.ts @@ -18,6 +18,7 @@ export function useRefreshJobsMutation(callbacks?: { void callbacks.onSuccess(); } await queryClient.invalidateQueries({ queryKey: ['fetchMyJobs'] }); + await queryClient.invalidateQueries({ queryKey: ['myJobsInfinite'] }); }, onError: (error) => { if (callbacks?.onError) { diff --git a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-resign-job.ts b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-resign-job.ts index 0271b7c797..c3462793b3 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-resign-job.ts +++ b/packages/apps/human-app/frontend/src/modules/worker/jobs/my-jobs/hooks/use-resign-job.ts @@ -18,6 +18,7 @@ export function useResignJobMutation(callbacks?: { void callbacks.onSuccess(); } await queryClient.invalidateQueries({ queryKey: ['fetchMyJobs'] }); + await queryClient.invalidateQueries({ queryKey: ['myJobsInfinite'] }); }, onError: (error) => { if (callbacks?.onError) { diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/identity-verification-control.tsx b/packages/apps/human-app/frontend/src/modules/worker/profile/components/identity-verification-control.tsx index 2b8b801cb6..b808043119 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/identity-verification-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/profile/components/identity-verification-control.tsx @@ -1,21 +1,37 @@ import { useTranslation } from 'react-i18next'; +import { Stack, Typography } from '@mui/material'; +import { Chip } from '@/shared/components/ui/chip'; import { useWorkerIdentityVerificationStatus } from '../hooks'; +import { KycStatus } from '../types'; import { StartIdvBtn } from './buttons'; -import { DoneLabel, ErrorLabel } from './status-labels'; + +const getChipColor = (status: KycStatus) => { + if (status === KycStatus.APPROVED) { + return 'success.main'; + } else if ( + [KycStatus.RESUBMISSION_REQUESTED, KycStatus.REVIEW].includes(status) + ) { + return 'warning.main'; + } + return 'error.main'; +}; export function IdentityVerificationControl() { const { t } = useTranslation(); const { status } = useWorkerIdentityVerificationStatus(); - if (status === 'approved') { - return ( - {t('worker.profile.identityVerificationStatus')} - ); - } else if (status === 'declined') { - return ( - {t('worker.profile.identityVerificationStatus')} - ); + const label = t(`worker.profile.idvStatusValues.${status}`); + + if (status === KycStatus.NONE) { + return ; } - return ; + return ( + + + {t('worker.profile.identityVerificationStatus')}:{' '} + + + + ); } diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/done-label.tsx b/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/done-label.tsx deleted file mode 100644 index cbd5b38c55..0000000000 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/done-label.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Grid from '@mui/material/Grid'; -import Typography from '@mui/material/Typography'; -import { CheckmarkIcon } from '@/shared/components/ui/icons'; - -interface DoneLabelProps { - children: string | React.ReactElement; -} - -export function DoneLabel({ children }: Readonly) { - if (typeof children === 'string') { - return ( - - {children} - - - ); - } - - return children; -} diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/error-label.tsx b/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/error-label.tsx deleted file mode 100644 index b845f70df7..0000000000 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/error-label.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Grid from '@mui/material/Grid'; -import Typography from '@mui/material/Typography'; -import CancelIcon from '@mui/icons-material/Cancel'; - -interface ErrorLabelProps { - children: string | React.ReactElement; -} - -export function ErrorLabel({ children }: ErrorLabelProps) { - if (typeof children === 'string') { - return ( - - {children} - - - ); - } - - return children; -} diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/index.ts b/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/index.ts deleted file mode 100644 index 319821880d..0000000000 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/status-labels/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './done-label'; -export * from './error-label'; diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connect-done.tsx b/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connect-done.tsx index 0bf83e501e..263b262173 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connect-done.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connect-done.tsx @@ -1,9 +1,6 @@ -import Grid from '@mui/material/Grid/Grid'; -import TextField from '@mui/material/TextField'; -import Typography from '@mui/material/Typography/Typography'; +import { Stack, TextField, Typography } from '@mui/material'; import { t } from 'i18next'; import styled from '@mui/material/styles/styled'; -import { CheckmarkIcon } from '@/shared/components/ui/icons'; import { colorPalette } from '@/shared/styles/color-palette'; import { useAuthenticatedUser } from '@/modules/auth/hooks/use-authenticated-user'; import { useColorMode } from '@/shared/contexts/color-mode'; @@ -12,6 +9,7 @@ import { onlyDarkModeColor, } from '@/shared/styles/dark-color-palette'; import { useWalletConnect } from '@/shared/contexts/wallet-connect'; +import { Chip } from '@/shared/components/ui/chip'; const CustomTextField = styled(TextField)(() => ({ '& .Mui-disabled': { @@ -43,12 +41,17 @@ export function WalletConnectDone() { ); return ( - - - {t('worker.profile.walletConnected')} - - + + + + {t('worker.profile.wallet')}:{' '} + + + {address && !user.wallet_address ? null : textFiled} - + ); } diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx b/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx index d0268f7d7d..8188f76887 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/profile/components/wallet-connection-control.tsx @@ -4,7 +4,6 @@ import { Button } from '@/shared/components/ui/button'; import { useAuthenticatedUser } from '@/modules/auth/hooks/use-authenticated-user'; import { useWalletConnect } from '@/shared/contexts/wallet-connect'; import { useWorkerIdentityVerificationStatus } from '../hooks'; -import { DoneLabel } from './status-labels'; import { WalletConnectDone } from './wallet-connect-done'; import { RegisterAddressBtn } from './buttons'; @@ -18,11 +17,7 @@ export function WalletConnectionControl() { const hasWalletAddress = Boolean(walletAddress); if (hasWalletAddress) { - return ( - - - - ); + return ; } if (isVerificationCompleted && isConnected) { diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-worker-profile-status.tsx b/packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-worker-profile-status.tsx index e838b22257..8e355d2bed 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-worker-profile-status.tsx +++ b/packages/apps/human-app/frontend/src/modules/worker/profile/hooks/use-worker-profile-status.tsx @@ -1,11 +1,11 @@ import { useAuthenticatedUser } from '@/modules/auth/hooks/use-authenticated-user'; -import { type WorkerItentityVerificationStatus } from '../types'; +import { KycStatus, type WorkerItentityVerificationStatus } from '../types'; export function useWorkerIdentityVerificationStatus(): WorkerItentityVerificationStatus { const { user } = useAuthenticatedUser(); return { - isVerificationCompleted: user.kyc_status === 'approved', - status: user.kyc_status ?? 'none', + isVerificationCompleted: user.kyc_status === KycStatus.APPROVED, + status: user.kyc_status ?? KycStatus.NONE, }; } diff --git a/packages/apps/human-app/frontend/src/modules/worker/profile/types/profile-types.ts b/packages/apps/human-app/frontend/src/modules/worker/profile/types/profile-types.ts index 7c905bba8c..cdaf2dd700 100644 --- a/packages/apps/human-app/frontend/src/modules/worker/profile/types/profile-types.ts +++ b/packages/apps/human-app/frontend/src/modules/worker/profile/types/profile-types.ts @@ -1,4 +1,14 @@ +export enum KycStatus { + NONE = 'none', + APPROVED = 'approved', + RESUBMISSION_REQUESTED = 'resubmission_requested', + DECLINED = 'declined', + REVIEW = 'review', + EXPIRED = 'expired', + ABANDONED = 'abandoned', +} + export interface WorkerItentityVerificationStatus { isVerificationCompleted: boolean; - status: string; + status: (typeof KycStatus)[keyof typeof KycStatus]; } diff --git a/packages/apps/human-app/frontend/src/router/components/drawer-menu-items/drawer-menu-items-worker.tsx b/packages/apps/human-app/frontend/src/router/components/drawer-menu-items/drawer-menu-items-worker.tsx index 502a9d0087..de74d3fe23 100644 --- a/packages/apps/human-app/frontend/src/router/components/drawer-menu-items/drawer-menu-items-worker.tsx +++ b/packages/apps/human-app/frontend/src/router/components/drawer-menu-items/drawer-menu-items-worker.tsx @@ -7,6 +7,7 @@ import { import { DarkModeSwitch } from '@/shared/components/ui/dark-mode-switch'; import type { UserData } from '@/modules/auth/context/auth-context'; import { routerPaths } from '@/router/router-paths'; +import { KycStatus } from '@/modules/worker/profile/types'; import { type MenuItem } from '../layout/protected'; export const workerDrawerTopMenuItems = (user: UserData | null): MenuItem[] => { @@ -15,7 +16,7 @@ export const workerDrawerTopMenuItems = (user: UserData | null): MenuItem[] => { label: t('components.DrawerNavigation.jobs'), icon: , link: routerPaths.worker.jobsDiscovery, - disabled: !user?.wallet_address || user.kyc_status !== 'approved', + disabled: !user?.wallet_address || user.kyc_status !== KycStatus.APPROVED, }, ]; }; diff --git a/packages/apps/human-app/frontend/src/shared/i18n/en.json b/packages/apps/human-app/frontend/src/shared/i18n/en.json index f429748ee8..91bae6249a 100644 --- a/packages/apps/human-app/frontend/src/shared/i18n/en.json +++ b/packages/apps/human-app/frontend/src/shared/i18n/en.json @@ -199,6 +199,7 @@ "profileHeader": "Profile", "email": "Email", "password": "Password", + "wallet": "Wallet", "resetPassword": "Reset Password", "completeIdentityVerification": "Complete Identity Verification", "identityVerificationInProgress": "Identity verification in progress", @@ -206,7 +207,7 @@ "identityVerificationStatus": "Identity verification", "walletAddressMessage": "This address is the wallet address where you will receive payments for completing tasks.", "connectWallet": "Connect Wallet", - "walletConnected": "Wallet Connected ", + "walletConnected": "Connected", "addKYCInfoOnChain": "Add KYC Info On-chain", "wrongWalletAddress": "Selected wallet address doesn't match the address assigned to the account.", "kycInfoOnChainAdded": "KYC Info On-Chain Added", @@ -215,6 +216,15 @@ "notificationsConsent": "I would like to be notified about News and Offers", "topNotifications": { "completeSteps": "Please set up your profile by completing the steps below." + }, + "idvStatusValues": { + "none": "Not Started", + "approved": "Completed", + "resubmission_requested": "Resubmission Required", + "declined": "Failed", + "review": "Under Review", + "expired": "Expired", + "abandoned": "Abandoned" } }, "oraclesTable": { @@ -299,8 +309,9 @@ "hmtEarned": "HMT earned", "lastHour": "Last hour", "earnedLastHour": "HMT earned in the last hour", - "statisticsNotLive": "Statistics are not live. Please refresh to view live statistics.", - "solvedSuccess": "HCaptcha solved!" + "statisticsNotLive": "Statistics are not live.\nPlease refresh to view live statistics.", + "solvedSuccess": "HCaptcha solved!", + "loadingLiveStatistics": "Loading live statistics" }, "registerAddress": { "success": "The address has been successfully registered." diff --git a/packages/apps/human-app/server/src/modules/job-assignment/job-assignment.service.ts b/packages/apps/human-app/server/src/modules/job-assignment/job-assignment.service.ts index 0f2685eee0..9125b501ba 100644 --- a/packages/apps/human-app/server/src/modules/job-assignment/job-assignment.service.ts +++ b/packages/apps/human-app/server/src/modules/job-assignment/job-assignment.service.ts @@ -69,7 +69,7 @@ export class JobAssignmentService { ); assignmentsParamsCommand.token = command.token; - void this.updateAssignmentsCache(assignmentsParamsCommand); + await this.updateAssignmentsCache(assignmentsParamsCommand); return response; } @@ -82,7 +82,7 @@ export class JobAssignmentService { assignmentsParamsCommand.oracleAddress = command.oracleAddress; assignmentsParamsCommand.token = command.token; - void this.updateAssignmentsCache(assignmentsParamsCommand); + await this.updateAssignmentsCache(assignmentsParamsCommand); return response; } diff --git a/packages/apps/human-app/server/src/modules/jobs-discovery/jobs-discovery.controller.ts b/packages/apps/human-app/server/src/modules/jobs-discovery/jobs-discovery.controller.ts index abfc928d02..d65a973fe1 100644 --- a/packages/apps/human-app/server/src/modules/jobs-discovery/jobs-discovery.controller.ts +++ b/packages/apps/human-app/server/src/modules/jobs-discovery/jobs-discovery.controller.ts @@ -34,7 +34,7 @@ export class JobsDiscoveryController { private readonly service: JobsDiscoveryService, private readonly environmentConfigService: EnvironmentConfigService, @InjectMapper() private readonly mapper: Mapper, - ) { } + ) {} @Get('/jobs') @ApiOperation({ @@ -70,32 +70,33 @@ export class JobsDiscoveryController { return (data?.id ?? 0 > 0) ? { - page: 0, - page_size: 1, - total_pages: 1, - total_results: 0, - results: [], - } + page: 0, + page_size: 1, + total_pages: 1, + total_results: 0, + results: [], + } : { - page: 0, - page_size: 1, - total_pages: 1, - total_results: 1, - results: [ - { - chain_id: ChainId.POLYGON, - escrow_address: 'thirstyfi-task', - job_type: 'thirstyfi', - job_description: 'Check job description at https://thirsty.fi/blog/campaign-human-protocol', - reward_amount: '5 - 50', - reward_token: 'USDT', - status: JobStatus.ACTIVE, - created_at: new Date().toISOString(), - updated_at: new Date().toISOString(), - qualifications: [], - }, - ], - }; + page: 0, + page_size: 1, + total_pages: 1, + total_results: 1, + results: [ + { + chain_id: ChainId.POLYGON, + escrow_address: 'thirstyfi-task', + job_type: 'thirstyfi', + job_description: + 'Check job description at https://thirsty.fi/blog/campaign-human-protocol', + reward_amount: '5 - 50', + reward_token: 'USDT', + status: JobStatus.ACTIVE, + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + qualifications: [], + }, + ], + }; } return { diff --git a/packages/apps/human-app/server/src/modules/oracle-discovery/oracle-discovery.controller.ts b/packages/apps/human-app/server/src/modules/oracle-discovery/oracle-discovery.controller.ts index 64a8b169c3..a6d474d319 100644 --- a/packages/apps/human-app/server/src/modules/oracle-discovery/oracle-discovery.controller.ts +++ b/packages/apps/human-app/server/src/modules/oracle-discovery/oracle-discovery.controller.ts @@ -7,21 +7,24 @@ import { HttpException, HttpStatus, Query, - Request, } from '@nestjs/common'; -import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; +import { + ApiBearerAuth, + ApiOkResponse, + ApiOperation, + ApiTags, +} from '@nestjs/swagger'; import { EnvironmentConfigService } from '../../common/config/environment-config.service'; -import { RequestWithUser } from '../../common/interfaces/jwt'; import { DiscoveredOracle, GetOraclesCommand, GetOraclesQuery, } from './model/oracle-discovery.model'; import { OracleDiscoveryService } from './oracle-discovery.service'; -import Environment from '../../common/utils/environment'; import { ChainId } from '@human-protocol/sdk'; @ApiTags('Oracle-Discovery') +@ApiBearerAuth() @Controller() export class OracleDiscoveryController { constructor( @@ -38,7 +41,6 @@ export class OracleDiscoveryController { @Header('Cache-Control', 'private, max-age=60') @Get('/oracles') public async getOracles( - @Request() req: RequestWithUser, @Query() query: GetOraclesQuery, ): Promise { if (!this.environmentConfigService.jobsDiscoveryFlag) { @@ -76,25 +78,6 @@ export class OracleDiscoveryController { }); oracles.push(thisrtyOracle); - if (!Environment.isProduction()) { - return oracles; - } - - const isAudinoAvailableForUser = (req?.user?.qualifications ?? []).includes( - 'audino', - ); - - /** - * TODO: remove filtering logic when Audino available for everyone - */ - return oracles.filter((oracle) => { - const isAudinoOracle = oracle.jobTypes.includes('audio_transcription'); - - if (isAudinoOracle) { - return isAudinoAvailableForUser; - } else { - return true; - } - }); + return oracles; } } diff --git a/packages/apps/human-app/server/src/modules/oracle-discovery/spec/oracle-discovery.controller.spec.ts b/packages/apps/human-app/server/src/modules/oracle-discovery/spec/oracle-discovery.controller.spec.ts index baf20eda69..3e6caaacce 100644 --- a/packages/apps/human-app/server/src/modules/oracle-discovery/spec/oracle-discovery.controller.spec.ts +++ b/packages/apps/human-app/server/src/modules/oracle-discovery/spec/oracle-discovery.controller.spec.ts @@ -80,9 +80,7 @@ describe('OracleDiscoveryController', () => { (configServiceMock as any).jobsDiscoveryFlag = false; - await expect( - controller.getOracles({ qualifications: [] } as any, dtoFixture), - ).rejects.toThrow( + await expect(controller.getOracles(dtoFixture)).rejects.toThrow( new HttpException( 'Oracles discovery is disabled', HttpStatus.FORBIDDEN, diff --git a/packages/apps/job-launcher/client/serve.json b/packages/apps/job-launcher/client/serve.json index 0a1fecd634..fab81ba9fe 100644 --- a/packages/apps/job-launcher/client/serve.json +++ b/packages/apps/job-launcher/client/serve.json @@ -18,7 +18,7 @@ }, { "key": "Content-Security-Policy", - "value": "frame-ancestors: 'none';" + "value": "frame-ancestors 'none';" }, { "key": "Strict-Transport-Security", diff --git a/packages/apps/job-launcher/client/src/components/Icons/AuroraIcon.tsx b/packages/apps/job-launcher/client/src/components/Icons/AuroraIcon.tsx deleted file mode 100644 index 130d43133e..0000000000 --- a/packages/apps/job-launcher/client/src/components/Icons/AuroraIcon.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; -import type { FC } from 'react'; - -export const AuroraIcon: FC = (props) => { - return ( - - - - ); -}; diff --git a/packages/apps/job-launcher/client/src/components/Icons/chains.tsx b/packages/apps/job-launcher/client/src/components/Icons/chains.tsx index 56749e0047..2ba4d50f5a 100644 --- a/packages/apps/job-launcher/client/src/components/Icons/chains.tsx +++ b/packages/apps/job-launcher/client/src/components/Icons/chains.tsx @@ -1,7 +1,6 @@ import { ChainId } from '@human-protocol/sdk'; import { ReactElement } from 'react'; -import { AuroraIcon } from './AuroraIcon'; import { BinanceSmartChainIcon } from './BinanceSmartChainIcon'; import { DollarSignIcon } from './DollarSignIcon'; import { EthereumIcon } from './EthereumIcon'; @@ -16,7 +15,6 @@ export const CHAIN_ICONS: { [chainId in ChainId]?: ReactElement } = { [ChainId.POLYGON_AMOY]: , [ChainId.BSC_MAINNET]: , [ChainId.BSC_TESTNET]: , - [ChainId.AURORA_TESTNET]: , }; export const TOKEN_ICONS: Record = { diff --git a/packages/apps/job-launcher/client/src/constants/chains.ts b/packages/apps/job-launcher/client/src/constants/chains.ts index 67e9f9bda1..9d65dd4929 100644 --- a/packages/apps/job-launcher/client/src/constants/chains.ts +++ b/packages/apps/job-launcher/client/src/constants/chains.ts @@ -15,7 +15,6 @@ switch (import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase()) { ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, - ChainId.AURORA_TESTNET, ]; break; case 'localhost': diff --git a/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx b/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx index 9a53e3602b..ad9308ed9e 100644 --- a/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx +++ b/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx @@ -27,7 +27,6 @@ export const wagmiConfig = createConfig({ wagmiChains.avalanche, wagmiChains.xLayer, wagmiChains.xLayerTestnet, - wagmiChains.auroraTestnet, LOCALHOST, ], connectors: [ @@ -71,10 +70,6 @@ export const wagmiConfig = createConfig({ unstable_connector(metaMask), http(), ]), - [wagmiChains.auroraTestnet.id]: fallback([ - unstable_connector(metaMask), - http(), - ]), [LOCALHOST.id]: fallback([ unstable_connector(metaMask), http(LOCALHOST.rpcUrls.default.http[0]), diff --git a/packages/apps/job-launcher/server/src/common/config/env-schema.ts b/packages/apps/job-launcher/server/src/common/config/env-schema.ts index 74445aba16..e7fd7cbc95 100644 --- a/packages/apps/job-launcher/server/src/common/config/env-schema.ts +++ b/packages/apps/job-launcher/server/src/common/config/env-schema.ts @@ -46,7 +46,6 @@ export const envValidator = Joi.object({ RPC_URL_POLYGON_AMOY: Joi.string(), RPC_URL_BSC_MAINNET: Joi.string(), RPC_URL_BSC_TESTNET: Joi.string(), - RPC_URL_AURORA_TESTNET: Joi.string(), RPC_URL_MOONBEAM: Joi.string(), RPC_URL_XLAYER_TESTNET: Joi.string(), RPC_URL_XLAYER: Joi.string(), diff --git a/packages/apps/job-launcher/server/src/common/config/network-config.service.ts b/packages/apps/job-launcher/server/src/common/config/network-config.service.ts index 24edba9de6..df563652f1 100644 --- a/packages/apps/job-launcher/server/src/common/config/network-config.service.ts +++ b/packages/apps/job-launcher/server/src/common/config/network-config.service.ts @@ -68,15 +68,6 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), - ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { - auroratest: { - chainId: ChainId.AURORA_TESTNET, - /** - * The RPC URL for the AURORA Testnet network. - */ - rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), - }, - }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/job-launcher/server/src/common/constants/index.ts b/packages/apps/job-launcher/server/src/common/constants/index.ts index a335b1be3c..3518b69d51 100644 --- a/packages/apps/job-launcher/server/src/common/constants/index.ts +++ b/packages/apps/job-launcher/server/src/common/constants/index.ts @@ -16,7 +16,6 @@ export const TESTNET_CHAIN_IDS = [ ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, - ChainId.AURORA_TESTNET, ]; export const MAINNET_CHAIN_IDS = [ChainId.BSC_MAINNET, ChainId.POLYGON]; diff --git a/packages/apps/job-launcher/server/src/common/constants/tokens.ts b/packages/apps/job-launcher/server/src/common/constants/tokens.ts index e6fb2febc3..34f3f1ccfb 100644 --- a/packages/apps/job-launcher/server/src/common/constants/tokens.ts +++ b/packages/apps/job-launcher/server/src/common/constants/tokens.ts @@ -53,10 +53,11 @@ export const TOKEN_ADDRESSES: { address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F', decimals: 6, }, - [EscrowFundToken.USDC]: { - address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359', - decimals: 6, - }, + // Disabled + // [EscrowFundToken.USDC]: { + // address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359', + // decimals: 6, + // }, }, [ChainId.POLYGON_AMOY]: { [EscrowFundToken.HMT]: { @@ -68,12 +69,6 @@ export const TOKEN_ADDRESSES: { decimals: 6, }, }, - [ChainId.AURORA_TESTNET]: { - [EscrowFundToken.HMT]: { - address: NETWORKS[ChainId.AURORA_TESTNET]!.hmtAddress, - decimals: 18, - }, - }, [ChainId.LOCALHOST]: { [EscrowFundToken.HMT]: { address: NETWORKS[ChainId.LOCALHOST]!.hmtAddress, diff --git a/packages/apps/job-launcher/server/src/common/utils/hcaptcha.ts b/packages/apps/job-launcher/server/src/common/utils/hcaptcha.ts index 5a29900178..dbfd72ab99 100644 --- a/packages/apps/job-launcher/server/src/common/utils/hcaptcha.ts +++ b/packages/apps/job-launcher/server/src/common/utils/hcaptcha.ts @@ -1,4 +1,5 @@ import axios from 'axios'; +import { formatAxiosError } from './http'; export async function verifyToken( url: string, @@ -17,11 +18,18 @@ export async function verifyToken( queryParams.remoteip = ip; } - const { data } = await axios.post( - `${url}/siteverify`, - {}, - { params: queryParams }, - ); + try { + const { data } = await axios.post( + `${url}/siteverify`, + {}, + { params: queryParams }, + ); - return data; + return data; + } catch (error) { + return { + success: false, + error: formatAxiosError(error), + }; + } } diff --git a/packages/apps/job-launcher/server/src/common/utils/slack.ts b/packages/apps/job-launcher/server/src/common/utils/slack.ts index cb6ef3156e..bc184d0f32 100644 --- a/packages/apps/job-launcher/server/src/common/utils/slack.ts +++ b/packages/apps/job-launcher/server/src/common/utils/slack.ts @@ -1,6 +1,7 @@ import axios from 'axios'; import logger from '../../logger'; +import { formatAxiosError } from './http'; const slackLogger = logger.child({ context: 'sendSlackNotification' }); @@ -21,7 +22,9 @@ export async function sendSlackNotification( slackLogger.debug('Slack notification sent', payload); return true; } catch (error) { - slackLogger.error('Error sending Slack notification', error); + slackLogger.error('Error sending Slack notification', { + error: formatAxiosError(error), + }); return false; } } diff --git a/packages/apps/job-launcher/server/src/common/utils/storage.ts b/packages/apps/job-launcher/server/src/common/utils/storage.ts index b5278915ef..3c83af0010 100644 --- a/packages/apps/job-launcher/server/src/common/utils/storage.ts +++ b/packages/apps/job-launcher/server/src/common/utils/storage.ts @@ -1,5 +1,5 @@ import { HttpStatus } from '@nestjs/common'; -import axios from 'axios'; +import axios, { AxiosError } from 'axios'; import { parseString } from 'xml2js'; import { StorageDataDto } from '../../modules/job/job.dto'; import { ErrorBucket } from '../constants/errors'; @@ -10,6 +10,7 @@ import { GCS_HTTP_REGEX_PATH_BASED, GCS_HTTP_REGEX_SUBDOMAIN, } from './gcstorage'; +import { formatAxiosError } from './http'; export function generateBucketUrl( storageData: StorageDataDto, @@ -140,7 +141,11 @@ export async function listObjectsInBucket(url: URL): Promise { } while (nextContinuationToken); resolve(objects); } catch (err) { - reject(err); + let formatted = err; + if (err instanceof AxiosError) { + formatted = formatAxiosError(err); + } + reject(formatted); } }); } diff --git a/packages/apps/job-launcher/server/src/modules/auth/auth.service.ts b/packages/apps/job-launcher/server/src/modules/auth/auth.service.ts index babebfb57c..25315193cc 100644 --- a/packages/apps/job-launcher/server/src/modules/auth/auth.service.ts +++ b/packages/apps/job-launcher/server/src/modules/auth/auth.service.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { Injectable } from '@nestjs/common'; +import { Injectable, Logger } from '@nestjs/common'; import { JwtService } from '@nestjs/jwt'; import { ErrorAuth, ErrorUser } from '../../common/constants/errors'; @@ -39,6 +39,8 @@ import { ApiKeyRepository } from './apikey.repository'; @Injectable() export class AuthService { + private readonly logger = new Logger(AuthService.name); + constructor( private readonly jwtService: JwtService, private readonly userService: UserService, @@ -80,19 +82,7 @@ export class AuthService { } public async signup(data: UserCreateDto, ip?: string): Promise { - if ( - !( - await verifyToken( - this.authConfigService.hcaptchaProtectionUrl, - this.authConfigService.hCaptchaSiteKey, - this.authConfigService.hCaptchaSecret, - data.hCaptchaToken, - ip, - ) - ).success - ) { - throw new ForbiddenError(ErrorAuth.InvalidCaptchaToken); - } + await this.ensureCaptchaValid(data.hCaptchaToken, ip); const storedUser = await this.userRepository.findByEmail(data.email); if (storedUser) { throw new ConflictError(ErrorUser.DuplicatedEmail); @@ -185,19 +175,7 @@ export class AuthService { data: ForgotPasswordDto, ip?: string, ): Promise { - if ( - !( - await verifyToken( - this.authConfigService.hcaptchaProtectionUrl, - this.authConfigService.hCaptchaSiteKey, - this.authConfigService.hCaptchaSecret, - data.hCaptchaToken, - ip, - ) - ).success - ) { - throw new ForbiddenError(ErrorAuth.InvalidCaptchaToken); - } + await this.ensureCaptchaValid(data.hCaptchaToken, ip); const userEntity = await this.userRepository.findByEmail(data.email); if (!userEntity) { @@ -245,19 +223,7 @@ export class AuthService { data: RestorePasswordDto, ip?: string, ): Promise { - if ( - !( - await verifyToken( - this.authConfigService.hcaptchaProtectionUrl, - this.authConfigService.hCaptchaSiteKey, - this.authConfigService.hCaptchaSecret, - data.hCaptchaToken, - ip, - ) - ).success - ) { - throw new ForbiddenError(ErrorAuth.InvalidCaptchaToken); - } + await this.ensureCaptchaValid(data.hCaptchaToken, ip); const tokenEntity = await this.tokenRepository.findOneByUuidAndType( data.token, @@ -426,4 +392,24 @@ export class AuthService { return null; } + + private async ensureCaptchaValid(token: string, ip?: string): Promise { + const verification = await verifyToken( + this.authConfigService.hcaptchaProtectionUrl, + this.authConfigService.hCaptchaSiteKey, + this.authConfigService.hCaptchaSecret, + token, + ip, + ); + + if (verification.success) { + return; + } + + this.logger.error(ErrorAuth.InvalidCaptchaToken, { + error: verification.error, + }); + + throw new ForbiddenError(ErrorAuth.InvalidCaptchaToken); + } } diff --git a/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts b/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts index 33e2552034..2a0b4c4e24 100644 --- a/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts +++ b/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts @@ -509,7 +509,7 @@ export class CronJobService { const key = `${event.chainId}-${ethers.getAddress(event.escrowAddress)}`; const job = jobMap.get(key); - const eventTimestamp = new Date(event.timestamp * 1000).getTime(); + const eventTimestamp = event.timestamp; if (eventTimestamp > latestEventTimestamp) { latestEventTimestamp = eventTimestamp; } diff --git a/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts b/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts index a4867f8f31..391dca143e 100644 --- a/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts +++ b/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts @@ -5,9 +5,10 @@ import { firstValueFrom } from 'rxjs'; import { Web3ConfigService } from '../../common/config/web3-config.service'; import { ErrorQualification, ErrorWeb3 } from '../../common/constants/errors'; import { ServerError } from '../../common/errors'; +import { formatAxiosError } from '../../common/utils/http'; +import logger from '../../logger'; import { Web3Service } from '../web3/web3.service'; import { QualificationDto } from './qualification.dto'; -import logger from '../../logger'; @Injectable() export class QualificationService { @@ -48,9 +49,10 @@ export class QualificationService { return data; } catch (error) { + const formattedError = formatAxiosError(error); this.logger.error( 'Error fetching qualifications from reputation oracle', - error, + { error: formattedError }, ); throw new ServerError(ErrorQualification.FailedToFetchQualifications); } diff --git a/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts b/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts index 97008852f4..9706f3d4c5 100644 --- a/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts +++ b/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts @@ -7,6 +7,7 @@ import { ErrorCurrency } from '../../common/constants/errors'; import { CoingeckoTokenId } from '../../common/constants/payment'; import { EscrowFundToken } from '../../common/enums/job'; import { NotFoundError } from '../../common/errors'; +import { formatAxiosError } from '../../common/utils/http'; import logger from '../../logger'; @Injectable() @@ -77,10 +78,11 @@ export class RateService { return finalRate; } catch (error) { + const formattedError = formatAxiosError(error); this.logger.error('Error while getting rate', { from, to, - error, + error: formattedError, }); throw new NotFoundError(ErrorCurrency.PairNotFound); } diff --git a/packages/apps/reputation-oracle/server/src/config/env-schema.ts b/packages/apps/reputation-oracle/server/src/config/env-schema.ts index 0df0b9fd1f..98dc73b932 100644 --- a/packages/apps/reputation-oracle/server/src/config/env-schema.ts +++ b/packages/apps/reputation-oracle/server/src/config/env-schema.ts @@ -53,7 +53,6 @@ export const envValidator = Joi.object({ RPC_URL_POLYGON_AMOY: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_BSC_MAINNET: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_BSC_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }), - RPC_URL_AURORA_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_MOONBEAM: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_XLAYER_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_XLAYER: Joi.string().uri({ scheme: ['http', 'https'] }), diff --git a/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts b/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts index edce855c26..dbb40d55f4 100644 --- a/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts +++ b/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts @@ -62,9 +62,6 @@ export class Web3ConfigService { [ChainId.POLYGON_AMOY]: this.configService.get('RPC_URL_POLYGON_AMOY'), [ChainId.BSC_MAINNET]: this.configService.get('RPC_URL_BSC_MAINNET'), [ChainId.BSC_TESTNET]: this.configService.get('RPC_URL_BSC_TESTNET'), - [ChainId.AURORA_TESTNET]: this.configService.get( - 'RPC_URL_AURORA_TESTNET', - ), [ChainId.SEPOLIA]: this.configService.get('RPC_URL_SEPOLIA'), [ChainId.LOCALHOST]: this.configService.get('RPC_URL_LOCALHOST'), }; diff --git a/packages/apps/reputation-oracle/server/src/integrations/hcaptcha/hcaptcha.service.ts b/packages/apps/reputation-oracle/server/src/integrations/hcaptcha/hcaptcha.service.ts index 8478882037..7e9161fe70 100644 --- a/packages/apps/reputation-oracle/server/src/integrations/hcaptcha/hcaptcha.service.ts +++ b/packages/apps/reputation-oracle/server/src/integrations/hcaptcha/hcaptcha.service.ts @@ -1,10 +1,12 @@ import { HttpService } from '@nestjs/axios'; import { Injectable } from '@nestjs/common'; +import { AxiosError } from 'axios'; import { ethers } from 'ethers'; import { firstValueFrom } from 'rxjs'; import { HCaptchaConfigService } from '@/config'; import logger from '@/logger'; +import { formatAxiosError } from '@/utils/http'; import { GetLabelerQueryParams, @@ -59,7 +61,13 @@ export class HCaptchaService { }); } } catch (error) { - this.logger.error('Error occurred during token verification', error); + let formattedError = error; + if (error instanceof AxiosError) { + formattedError = formatAxiosError(error); + } + this.logger.error('Error occurred during token verification', { + error: formattedError, + }); } return false; @@ -105,8 +113,12 @@ export class HCaptchaService { }); } } catch (error) { + let formattedError = error; + if (error instanceof AxiosError) { + formattedError = formatAxiosError(error); + } this.logger.error('Error occurred during labeling registration', { - error, + error: formattedError, ...data, }); } @@ -134,8 +146,12 @@ export class HCaptchaService { return response.data; } } catch (error) { + let formattedError = error; + if (error instanceof AxiosError) { + formattedError = formatAxiosError(error); + } this.logger.error(`Error occurred while retrieving labeler data`, { - error, + error: formattedError, email, }); } diff --git a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts index e1bc6b34ae..baa5f64a5f 100644 --- a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts +++ b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts @@ -13,7 +13,6 @@ export const supportedChainIdsByNetwork = { ChainId.POLYGON_AMOY, ChainId.BSC_TESTNET, ChainId.SEPOLIA, - ChainId.AURORA_TESTNET, ], [Web3Network.LOCAL]: [ChainId.LOCALHOST], } as const; diff --git a/packages/apps/staking/serve.json b/packages/apps/staking/serve.json index 0a1fecd634..fab81ba9fe 100644 --- a/packages/apps/staking/serve.json +++ b/packages/apps/staking/serve.json @@ -18,7 +18,7 @@ }, { "key": "Content-Security-Policy", - "value": "frame-ancestors: 'none';" + "value": "frame-ancestors 'none';" }, { "key": "Strict-Transport-Security", diff --git a/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/Icons/AuroraIcon.tsx b/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/Icons/AuroraIcon.tsx deleted file mode 100644 index 1e8cf89d87..0000000000 --- a/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/Icons/AuroraIcon.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import type { FC } from 'react'; - -import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; - -const AuroraIcon: FC = (props) => { - return ( - - - - ); -}; - -export default AuroraIcon; diff --git a/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx b/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx index 559e895b2e..43f918ef9a 100644 --- a/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx +++ b/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx @@ -1,11 +1,10 @@ -import EthereumIcon from './Icons/EthereumIcon'; -import BinanceSmartChainIcon from './Icons/BinanceSmartChainIcon'; -import PolygonIcon from './Icons/PolygonIcon'; -import MoonbeamIcon from './Icons/MoonbeamIcon'; -import MoonbaseAlphaIcon from './Icons/MoonbaseAlphaIcon'; -import { XLayerIcon } from './Icons/XLayerIcon'; -import { AvalancheIcon } from './Icons/AvalancheIcon'; -import AuroraIcon from './Icons/AuroraIcon'; +import EthereumIcon from "./Icons/EthereumIcon"; +import BinanceSmartChainIcon from "./Icons/BinanceSmartChainIcon"; +import PolygonIcon from "./Icons/PolygonIcon"; +import MoonbeamIcon from "./Icons/MoonbeamIcon"; +import MoonbaseAlphaIcon from "./Icons/MoonbaseAlphaIcon"; +import { XLayerIcon } from "./Icons/XLayerIcon"; +import { AvalancheIcon } from "./Icons/AvalancheIcon"; export const NetworkIcon = ({ chainId }: { chainId?: number }) => { const icon = (() => { @@ -32,8 +31,6 @@ export const NetworkIcon = ({ chainId }: { chainId?: number }) => { case 43113: case 43114: return ; - case 1313161555: - return ; default: return ; } diff --git a/packages/apps/staking/src/constants/chains.ts b/packages/apps/staking/src/constants/chains.ts index 799732dc8f..3d64dd6866 100644 --- a/packages/apps/staking/src/constants/chains.ts +++ b/packages/apps/staking/src/constants/chains.ts @@ -1,60 +1,59 @@ -import { ChainId } from '@human-protocol/sdk'; +import { ChainId } from "@human-protocol/sdk"; export const IS_MAINNET = - import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase() === 'mainnet'; + import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase() === "mainnet"; export const IS_TESTNET = !IS_MAINNET; let initialSupportedChainIds: ChainId[]; switch (import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase()) { - case 'mainnet': + case "mainnet": initialSupportedChainIds = [ ChainId.POLYGON, ChainId.MAINNET, ChainId.BSC_MAINNET, ]; break; - case 'testnet': + case "testnet": initialSupportedChainIds = [ ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, - ChainId.AURORA_TESTNET, ]; break; - case 'localhost': + case "localhost": default: initialSupportedChainIds = [ChainId.LOCALHOST]; break; } const supportedChains = - import.meta.env.VITE_APP_SUPPORTED_CHAINS?.split(',') || []; + import.meta.env.VITE_APP_SUPPORTED_CHAINS?.split(",") || []; export const SUPPORTED_CHAIN_IDS: ChainId[] = initialSupportedChainIds.filter( - (chainId) => supportedChains.includes(chainId.toString()) + (chainId) => supportedChains.includes(chainId.toString()), ); if (SUPPORTED_CHAIN_IDS.length === 0) { throw new Error( - 'No valid RPC URL provided for the supported blockchain environment' + "No valid RPC URL provided for the supported blockchain environment", ); } export const LOCALHOST = { id: 1338, - name: 'Localhost', - network: 'localhost', + name: "Localhost", + network: "localhost", nativeCurrency: { decimals: 18, - name: 'Ether', - symbol: 'ETH', + name: "Ether", + symbol: "ETH", }, rpcUrls: { default: { - http: ['http://127.0.0.1:8545'], + http: ["http://127.0.0.1:8545"], }, public: { - http: ['http://127.0.0.1:8545'], + http: ["http://127.0.0.1:8545"], }, }, }; diff --git a/packages/apps/staking/src/providers/WagmiProvider.tsx b/packages/apps/staking/src/providers/WagmiProvider.tsx index 426d32f29c..b493d5e501 100644 --- a/packages/apps/staking/src/providers/WagmiProvider.tsx +++ b/packages/apps/staking/src/providers/WagmiProvider.tsx @@ -1,8 +1,8 @@ -import { FC, PropsWithChildren } from 'react'; -import { createConfig, http, WagmiProvider as WWagmiProvider } from 'wagmi'; -import { walletConnect, coinbaseWallet } from 'wagmi/connectors'; -import * as wagmiChains from 'wagmi/chains'; -import { LOCALHOST, SUPPORTED_CHAIN_IDS } from '../constants/chains'; +import { FC, PropsWithChildren } from "react"; +import { createConfig, http, WagmiProvider as WWagmiProvider } from "wagmi"; +import { walletConnect, coinbaseWallet } from "wagmi/connectors"; +import * as wagmiChains from "wagmi/chains"; +import { LOCALHOST, SUPPORTED_CHAIN_IDS } from "../constants/chains"; const projectId = import.meta.env.VITE_APP_WALLETCONNECT_PROJECT_ID; @@ -13,12 +13,11 @@ const chainIdToChainMap: Record = { [wagmiChains.bscTestnet.id]: wagmiChains.bscTestnet, [wagmiChains.polygon.id]: wagmiChains.polygon, [wagmiChains.polygonAmoy.id]: wagmiChains.polygonAmoy, - [wagmiChains.auroraTestnet.id]: wagmiChains.auroraTestnet, [LOCALHOST.id]: LOCALHOST, }; const supportedChains = SUPPORTED_CHAIN_IDS.map( - (id) => chainIdToChainMap[id] + (id) => chainIdToChainMap[id], ).filter(Boolean); export const wagmiConfig = createConfig({ @@ -26,17 +25,17 @@ export const wagmiConfig = createConfig({ connectors: [ walletConnect({ showQrModal: true, - projectId: projectId ?? '', + projectId: projectId ?? "", }), coinbaseWallet({ - appName: 'human-staking-dashboard', + appName: "human-staking-dashboard", }), ], transports: Object.fromEntries( supportedChains.map((chain) => [ chain.id, http(chain.rpcUrls.default.http[0]), - ]) + ]), ), }); diff --git a/packages/core/hardhat.config.ts b/packages/core/hardhat.config.ts index 8110bea27c..2c1b28069f 100644 --- a/packages/core/hardhat.config.ts +++ b/packages/core/hardhat.config.ts @@ -118,13 +118,6 @@ const config: HardhatUserConfig = { process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], timeout: 2000000, }, - auroraTestnet: { - chainId: 1313161555, - url: process.env.ETH_AURORA_TESTNET_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - timeout: 2000000, - }, }, gasReporter: { enabled: process.env.REPORT_GAS !== undefined, @@ -169,16 +162,6 @@ const config: HardhatUserConfig = { ], etherscan: { apiKey: process.env.ETHERSCAN_API_KEY || '', - customChains: [ - { - network: 'auroraTestnet', - chainId: 1313161555, - urls: { - apiURL: 'https://explorer.testnet.aurora.dev/api', - browserURL: 'http://explorer.testnet.aurora.dev', - }, - }, - ], }, mocha: { timeout: 200000, diff --git a/packages/examples/cvat/exchange-oracle/src/.env.template b/packages/examples/cvat/exchange-oracle/src/.env.template index 03f0c5cb93..6663e8b43f 100644 --- a/packages/examples/cvat/exchange-oracle/src/.env.template +++ b/packages/examples/cvat/exchange-oracle/src/.env.template @@ -35,12 +35,6 @@ POLYGON_AMOY_RPC_API_URL= POLYGON_AMOY_PRIVATE_KEY= POLYGON_AMOY_ADDR= -# Aurora Testnet Config - -AURORA_TESTNET_RPC_API_URL= -AURORA_TESTNET_PRIVATE_KEY= -AURORA_TESTNET_ADDR= - # Cron Config PROCESS_JOB_LAUNCHER_WEBHOOKS_INT= diff --git a/packages/examples/cvat/exchange-oracle/src/chain/web3.py b/packages/examples/cvat/exchange-oracle/src/chain/web3.py index bc2f456d88..9bf9f033bd 100644 --- a/packages/examples/cvat/exchange-oracle/src/chain/web3.py +++ b/packages/examples/cvat/exchange-oracle/src/chain/web3.py @@ -26,8 +26,6 @@ def get_web3(chain_id: int | Networks): network = Config.polygon_mainnet case Networks.polygon_amoy: network = Config.polygon_amoy - case Networks.aurora_testnet: - network = Config.aurora_testnet case Networks.localhost: network = Config.localhost case _: @@ -56,8 +54,6 @@ def sign_message(chain_id: Networks, message) -> str: private_key = Config.polygon_mainnet.private_key case Config.polygon_amoy.chain_id: private_key = Config.polygon_amoy.private_key - case Config.aurora_testnet.chain_id: - private_key = Config.aurora_testnet.private_key case Config.localhost.chain_id: private_key = Config.localhost.private_key case _: diff --git a/packages/examples/cvat/exchange-oracle/src/core/config.py b/packages/examples/cvat/exchange-oracle/src/core/config.py index 7807c583a2..10d5bb3a5e 100644 --- a/packages/examples/cvat/exchange-oracle/src/core/config.py +++ b/packages/examples/cvat/exchange-oracle/src/core/config.py @@ -96,13 +96,6 @@ class PolygonAmoyConfig(_NetworkConfig): addr = getenv("POLYGON_AMOY_ADDR") -class AuroraTestnetConfig(_NetworkConfig): - chain_id = 1313161555 - rpc_api = getenv("AURORA_TESTNET_RPC_API_URL") - private_key = getenv("AURORA_TESTNET_PRIVATE_KEY") - addr = getenv("AURORA_TESTNET_ADDR") - - class LocalhostConfig(_NetworkConfig): chain_id = 1338 rpc_api = getenv("LOCALHOST_RPC_API_URL", "http://blockchain-node:8545") @@ -354,7 +347,6 @@ class Config: polygon_mainnet = PolygonMainnetConfig polygon_amoy = PolygonAmoyConfig - aurora_testnet = AuroraTestnetConfig localhost = LocalhostConfig postgres_config = PostgresConfig diff --git a/packages/examples/cvat/exchange-oracle/src/core/types.py b/packages/examples/cvat/exchange-oracle/src/core/types.py index 3022f2efc3..091e2d6133 100644 --- a/packages/examples/cvat/exchange-oracle/src/core/types.py +++ b/packages/examples/cvat/exchange-oracle/src/core/types.py @@ -7,7 +7,6 @@ class Networks(int, Enum, metaclass=BetterEnumMeta): polygon_mainnet = Config.polygon_mainnet.chain_id polygon_amoy = Config.polygon_amoy.chain_id - aurora_testnet = Config.aurora_testnet.chain_id localhost = Config.localhost.chain_id diff --git a/packages/examples/cvat/exchange-oracle/src/endpoints/__init__.py b/packages/examples/cvat/exchange-oracle/src/endpoints/__init__.py index 93f0a8becf..9943fea79f 100644 --- a/packages/examples/cvat/exchange-oracle/src/endpoints/__init__.py +++ b/packages/examples/cvat/exchange-oracle/src/endpoints/__init__.py @@ -16,7 +16,7 @@ @greet_router.get("/", description="Endpoint describing the API", response_model=MetaResponse) def meta_route() -> MetaResponse: - networks = [Config.polygon_mainnet, Config.polygon_amoy, Config.aurora_testnet] + networks = [Config.polygon_mainnet, Config.polygon_amoy] networks_info = [ { diff --git a/packages/examples/cvat/exchange-oracle/tests/api/test_webhook_api.py b/packages/examples/cvat/exchange-oracle/tests/api/test_webhook_api.py index a2602c483b..ad18f1e126 100644 --- a/packages/examples/cvat/exchange-oracle/tests/api/test_webhook_api.py +++ b/packages/examples/cvat/exchange-oracle/tests/api/test_webhook_api.py @@ -116,7 +116,7 @@ def test_incoming_webhook_400_invalid_chain_id(client: TestClient) -> None: "errors": [ { "field": "chain_id", - "message": "Input should be 137, 80002, 1313161555 or 1338", + "message": "Input should be 137, 80002 or 1338", } ] } diff --git a/packages/examples/cvat/exchange-oracle/tests/integration/chain/test_web3.py b/packages/examples/cvat/exchange-oracle/tests/integration/chain/test_web3.py index d313fd5fed..13b04fa428 100644 --- a/packages/examples/cvat/exchange-oracle/tests/integration/chain/test_web3.py +++ b/packages/examples/cvat/exchange-oracle/tests/integration/chain/test_web3.py @@ -50,18 +50,6 @@ class PolygonAmoyConfig: assert w3.eth.default_account == DEFAULT_GAS_PAYER assert w3.manager._provider.endpoint_uri == PolygonAmoyConfig.rpc_api - def test_get_web3_aurora_testnet(self): - class AuroraTestnetConfig: - chain_id = 1313161555 - rpc_api = " https://testnet.aurora.dev" - private_key = DEFAULT_GAS_PAYER_PRIV - - with patch("src.chain.web3.Config.aurora_testnet", AuroraTestnetConfig): - w3 = get_web3(ChainId.AURORA_TESTNET.value) - assert isinstance(w3, Web3) - assert w3.eth.default_account == DEFAULT_GAS_PAYER - assert w3.manager._provider.endpoint_uri == AuroraTestnetConfig.rpc_api - def test_get_web3_localhost(self): w3 = get_web3(ChainId.LOCALHOST.value) assert isinstance(w3, Web3) @@ -94,19 +82,6 @@ def test_sign_message_amoy(self): assert signature == SIGNATURE assert serialized_message == json.dumps("message") - def test_sign_message_aurora_tesnet(self): - with patch("src.chain.web3.get_web3") as mock_function: - with patch( - "src.chain.web3.Config.aurora_testnet.private_key", - DEFAULT_GAS_PAYER_PRIV, - ): - mock_function.return_value = self.w3 - signature, serialized_message = sign_message( - ChainId.AURORA_TESTNET.value, "message" - ) - assert signature == SIGNATURE - assert serialized_message == json.dumps("message") - def test_sign_message_invalid_chain_id(self): with pytest.raises(ValueError, match="1234 is not in available list of networks."): sign_message(1234, "message") diff --git a/packages/examples/cvat/recording-oracle/src/.env.template b/packages/examples/cvat/recording-oracle/src/.env.template index 988f1ab35e..d63b8d41e3 100644 --- a/packages/examples/cvat/recording-oracle/src/.env.template +++ b/packages/examples/cvat/recording-oracle/src/.env.template @@ -26,12 +26,6 @@ POLYGON_AMOY_RPC_API_URL= POLYGON_AMOY_PRIVATE_KEY= POLYGON_AMOY_ADDR= -# Aurora Testnet Config - -AURORA_TESTNET_RPC_API_URL= -AURORA_TESTNET_PRIVATE_KEY= -AURORA_TESTNET_ADDR= - # Cron jobs PROCESS_EXCHANGE_ORACLE_WEBHOOKS_INT= diff --git a/packages/examples/cvat/recording-oracle/src/chain/web3.py b/packages/examples/cvat/recording-oracle/src/chain/web3.py index b1cd682f49..c2ad58d5f1 100644 --- a/packages/examples/cvat/recording-oracle/src/chain/web3.py +++ b/packages/examples/cvat/recording-oracle/src/chain/web3.py @@ -32,16 +32,6 @@ def get_web3(chain_id: Networks): ) w3.eth.default_account = gas_payer.address return w3 - case Config.aurora_testnet.chain_id: - w3 = Web3(HTTPProvider(Config.aurora_testnet.rpc_api)) - gas_payer = w3.eth.account.from_key(Config.aurora_testnet.private_key) - w3.middleware_onion.inject( - SignAndSendRawMiddlewareBuilder.build(Config.aurora_testnet.private_key), - "SignAndSendRawMiddlewareBuilder", - layer=0, - ) - w3.eth.default_account = gas_payer.address - return w3 case Config.localhost.chain_id: w3 = Web3(HTTPProvider(Config.localhost.rpc_api)) gas_payer = w3.eth.account.from_key(Config.localhost.private_key) @@ -68,8 +58,6 @@ def sign_message(chain_id: Networks, message) -> tuple: private_key = Config.polygon_mainnet.private_key case Config.polygon_amoy.chain_id: private_key = Config.polygon_amoy.private_key - case Config.aurora_testnet.chain_id: - private_key = Config.aurora_testnet.private_key case Config.localhost.chain_id: private_key = Config.localhost.private_key case _: diff --git a/packages/examples/cvat/recording-oracle/src/core/config.py b/packages/examples/cvat/recording-oracle/src/core/config.py index a18c9f722e..477046d0bf 100644 --- a/packages/examples/cvat/recording-oracle/src/core/config.py +++ b/packages/examples/cvat/recording-oracle/src/core/config.py @@ -71,13 +71,6 @@ class PolygonAmoyConfig(_NetworkConfig): addr = getenv("POLYGON_AMOY_ADDR") -class AuroraTestnetConfig(_NetworkConfig): - chain_id = 1313161555 - rpc_api = getenv("AURORA_TESTNET_RPC_API_URL") - private_key = getenv("AURORA_TESTNET_PRIVATE_KEY") - addr = getenv("AURORA_TESTNET_ADDR") - - class LocalhostConfig(_NetworkConfig): chain_id = 1338 rpc_api = getenv("LOCALHOST_RPC_API_URL", "http://blockchain-node:8545") @@ -261,7 +254,6 @@ class Config: polygon_mainnet = PolygonMainnetConfig polygon_amoy = PolygonAmoyConfig - aurora_testnet = AuroraTestnetConfig localhost = LocalhostConfig postgres_config = Postgres diff --git a/packages/examples/cvat/recording-oracle/src/core/types.py b/packages/examples/cvat/recording-oracle/src/core/types.py index a3d1695f8f..682b9f2703 100644 --- a/packages/examples/cvat/recording-oracle/src/core/types.py +++ b/packages/examples/cvat/recording-oracle/src/core/types.py @@ -7,7 +7,6 @@ class Networks(int, Enum): polygon_mainnet = Config.polygon_mainnet.chain_id polygon_amoy = Config.polygon_amoy.chain_id - aurora_testnet = Config.aurora_testnet.chain_id localhost = Config.localhost.chain_id diff --git a/packages/examples/cvat/recording-oracle/src/endpoints/__init__.py b/packages/examples/cvat/recording-oracle/src/endpoints/__init__.py index 114469a3f0..4a21381846 100644 --- a/packages/examples/cvat/recording-oracle/src/endpoints/__init__.py +++ b/packages/examples/cvat/recording-oracle/src/endpoints/__init__.py @@ -11,7 +11,7 @@ @greet_router.get("/", description="Endpoint describing the API", response_model=MetaResponse) def meta_route() -> MetaResponse: - networks = [Config.polygon_mainnet, Config.polygon_amoy, Config.aurora_testnet] + networks = [Config.polygon_mainnet, Config.polygon_amoy] networks_info = [ { diff --git a/packages/examples/cvat/recording-oracle/tests/integration/chain/test_web3.py b/packages/examples/cvat/recording-oracle/tests/integration/chain/test_web3.py index fd4a291615..1638bcdafb 100644 --- a/packages/examples/cvat/recording-oracle/tests/integration/chain/test_web3.py +++ b/packages/examples/cvat/recording-oracle/tests/integration/chain/test_web3.py @@ -49,18 +49,6 @@ class PolygonAmoyConfig: assert w3.eth.default_account == DEFAULT_GAS_PAYER assert w3.manager._provider.endpoint_uri == PolygonAmoyConfig.rpc_api - def test_get_web3_aurora_testnet(self): - class AuroraTestnetConfig: - chain_id = 1313161555 - rpc_api = " https://testnet.aurora.dev" - private_key = DEFAULT_GAS_PAYER_PRIV - - with patch("src.chain.web3.Config.aurora_testnet", AuroraTestnetConfig): - w3 = get_web3(ChainId.AURORA_TESTNET.value) - assert isinstance(w3, Web3) - assert w3.eth.default_account == DEFAULT_GAS_PAYER - assert w3.manager._provider.endpoint_uri == AuroraTestnetConfig.rpc_api - def test_get_web3_localhost(self): w3 = get_web3(ChainId.LOCALHOST.value) assert isinstance(w3, Web3) @@ -95,18 +83,6 @@ def test_sign_message_amoy(self): signed_message, _ = sign_message(ChainId.POLYGON_AMOY.value, "message") assert signed_message == SIGNATURE - def test_sign_message_aurora_testnet(self): - with ( - patch("src.chain.web3.get_web3") as mock_function, - patch( - "src.chain.web3.Config.aurora_testnet.private_key", - DEFAULT_GAS_PAYER_PRIV, - ), - ): - mock_function.return_value = self.w3 - signed_message, _ = sign_message(ChainId.AURORA_TESTNET.value, "message") - assert signed_message == SIGNATURE - def test_sign_message_invalid_chain_id(self): with pytest.raises(ValueError, match="1234 is not in available list of networks."): sign_message(1234, "message") diff --git a/packages/sdk/python/human-protocol-sdk/example.py b/packages/sdk/python/human-protocol-sdk/example.py index ddc2c65264..43a874447c 100644 --- a/packages/sdk/python/human-protocol-sdk/example.py +++ b/packages/sdk/python/human-protocol-sdk/example.py @@ -18,6 +18,7 @@ from human_protocol_sdk.operator import OperatorUtils, OperatorFilter from human_protocol_sdk.agreement import agreement from human_protocol_sdk.staking.staking_utils import StakingUtils +from human_protocol_sdk.utils import SubgraphOptions def get_escrow_statistics(statistics_client: StatisticsClient): @@ -162,7 +163,8 @@ def get_escrows(): status=Status.Pending, date_from=datetime.datetime(2023, 5, 8), date_to=datetime.datetime(2023, 6, 8), - ) + ), + SubgraphOptions(3, 1000), ) ) @@ -232,12 +234,13 @@ def get_stakers_example(): chain_id=ChainId.POLYGON_AMOY, order_by="lastDepositTimestamp", order_direction=OrderDirection.ASC, - ) + ), + SubgraphOptions(3, 1000), ) print("Filtered stakers:", len(stakers)) if stakers: - staker = StakingUtils.get_staker(ChainId.LOCALHOST, stakers[0].address) + staker = StakingUtils.get_staker(ChainId.POLYGON_AMOY, stakers[0].address) print("Staker info:", staker.address) else: print("No stakers found.") diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py index 6246c82020..4decd6bc74 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py @@ -12,7 +12,6 @@ class ChainId(Enum): BSC_TESTNET = 97 POLYGON = 137 POLYGON_AMOY = 80002 - AURORA_TESTNET = 1313161555 LOCALHOST = 1338 @@ -131,22 +130,6 @@ class OperatorCategory(Enum): "old_subgraph_url": "", "old_factory_address": "", }, - ChainId.AURORA_TESTNET: { - "title": "Aurora Testnet", - "scan_url": "https://testnet.aurorascan.dev", - "subgraph_url": ( - "https://api.studio.thegraph.com/query/74256/amoy/version/aurora-testnet" - ), - "subgraph_url_api_key": ( - "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmVHYvjbsgAroR9EMgqqGTQ7aKPRFMVekY6evU6mFPUU7J" - ), - "hmt_address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33", - "factory_address": "0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940", - "staking_address": "0x7457d26a3C70Bd71F7557C773b303c1dB82BBB68", - "kvstore_address": "0xD6D347ba6987519B4e42EcED43dF98eFf5465a23", - "old_subgraph_url": "", - "old_factory_address": "", - }, ChainId.LOCALHOST: { "title": "Localhost", "scan_url": "", @@ -161,8 +144,6 @@ class OperatorCategory(Enum): }, } -DEFAULT_AURORA_GAS_PRICE = Web3.to_wei(0.07, "gwei") - SUBGRAPH_API_KEY_PLACEHOLDER = "[SUBGRAPH_API_KEY]" diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_client.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_client.py index a4ec42ba6b..4d26bc20df 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_client.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_client.py @@ -71,7 +71,7 @@ def get_w3_with_priv_key(priv_key: str): from web3.middleware import ExtraDataToPOAMiddleware from web3.types import TxParams -from human_protocol_sdk.utils import validate_url, apply_tx_defaults +from human_protocol_sdk.utils import validate_url from human_protocol_sdk.decorators import requires_signer LOG = logging.getLogger("human_protocol_sdk.escrow") @@ -263,7 +263,7 @@ def get_w3_with_priv_key(priv_key: str): try: tx_hash = self.factory_contract.functions.createEscrow( token_address, job_requester_id - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) receipt = self.w3.eth.wait_for_transaction_receipt(tx_hash) event = next( ( @@ -362,7 +362,7 @@ def get_w3_with_priv_key(priv_key: str): escrow_config.exchange_oracle_fee, escrow_config.manifest, escrow_config.hash, - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) receipt = self.w3.eth.wait_for_transaction_receipt(tx_hash) event = next( ( @@ -450,7 +450,7 @@ def get_w3_with_priv_key(priv_key: str): escrow_config.manifest, escrow_config.hash, ) - .transact(apply_tx_defaults(self.w3, tx_options)) + .transact(tx_options) ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -515,7 +515,7 @@ def get_w3_with_priv_key(priv_key: str): try: tx_hash = token_contract.functions.transfer( escrow_address, amount - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: handle_error(e, EscrowClientError) @@ -592,10 +592,10 @@ def get_w3_with_priv_key(priv_key: str): if funds_to_reserve is not None: tx_hash = contract.functions.storeResults( url, hash, funds_to_reserve - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) else: tx_hash = contract.functions.storeResults(url, hash).transact( - apply_tx_defaults(self.w3, tx_options) + tx_options ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -657,7 +657,7 @@ def get_w3_with_priv_key(priv_key: str): tx_hash = ( self._get_escrow_contract(escrow_address) .functions.complete() - .transact(apply_tx_defaults(self.w3, tx_options)) + .transact(tx_options) ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -749,7 +749,7 @@ def get_w3_with_priv_key(priv_key: str): final_results_hash, payout_id, force_complete, - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) else: tx_id = payout_id tx_hash = contract.functions.bulkPayOut( @@ -759,7 +759,7 @@ def get_w3_with_priv_key(priv_key: str): final_results_hash, tx_id, force_complete, - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: error_text = str(e) or "" @@ -987,7 +987,7 @@ def get_w3_with_priv_key(priv_key: str): tx_hash = ( self._get_escrow_contract(escrow_address) .functions.requestCancellation() - .transact(apply_tx_defaults(self.w3, tx_options)) + .transact(tx_options) ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -1046,7 +1046,7 @@ def get_w3_with_priv_key(priv_key: str): tx_hash = ( self._get_escrow_contract(escrow_address) .functions.cancel() - .transact(apply_tx_defaults(self.w3, tx_options)) + .transact(tx_options) ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -1114,7 +1114,7 @@ def get_w3_with_priv_key(priv_key: str): tx_hash = ( self._get_escrow_contract(escrow_address) .functions.withdraw(token_address) - .transact(apply_tx_defaults(self.w3, tx_options)) + .transact(tx_options) ) receipt = self.w3.eth.wait_for_transaction_receipt(tx_hash) diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_utils.py index 3d1512a04a..5a5531e591 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/escrow/escrow_utils.py @@ -24,7 +24,6 @@ ------ """ -from datetime import datetime import logging from typing import List, Optional @@ -38,7 +37,8 @@ PayoutFilter, ) from human_protocol_sdk.utils import ( - get_data_from_subgraph, + SubgraphOptions, + custom_gql_fetch, ) from human_protocol_sdk.escrow.escrow_client import EscrowClientError @@ -219,10 +219,12 @@ class EscrowUtils: @staticmethod def get_escrows( filter: EscrowFilter, + options: Optional[SubgraphOptions] = None, ) -> List[EscrowData]: """Get an array of escrow addresses based on the specified filter parameters. :param filter: Object containing all the necessary parameters to filter + :param options: Optional config for subgraph requests :return: List of escrows @@ -257,7 +259,7 @@ def get_escrows( else: statuses = [filter.status.name] - escrows_data = get_data_from_subgraph( + escrows_data = custom_gql_fetch( network, query=get_escrows_query(filter), params={ @@ -283,6 +285,7 @@ def get_escrows( "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) if ( @@ -334,11 +337,13 @@ def get_escrows( def get_escrow( chain_id: ChainId, escrow_address: str, + options: Optional[SubgraphOptions] = None, ) -> Optional[EscrowData]: """Returns the escrow for a given address. :param chain_id: Network in which the escrow has been deployed :param escrow_address: Address of the escrow + :param options: Optional config for subgraph requests :return: Escrow data @@ -367,12 +372,13 @@ def get_escrow( network = NETWORKS[ChainId(chain_id)] - escrow_data = get_data_from_subgraph( + escrow_data = custom_gql_fetch( network, query=get_escrow_query(), params={ "escrowAddress": escrow_address.lower(), }, + options=options, ) if ( @@ -414,11 +420,15 @@ def get_escrow( ) @staticmethod - def get_status_events(filter: StatusEventFilter) -> List[StatusEvent]: + def get_status_events( + filter: StatusEventFilter, + options: Optional[SubgraphOptions] = None, + ) -> List[StatusEvent]: """ Retrieve status events for specified networks and statuses within a date range. :param filter: Object containing all the necessary parameters to filter status events. + :param options: Optional config for subgraph requests :return List[StatusEvent]: List of status events matching the query parameters. @@ -435,7 +445,7 @@ def get_status_events(filter: StatusEventFilter) -> List[StatusEvent]: status_names = [status.name for status in filter.statuses] - data = get_data_from_subgraph( + data = custom_gql_fetch( network, get_status_query(filter.date_from, filter.date_to, filter.launcher), { @@ -447,6 +457,7 @@ def get_status_events(filter: StatusEventFilter) -> List[StatusEvent]: "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) if ( @@ -472,11 +483,15 @@ def get_status_events(filter: StatusEventFilter) -> List[StatusEvent]: return events_with_chain_id @staticmethod - def get_payouts(filter: PayoutFilter) -> List[Payout]: + def get_payouts( + filter: PayoutFilter, + options: Optional[SubgraphOptions] = None, + ) -> List[Payout]: """ Fetch payouts from the subgraph based on the provided filter. :param filter: Object containing all the necessary parameters to filter payouts. + :param options: Optional config for subgraph requests :return List[Payout]: List of payouts matching the query parameters. @@ -494,7 +509,7 @@ def get_payouts(filter: PayoutFilter) -> List[Payout]: if not network: raise EscrowClientError("Unsupported Chain ID") - data = get_data_from_subgraph( + data = custom_gql_fetch( network, get_payouts_query(filter), { @@ -508,6 +523,7 @@ def get_payouts(filter: PayoutFilter) -> List[Payout]: "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) if ( @@ -536,11 +552,13 @@ def get_payouts(filter: PayoutFilter) -> List[Payout]: @staticmethod def get_cancellation_refunds( filter: CancellationRefundFilter, + options: Optional[SubgraphOptions] = None, ) -> List[CancellationRefund]: """ Fetch cancellation refunds from the subgraph based on the provided filter. :param filter: Object containing all the necessary parameters to filter cancellation refunds. + :param options: Optional config for subgraph requests :return List[CancellationRefund]: List of cancellation refunds matching the query parameters. @@ -558,7 +576,7 @@ def get_cancellation_refunds( if not network: raise EscrowClientError("Unsupported Chain ID") - data = get_data_from_subgraph( + data = custom_gql_fetch( network, get_cancellation_refunds_query(filter), { @@ -572,6 +590,7 @@ def get_cancellation_refunds( "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) if ( @@ -601,13 +620,16 @@ def get_cancellation_refunds( @staticmethod def get_cancellation_refund( - chain_id: ChainId, escrow_address: str + chain_id: ChainId, + escrow_address: str, + options: Optional[SubgraphOptions] = None, ) -> CancellationRefund: """ Returns the cancellation refund for a given escrow address. :param chain_id: Network in which the escrow has been deployed :param escrow_address: Address of the escrow + :param options: Optional config for subgraph requests :return: CancellationRefund data or None @@ -635,12 +657,13 @@ def get_cancellation_refund( if not network: raise EscrowClientError("Unsupported Chain ID") - data = get_data_from_subgraph( + data = custom_gql_fetch( network, get_cancellation_refund_by_escrow_query(), { "escrowAddress": escrow_address.lower(), }, + options=options, ) if ( diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_client.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_client.py index 8551a35082..db199fc264 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_client.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_client.py @@ -52,7 +52,6 @@ def get_w3_with_priv_key(priv_key: str): """ import logging -import os from typing import List, Optional import requests @@ -63,7 +62,6 @@ def get_w3_with_priv_key(priv_key: str): get_kvstore_interface, handle_error, validate_url, - apply_tx_defaults, ) from web3 import Web3 from web3.middleware import ExtraDataToPOAMiddleware @@ -160,7 +158,7 @@ def get_w3_with_priv_key(priv_key: str): try: tx_hash = self.kvstore_contract.functions.set(key, value).transact( - apply_tx_defaults(self.w3, tx_options) + tx_options ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -217,7 +215,7 @@ def get_w3_with_priv_key(priv_key: str): try: tx_hash = self.kvstore_contract.functions.setBulk(keys, values).transact( - apply_tx_defaults(self.w3, tx_options) + tx_options ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -276,7 +274,7 @@ def get_w3_with_priv_key(priv_key: str): try: tx_hash = self.kvstore_contract.functions.setBulk( [key, key + "_hash"], [url, content_hash] - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: handle_error(e, KVStoreClientError) diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py index 9886b144eb..fdb371ddf2 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/kvstore/kvstore_utils.py @@ -29,7 +29,7 @@ import requests from human_protocol_sdk.constants import NETWORKS, ChainId, KVStoreKeys -from human_protocol_sdk.utils import get_data_from_subgraph +from human_protocol_sdk.utils import SubgraphOptions, custom_gql_fetch from human_protocol_sdk.kvstore.kvstore_client import KVStoreClientError @@ -57,11 +57,13 @@ class KVStoreUtils: def get_kvstore_data( chain_id: ChainId, address: str, + options: Optional[SubgraphOptions] = None, ) -> Optional[List[KVStoreData]]: """Returns the KVStore data for a given address. :param chain_id: Network in which the KVStore data has been deployed :param address: Address of the KVStore + :param options: Optional config for subgraph requests :return: List of KVStore data @@ -88,12 +90,13 @@ def get_kvstore_data( network = NETWORKS[ChainId(chain_id)] - kvstore_data = get_data_from_subgraph( + kvstore_data = custom_gql_fetch( network, query=get_kvstore_by_address_query(), params={ "address": address.lower(), }, + options=options, ) if ( @@ -111,12 +114,18 @@ def get_kvstore_data( ] @staticmethod - def get(chain_id: ChainId, address: str, key: str) -> str: + def get( + chain_id: ChainId, + address: str, + key: str, + options: Optional[SubgraphOptions] = None, + ) -> str: """Gets the value of a key-value pair in the contract. :param chain_id: Network in which the KVStore data has been deployed :param address: The Ethereum address associated with the key-value pair :param key: The key of the key-value pair to get + :param options: Optional config for subgraph requests :return: The value of the key-value pair if it exists @@ -142,13 +151,14 @@ def get(chain_id: ChainId, address: str, key: str) -> str: network = NETWORKS[ChainId(chain_id)] - kvstore_data = get_data_from_subgraph( + kvstore_data = custom_gql_fetch( network, query=get_kvstore_by_address_and_key_query(), params={ "address": address.lower(), "key": key, }, + options=options, ) if ( @@ -163,13 +173,17 @@ def get(chain_id: ChainId, address: str, key: str) -> str: @staticmethod def get_file_url_and_verify_hash( - chain_id: ChainId, address: str, key: Optional[str] = "url" + chain_id: ChainId, + address: str, + key: Optional[str] = "url", + options: Optional[SubgraphOptions] = None, ) -> str: """Gets the URL value of the given entity, and verify its hash. :param chain_id: Network in which the KVStore data has been deployed :param address: Address from which to get the URL value. :param key: Configurable URL key. `url` by default. + :param options: Optional config for subgraph requests :return url: The URL value of the given address if exists, and the content is valid @@ -189,8 +203,8 @@ def get_file_url_and_verify_hash( if not Web3.is_address(address): raise KVStoreClientError(f"Invalid address: {address}") - url = KVStoreUtils.get(chain_id, address, key) - hash = KVStoreUtils.get(chain_id, address, key + "_hash") + url = KVStoreUtils.get(chain_id, address, key, options=options) + hash = KVStoreUtils.get(chain_id, address, key + "_hash", options=options) if len(url) == 0: return url diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/operator/operator_utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/operator/operator_utils.py index 9bed4d8fc6..c4332ea4fb 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/operator/operator_utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/operator/operator_utils.py @@ -25,7 +25,7 @@ from human_protocol_sdk.constants import NETWORKS, ChainId, OrderDirection from human_protocol_sdk.gql.reward import get_reward_added_events_query -from human_protocol_sdk.utils import get_data_from_subgraph +from human_protocol_sdk.utils import SubgraphOptions, custom_gql_fetch from web3 import Web3 LOG = logging.getLogger("human_protocol_sdk.operator") @@ -198,10 +198,14 @@ class OperatorUtils: """ @staticmethod - def get_operators(filter: OperatorFilter) -> List[OperatorData]: + def get_operators( + filter: OperatorFilter, + options: Optional[SubgraphOptions] = None, + ) -> List[OperatorData]: """Get operators data of the protocol. :param filter: Operator filter + :param options: Optional config for subgraph requests :return: List of operators data @@ -226,7 +230,7 @@ def get_operators(filter: OperatorFilter) -> List[OperatorData]: if not network.get("subgraph_url"): return [] - operators_data = get_data_from_subgraph( + operators_data = custom_gql_fetch( network, query=get_operators_query(filter), params={ @@ -237,6 +241,7 @@ def get_operators(filter: OperatorFilter) -> List[OperatorData]: "first": filter.first, "skip": filter.skip, }, + options=options, ) if ( @@ -283,11 +288,13 @@ def get_operators(filter: OperatorFilter) -> List[OperatorData]: def get_operator( chain_id: ChainId, operator_address: str, + options: Optional[SubgraphOptions] = None, ) -> Optional[OperatorData]: """Gets the operator details. :param chain_id: Network in which the operator exists :param operator_address: Address of the operator + :param options: Optional config for subgraph requests :return: Operator data if exists, otherwise None @@ -314,10 +321,11 @@ def get_operator( network = NETWORKS[chain_id] - operator_data = get_data_from_subgraph( + operator_data = custom_gql_fetch( network, query=get_operator_query, params={"address": operator_address.lower()}, + options=options, ) if ( @@ -359,12 +367,14 @@ def get_reputation_network_operators( chain_id: ChainId, address: str, role: Optional[str] = None, + options: Optional[SubgraphOptions] = None, ) -> List[OperatorData]: """Get the reputation network operators of the specified address. :param chain_id: Network in which the reputation network exists :param address: Address of the reputation oracle :param role: (Optional) Role of the operator + :param options: Optional config for subgraph requests :return: Returns an array of operator details @@ -391,10 +401,11 @@ def get_reputation_network_operators( network = NETWORKS[chain_id] - reputation_network_data = get_data_from_subgraph( + reputation_network_data = custom_gql_fetch( network, query=get_reputation_network_query(role), params={"address": address.lower(), "role": role}, + options=options, ) if ( @@ -438,11 +449,16 @@ def get_reputation_network_operators( return result @staticmethod - def get_rewards_info(chain_id: ChainId, slasher: str) -> List[RewardData]: + def get_rewards_info( + chain_id: ChainId, + slasher: str, + options: Optional[SubgraphOptions] = None, + ) -> List[RewardData]: """Get rewards of the given slasher. :param chain_id: Network in which the slasher exists :param slasher: Address of the slasher + :param options: Optional config for subgraph requests :return: List of rewards info @@ -467,10 +483,11 @@ def get_rewards_info(chain_id: ChainId, slasher: str) -> List[RewardData]: network = NETWORKS[chain_id] - reward_added_events_data = get_data_from_subgraph( + reward_added_events_data = custom_gql_fetch( network, query=get_reward_added_events_query, params={"slasherAddress": slasher.lower()}, + options=options, ) if ( diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_client.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_client.py index bd1db4d302..33a9073b53 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_client.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_client.py @@ -68,7 +68,6 @@ def get_w3_with_priv_key(priv_key: str): get_factory_interface, get_staking_interface, handle_error, - apply_tx_defaults, ) LOG = logging.getLogger("human_protocol_sdk.staking") @@ -176,7 +175,7 @@ def get_w3_with_priv_key(priv_key: str): try: tx_hash = self.hmtoken_contract.functions.approve( self.network["staking_address"], amount - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: handle_error(e, StakingClientError) @@ -227,9 +226,7 @@ def get_w3_with_priv_key(priv_key: str): if amount <= 0: raise StakingClientError("Amount to stake must be greater than 0") try: - tx_hash = self.staking_contract.functions.stake(amount).transact( - apply_tx_defaults(self.w3, tx_options) - ) + tx_hash = self.staking_contract.functions.stake(amount).transact(tx_options) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: handle_error(e, StakingClientError) @@ -279,7 +276,7 @@ def get_w3_with_priv_key(priv_key: str): raise StakingClientError("Amount to unstake must be greater than 0") try: tx_hash = self.staking_contract.functions.unstake(amount).transact( - apply_tx_defaults(self.w3, tx_options) + tx_options ) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: @@ -324,9 +321,7 @@ def get_w3_with_priv_key(priv_key: str): """ try: - tx_hash = self.staking_contract.functions.withdraw().transact( - apply_tx_defaults(self.w3, tx_options) - ) + tx_hash = self.staking_contract.functions.withdraw().transact(tx_options) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: handle_error(e, StakingClientError) @@ -395,7 +390,7 @@ def get_w3_with_priv_key(priv_key: str): try: tx_hash = self.staking_contract.functions.slash( slasher, staker, escrow_address, amount - ).transact(apply_tx_defaults(self.w3, tx_options)) + ).transact(tx_options) self.w3.eth.wait_for_transaction_receipt(tx_hash) except Exception as e: handle_error(e, StakingClientError) diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_utils.py index 2da710d030..74915e278b 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/staking/staking_utils.py @@ -30,7 +30,7 @@ from typing import List, Optional from human_protocol_sdk.constants import NETWORKS, ChainId from human_protocol_sdk.filter import StakersFilter -from human_protocol_sdk.utils import get_data_from_subgraph +from human_protocol_sdk.utils import SubgraphOptions, custom_gql_fetch from human_protocol_sdk.gql.staking import get_staker_query, get_stakers_query @@ -62,15 +62,20 @@ class StakingUtilsError(Exception): class StakingUtils: @staticmethod - def get_staker(chain_id: ChainId, address: str) -> Optional[StakerData]: + def get_staker( + chain_id: ChainId, + address: str, + options: Optional[SubgraphOptions] = None, + ) -> Optional[StakerData]: network = NETWORKS.get(chain_id) if not network: raise StakingUtilsError("Unsupported Chain ID") - data = get_data_from_subgraph( + data = custom_gql_fetch( network, query=get_staker_query(), params={"id": address.lower()}, + options=options, ) if ( not data @@ -93,12 +98,15 @@ def get_staker(chain_id: ChainId, address: str) -> Optional[StakerData]: ) @staticmethod - def get_stakers(filter: StakersFilter) -> List[StakerData]: + def get_stakers( + filter: StakersFilter, + options: Optional[SubgraphOptions] = None, + ) -> List[StakerData]: network_data = NETWORKS.get(filter.chain_id) if not network_data: raise StakingUtilsError("Unsupported Chain ID") - data = get_data_from_subgraph( + data = custom_gql_fetch( network_data, query=get_stakers_query(filter), params={ @@ -115,6 +123,7 @@ def get_stakers(filter: StakersFilter) -> List[StakerData]: "first": filter.first, "skip": filter.skip, }, + options=options, ) if ( not data diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/statistics/statistics_client.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/statistics/statistics_client.py index 3a42205689..b78f927418 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/statistics/statistics_client.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/statistics/statistics_client.py @@ -22,7 +22,7 @@ from human_protocol_sdk.constants import ChainId, NETWORKS -from human_protocol_sdk.utils import get_data_from_subgraph +from human_protocol_sdk.utils import SubgraphOptions, custom_gql_fetch from human_protocol_sdk.filter import StatisticsFilter LOG = logging.getLogger("human_protocol_sdk.statistics") @@ -290,11 +290,14 @@ def __init__(self, chain_id: ChainId = ChainId.POLYGON_AMOY): raise StatisticsClientError("Empty network configuration") def get_escrow_statistics( - self, filter: StatisticsFilter = StatisticsFilter() + self, + filter: StatisticsFilter = StatisticsFilter(), + options: Optional[SubgraphOptions] = None, ) -> EscrowStatistics: """Get escrow statistics data for the given date range. :param filter: Object containing the date range + :param options: Optional config for subgraph requests :return: Escrow statistics data @@ -323,13 +326,14 @@ def get_escrow_statistics( get_escrow_statistics_query, ) - escrow_statistics_data = get_data_from_subgraph( + escrow_statistics_data = custom_gql_fetch( self.network, query=get_escrow_statistics_query, + options=options, ) escrow_statistics = escrow_statistics_data["data"]["escrowStatistics"] - event_day_datas_data = get_data_from_subgraph( + event_day_datas_data = custom_gql_fetch( self.network, query=get_event_day_data_query(filter), params={ @@ -339,6 +343,7 @@ def get_escrow_statistics( "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) event_day_datas = event_day_datas_data["data"]["eventDayDatas"] @@ -368,11 +373,14 @@ def get_escrow_statistics( ) def get_worker_statistics( - self, filter: StatisticsFilter = StatisticsFilter() + self, + filter: StatisticsFilter = StatisticsFilter(), + options: Optional[SubgraphOptions] = None, ) -> WorkerStatistics: """Get worker statistics data for the given date range. :param filter: Object containing the date range + :param options: Optional config for subgraph requests :return: Worker statistics data @@ -399,7 +407,7 @@ def get_worker_statistics( get_event_day_data_query, ) - event_day_datas_data = get_data_from_subgraph( + event_day_datas_data = custom_gql_fetch( self.network, query=get_event_day_data_query(filter), params={ @@ -409,6 +417,7 @@ def get_worker_statistics( "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) event_day_datas = event_day_datas_data["data"]["eventDayDatas"] @@ -425,11 +434,14 @@ def get_worker_statistics( ) def get_payment_statistics( - self, filter: StatisticsFilter = StatisticsFilter() + self, + filter: StatisticsFilter = StatisticsFilter(), + options: Optional[SubgraphOptions] = None, ) -> PaymentStatistics: """Get payment statistics data for the given date range. :param filter: Object containing the date range + :param options: Optional config for subgraph requests :return: Payment statistics data @@ -457,7 +469,7 @@ def get_payment_statistics( get_event_day_data_query, ) - event_day_datas_data = get_data_from_subgraph( + event_day_datas_data = custom_gql_fetch( self.network, query=get_event_day_data_query(filter), params={ @@ -467,6 +479,7 @@ def get_payment_statistics( "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) event_day_datas = event_day_datas_data["data"]["eventDayDatas"] @@ -491,9 +504,13 @@ def get_payment_statistics( ], ) - def get_hmt_statistics(self) -> HMTStatistics: + def get_hmt_statistics( + self, options: Optional[SubgraphOptions] = None + ) -> HMTStatistics: """Get HMT statistics data. + :param options: Optional config for subgraph requests + :return: HMT statistics data :example: @@ -511,9 +528,10 @@ def get_hmt_statistics(self) -> HMTStatistics: get_hmtoken_statistics_query, ) - hmtoken_statistics_data = get_data_from_subgraph( + hmtoken_statistics_data = custom_gql_fetch( self.network, query=get_hmtoken_statistics_query, + options=options, ) hmtoken_statistics = hmtoken_statistics_data["data"]["hmtokenStatistics"] @@ -528,11 +546,14 @@ def get_hmt_statistics(self) -> HMTStatistics: ) def get_hmt_holders( - self, param: HMTHoldersParam = HMTHoldersParam() + self, + param: HMTHoldersParam = HMTHoldersParam(), + options: Optional[SubgraphOptions] = None, ) -> List[HMTHolder]: """Get HMT holders data with optional filters and ordering. :param param: Object containing filter and order parameters + :param options: Optional config for subgraph requests :return: List of HMT holders @@ -556,7 +577,7 @@ def get_hmt_holders( """ from human_protocol_sdk.gql.hmtoken import get_holders_query - holders_data = get_data_from_subgraph( + holders_data = custom_gql_fetch( self.network, query=get_holders_query(address=param.address), params={ @@ -564,6 +585,7 @@ def get_hmt_holders( "orderBy": "balance", "orderDirection": param.order_direction, }, + options=options, ) holders = holders_data["data"]["holders"] @@ -577,11 +599,14 @@ def get_hmt_holders( ] def get_hmt_daily_data( - self, filter: StatisticsFilter = StatisticsFilter() + self, + filter: StatisticsFilter = StatisticsFilter(), + options: Optional[SubgraphOptions] = None, ) -> List[DailyHMTData]: """Get HMT daily statistics data for the given date range. :param filter: Object containing the date range + :param options: Optional config for subgraph requests :return: HMT statistics data @@ -607,7 +632,7 @@ def get_hmt_daily_data( get_event_day_data_query, ) - event_day_datas_data = get_data_from_subgraph( + event_day_datas_data = custom_gql_fetch( self.network, query=get_event_day_data_query(filter), params={ @@ -617,6 +642,7 @@ def get_hmt_daily_data( "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) event_day_datas = event_day_datas_data["data"]["eventDayDatas"] diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/transaction/transaction_utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/transaction/transaction_utils.py index 1b88aa89da..ee725ff1b0 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/transaction/transaction_utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/transaction/transaction_utils.py @@ -30,7 +30,7 @@ from human_protocol_sdk.constants import NETWORKS, ChainId from web3 import Web3 from human_protocol_sdk.filter import TransactionFilter -from human_protocol_sdk.utils import get_data_from_subgraph +from human_protocol_sdk.utils import SubgraphOptions, custom_gql_fetch class InternalTransaction: @@ -97,11 +97,14 @@ class TransactionUtils: """ @staticmethod - def get_transaction(chain_id: ChainId, hash: str) -> Optional[TransactionData]: + def get_transaction( + chain_id: ChainId, hash: str, options: Optional[SubgraphOptions] = None + ) -> Optional[TransactionData]: """Returns the transaction for a given hash. :param chain_id: Network in which the transaction was executed :param hash: Hash of the transaction + :param options: Optional config for subgraph requests :return: Transaction data @@ -124,10 +127,11 @@ def get_transaction(chain_id: ChainId, hash: str) -> Optional[TransactionData]: from human_protocol_sdk.gql.transaction import get_transaction_query - transaction_data = get_data_from_subgraph( + transaction_data = custom_gql_fetch( network, query=get_transaction_query(), params={"hash": hash.lower()}, + options=options, ) if ( not transaction_data @@ -166,11 +170,14 @@ def get_transaction(chain_id: ChainId, hash: str) -> Optional[TransactionData]: ) @staticmethod - def get_transactions(filter: TransactionFilter) -> List[TransactionData]: + def get_transactions( + filter: TransactionFilter, options: Optional[SubgraphOptions] = None + ) -> List[TransactionData]: """Get an array of transactions based on the specified filter parameters. :param filter: Object containing all the necessary parameters to filter (chain_id, from_address, to_address, start_date, end_date, start_block, end_block, method, escrow, token, first, skip, order_direction) + :param options: Optional config for subgraph requests :return: List of transactions @@ -200,7 +207,7 @@ def get_transactions(filter: TransactionFilter) -> List[TransactionData]: if not network_data: raise TransactionUtilsError("Unsupported Chain ID") - data = get_data_from_subgraph( + data = custom_gql_fetch( network_data, query=get_transactions_query(filter), params={ @@ -223,6 +230,7 @@ def get_transactions(filter: TransactionFilter) -> List[TransactionData]: "skip": filter.skip, "orderDirection": filter.order_direction.value, }, + options=options, ) if ( not data diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/utils.py index c9dd1c7bf5..056ec1b732 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/utils.py @@ -4,6 +4,7 @@ import time import re from typing import Tuple, Optional +from dataclasses import dataclass import requests from validators import url as URL @@ -18,7 +19,6 @@ ARTIFACTS_FOLDER, SUBGRAPH_API_KEY_PLACEHOLDER, ChainId, - DEFAULT_AURORA_GAS_PRICE, ) logger = logging.getLogger("human_protocol_sdk.utils") @@ -32,41 +32,118 @@ pass -def with_retry(fn, retries=3, delay=5, backoff=2): - """Retry a function +@dataclass +class SubgraphOptions: + """Configuration for subgraph logic.""" - Mainly used with handle_transaction to retry on case of failure. - Uses exponential backoff. + max_retries: Optional[int] = None + base_delay: Optional[int] = None # milliseconds - :param fn: to run with retry logic. - :param retries: number of times to retry the transaction - :param delay: time to wait (exponentially) - :param backoff: defines the rate of grow for the exponential wait. - :return: False if transaction never succeeded, - otherwise the return of the function +def is_indexer_error(error: Exception) -> bool: + """ + Check if an error indicates that the indexer is down or not synced. + This function specifically checks for "bad indexers" errors from The Graph. - :note: If the partial returns a Boolean and it happens to be False, - we would not know if the tx succeeded and it will retry. + :param error: The error to check + :return: True if the error indicates indexer issues """ + if not error: + return False - wait_time = delay + response = getattr(error, "response", None) - for i in range(retries): + message = "" + if response is not None: try: - result = fn() - if result: - return result - except Exception as e: - name = getattr(fn, "__name__", "partial") - logger.warning( - f"(x{i+1}) {name} exception: {e}. Retrying after {wait_time} sec..." - ) + data = response.json() + except Exception: + data = None + + if isinstance(data, dict): + errors = data.get("errors") + if isinstance(errors, list) and errors: + first_error = errors[0] + if isinstance(first_error, dict): + message = str(first_error.get("message", "")) + + if not message: + message = getattr(error, "message", "") or str(error) or "" - time.sleep(wait_time) - wait_time *= backoff + return "bad indexers" in message.lower() - return False + +def custom_gql_fetch( + network: dict, + query: str, + params: dict = None, + options: Optional[SubgraphOptions] = None, +): + """Fetch data from the subgraph with optional logic. + + :param network: Network configuration dictionary + :param query: GraphQL query string + :param params: Query parameters + :param options: Optional subgraph configuration + + :return: JSON response from the subgraph + + :raise Exception: If the subgraph query fails + """ + if not options: + return _fetch_subgraph_data(network, query, params) + + if ( + options.max_retries is not None + and options.base_delay is None + or options.max_retries is None + and options.base_delay is not None + ): + raise ValueError( + "Retry configuration must include both max_retries and base_delay" + ) + + max_retries = int(options.max_retries) + base_delay = options.base_delay / 1000 + + last_error = None + + for attempt in range(max_retries + 1): + try: + return _fetch_subgraph_data(network, query, params) + except Exception as error: + last_error = error + + if not is_indexer_error(error): + break + + delay = base_delay * attempt + time.sleep(delay) + + raise last_error + + +def _fetch_subgraph_data(network: dict, query: str, params: dict = None): + subgraph_api_key = os.getenv("SUBGRAPH_API_KEY", "") + if subgraph_api_key: + subgraph_url = network["subgraph_url_api_key"].replace( + SUBGRAPH_API_KEY_PLACEHOLDER, subgraph_api_key + ) + else: + logger.warning( + "Warning: SUBGRAPH_API_KEY is not provided. It might cause issues with the subgraph." + ) + subgraph_url = network["subgraph_url"] + + request = requests.post(subgraph_url, json={"query": query, "variables": params}) + if request.status_code == 200: + return request.json() + else: + raise Exception( + "Subgraph query failed. return code is {}. \n{}".format( + request.status_code, query + ) + ) def get_hmt_balance(wallet_addr, token_addr, w3): @@ -192,39 +269,6 @@ def get_kvstore_interface(): ) -def get_data_from_subgraph(network: dict, query: str, params: dict = None): - """Fetch data from the subgraph. - - :param network: Network configuration dictionary - :param query: GraphQL query string - :param params: Query parameters - - :return: JSON response from the subgraph - - :raise Exception: If the subgraph query fails - """ - subgraph_api_key = os.getenv("SUBGRAPH_API_KEY", "") - if subgraph_api_key: - subgraph_url = network["subgraph_url_api_key"].replace( - SUBGRAPH_API_KEY_PLACEHOLDER, subgraph_api_key - ) - else: - logger.warning( - "Warning: SUBGRAPH_API_KEY is not provided. It might cause issues with the subgraph." - ) - subgraph_url = network["subgraph_url"] - - request = requests.post(subgraph_url, json={"query": query, "variables": params}) - if request.status_code == 200: - return request.json() - else: - raise Exception( - "Subgraph query failed. return code is {}. \n{}".format( - request.status_code, query - ) - ) - - def handle_error(e, exception_class): """ Handles and translates errors raised during contract transactions. @@ -324,22 +368,3 @@ def validate_json(data: str) -> bool: return True except (ValueError, TypeError): return False - - -def apply_tx_defaults(w3: Web3, tx_options: Optional[TxParams]) -> TxParams: - """Apply network specific default transaction parameters. - - Aurora networks enforce a fixed gas price. We always override any user supplied - gasPrice with DEFAULT_AURORA_GAS_PRICE when on Aurora Testnet. - EIP-1559 fields are removed to avoid conflicts. - - :param w3: Web3 instance (used to read chain id) - :param tx_options: Original transaction options (can be None) - :return: Mutated tx options with enforced defaults - """ - opts: TxParams = dict(tx_options) if tx_options else {} - if w3.eth.chain_id == ChainId.AURORA_TESTNET.value: - opts["gasPrice"] = DEFAULT_AURORA_GAS_PRICE - opts.pop("maxFeePerGas", None) - opts.pop("maxPriorityFeePerGas", None) - return opts diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/worker/worker_utils.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/worker/worker_utils.py index c363898ce6..1bdab5ca14 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/worker/worker_utils.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/worker/worker_utils.py @@ -4,7 +4,7 @@ from web3 import Web3 from human_protocol_sdk.constants import NETWORKS, ChainId -from human_protocol_sdk.utils import get_data_from_subgraph +from human_protocol_sdk.utils import SubgraphOptions, custom_gql_fetch from human_protocol_sdk.filter import WorkerFilter LOG = logging.getLogger("human_protocol_sdk.worker") @@ -47,10 +47,14 @@ class WorkerUtils: """ @staticmethod - def get_workers(filter: WorkerFilter) -> List[WorkerData]: + def get_workers( + filter: WorkerFilter, + options: Optional[SubgraphOptions] = None, + ) -> List[WorkerData]: """Get workers data of the protocol. :param filter: Worker filter + :param options: Optional config for subgraph requests :return: List of workers data """ @@ -62,7 +66,7 @@ def get_workers(filter: WorkerFilter) -> List[WorkerData]: if not network: raise WorkerUtilsError("Unsupported Chain ID") - workers_data = get_data_from_subgraph( + workers_data = custom_gql_fetch( network, query=get_workers_query(filter), params={ @@ -72,6 +76,7 @@ def get_workers(filter: WorkerFilter) -> List[WorkerData]: "first": filter.first, "skip": filter.skip, }, + options=options, ) if ( @@ -97,11 +102,16 @@ def get_workers(filter: WorkerFilter) -> List[WorkerData]: return workers @staticmethod - def get_worker(chain_id: ChainId, worker_address: str) -> Optional[WorkerData]: + def get_worker( + chain_id: ChainId, + worker_address: str, + options: Optional[SubgraphOptions] = None, + ) -> Optional[WorkerData]: """Gets the worker details. :param chain_id: Network in which the worker exists :param worker_address: Address of the worker + :param options: Optional config for subgraph requests :return: Worker data if exists, otherwise None """ @@ -116,10 +126,11 @@ def get_worker(chain_id: ChainId, worker_address: str) -> Optional[WorkerData]: raise WorkerUtilsError(f"Invalid operator address: {worker_address}") network = NETWORKS[chain_id] - worker_data = get_data_from_subgraph( + worker_data = custom_gql_fetch( network, query=get_worker_query(), params={"address": worker_address.lower()}, + options=options, ) if ( diff --git a/packages/sdk/python/human-protocol-sdk/package.json b/packages/sdk/python/human-protocol-sdk/package.json index e10641d495..d9d3bd2049 100644 --- a/packages/sdk/python/human-protocol-sdk/package.json +++ b/packages/sdk/python/human-protocol-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@human-protocol/python-sdk", - "version": "5.0.1", + "version": "5.1.0", "private": true, "description": "Stub package to integrate the Python SDK with Changesets (dev-only).", "license": "MIT" diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_client.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_client.py index cd07585a2c..582affebbb 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_client.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_client.py @@ -384,7 +384,7 @@ def test_create_escrow(self): self.escrow.factory_contract.functions.createEscrow.assert_called_once_with( token_address, job_requester_id ) - mock_create.transact.assert_called_once_with({}) + mock_create.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -500,7 +500,7 @@ def test_create_fund_and_setup_escrow(self): escrow_config.manifest, escrow_config.hash, ) - mock_create.transact.assert_called_once_with({}) + mock_create.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -647,7 +647,7 @@ def test_setup(self): escrow_config.manifest, escrow_config.hash, ) - mock_setup.transact.assert_called_once_with({}) + mock_setup.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -828,7 +828,7 @@ def test_fund(self): mock_token_contract.functions.transfer.assert_called_once_with( escrow_address, amount ) - mock_transfer.transact.assert_called_once_with({}) + mock_transfer.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -909,7 +909,7 @@ def test_store_results(self): self.escrow._get_escrow_contract.assert_called_once_with(escrow_address) mock_contract.functions.storeResults.assert_called_once_with(url, hash) - mock_store.transact.assert_called_once_with({}) + mock_store.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -1038,7 +1038,7 @@ def test_store_results_with_funds_to_reserve_positive(self): mock_contract.functions.storeResults.assert_called_once_with( url, hash, funds_to_reserve ) - mock_store.transact.assert_called_once_with({}) + mock_store.transact.assert_called_once_with(None) def test_store_results_with_funds_to_reserve_zero_allows_empty(self): mock_contract = MagicMock() @@ -1119,7 +1119,7 @@ def test_bulk_payout(self): mock_contract.functions.bulkPayOut.assert_called_once_with( recipients, amounts, final_results_url, final_results_hash, txId, True ) - mock_bulk.transact.assert_called_once_with({}) + mock_bulk.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -1580,7 +1580,7 @@ def test_complete(self): self.escrow._get_escrow_contract.assert_called_once_with(escrow_address) mock_contract.functions.complete.assert_called_once_with() - mock_complete.transact.assert_called_once_with({}) + mock_complete.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -1675,7 +1675,7 @@ def test_request_cancellation(self): self.escrow._get_escrow_contract.assert_called_once_with(escrow_address) mock_contract.functions.requestCancellation.assert_called_once_with() - mock_request.transact.assert_called_once_with({}) + mock_request.transact.assert_called_once_with(None) self.assertIsNone(result) def test_request_cancellation_invalid_address(self): @@ -1759,7 +1759,7 @@ def test_cancel(self): self.assertIsNone(result) self.escrow._get_escrow_contract.assert_called_once_with(escrow_address) mock_contract.functions.cancel.assert_called_once_with() - mock_cancel.transact.assert_called_once_with({}) + mock_cancel.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -1869,7 +1869,7 @@ def test_withdraw(self): self.escrow._get_escrow_contract.assert_called_once_with(escrow_address) mock_contract.functions.withdraw.assert_called_once_with(token_address) - mock_withdraw.transact.assert_called_once_with({}) + mock_withdraw.transact.assert_called_once_with(None) self.escrow.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_utils.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_utils.py index 88b52db16e..3a61638d6b 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_utils.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/escrow/test_escrow_utils.py @@ -23,7 +23,7 @@ class TestEscrowUtils(unittest.TestCase): def test_get_escrows(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_escrow = { "id": "0x1234567890123456789012345678901234567891", @@ -51,7 +51,7 @@ def test_get_escrows(self): "createdAt": "1683811973", } - def side_effect(subgraph_url, query, params): + def side_effect(subgraph_url, query, params, options): if subgraph_url == NETWORKS[ChainId.POLYGON_AMOY]: return {"data": {"escrows": [mock_escrow]}} @@ -83,6 +83,7 @@ def side_effect(subgraph_url, query, params): "skip": 0, "orderDirection": "desc", }, + options=None, ) self.assertEqual(len(filtered), 1) self.assertEqual(filtered[0].address, mock_escrow["address"]) @@ -154,6 +155,7 @@ def side_effect(subgraph_url, query, params): "skip": 0, "orderDirection": "desc", }, + options=None, ) self.assertEqual(len(filtered), 1) self.assertEqual(filtered[0].chain_id, ChainId.POLYGON_AMOY) @@ -161,7 +163,7 @@ def side_effect(subgraph_url, query, params): def test_get_escrows_with_status_array(self): """Test get_escrows with an array of statuses, similar to the TypeScript test.""" with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_escrow_1 = { "id": "0x1234567890123456789012345678901234567891", @@ -204,7 +206,7 @@ def test_get_escrows_with_status_array(self): "createdAt": "1672531200000", } - def side_effect(subgraph_url, query, params): + def side_effect(subgraph_url, query, params, options): if subgraph_url == NETWORKS[ChainId.POLYGON_AMOY]: return {"data": {"escrows": [mock_escrow_1, mock_escrow_2]}} @@ -232,6 +234,7 @@ def side_effect(subgraph_url, query, params): "skip": 0, "orderDirection": "desc", }, + options=None, ) self.assertEqual(len(filtered), 2) self.assertEqual(filtered[0].address, mock_escrow_1["address"]) @@ -239,7 +242,7 @@ def side_effect(subgraph_url, query, params): def test_get_escrow(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_escrow = { "id": "0x1234567890123456789012345678901234567891", @@ -284,6 +287,7 @@ def test_get_escrow(self): params={ "escrowAddress": "0x1234567890123456789012345678901234567890", }, + options=None, ) self.assertEqual(escrow.chain_id, ChainId.POLYGON_AMOY) self.assertEqual(escrow.address, mock_escrow["address"]) @@ -325,7 +329,7 @@ def test_get_escrow(self): def test_get_escrow_empty_data(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = { "data": { @@ -343,6 +347,7 @@ def test_get_escrow_empty_data(self): params={ "escrowAddress": "0x1234567890123456789012345678901234567890", }, + options=None, ) self.assertEqual(escrow, None) @@ -367,9 +372,9 @@ def test_get_status_events_invalid_launcher(self): def test_get_status_events(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = { + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = { "data": { "escrowStatusEvents": [ { @@ -394,9 +399,9 @@ def test_get_status_events(self): def test_get_status_events_with_date_range(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = { + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = { "data": { "escrowStatusEvents": [ { @@ -427,9 +432,9 @@ def test_get_status_events_with_date_range(self): def test_get_status_events_no_data(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = {"data": {}} + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = {"data": {}} filter = StatusEventFilter( chain_id=ChainId.POLYGON_AMOY, statuses=[Status.Pending] @@ -440,9 +445,9 @@ def test_get_status_events_no_data(self): def test_get_status_events_with_launcher(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = { + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = { "data": { "escrowStatusEvents": [ { @@ -487,9 +492,9 @@ def test_get_payouts_invalid_recipient(self): def test_get_payouts(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = { + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = { "data": { "payouts": [ { @@ -519,9 +524,9 @@ def test_get_payouts(self): def test_get_payouts_with_filters(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = { + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = { "data": { "payouts": [ { @@ -557,9 +562,9 @@ def test_get_payouts_with_filters(self): def test_get_payouts_no_data(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = {"data": {"payouts": []}} + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = {"data": {"payouts": []}} filter = PayoutFilter(chain_id=ChainId.POLYGON_AMOY) result = EscrowUtils.get_payouts(filter) @@ -568,9 +573,9 @@ def test_get_payouts_no_data(self): def test_get_payouts_with_pagination(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" - ) as mock_get_data_from_subgraph: - mock_get_data_from_subgraph.return_value = { + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" + ) as mock_custom_gql_fetch: + mock_custom_gql_fetch.return_value = { "data": { "payouts": [ { @@ -604,7 +609,7 @@ def test_get_cancellation_refunds(self): from human_protocol_sdk.escrow.escrow_utils import CancellationRefundFilter with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_refund = { "id": "1", @@ -616,7 +621,7 @@ def test_get_cancellation_refunds(self): "txHash": "0xhash1", } - def side_effect(subgraph_url, query, params): + def side_effect(subgraph_url, query, params, options): if subgraph_url == NETWORKS[ChainId.POLYGON_AMOY]: return {"data": {"cancellationRefundEvents": [mock_refund]}} @@ -674,7 +679,7 @@ def test_get_cancellation_refunds_no_data(self): from human_protocol_sdk.escrow.escrow_utils import CancellationRefundFilter with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"cancellationRefundEvents": []}} @@ -685,7 +690,7 @@ def test_get_cancellation_refunds_no_data(self): def test_get_cancellation_refund(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_refund = { "id": "1", @@ -720,7 +725,7 @@ def test_get_cancellation_refund(self): def test_get_cancellation_refund_no_data(self): with patch( - "human_protocol_sdk.escrow.escrow_utils.get_data_from_subgraph" + "human_protocol_sdk.escrow.escrow_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"cancellationRefundEvents": []}} diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_client.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_client.py index 31dadc1615..30bf3d0a54 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_client.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_client.py @@ -78,7 +78,7 @@ def test_set(self): self.kvstore.set(key, value) self.kvstore.kvstore_contract.functions.set.assert_called_once_with(key, value) - mock_set.transact.assert_called_once_with({}) + mock_set.transact.assert_called_once_with(None) self.kvstore.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -140,7 +140,7 @@ def test_set_bulk(self): self.kvstore.kvstore_contract.functions.setBulk.assert_called_once_with( keys, values ) - mock_set_bulk.transact.assert_called_once_with({}) + mock_set_bulk.transact.assert_called_once_with(None) self.kvstore.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -226,7 +226,7 @@ def test_set_file_url_and_hash(self): self.kvstore.kvstore_contract.functions.setBulk.assert_called_once_with( ["url", "url_hash"], [url, content_hash] ) - mock_set_bulk.transact.assert_called_once_with({}) + mock_set_bulk.transact.assert_called_once_with(None) self.kvstore.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -255,7 +255,7 @@ def test_set_file_url_and_hash_with_key(self): ["linkedin_url", "linkedin_url_hash"], [url, content_hash] ) - mock_set_bulk.transact.assert_called_once_with({}) + mock_set_bulk.transact.assert_called_once_with(None) self.kvstore.w3.eth.wait_for_transaction_receipt.assert_called_once_with def test_set_file_url_and_hash_invalid_url(self): diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_utils.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_utils.py index 35e590715b..2b39eec467 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_utils.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/kvstore/test_kvstore_utils.py @@ -13,7 +13,7 @@ class TestKVStoreUtils(unittest.TestCase): def test_get_kvstore_data(self): with patch( - "human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph" + "human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch" ) as mock_function: mock_kvstore_data = [ { @@ -51,6 +51,7 @@ def test_get_kvstore_data(self): params={ "address": "0x15d34aaf54267db7d7c367839aaf71a00a2c6a65", }, + options=None, ) self.assertEqual(len(kvstores), 2) self.assertEqual(kvstores[0].key, "fee") @@ -58,7 +59,7 @@ def test_get_kvstore_data(self): def test_get_kvstore_data_empty_data(self): with patch( - "human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph" + "human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = { "data": { @@ -76,6 +77,7 @@ def test_get_kvstore_data_empty_data(self): params={ "address": "0x15d34aaf54267db7d7c367839aaf71a00a2c6a65", }, + options=None, ) self.assertEqual(kvstores, []) @@ -91,7 +93,7 @@ def test_get_kvstore_data_invalid_address(self): KVStoreUtils.get_kvstore_data(ChainId.LOCALHOST, "invalid_address") self.assertEqual("Invalid KVStore address: invalid_address", str(cm.exception)) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get(self, mock_function): address = Web3.to_checksum_address("0x1234567890123456789012345678901234567890") key = "key1" @@ -118,10 +120,11 @@ def test_get(self, mock_function): NETWORKS[ChainId.LOCALHOST], query=get_kvstore_by_address_and_key_query(), params={"address": address, "key": key}, + options=None, ) self.assertEqual(result, "1") - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_empty_key(self, mock_function): address = Web3.to_checksum_address("0x1234567890123456789012345678901234567890") key = "" @@ -129,7 +132,7 @@ def test_get_empty_key(self, mock_function): KVStoreUtils.get(ChainId.LOCALHOST, address, key) self.assertEqual("Key cannot be empty", str(cm.exception)) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_invalid_address(self, mock_function): address = "invalid_address" key = "key" @@ -137,7 +140,7 @@ def test_get_invalid_address(self, mock_function): KVStoreUtils.get(ChainId.LOCALHOST, address, key) self.assertEqual(f"Invalid address: {address}", str(cm.exception)) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_empty_value(self, mock_function): mock_function.return_value = {"data": {"kvstores": []}} @@ -154,9 +157,10 @@ def test_get_empty_value(self, mock_function): NETWORKS[ChainId.LOCALHOST], query=get_kvstore_by_address_and_key_query(), params={"address": address, "key": key}, + options=None, ) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_without_account(self, mock_function): mock_function.return_value = { "data": { @@ -182,10 +186,11 @@ def test_get_without_account(self, mock_function): NETWORKS[ChainId.LOCALHOST], query=get_kvstore_by_address_and_key_query(), params={"address": address, "key": key}, + options=None, ) self.assertEqual(result, "mock_value") - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_file_url_and_verify_hash(self, mock_function): mock_function.side_effect = [ {"data": {"kvstores": [{"value": "https://example.com"}]}}, @@ -204,7 +209,7 @@ def test_get_file_url_and_verify_hash(self, mock_function): self.assertEqual(result, "https://example.com") - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_file_url_and_verify_hash_with_key(self, mock_function): mock_function.side_effect = [ {"data": {"kvstores": [{"value": "https://example.com"}]}}, @@ -223,14 +228,14 @@ def test_get_file_url_and_verify_hash_with_key(self, mock_function): self.assertEqual(result, "https://example.com") - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_file_url_and_verify_hash_invalid_address(self, mock_function): address = "invalid_address" with self.assertRaises(KVStoreClientError) as cm: KVStoreUtils.get_file_url_and_verify_hash(ChainId.LOCALHOST, address) self.assertEqual(f"Invalid address: {address}", str(cm.exception)) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_file_url_and_verify_hash_empty_value(self, mock_function): mock_function.return_value = {"data": {"kvstores": []}} @@ -243,7 +248,7 @@ def test_get_file_url_and_verify_hash_empty_value(self, mock_function): f"Key '{key}' not found for address {address}", str(cm.exception) ) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_file_url_and_verify_hash_without_account(self, mock_function): mock_function.side_effect = [ {"data": {"kvstores": [{"value": "https://example.com"}]}}, @@ -262,7 +267,7 @@ def test_get_file_url_and_verify_hash_without_account(self, mock_function): self.assertEqual(result, "https://example.com") - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_file_url_and_verify_hash_invalid_hash(self, mock_function): mock_function.side_effect = [ {"data": {"kvstores": [{"value": "https://example.com"}]}}, @@ -279,7 +284,7 @@ def test_get_file_url_and_verify_hash_invalid_hash(self, mock_function): KVStoreUtils.get_file_url_and_verify_hash(ChainId.LOCALHOST, address) self.assertEqual("Invalid hash", str(cm.exception)) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_public_key(self, mock_function): mock_function.side_effect = [ {"data": {"kvstores": [{"value": "PUBLIC_KEY_URL"}]}}, @@ -302,7 +307,7 @@ def test_get_public_key_invalid_address(self): KVStoreUtils.get_public_key(ChainId.LOCALHOST, address) self.assertEqual(f"Invalid address: {address}", str(cm.exception)) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_public_key_empty_value(self, mock_function): mock_function.return_value = {"data": {"kvstores": []}} @@ -316,7 +321,7 @@ def test_get_public_key_empty_value(self, mock_function): f"Key '{key}' not found for address {address}", str(cm.exception) ) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_public_key_invalid_hash(self, mock_function): mock_function.side_effect = [ {"data": {"kvstores": [{"value": "PUBLIC_KEY_URL"}]}}, @@ -333,7 +338,7 @@ def test_get_public_key_invalid_hash(self, mock_function): KVStoreUtils.get_public_key(ChainId.LOCALHOST, address) self.assertEqual("Invalid hash", str(cm.exception)) - @patch("human_protocol_sdk.kvstore.kvstore_utils.get_data_from_subgraph") + @patch("human_protocol_sdk.kvstore.kvstore_utils.custom_gql_fetch") def test_get_public_key_without_account(self, mock_function): mock_function.side_effect = [ {"data": {"kvstores": [{"value": "PUBLIC_KEY_URL"}]}}, diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/operator/test_operator_utils.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/operator/test_operator_utils.py index b77c23db86..126ddda3e6 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/operator/test_operator_utils.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/operator/test_operator_utils.py @@ -18,7 +18,7 @@ def test_get_operators(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -67,6 +67,7 @@ def test_get_operators(self): "first": filter.first, "skip": filter.skip, }, + options=None, ) self.assertEqual(len(operators), 1) @@ -96,7 +97,7 @@ def test_get_operators_when_job_types_is_none(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -143,6 +144,7 @@ def test_get_operators_when_job_types_is_none(self): "first": filter.first, "skip": filter.skip, }, + options=None, ) self.assertEqual(len(operators), 1) @@ -172,7 +174,7 @@ def test_get_operators_when_job_types_is_array(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -219,6 +221,7 @@ def test_get_operators_when_job_types_is_array(self): "first": filter.first, "skip": filter.skip, }, + options=None, ) self.assertEqual(len(operators), 1) @@ -248,7 +251,7 @@ def test_get_operators_empty_data(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = [ { @@ -271,6 +274,7 @@ def test_get_operators_empty_data(self): "first": filter.first, "skip": filter.skip, }, + options=None, ) self.assertEqual(operators, []) @@ -281,7 +285,7 @@ def test_get_operator(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -321,6 +325,7 @@ def test_get_operator(self): NETWORKS[ChainId.POLYGON], query=get_operator_query, params={"address": staker_address}, + options=None, ) self.assertNotEqual(operator, None) @@ -351,7 +356,7 @@ def test_get_operator_when_job_types_is_none(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -389,6 +394,7 @@ def test_get_operator_when_job_types_is_none(self): NETWORKS[ChainId.POLYGON], query=get_operator_query, params={"address": staker_address}, + options=None, ) self.assertNotEqual(operator, None) @@ -419,7 +425,7 @@ def test_get_operator_when_job_types_is_array(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -457,6 +463,7 @@ def test_get_operator_when_job_types_is_array(self): NETWORKS[ChainId.POLYGON], query=get_operator_query, params={"address": staker_address}, + options=None, ) self.assertNotEqual(operator, None) @@ -485,7 +492,7 @@ def test_get_operator_empty_data(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = [{"data": {"operator": None}}] @@ -495,6 +502,7 @@ def test_get_operator_empty_data(self): NETWORKS[ChainId.POLYGON], query=get_operator_query, params={"address": staker_address}, + options=None, ) self.assertEqual(operator, None) @@ -509,7 +517,7 @@ def test_get_reputation_network_operators(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -541,6 +549,7 @@ def test_get_reputation_network_operators(self): NETWORKS[ChainId.POLYGON], query=get_reputation_network_query(None), params={"address": reputation_address, "role": None}, + options=None, ) self.assertNotEqual(operators, []) @@ -561,7 +570,7 @@ def test_get_reputation_network_operators_when_job_types_is_none(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -593,6 +602,7 @@ def test_get_reputation_network_operators_when_job_types_is_none(self): NETWORKS[ChainId.POLYGON], query=get_reputation_network_query(None), params={"address": reputation_address, "role": None}, + options=None, ) self.assertNotEqual(operators, []) @@ -613,7 +623,7 @@ def test_get_reputation_network_operators_when_job_types_is_array(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -645,6 +655,7 @@ def test_get_reputation_network_operators_when_job_types_is_array(self): NETWORKS[ChainId.POLYGON], query=get_reputation_network_query(None), params={"address": reputation_address, "role": None}, + options=None, ) self.assertNotEqual(operators, []) @@ -661,7 +672,7 @@ def test_get_reputation_network_operators_empty_data(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = [{"data": {"reputationNetwork": None}}] @@ -673,6 +684,7 @@ def test_get_reputation_network_operators_empty_data(self): NETWORKS[ChainId.POLYGON], query=get_reputation_network_query(None), params={"address": reputation_address, "role": None}, + options=None, ) self.assertEqual(operators, []) @@ -682,7 +694,7 @@ def test_get_rewards_info(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = { "data": { @@ -704,6 +716,7 @@ def test_get_rewards_info(self): NETWORKS[ChainId.POLYGON], query=get_reward_added_events_query, params={"slasherAddress": slasher}, + options=None, ) self.assertEqual(len(rewards_info), 2) @@ -717,7 +730,7 @@ def test_get_rewards_info_empty_data(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.operator.operator_utils.get_data_from_subgraph" + "human_protocol_sdk.operator.operator_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"rewardAddedEvents": None}} rewards_info = OperatorUtils.get_rewards_info(ChainId.POLYGON, slasher) @@ -726,6 +739,7 @@ def test_get_rewards_info_empty_data(self): NETWORKS[ChainId.POLYGON], query=get_reward_added_events_query, params={"slasherAddress": slasher}, + options=None, ) self.assertEqual(rewards_info, []) diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_client.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_client.py index 5302dddd79..c0f59a09a6 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_client.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_client.py @@ -88,7 +88,7 @@ def test_approve_stake(self): self.staking_client.hmtoken_contract.functions.approve.assert_called_once_with( NETWORKS[ChainId.LOCALHOST]["staking_address"], 100 ) - mock_approve.transact.assert_called_once_with({}) + mock_approve.transact.assert_called_once_with(None) self.staking_client.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -134,7 +134,7 @@ def test_stake(self): self.staking_client.staking_contract.functions.stake.assert_called_once_with( 100 ) - mock_stake.transact.assert_called_once_with({}) + mock_stake.transact.assert_called_once_with(None) self.staking_client.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -180,7 +180,7 @@ def test_unstake(self): self.staking_client.staking_contract.functions.unstake.assert_called_once_with( 100 ) - mock_unstake.transact.assert_called_once_with({}) + mock_unstake.transact.assert_called_once_with(None) self.staking_client.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -224,7 +224,7 @@ def test_withdraw(self): self.staking_client.withdraw() self.staking_client.staking_contract.functions.withdraw.assert_called_once_with() - mock_withdraw.transact.assert_called_once_with({}) + mock_withdraw.transact.assert_called_once_with(None) self.staking_client.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) @@ -273,7 +273,7 @@ def test_slash(self): self.staking_client.staking_contract.functions.slash.assert_called_once_with( slasher, staker, escrow_address, 50 ) - mock_slash.transact.assert_called_once_with({}) + mock_slash.transact.assert_called_once_with(None) self.staking_client.w3.eth.wait_for_transaction_receipt.assert_called_once_with( "tx_hash" ) diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_utils.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_utils.py index 0f9183eb8b..18d8aa0b40 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_utils.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/staking/test_staking_utils.py @@ -14,7 +14,7 @@ class TestStakingUtils(unittest.TestCase): def test_get_stakers(self): with patch( - "human_protocol_sdk.staking.staking_utils.get_data_from_subgraph" + "human_protocol_sdk.staking.staking_utils.custom_gql_fetch" ) as mock_function: mock_staker_1 = { "id": "1", @@ -69,6 +69,7 @@ def test_get_stakers(self): "first": 2, "skip": 0, }, + options=None, ) self.assertEqual(len(stakers), 2) self.assertIsInstance(stakers[0], StakerData) @@ -120,7 +121,7 @@ def test_get_stakers(self): def test_get_stakers_empty_response(self): with patch( - "human_protocol_sdk.staking.staking_utils.get_data_from_subgraph" + "human_protocol_sdk.staking.staking_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"stakers": []}} @@ -139,7 +140,7 @@ def test_get_stakers_invalid_network(self): def test_get_staker(self): with patch( - "human_protocol_sdk.staking.staking_utils.get_data_from_subgraph" + "human_protocol_sdk.staking.staking_utils.custom_gql_fetch" ) as mock_function: mock_staker = { "id": "1", @@ -160,6 +161,7 @@ def test_get_staker(self): NETWORKS[ChainId.POLYGON_AMOY], query=get_staker_query(), params={"id": "0x123"}, + options=None, ) self.assertIsInstance(staker, StakerData) self.assertEqual(staker.id, "1") @@ -181,7 +183,7 @@ def test_get_staker(self): def test_get_staker_empty_data(self): with patch( - "human_protocol_sdk.staking.staking_utils.get_data_from_subgraph" + "human_protocol_sdk.staking.staking_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"staker": None}} diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/statistics/test_statistics_client.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/statistics/test_statistics_client.py index 666dc1029d..2299d296cf 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/statistics/test_statistics_client.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/statistics/test_statistics_client.py @@ -33,7 +33,7 @@ def test_get_escrow_statistics(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.statistics.statistics_client.get_data_from_subgraph" + "human_protocol_sdk.statistics.statistics_client.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -65,6 +65,7 @@ def test_get_escrow_statistics(self): mock_function.assert_any_call( NETWORKS[ChainId.LOCALHOST], query=get_escrow_statistics_query, + options=None, ) mock_function.assert_any_call( @@ -77,6 +78,7 @@ def test_get_escrow_statistics(self): "skip": 0, "orderDirection": "asc", }, + options=None, ) self.assertEqual(escrow_statistics.total_escrows, 1) @@ -101,7 +103,7 @@ def test_get_worker_statistics(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.statistics.statistics_client.get_data_from_subgraph" + "human_protocol_sdk.statistics.statistics_client.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -128,6 +130,7 @@ def test_get_worker_statistics(self): "skip": 0, "orderDirection": "asc", }, + options=None, ) self.assertEqual(len(payment_statistics.daily_workers_data), 1) @@ -144,7 +147,7 @@ def test_get_payment_statistics(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.statistics.statistics_client.get_data_from_subgraph" + "human_protocol_sdk.statistics.statistics_client.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -173,6 +176,7 @@ def test_get_payment_statistics(self): "skip": 0, "orderDirection": "asc", }, + options=None, ) self.assertEqual(len(payment_statistics.daily_payments_data), 1) @@ -192,7 +196,7 @@ def test_get_hmt_statistics(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.statistics.statistics_client.get_data_from_subgraph" + "human_protocol_sdk.statistics.statistics_client.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -211,6 +215,7 @@ def test_get_hmt_statistics(self): mock_function.assert_any_call( NETWORKS[ChainId.LOCALHOST], query=get_hmtoken_statistics_query, + options=None, ) self.assertEqual(hmt_statistics.total_transfer_amount, 100) @@ -225,7 +230,7 @@ def test_get_hmt_holders(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.statistics.statistics_client.get_data_from_subgraph" + "human_protocol_sdk.statistics.statistics_client.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -250,6 +255,7 @@ def test_get_hmt_holders(self): "orderBy": "balance", "orderDirection": param.order_direction, }, + options=None, ) self.assertEqual(len(holders), 2) @@ -266,7 +272,7 @@ def test_get_hmt_daily_data(self): mock_function = MagicMock() with patch( - "human_protocol_sdk.statistics.statistics_client.get_data_from_subgraph" + "human_protocol_sdk.statistics.statistics_client.custom_gql_fetch" ) as mock_function: mock_function.side_effect = [ { @@ -296,6 +302,7 @@ def test_get_hmt_daily_data(self): "skip": 0, "orderDirection": "asc", }, + options=None, ) self.assertEqual(len(hmt_statistics), 1) diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/test_utils.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/test_utils.py index 1aea57fb90..cb41e620ef 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/test_utils.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/test_utils.py @@ -1,7 +1,21 @@ import unittest +from unittest.mock import Mock, patch from validators import ValidationError -from human_protocol_sdk.utils import validate_url +from human_protocol_sdk.utils import ( + SubgraphOptions, + custom_gql_fetch, + is_indexer_error, + validate_url, +) + + +def make_graphql_error(payload, message=""): + error = Exception(message or "GraphQL error") + response = Mock() + response.json.return_value = payload + error.response = response + return error class TestStorageClient(unittest.TestCase): @@ -12,4 +26,103 @@ def test_validate_url_with_docker_network_url(self): self.assertTrue(validate_url("http://test:8000/valid")) def test_validate_url_with_invalid_url(self): - assert isinstance(validate_url("htt://test:8000/valid"), ValidationError) + self.assertIsInstance(validate_url("htt://test:8000/valid"), ValidationError) + + +class TestIsIndexerError(unittest.TestCase): + def test_returns_true_for_graphql_response(self): + error = make_graphql_error( + {"errors": [{"message": "bad indexers: out of sync"}]} + ) + self.assertTrue(is_indexer_error(error)) + + def test_returns_true_for_message(self): + error = Exception("bad indexers: [...]") + self.assertTrue(is_indexer_error(error)) + + def test_returns_false_when_not_indexer_error(self): + error = Exception("some other issue") + self.assertFalse(is_indexer_error(error)) + + +class TestGetDataFromSubgraph(unittest.TestCase): + def setUp(self): + self.network = { + "subgraph_url": "http://subgraph", + "subgraph_url_api_key": "http://subgraph-with-key", + } + self.query = "query Test" + self.variables = {"foo": "bar"} + + def test_returns_response_without_options(self): + expected = {"data": {"ok": True}} + with patch( + "human_protocol_sdk.utils._fetch_subgraph_data", + return_value=expected, + ) as mock_fetch: + result = custom_gql_fetch(self.network, self.query, self.variables) + + self.assertEqual(result, expected) + mock_fetch.assert_called_once_with(self.network, self.query, self.variables) + + def test_retries_on_indexer_error_and_succeeds(self): + options = SubgraphOptions(max_retries=2, base_delay=100) + error = make_graphql_error({"errors": [{"message": "Bad indexers: syncing"}]}) + + with patch( + "human_protocol_sdk.utils._fetch_subgraph_data", + side_effect=[error, {"data": {"ok": True}}], + ) as mock_fetch, patch("human_protocol_sdk.utils.time.sleep") as mock_sleep: + result = custom_gql_fetch( + self.network, self.query, self.variables, options=options + ) + + self.assertEqual(result, {"data": {"ok": True}}) + self.assertEqual(mock_fetch.call_count, 2) + mock_sleep.assert_called_once() + + def test_raises_when_retry_options_incomplete(self): + options = SubgraphOptions(max_retries=2) + + with patch("human_protocol_sdk.utils._fetch_subgraph_data") as mock_fetch: + with self.assertRaises(ValueError) as ctx: + custom_gql_fetch( + self.network, self.query, self.variables, options=options + ) + + self.assertIn("max_retries", str(ctx.exception)) + mock_fetch.assert_not_called() + + def test_raises_immediately_on_non_indexer_error(self): + options = SubgraphOptions(max_retries=3, base_delay=50) + with patch( + "human_protocol_sdk.utils._fetch_subgraph_data", + side_effect=Exception("network failure"), + ) as mock_fetch, patch("human_protocol_sdk.utils.time.sleep") as mock_sleep: + with self.assertRaises(Exception) as ctx: + custom_gql_fetch( + self.network, self.query, self.variables, options=options + ) + + self.assertIn("network failure", str(ctx.exception)) + mock_fetch.assert_called_once() + mock_sleep.assert_not_called() + + def test_raises_after_exhausting_retries(self): + options = SubgraphOptions(max_retries=2, base_delay=10) + errors = [ + make_graphql_error({"errors": [{"message": "bad indexers: stalled"}]}) + for _ in range(3) + ] + + with patch( + "human_protocol_sdk.utils._fetch_subgraph_data", + side_effect=errors, + ) as mock_fetch, patch("human_protocol_sdk.utils.time.sleep"): + with self.assertRaises(Exception) as ctx: + custom_gql_fetch( + self.network, self.query, self.variables, options=options + ) + + self.assertTrue(is_indexer_error(ctx.exception)) + self.assertEqual(mock_fetch.call_count, 3) diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/transaction/test_transaction_utils.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/transaction/test_transaction_utils.py index aee4e3914f..d475b63ae1 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/transaction/test_transaction_utils.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/transaction/test_transaction_utils.py @@ -16,7 +16,7 @@ class TestTransactionUtils(unittest.TestCase): def test_get_transactions(self): with patch( - "human_protocol_sdk.transaction.transaction_utils.get_data_from_subgraph" + "human_protocol_sdk.transaction.transaction_utils.custom_gql_fetch" ) as mock_function: mock_transaction_1 = { "block": "123", @@ -82,6 +82,7 @@ def test_get_transactions(self): "token": None, "method": None, }, + options=None, ) self.assertEqual(len(transactions), 2) self.assertEqual(transactions[0].chain_id, ChainId.POLYGON_AMOY) @@ -89,7 +90,7 @@ def test_get_transactions(self): def test_get_transactions_empty_response(self): with patch( - "human_protocol_sdk.transaction.transaction_utils.get_data_from_subgraph" + "human_protocol_sdk.transaction.transaction_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"transactions": []}} @@ -117,6 +118,7 @@ def test_get_transactions_empty_response(self): "token": None, "method": None, }, + options=None, ) self.assertEqual(len(transactions), 0) @@ -148,7 +150,7 @@ def test_get_transactions_invalid_to_address(self): def test_get_transaction(self): with patch( - "human_protocol_sdk.transaction.transaction_utils.get_data_from_subgraph" + "human_protocol_sdk.transaction.transaction_utils.custom_gql_fetch" ) as mock_function: mock_transaction = { "block": "123", @@ -181,6 +183,7 @@ def test_get_transaction(self): params={ "hash": "0x1234567890123456789012345678901234567890123456789012345678901234" }, + options=None, ) self.assertIsNotNone(transaction) self.assertEqual(transaction.chain_id, ChainId.POLYGON_AMOY) @@ -196,7 +199,7 @@ def test_get_transaction(self): def test_get_transaction_empty_data(self): with patch( - "human_protocol_sdk.transaction.transaction_utils.get_data_from_subgraph" + "human_protocol_sdk.transaction.transaction_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"transaction": None}} @@ -209,6 +212,7 @@ def test_get_transaction_empty_data(self): NETWORKS[ChainId.POLYGON_AMOY], query=ANY, params={"hash": "transaction_hash"}, + options=None, ) self.assertIsNone(transaction) diff --git a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/worker/test_worker_utils.py b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/worker/test_worker_utils.py index 4427af4998..ea44241c19 100644 --- a/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/worker/test_worker_utils.py +++ b/packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/worker/test_worker_utils.py @@ -10,7 +10,7 @@ class TestWorkerUtils(unittest.TestCase): def test_get_workers(self): with patch( - "human_protocol_sdk.worker.worker_utils.get_data_from_subgraph" + "human_protocol_sdk.worker.worker_utils.custom_gql_fetch" ) as mock_function: mock_worker_1 = { "id": "worker1", @@ -47,6 +47,7 @@ def test_get_workers(self): "orderBy": "totalHMTAmountReceived", "orderDirection": "asc", }, + options=None, ) self.assertEqual(len(workers), 2) self.assertEqual(workers[0].id, "worker1") @@ -54,7 +55,7 @@ def test_get_workers(self): def test_get_workers_empty_response(self): with patch( - "human_protocol_sdk.worker.worker_utils.get_data_from_subgraph" + "human_protocol_sdk.worker.worker_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"workers": []}} @@ -75,6 +76,7 @@ def test_get_workers_empty_response(self): "orderBy": "payoutCount", "orderDirection": "desc", }, + options=None, ) self.assertEqual(len(workers), 0) @@ -86,7 +88,7 @@ def test_get_workers_invalid_network(self): def test_get_worker(self): with patch( - "human_protocol_sdk.worker.worker_utils.get_data_from_subgraph" + "human_protocol_sdk.worker.worker_utils.custom_gql_fetch" ) as mock_function: mock_worker = { "id": "worker1", @@ -106,6 +108,7 @@ def test_get_worker(self): NETWORKS[ChainId.POLYGON_AMOY], query=get_worker_query(), params={"address": "0x1234567890123456789012345678901234567890"}, + options=None, ) self.assertIsNotNone(worker) self.assertEqual(worker.id, "worker1") @@ -115,7 +118,7 @@ def test_get_worker(self): def test_get_worker_empty_data(self): with patch( - "human_protocol_sdk.worker.worker_utils.get_data_from_subgraph" + "human_protocol_sdk.worker.worker_utils.custom_gql_fetch" ) as mock_function: mock_function.return_value = {"data": {"worker": None}} @@ -127,6 +130,7 @@ def test_get_worker_empty_data(self): NETWORKS[ChainId.POLYGON_AMOY], query=get_worker_query(), params={"address": "0x1234567890123456789012345678901234567890"}, + options=None, ) self.assertIsNone(worker) diff --git a/packages/sdk/typescript/human-protocol-sdk/package.json b/packages/sdk/typescript/human-protocol-sdk/package.json index 5075a928e0..516b8dbc1e 100644 --- a/packages/sdk/typescript/human-protocol-sdk/package.json +++ b/packages/sdk/typescript/human-protocol-sdk/package.json @@ -1,7 +1,7 @@ { "name": "@human-protocol/sdk", "description": "Human Protocol SDK", - "version": "5.0.0", + "version": "5.1.0", "files": [ "src", "dist" @@ -51,6 +51,7 @@ "vitest": "^3.0.9" }, "devDependencies": { + "@types/validator": "^13.15.4", "eslint": "^8.55.0", "prettier": "^3.4.2", "ts-node": "^10.9.2", diff --git a/packages/sdk/typescript/human-protocol-sdk/src/base.ts b/packages/sdk/typescript/human-protocol-sdk/src/base.ts index 12bd18e3c2..a0f3083da7 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/base.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/base.ts @@ -1,7 +1,5 @@ -import { ContractRunner, Overrides } from 'ethers'; +import { ContractRunner } from 'ethers'; import { NetworkData } from './types'; -import { ChainId } from './enums'; -import { DEFAULT_AURORA_GAS_PRICE } from './constants'; /** * ## Introduction @@ -23,24 +21,4 @@ export abstract class BaseEthersClient { this.networkData = networkData; this.runner = runner; } - - /** - * 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. - */ - protected applyTxDefaults(txOptions: Overrides = {}): Overrides { - if (this.networkData.chainId === ChainId.AURORA_TESTNET) { - return { - ...txOptions, - gasPrice: DEFAULT_AURORA_GAS_PRICE, - maxFeePerGas: undefined, - maxPriorityFeePerGas: undefined, - } as Overrides; - } - return txOptions; - } } diff --git a/packages/sdk/typescript/human-protocol-sdk/src/constants.ts b/packages/sdk/typescript/human-protocol-sdk/src/constants.ts index c13247053a..edbd5d21f8 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/constants.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/constants.ts @@ -1,4 +1,3 @@ -import { ethers } from 'ethers'; import { ChainId } from './enums'; import { NetworkData } from './types'; @@ -12,8 +11,6 @@ export const DEFAULT_PORT = 9000; export const DEFAULT_USE_SSL = false; -export const DEFAULT_AURORA_GAS_PRICE = ethers.parseUnits('0.07', 'gwei'); - export enum HttpStatus { OK = 200, CREATED = 201, @@ -120,21 +117,6 @@ export const NETWORKS: { oldSubgraphUrl: '', oldFactoryAddress: '', }, - [ChainId.AURORA_TESTNET]: { - chainId: ChainId.AURORA_TESTNET, - title: 'Aurora Testnet', - scanUrl: 'https://explorer.testnet.aurora.dev/', - factoryAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940', - hmtAddress: '0x792abbcC99c01dbDec49c9fa9A828a186Da45C33', - stakingAddress: '0x7457d26a3C70Bd71F7557C773b303c1dB82BBB68', - kvstoreAddress: '0xD6D347ba6987519B4e42EcED43dF98eFf5465a23', - subgraphUrl: - 'https://api.studio.thegraph.com/query/74256/amoy/version/latest', - subgraphUrlApiKey: - 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmVHYvjbsgAroR9EMgqqGTQ7aKPRFMVekY6evU6mFPUU7J', - oldSubgraphUrl: '', - oldFactoryAddress: '', - }, [ChainId.LOCALHOST]: { chainId: ChainId.LOCALHOST, title: 'Localhost', diff --git a/packages/sdk/typescript/human-protocol-sdk/src/enums.ts b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts index b45bec2725..951fa0d524 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/enums.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts @@ -6,7 +6,6 @@ export enum ChainId { BSC_TESTNET = 97, POLYGON = 137, POLYGON_AMOY = 80002, - AURORA_TESTNET = 1313161555, LOCALHOST = 1338, } diff --git a/packages/sdk/typescript/human-protocol-sdk/src/error.ts b/packages/sdk/typescript/human-protocol-sdk/src/error.ts index a4c4d9fae7..40af09be57 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/error.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/error.ts @@ -306,6 +306,13 @@ export const ErrorBulkPayOutVersion = new Error( 'Invalid bulkPayOut parameters for the contract version of the specified escrow address' ); +/** + * @constant {Error} - Retry configuration is missing required parameters. + */ +export const ErrorRetryParametersMissing = new Error( + 'Retry configuration must include both maxRetries and baseDelay' +); + /** * @constant {Warning} - Possible version mismatch. */ diff --git a/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts b/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts index cf1f946b96..f22af6f593 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts @@ -10,7 +10,6 @@ import { HMToken__factory, } from '@human-protocol/core/typechain-types'; import { ContractRunner, EventLog, Overrides, Signer, ethers } from 'ethers'; -import gqlFetch from 'graphql-request'; import { BaseEthersClient } from './base'; import { ESCROW_BULK_PAYOUT_MAX_ITEMS, NETWORKS } from './constants'; import { requiresSigner } from './decorators'; @@ -62,13 +61,16 @@ import { IStatusEventFilter, IStatusEvent, ICancellationRefund, + ICancellationRefundFilter, IPayout, IEscrowWithdraw, + SubgraphOptions, } from './interfaces'; import { EscrowStatus, NetworkData, TransactionLikeWithNonce } from './types'; import { getSubgraphUrl, getUnixTimestamp, + customGqlFetch, isValidJson, isValidUrl, throwError, @@ -244,7 +246,7 @@ export class EscrowClient extends BaseEthersClient { await this.escrowFactoryContract.createEscrow( tokenAddress, jobRequesterId, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); @@ -405,7 +407,7 @@ export class EscrowClient extends BaseEthersClient { exchangeOracleFee, manifest, manifestHash, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); @@ -503,7 +505,7 @@ export class EscrowClient extends BaseEthersClient { exchangeOracleFee, manifest, manifestHash, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); @@ -567,11 +569,7 @@ export class EscrowClient extends BaseEthersClient { this.runner ); await ( - await tokenContract.transfer( - escrowAddress, - amount, - this.applyTxDefaults(txOptions) - ) + await tokenContract.transfer(escrowAddress, amount, txOptions) ).wait(); return; @@ -692,7 +690,7 @@ export class EscrowClient extends BaseEthersClient { url, hash, fundsToReserve, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); } else { @@ -700,7 +698,7 @@ export class EscrowClient extends BaseEthersClient { await escrowContract['storeResults(string,string)']( url, hash, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); } @@ -756,9 +754,7 @@ export class EscrowClient extends BaseEthersClient { try { const escrowContract = this.getEscrowContract(escrowAddress); - await ( - await escrowContract.complete(this.applyTxDefaults(txOptions)) - ).wait(); + await (await escrowContract.complete(txOptions)).wait(); return; } catch (e) { return throwError(e); @@ -898,7 +894,7 @@ export class EscrowClient extends BaseEthersClient { finalResultsHash, id, forceComplete, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); } else { @@ -912,7 +908,7 @@ export class EscrowClient extends BaseEthersClient { finalResultsHash, id, forceComplete, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); } @@ -966,9 +962,7 @@ export class EscrowClient extends BaseEthersClient { try { const escrowContract = this.getEscrowContract(escrowAddress); - await ( - await escrowContract.cancel(this.applyTxDefaults(txOptions)) - ).wait(); + await (await escrowContract.cancel(txOptions)).wait(); } catch (e) { return throwError(e); } @@ -1014,11 +1008,7 @@ export class EscrowClient extends BaseEthersClient { try { const escrowContract = this.getEscrowContract(escrowAddress); - await ( - await escrowContract.requestCancellation( - this.applyTxDefaults(txOptions) - ) - ).wait(); + await (await escrowContract.requestCancellation(txOptions)).wait(); } catch (e) { return throwError(e); } @@ -1076,10 +1066,7 @@ export class EscrowClient extends BaseEthersClient { const escrowContract = this.getEscrowContract(escrowAddress); const transactionReceipt = await ( - await escrowContract.withdraw( - tokenAddress, - this.applyTxDefaults(txOptions) - ) + await escrowContract.withdraw(tokenAddress, txOptions) ).wait(); let amountTransferred: bigint | undefined = undefined; @@ -1169,7 +1156,6 @@ export class EscrowClient extends BaseEthersClient { forceComplete = false, txOptions: Overrides = {} ): Promise { - txOptions = this.applyTxDefaults(txOptions); await this.ensureCorrectBulkPayoutInput( escrowAddress, recipients, @@ -1940,6 +1926,7 @@ export class EscrowUtils { * * * @param {IEscrowsFilter} filter Filter parameters. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {IEscrow[]} List of escrows that match the filter. * * **Code example** @@ -1956,7 +1943,10 @@ export class EscrowUtils { * const escrows = await EscrowUtils.getEscrows(filters); * ``` */ - public static async getEscrows(filter: IEscrowsFilter): Promise { + public static async getEscrows( + filter: IEscrowsFilter, + options?: SubgraphOptions + ): Promise { if (filter.launcher && !ethers.isAddress(filter.launcher)) { throw ErrorInvalidAddress; } @@ -1989,7 +1979,7 @@ export class EscrowUtils { statuses = Array.isArray(filter.status) ? filter.status : [filter.status]; statuses = statuses.map((status) => EscrowStatus[status]); } - const { escrows } = await gqlFetch<{ escrows: EscrowData[] }>( + const { escrows } = await customGqlFetch<{ escrows: EscrowData[] }>( getSubgraphUrl(networkData), GET_ESCROWS_QUERY(filter), { @@ -2004,7 +1994,8 @@ export class EscrowUtils { orderDirection: orderDirection, first: first, skip: skip, - } + }, + options ); return (escrows || []).map((e) => mapEscrow(e, networkData.chainId)); } @@ -2062,6 +2053,7 @@ export class EscrowUtils { * * @param {ChainId} chainId Network in which the escrow has been deployed * @param {string} escrowAddress Address of the escrow + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} - Escrow data or null if not found. * * **Code example** @@ -2074,7 +2066,8 @@ export class EscrowUtils { */ public static async getEscrow( chainId: ChainId, - escrowAddress: string + escrowAddress: string, + options?: SubgraphOptions ): Promise { const networkData = NETWORKS[chainId]; @@ -2086,10 +2079,11 @@ export class EscrowUtils { throw ErrorInvalidAddress; } - const { escrow } = await gqlFetch<{ escrow: EscrowData | null }>( + const { escrow } = await customGqlFetch<{ escrow: EscrowData | null }>( getSubgraphUrl(networkData), GET_ESCROW_BY_ADDRESS_QUERY(), - { escrowAddress: escrowAddress.toLowerCase() } + { escrowAddress: escrowAddress.toLowerCase() }, + options ); if (!escrow) return null; @@ -2132,6 +2126,7 @@ export class EscrowUtils { * ``` * * @param {IStatusEventFilter} filter Filter parameters. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} - Array of status events with their corresponding statuses. * * **Code example** @@ -2153,7 +2148,8 @@ export class EscrowUtils { * ``` */ public static async getStatusEvents( - filter: IStatusEventFilter + filter: IStatusEventFilter, + options?: SubgraphOptions ): Promise { const { chainId, @@ -2187,7 +2183,7 @@ export class EscrowUtils { const statusNames = effectiveStatuses.map((status) => EscrowStatus[status]); - const data = await gqlFetch<{ + const data = await customGqlFetch<{ escrowStatusEvents: StatusEvent[]; }>( getSubgraphUrl(networkData), @@ -2200,7 +2196,8 @@ export class EscrowUtils { orderDirection, first: Math.min(first, 1000), skip, - } + }, + options ); if (!data || !data['escrowStatusEvents']) { @@ -2224,6 +2221,7 @@ export class EscrowUtils { * Fetch payouts from the subgraph. * * @param {IPayoutFilter} filter Filter parameters. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} List of payouts matching the filters. * * **Code example** @@ -2241,7 +2239,10 @@ export class EscrowUtils { * console.log(payouts); * ``` */ - public static async getPayouts(filter: IPayoutFilter): Promise { + public static async getPayouts( + filter: IPayoutFilter, + options?: SubgraphOptions + ): Promise { const networkData = NETWORKS[filter.chainId]; if (!networkData) { throw ErrorUnsupportedChainID; @@ -2258,7 +2259,7 @@ export class EscrowUtils { const skip = filter.skip || 0; const orderDirection = filter.orderDirection || OrderDirection.DESC; - const { payouts } = await gqlFetch<{ payouts: PayoutData[] }>( + const { payouts } = await customGqlFetch<{ payouts: PayoutData[] }>( getSubgraphUrl(networkData), GET_PAYOUTS_QUERY(filter), { @@ -2269,7 +2270,8 @@ export class EscrowUtils { first: Math.min(first, 1000), skip, orderDirection, - } + }, + options ); if (!payouts) { return []; @@ -2318,6 +2320,7 @@ export class EscrowUtils { * * * @param {Object} filter Filter parameters. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} List of cancellation refunds matching the filters. * * **Code example** @@ -2332,16 +2335,10 @@ export class EscrowUtils { * console.log(cancellationRefunds); * ``` */ - public static async getCancellationRefunds(filter: { - chainId: ChainId; - escrowAddress?: string; - receiver?: string; - from?: Date; - to?: Date; - first?: number; - skip?: number; - orderDirection?: OrderDirection; - }): Promise { + public static async getCancellationRefunds( + filter: ICancellationRefundFilter, + options?: SubgraphOptions + ): Promise { const networkData = NETWORKS[filter.chainId]; if (!networkData) throw ErrorUnsupportedChainID; if (filter.escrowAddress && !ethers.isAddress(filter.escrowAddress)) { @@ -2356,17 +2353,22 @@ export class EscrowUtils { const skip = filter.skip || 0; const orderDirection = filter.orderDirection || OrderDirection.DESC; - const { cancellationRefundEvents } = await gqlFetch<{ + const { cancellationRefundEvents } = await customGqlFetch<{ cancellationRefundEvents: CancellationRefundData[]; - }>(getSubgraphUrl(networkData), GET_CANCELLATION_REFUNDS_QUERY(filter), { - escrowAddress: filter.escrowAddress?.toLowerCase(), - receiver: filter.receiver?.toLowerCase(), - from: filter.from ? getUnixTimestamp(filter.from) : undefined, - to: filter.to ? getUnixTimestamp(filter.to) : undefined, - first, - skip, - orderDirection, - }); + }>( + getSubgraphUrl(networkData), + GET_CANCELLATION_REFUNDS_QUERY(filter), + { + escrowAddress: filter.escrowAddress?.toLowerCase(), + receiver: filter.receiver?.toLowerCase(), + from: filter.from ? getUnixTimestamp(filter.from) : undefined, + to: filter.to ? getUnixTimestamp(filter.to) : undefined, + first, + skip, + orderDirection, + }, + options + ); if (!cancellationRefundEvents || cancellationRefundEvents.length === 0) { return []; @@ -2418,6 +2420,7 @@ export class EscrowUtils { * * @param {ChainId} chainId Network in which the escrow has been deployed * @param {string} escrowAddress Address of the escrow + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Cancellation refund data * * **Code example** @@ -2430,7 +2433,8 @@ export class EscrowUtils { */ public static async getCancellationRefund( chainId: ChainId, - escrowAddress: string + escrowAddress: string, + options?: SubgraphOptions ): Promise { const networkData = NETWORKS[chainId]; if (!networkData) throw ErrorUnsupportedChainID; @@ -2439,12 +2443,13 @@ export class EscrowUtils { throw ErrorInvalidEscrowAddressProvided; } - const { cancellationRefundEvents } = await gqlFetch<{ + const { cancellationRefundEvents } = await customGqlFetch<{ cancellationRefundEvents: CancellationRefundData[]; }>( getSubgraphUrl(networkData), GET_CANCELLATION_REFUND_BY_ADDRESS_QUERY(), - { escrowAddress: escrowAddress.toLowerCase() } + { escrowAddress: escrowAddress.toLowerCase() }, + options ); if (!cancellationRefundEvents || cancellationRefundEvents.length === 0) { diff --git a/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts b/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts index c47656c690..9a204751ce 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts @@ -312,3 +312,13 @@ export interface IEscrowWithdraw { tokenAddress: string; withdrawnAmount: bigint; } + +/** + * Configuration options for subgraph requests with retry logic. + */ +export interface SubgraphOptions { + /** Maximum number of retry attempts */ + maxRetries?: number; + /** Base delay between retries in milliseconds */ + baseDelay?: number; +} diff --git a/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts b/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts index e2378ba70e..518217ee01 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts @@ -17,15 +17,14 @@ import { ErrorUnsupportedChainID, InvalidKeyError, } from './error'; -import gqlFetch from 'graphql-request'; import { NetworkData } from './types'; -import { getSubgraphUrl, isValidUrl } from './utils'; +import { getSubgraphUrl, customGqlFetch, isValidUrl } from './utils'; import { GET_KVSTORE_BY_ADDRESS_AND_KEY_QUERY, GET_KVSTORE_BY_ADDRESS_QUERY, } from './graphql/queries/kvstore'; import { KVStoreData } from './graphql'; -import { IKVStore } from './interfaces'; +import { IKVStore, SubgraphOptions } from './interfaces'; /** * ## Introduction * @@ -175,9 +174,7 @@ export class KVStoreClient extends BaseEthersClient { ): Promise { if (key === '') throw ErrorKVStoreEmptyKey; try { - await ( - await this.contract.set(key, value, this.applyTxDefaults(txOptions)) - ).wait(); + await (await this.contract.set(key, value, txOptions)).wait(); } catch (e) { if (e instanceof Error) throw Error(`Failed to set value: ${e.message}`); } @@ -222,13 +219,7 @@ export class KVStoreClient extends BaseEthersClient { if (keys.includes('')) throw ErrorKVStoreEmptyKey; try { - await ( - await this.contract.setBulk( - keys, - values, - this.applyTxDefaults(txOptions) - ) - ).wait(); + await (await this.contract.setBulk(keys, values, txOptions)).wait(); } catch (e) { if (e instanceof Error) throw Error(`Failed to set bulk values: ${e.message}`); @@ -281,7 +272,7 @@ export class KVStoreClient extends BaseEthersClient { await this.contract.setBulk( [urlKey, hashKey], [url, contentHash], - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); } catch (e) { @@ -294,6 +285,7 @@ export class KVStoreClient extends BaseEthersClient { * * @param {string} address Address from which to get the key value. * @param {string} key Key to obtain the value. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {string} Value of the key. * * @@ -365,6 +357,7 @@ export class KVStoreUtils { * * @param {ChainId} chainId Network in which the KVStore is deployed * @param {string} address Address of the KVStore + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} KVStore data * @throws {ErrorUnsupportedChainID} - Thrown if the network's chainId is not supported * @throws {ErrorInvalidAddress} - Thrown if the Address sent is invalid @@ -380,7 +373,8 @@ export class KVStoreUtils { */ public static async getKVStoreData( chainId: ChainId, - address: string + address: string, + options?: SubgraphOptions ): Promise { const networkData = NETWORKS[chainId]; @@ -392,10 +386,11 @@ export class KVStoreUtils { throw ErrorInvalidAddress; } - const { kvstores } = await gqlFetch<{ kvstores: KVStoreData[] }>( + const { kvstores } = await customGqlFetch<{ kvstores: KVStoreData[] }>( getSubgraphUrl(networkData), GET_KVSTORE_BY_ADDRESS_QUERY(), - { address: address.toLowerCase() } + { address: address.toLowerCase() }, + options ); const kvStoreData = kvstores.map((item) => ({ @@ -412,6 +407,7 @@ export class KVStoreUtils { * @param {ChainId} chainId Network in which the KVStore is deployed * @param {string} address Address from which to get the key value. * @param {string} key Key to obtain the value. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Value of the key. * @throws {ErrorUnsupportedChainID} - Thrown if the network's chainId is not supported * @throws {ErrorInvalidAddress} - Thrown if the Address sent is invalid @@ -433,7 +429,8 @@ export class KVStoreUtils { public static async get( chainId: ChainId, address: string, - key: string + key: string, + options?: SubgraphOptions ): Promise { if (key === '') throw ErrorKVStoreEmptyKey; if (!ethers.isAddress(address)) throw ErrorInvalidAddress; @@ -444,10 +441,11 @@ export class KVStoreUtils { throw ErrorUnsupportedChainID; } - const { kvstores } = await gqlFetch<{ kvstores: KVStoreData[] }>( + const { kvstores } = await customGqlFetch<{ kvstores: KVStoreData[] }>( getSubgraphUrl(networkData), GET_KVSTORE_BY_ADDRESS_AND_KEY_QUERY(), - { address: address.toLowerCase(), key } + { address: address.toLowerCase(), key }, + options ); if (!kvstores || kvstores.length === 0) { @@ -463,6 +461,7 @@ export class KVStoreUtils { * @param {ChainId} chainId Network in which the KVStore is deployed * @param {string} address Address from which to get the URL value. * @param {string} urlKey Configurable URL key. `url` by default. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} URL value for the given address if it exists, and the content is valid * * **Code example** @@ -480,7 +479,8 @@ export class KVStoreUtils { public static async getFileUrlAndVerifyHash( chainId: ChainId, address: string, - urlKey = 'url' + urlKey = 'url', + options?: SubgraphOptions ): Promise { if (!ethers.isAddress(address)) throw ErrorInvalidAddress; const hashKey = urlKey + '_hash'; @@ -489,7 +489,7 @@ export class KVStoreUtils { hash = ''; try { - url = await this.get(chainId, address, urlKey); + url = await this.get(chainId, address, urlKey, options); } catch (e) { if (e instanceof Error) throw Error(`Failed to get URL: ${e.message}`); } @@ -539,12 +539,14 @@ export class KVStoreUtils { */ public static async getPublicKey( chainId: ChainId, - address: string + address: string, + options?: SubgraphOptions ): Promise { const publicKeyUrl = await this.getFileUrlAndVerifyHash( chainId, address, - KVStoreKeys.publicKey + KVStoreKeys.publicKey, + options ); if (publicKeyUrl === '') { diff --git a/packages/sdk/typescript/human-protocol-sdk/src/operator.ts b/packages/sdk/typescript/human-protocol-sdk/src/operator.ts index cbca6e866a..2428c9d24e 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/operator.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/operator.ts @@ -1,6 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import gqlFetch from 'graphql-request'; -import { IOperator, IOperatorsFilter, IReward } from './interfaces'; +import { + IOperator, + IOperatorsFilter, + IReward, + SubgraphOptions, +} from './interfaces'; import { GET_REWARD_ADDED_EVENTS_QUERY } from './graphql/queries/reward'; import { IOperatorSubgraph, @@ -18,7 +22,7 @@ import { ErrorInvalidStakerAddressProvided, ErrorUnsupportedChainID, } from './error'; -import { getSubgraphUrl } from './utils'; +import { getSubgraphUrl, customGqlFetch } from './utils'; import { ChainId, OrderDirection } from './enums'; import { NETWORKS } from './constants'; @@ -28,6 +32,7 @@ export class OperatorUtils { * * @param {ChainId} chainId Network in which the operator is deployed * @param {string} address Operator address. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} - Returns the operator details or null if not found. * * **Code example** @@ -40,7 +45,8 @@ export class OperatorUtils { */ public static async getOperator( chainId: ChainId, - address: string + address: string, + options?: SubgraphOptions ): Promise { if (!ethers.isAddress(address)) { throw ErrorInvalidStakerAddressProvided; @@ -51,10 +57,11 @@ export class OperatorUtils { throw ErrorUnsupportedChainID; } - const { operator } = await gqlFetch<{ + const { operator } = await customGqlFetch<{ operator: IOperatorSubgraph; }>(getSubgraphUrl(networkData), GET_LEADER_QUERY, { address: address.toLowerCase(), + options, }); if (!operator) { @@ -68,6 +75,7 @@ export class OperatorUtils { * This function returns all the operator details of the protocol. * * @param {IOperatorsFilter} filter Filter for the operators. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Returns an array with all the operator details. * * **Code example** @@ -82,7 +90,8 @@ export class OperatorUtils { * ``` */ public static async getOperators( - filter: IOperatorsFilter + filter: IOperatorsFilter, + options?: SubgraphOptions ): Promise { const first = filter.first !== undefined && filter.first > 0 @@ -107,16 +116,21 @@ export class OperatorUtils { throw ErrorUnsupportedChainID; } - const { operators } = await gqlFetch<{ + const { operators } = await customGqlFetch<{ operators: IOperatorSubgraph[]; - }>(getSubgraphUrl(networkData), GET_LEADERS_QUERY(filter), { - minStakedAmount: filter?.minStakedAmount, - roles: filter?.roles, - orderBy: orderBy, - orderDirection: orderDirection, - first: first, - skip: skip, - }); + }>( + getSubgraphUrl(networkData), + GET_LEADERS_QUERY(filter), + { + minStakedAmount: filter?.minStakedAmount, + roles: filter?.roles, + orderBy: orderBy, + orderDirection: orderDirection, + first: first, + skip: skip, + }, + options + ); if (!operators) { return []; @@ -131,6 +145,7 @@ export class OperatorUtils { * @param {ChainId} chainId Network in which the reputation network is deployed * @param {string} address Address of the reputation oracle. * @param {string} [role] - (Optional) Role of the operator. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} - Returns an array of operator details. * * **Code example** @@ -144,19 +159,25 @@ export class OperatorUtils { public static async getReputationNetworkOperators( chainId: ChainId, address: string, - role?: string + role?: string, + options?: SubgraphOptions ): Promise { const networkData = NETWORKS[chainId]; if (!networkData) { throw ErrorUnsupportedChainID; } - const { reputationNetwork } = await gqlFetch<{ + const { reputationNetwork } = await customGqlFetch<{ reputationNetwork: IReputationNetworkSubgraph; - }>(getSubgraphUrl(networkData), GET_REPUTATION_NETWORK_QUERY(role), { - address: address.toLowerCase(), - role: role, - }); + }>( + getSubgraphUrl(networkData), + GET_REPUTATION_NETWORK_QUERY(role), + { + address: address.toLowerCase(), + role: role, + }, + options + ); if (!reputationNetwork) return []; @@ -170,6 +191,7 @@ export class OperatorUtils { * * @param {ChainId} chainId Network in which the rewards are deployed * @param {string} slasherAddress Slasher address. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Returns an array of Reward objects that contain the rewards earned by the user through slashing other users. * * **Code example** @@ -182,7 +204,8 @@ export class OperatorUtils { */ public static async getRewards( chainId: ChainId, - slasherAddress: string + slasherAddress: string, + options?: SubgraphOptions ): Promise { if (!ethers.isAddress(slasherAddress)) { throw ErrorInvalidSlasherAddressProvided; @@ -193,11 +216,16 @@ export class OperatorUtils { throw ErrorUnsupportedChainID; } - const { rewardAddedEvents } = await gqlFetch<{ + const { rewardAddedEvents } = await customGqlFetch<{ rewardAddedEvents: RewardAddedEventData[]; - }>(getSubgraphUrl(networkData), GET_REWARD_ADDED_EVENTS_QUERY, { - slasherAddress: slasherAddress.toLowerCase(), - }); + }>( + getSubgraphUrl(networkData), + GET_REWARD_ADDED_EVENTS_QUERY, + { + slasherAddress: slasherAddress.toLowerCase(), + }, + options + ); if (!rewardAddedEvents) return []; diff --git a/packages/sdk/typescript/human-protocol-sdk/src/staking.ts b/packages/sdk/typescript/human-protocol-sdk/src/staking.ts index 1fab0ed1fd..5d32d702eb 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/staking.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/staking.ts @@ -7,7 +7,6 @@ import { Staking__factory, } from '@human-protocol/core/typechain-types'; import { ContractRunner, Overrides, ethers } from 'ethers'; -import gqlFetch from 'graphql-request'; import { BaseEthersClient } from './base'; import { NETWORKS } from './constants'; import { requiresSigner } from './decorators'; @@ -23,10 +22,15 @@ import { ErrorStakerNotFound, ErrorUnsupportedChainID, } from './error'; -import { IStaker, IStakersFilter, StakerInfo } from './interfaces'; +import { + IStaker, + IStakersFilter, + StakerInfo, + SubgraphOptions, +} from './interfaces'; import { StakerData } from './graphql'; import { NetworkData } from './types'; -import { getSubgraphUrl, throwError } from './utils'; +import { getSubgraphUrl, customGqlFetch, throwError } from './utils'; import { GET_STAKER_BY_ADDRESS_QUERY, GET_STAKERS_QUERY, @@ -214,7 +218,7 @@ export class StakingClient extends BaseEthersClient { await this.tokenContract.approve( await this.stakingContract.getAddress(), amount, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); return; @@ -261,12 +265,7 @@ export class StakingClient extends BaseEthersClient { } try { - await ( - await this.stakingContract.stake( - amount, - this.applyTxDefaults(txOptions) - ) - ).wait(); + await (await this.stakingContract.stake(amount, txOptions)).wait(); return; } catch (e) { return throwError(e); @@ -313,12 +312,7 @@ export class StakingClient extends BaseEthersClient { } try { - await ( - await this.stakingContract.unstake( - amount, - this.applyTxDefaults(txOptions) - ) - ).wait(); + await (await this.stakingContract.unstake(amount, txOptions)).wait(); return; } catch (e) { return throwError(e); @@ -352,9 +346,7 @@ export class StakingClient extends BaseEthersClient { @requiresSigner public async withdraw(txOptions: Overrides = {}): Promise { try { - await ( - await this.stakingContract.withdraw(this.applyTxDefaults(txOptions)) - ).wait(); + await (await this.stakingContract.withdraw(txOptions)).wait(); return; } catch (e) { return throwError(e); @@ -421,7 +413,7 @@ export class StakingClient extends BaseEthersClient { staker, escrowAddress, amount, - this.applyTxDefaults(txOptions) + txOptions ) ).wait(); @@ -495,11 +487,13 @@ export class StakingUtils { * * @param {ChainId} chainId Network in which the staking contract is deployed * @param {string} stakerAddress Address of the staker + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Staker info from subgraph */ public static async getStaker( chainId: ChainId, - stakerAddress: string + stakerAddress: string, + options?: SubgraphOptions ): Promise { if (!ethers.isAddress(stakerAddress)) { throw ErrorInvalidStakerAddressProvided; @@ -510,10 +504,11 @@ export class StakingUtils { throw ErrorUnsupportedChainID; } - const { staker } = await gqlFetch<{ staker: StakerData }>( + const { staker } = await customGqlFetch<{ staker: StakerData }>( getSubgraphUrl(networkData), GET_STAKER_BY_ADDRESS_QUERY, - { id: stakerAddress.toLowerCase() } + { id: stakerAddress.toLowerCase() }, + options ); if (!staker) { @@ -526,9 +521,14 @@ export class StakingUtils { /** * Gets all stakers from the subgraph with filters, pagination and ordering. * + * @param {IStakersFilter} filter Stakers filter with pagination and ordering + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Array of stakers */ - public static async getStakers(filter: IStakersFilter): Promise { + public static async getStakers( + filter: IStakersFilter, + options?: SubgraphOptions + ): Promise { const first = filter.first !== undefined ? Math.min(filter.first, 1000) : 10; const skip = filter.skip || 0; @@ -540,7 +540,7 @@ export class StakingUtils { throw ErrorUnsupportedChainID; } - const { stakers } = await gqlFetch<{ stakers: StakerData[] }>( + const { stakers } = await customGqlFetch<{ stakers: StakerData[] }>( getSubgraphUrl(networkData), GET_STAKERS_QUERY(filter), { @@ -572,7 +572,8 @@ export class StakingUtils { orderDirection: orderDirection, first: first, skip: skip, - } + }, + options ); if (!stakers) { return []; diff --git a/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts b/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts index 715c094621..36095e7258 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts @@ -1,6 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import gqlFetch from 'graphql-request'; - import { OrderDirection } from './enums'; import { EscrowStatisticsData, @@ -21,9 +19,15 @@ import { IPaymentStatistics, IStatisticsFilter, IWorkerStatistics, + SubgraphOptions, } from './interfaces'; import { NetworkData } from './types'; -import { getSubgraphUrl, getUnixTimestamp, throwError } from './utils'; +import { + getSubgraphUrl, + getUnixTimestamp, + customGqlFetch, + throwError, +} from './utils'; /** * ## Introduction @@ -103,6 +107,7 @@ export class StatisticsClient { * ``` * * @param {IStatisticsFilter} filter Statistics params with duration data + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Escrow statistics data. * * **Code example** @@ -120,7 +125,8 @@ export class StatisticsClient { * ``` */ async getEscrowStatistics( - filter: IStatisticsFilter = {} + filter: IStatisticsFilter = {}, + options?: SubgraphOptions ): Promise { try { const first = @@ -128,19 +134,24 @@ export class StatisticsClient { const skip = filter.skip || 0; const orderDirection = filter.orderDirection || OrderDirection.ASC; - const { escrowStatistics } = await gqlFetch<{ + const { escrowStatistics } = await customGqlFetch<{ escrowStatistics: EscrowStatisticsData; - }>(this.subgraphUrl, GET_ESCROW_STATISTICS_QUERY); + }>(this.subgraphUrl, GET_ESCROW_STATISTICS_QUERY, options); - const { eventDayDatas } = await gqlFetch<{ + const { eventDayDatas } = await customGqlFetch<{ eventDayDatas: EventDayData[]; - }>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), { - from: filter.from ? getUnixTimestamp(filter.from) : undefined, - to: filter.to ? getUnixTimestamp(filter.to) : undefined, - orderDirection: orderDirection, - first: first, - skip: skip, - }); + }>( + this.subgraphUrl, + GET_EVENT_DAY_DATA_QUERY(filter), + { + from: filter.from ? getUnixTimestamp(filter.from) : undefined, + to: filter.to ? getUnixTimestamp(filter.to) : undefined, + orderDirection: orderDirection, + first: first, + skip: skip, + }, + options + ); return { totalEscrows: escrowStatistics?.totalEscrowCount @@ -187,6 +198,7 @@ export class StatisticsClient { * ``` * * @param {IStatisticsFilter} filter Statistics params with duration data + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Worker statistics data. * * **Code example** @@ -204,7 +216,8 @@ export class StatisticsClient { * ``` */ async getWorkerStatistics( - filter: IStatisticsFilter = {} + filter: IStatisticsFilter = {}, + options?: SubgraphOptions ): Promise { try { const first = @@ -212,15 +225,20 @@ export class StatisticsClient { const skip = filter.skip || 0; const orderDirection = filter.orderDirection || OrderDirection.ASC; - const { eventDayDatas } = await gqlFetch<{ + const { eventDayDatas } = await customGqlFetch<{ eventDayDatas: EventDayData[]; - }>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), { - from: filter.from ? getUnixTimestamp(filter.from) : undefined, - to: filter.to ? getUnixTimestamp(filter.to) : undefined, - orderDirection: orderDirection, - first: first, - skip: skip, - }); + }>( + this.subgraphUrl, + GET_EVENT_DAY_DATA_QUERY(filter), + { + from: filter.from ? getUnixTimestamp(filter.from) : undefined, + to: filter.to ? getUnixTimestamp(filter.to) : undefined, + orderDirection: orderDirection, + first: first, + skip: skip, + }, + options + ); return { dailyWorkersData: eventDayDatas.map((eventDayData) => ({ @@ -262,6 +280,7 @@ export class StatisticsClient { * ``` * * @param {IStatisticsFilter} filter Statistics params with duration data + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Payment statistics data. * * **Code example** @@ -300,7 +319,8 @@ export class StatisticsClient { * ``` */ async getPaymentStatistics( - filter: IStatisticsFilter = {} + filter: IStatisticsFilter = {}, + options?: SubgraphOptions ): Promise { try { const first = @@ -308,15 +328,20 @@ export class StatisticsClient { const skip = filter.skip || 0; const orderDirection = filter.orderDirection || OrderDirection.ASC; - const { eventDayDatas } = await gqlFetch<{ + const { eventDayDatas } = await customGqlFetch<{ eventDayDatas: EventDayData[]; - }>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), { - from: filter.from ? getUnixTimestamp(filter.from) : undefined, - to: filter.to ? getUnixTimestamp(filter.to) : undefined, - orderDirection: orderDirection, - first: first, - skip: skip, - }); + }>( + this.subgraphUrl, + GET_EVENT_DAY_DATA_QUERY(filter), + { + from: filter.from ? getUnixTimestamp(filter.from) : undefined, + to: filter.to ? getUnixTimestamp(filter.to) : undefined, + orderDirection: orderDirection, + first: first, + skip: skip, + }, + options + ); return { dailyPaymentsData: eventDayDatas.map((eventDayData) => ({ @@ -346,6 +371,7 @@ export class StatisticsClient { * }; * ``` * + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} HMToken statistics data. * * **Code example** @@ -363,11 +389,11 @@ export class StatisticsClient { * }); * ``` */ - async getHMTStatistics(): Promise { + async getHMTStatistics(options?: SubgraphOptions): Promise { try { - const { hmtokenStatistics } = await gqlFetch<{ + const { hmtokenStatistics } = await customGqlFetch<{ hmtokenStatistics: HMTStatisticsData; - }>(this.subgraphUrl, GET_HMTOKEN_STATISTICS_QUERY); + }>(this.subgraphUrl, GET_HMTOKEN_STATISTICS_QUERY, options); return { totalTransferAmount: BigInt(hmtokenStatistics.totalValueTransfered), @@ -385,6 +411,7 @@ export class StatisticsClient { * **Input parameters** * * @param {IHMTHoldersParams} params HMT Holders params with filters and ordering + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} List of HMToken holders. * * **Code example** @@ -404,19 +431,23 @@ export class StatisticsClient { * }))); * ``` */ - async getHMTHolders(params: IHMTHoldersParams = {}): Promise { + async getHMTHolders( + params: IHMTHoldersParams = {}, + options?: SubgraphOptions + ): Promise { try { const { address, orderDirection } = params; const query = GET_HOLDERS_QUERY(address); - const { holders } = await gqlFetch<{ holders: HMTHolderData[] }>( + const { holders } = await customGqlFetch<{ holders: HMTHolderData[] }>( this.subgraphUrl, query, { address, orderBy: 'balance', orderDirection, - } + }, + options ); return holders.map((holder) => ({ @@ -454,6 +485,7 @@ export class StatisticsClient { * ``` * * @param {IStatisticsFilter} filter Statistics params with duration data + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Daily HMToken statistics data. * * **Code example** @@ -475,22 +507,30 @@ export class StatisticsClient { * console.log('HMT statistics from 5/8 - 6/8:', hmtStatisticsRange); * ``` */ - async getHMTDailyData(filter: IStatisticsFilter = {}): Promise { + async getHMTDailyData( + filter: IStatisticsFilter = {}, + options?: SubgraphOptions + ): Promise { try { const first = filter.first !== undefined ? Math.min(filter.first, 1000) : 10; const skip = filter.skip || 0; const orderDirection = filter.orderDirection || OrderDirection.ASC; - const { eventDayDatas } = await gqlFetch<{ + const { eventDayDatas } = await customGqlFetch<{ eventDayDatas: EventDayData[]; - }>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), { - from: filter.from ? getUnixTimestamp(filter.from) : undefined, - to: filter.to ? getUnixTimestamp(filter.to) : undefined, - orderDirection: orderDirection, - first: first, - skip: skip, - }); + }>( + this.subgraphUrl, + GET_EVENT_DAY_DATA_QUERY(filter), + { + from: filter.from ? getUnixTimestamp(filter.from) : undefined, + to: filter.to ? getUnixTimestamp(filter.to) : undefined, + orderDirection: orderDirection, + first: first, + skip: skip, + }, + options + ); return eventDayDatas.map((eventDayData) => ({ timestamp: +eventDayData.timestamp * 1000, diff --git a/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts b/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts index fc8cd3e987..0b2014b495 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/transaction.ts @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { ethers } from 'ethers'; -import gqlFetch from 'graphql-request'; import { NETWORKS } from './constants'; import { ChainId, OrderDirection } from './enums'; import { @@ -17,8 +16,9 @@ import { InternalTransaction, ITransaction, ITransactionsFilter, + SubgraphOptions, } from './interfaces'; -import { getSubgraphUrl, getUnixTimestamp } from './utils'; +import { getSubgraphUrl, getUnixTimestamp, customGqlFetch } from './utils'; export class TransactionUtils { /** @@ -54,6 +54,7 @@ export class TransactionUtils { * * @param {ChainId} chainId The chain ID. * @param {string} hash The transaction hash. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} - Returns the transaction details or null if not found. * * **Code example** @@ -66,7 +67,8 @@ export class TransactionUtils { */ public static async getTransaction( chainId: ChainId, - hash: string + hash: string, + options?: SubgraphOptions ): Promise { if (!ethers.isHexString(hash)) { throw ErrorInvalidHashProvided; @@ -77,11 +79,16 @@ export class TransactionUtils { throw ErrorUnsupportedChainID; } - const { transaction } = await gqlFetch<{ + const { transaction } = await customGqlFetch<{ transaction: TransactionData | null; - }>(getSubgraphUrl(networkData), GET_TRANSACTION_QUERY, { - hash: hash.toLowerCase(), - }); + }>( + getSubgraphUrl(networkData), + GET_TRANSACTION_QUERY, + { + hash: hash.toLowerCase(), + }, + options + ); if (!transaction) return null; return mapTransaction(transaction); @@ -141,6 +148,7 @@ export class TransactionUtils { * ``` * * @param {ITransactionsFilter} filter Filter for the transactions. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Returns an array with all the transaction details. * * **Code example** @@ -160,7 +168,8 @@ export class TransactionUtils { * ``` */ public static async getTransactions( - filter: ITransactionsFilter + filter: ITransactionsFilter, + options?: SubgraphOptions ): Promise { if ( (!!filter.startDate || !!filter.endDate) && @@ -179,24 +188,29 @@ export class TransactionUtils { throw ErrorUnsupportedChainID; } - const { transactions } = await gqlFetch<{ + const { transactions } = await customGqlFetch<{ transactions: TransactionData[]; - }>(getSubgraphUrl(networkData), GET_TRANSACTIONS_QUERY(filter), { - fromAddress: filter?.fromAddress, - toAddress: filter?.toAddress, - startDate: filter?.startDate - ? getUnixTimestamp(filter?.startDate) - : undefined, - endDate: filter.endDate ? getUnixTimestamp(filter.endDate) : undefined, - startBlock: filter.startBlock ? filter.startBlock : undefined, - endBlock: filter.endBlock ? filter.endBlock : undefined, - method: filter.method ? filter.method : undefined, - escrow: filter.escrow ? filter.escrow : undefined, - token: filter.token ? filter.token : undefined, - orderDirection: orderDirection, - first: first, - skip: skip, - }); + }>( + getSubgraphUrl(networkData), + GET_TRANSACTIONS_QUERY(filter), + { + fromAddress: filter?.fromAddress, + toAddress: filter?.toAddress, + startDate: filter?.startDate + ? getUnixTimestamp(filter?.startDate) + : undefined, + endDate: filter.endDate ? getUnixTimestamp(filter.endDate) : undefined, + startBlock: filter.startBlock ? filter.startBlock : undefined, + endBlock: filter.endBlock ? filter.endBlock : undefined, + method: filter.method ? filter.method : undefined, + escrow: filter.escrow ? filter.escrow : undefined, + token: filter.token ? filter.token : undefined, + orderDirection: orderDirection, + first: first, + skip: skip, + }, + options + ); if (!transactions) { return []; diff --git a/packages/sdk/typescript/human-protocol-sdk/src/utils.ts b/packages/sdk/typescript/human-protocol-sdk/src/utils.ts index 975215da05..cfe35456b7 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/utils.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/utils.ts @@ -1,11 +1,13 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { ethers } from 'ethers'; +import gqlFetch from 'graphql-request'; import { isURL } from 'validator'; import { SUBGRAPH_API_KEY_PLACEHOLDER } from './constants'; import { ChainId } from './enums'; import { ContractExecutionError, + ErrorRetryParametersMissing, EthereumError, InvalidArgumentError, NonceExpired, @@ -15,6 +17,7 @@ import { WarnSubgraphApiKeyNotProvided, } from './error'; import { NetworkData } from './types'; +import { SubgraphOptions } from './interfaces'; /** * **Handle and throw the error.* @@ -99,3 +102,64 @@ export const getSubgraphUrl = (networkData: NetworkData) => { export const getUnixTimestamp = (date: Date): number => { return Math.floor(date.getTime() / 1000); }; + +export const isIndexerError = (error: any): boolean => { + if (!error) return false; + + const errorMessage = + error.response?.errors?.[0]?.message || + error.message || + error.toString() || + ''; + return errorMessage.toLowerCase().includes('bad indexers'); +}; + +const sleep = (ms: number): Promise => { + return new Promise((resolve) => setTimeout(resolve, ms)); +}; + +/** + * Execute a GraphQL request with automatic retry logic for bad indexer errors. + * Only retries if options is provided. + */ +export const customGqlFetch = async ( + url: string, + query: any, + variables?: any, + options?: SubgraphOptions +): Promise => { + if (!options) { + return await gqlFetch(url, query, variables); + } + + if ( + (options.maxRetries && options.baseDelay === undefined) || + (options.baseDelay && options.maxRetries === undefined) + ) { + throw ErrorRetryParametersMissing; + } + + let lastError: any; + + for (let attempt = 0; attempt <= (options.maxRetries as number); attempt++) { + try { + const result = await gqlFetch(url, query, variables); + return result; + } catch (error) { + lastError = error; + + if (attempt === options.maxRetries) { + throw error; + } + + if (!isIndexerError(error)) { + throw error; + } + + const delay = (options.baseDelay as number) * attempt; + await sleep(delay); + } + } + + throw lastError; +}; diff --git a/packages/sdk/typescript/human-protocol-sdk/src/worker.ts b/packages/sdk/typescript/human-protocol-sdk/src/worker.ts index 60fa11ed5f..6d37ec10bc 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/worker.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/worker.ts @@ -1,12 +1,11 @@ import { ethers } from 'ethers'; -import gqlFetch from 'graphql-request'; import { NETWORKS } from './constants'; import { ChainId, OrderDirection } from './enums'; import { ErrorInvalidAddress, ErrorUnsupportedChainID } from './error'; import { WorkerData } from './graphql'; import { GET_WORKER_QUERY, GET_WORKERS_QUERY } from './graphql/queries/worker'; -import { IWorker, IWorkersFilter } from './interfaces'; -import { getSubgraphUrl } from './utils'; +import { IWorker, IWorkersFilter, SubgraphOptions } from './interfaces'; +import { getSubgraphUrl, customGqlFetch } from './utils'; export class WorkerUtils { /** @@ -14,6 +13,7 @@ export class WorkerUtils { * * @param {ChainId} chainId The chain ID. * @param {string} address The worker address. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} - Returns the worker details or null if not found. * * **Code example** @@ -26,7 +26,8 @@ export class WorkerUtils { */ public static async getWorker( chainId: ChainId, - address: string + address: string, + options?: SubgraphOptions ): Promise { const networkData = NETWORKS[chainId]; @@ -37,11 +38,16 @@ export class WorkerUtils { throw ErrorInvalidAddress; } - const { worker } = await gqlFetch<{ + const { worker } = await customGqlFetch<{ worker: WorkerData | null; - }>(getSubgraphUrl(networkData), GET_WORKER_QUERY, { - address: address.toLowerCase(), - }); + }>( + getSubgraphUrl(networkData), + GET_WORKER_QUERY, + { + address: address.toLowerCase(), + }, + options + ); if (!worker) return null; @@ -74,6 +80,7 @@ export class WorkerUtils { * ``` * * @param {IWorkersFilter} filter Filter for the workers. + * @param {SubgraphOptions} options Optional configuration for subgraph requests. * @returns {Promise} Returns an array with all the worker details. * * **Code example** @@ -89,7 +96,10 @@ export class WorkerUtils { * const workers = await WorkerUtils.getWorkers(filter); * ``` */ - public static async getWorkers(filter: IWorkersFilter): Promise { + public static async getWorkers( + filter: IWorkersFilter, + options?: SubgraphOptions + ): Promise { const first = filter.first !== undefined ? Math.min(filter.first, 1000) : 10; const skip = filter.skip || 0; @@ -104,15 +114,20 @@ export class WorkerUtils { throw ErrorInvalidAddress; } - const { workers } = await gqlFetch<{ + const { workers } = await customGqlFetch<{ workers: WorkerData[]; - }>(getSubgraphUrl(networkData), GET_WORKERS_QUERY(filter), { - address: filter?.address?.toLowerCase(), - first: first, - skip: skip, - orderBy: orderBy, - orderDirection: orderDirection, - }); + }>( + getSubgraphUrl(networkData), + GET_WORKERS_QUERY(filter), + { + address: filter?.address?.toLowerCase(), + first: first, + skip: skip, + orderBy: orderBy, + orderDirection: orderDirection, + }, + options + ); if (!workers) { return []; diff --git a/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts b/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts index 80571d29ab..c918e03333 100644 --- a/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts +++ b/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts @@ -560,7 +560,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'url' + 'url', + undefined ); }); @@ -581,7 +582,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'url' + 'url', + undefined ); expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, @@ -608,7 +610,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'linkedin_url' + 'linkedin_url', + undefined ); expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, @@ -635,7 +638,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'url' + 'url', + undefined ); expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, @@ -659,7 +663,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'url' + 'url', + undefined ); }); }); @@ -682,7 +687,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'public_key' + 'public_key', + undefined ); }); @@ -703,7 +709,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'public_key' + 'public_key', + undefined ); expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, @@ -732,7 +739,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'public_key' + 'public_key', + undefined ); expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, @@ -756,7 +764,8 @@ describe('KVStoreUtils', () => { expect(KVStoreUtils.get).toHaveBeenCalledWith( ChainId.LOCALHOST, '0x42d75a16b04a02d1abd7f2386b1c5b567bc7ef71', - 'public_key' + 'public_key', + undefined ); }); }); diff --git a/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts b/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts index 8d6a741df2..0f36f8449b 100644 --- a/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts +++ b/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts @@ -62,7 +62,8 @@ describe('StatisticsClient', () => { expect(gqlFetchSpy).toHaveBeenCalledWith( 'https://api.studio.thegraph.com/query/74256/polygon/version/latest', - GET_ESCROW_STATISTICS_QUERY + GET_ESCROW_STATISTICS_QUERY, + undefined ); expect(gqlFetchSpy).toHaveBeenCalledWith( 'https://api.studio.thegraph.com/query/74256/polygon/version/latest', diff --git a/packages/sdk/typescript/human-protocol-sdk/test/utils.test.ts b/packages/sdk/typescript/human-protocol-sdk/test/utils.test.ts index 745119098c..6c6a0428b8 100644 --- a/packages/sdk/typescript/human-protocol-sdk/test/utils.test.ts +++ b/packages/sdk/typescript/human-protocol-sdk/test/utils.test.ts @@ -1,5 +1,13 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { describe, expect, test, vi } from 'vitest'; + +vi.mock('graphql-request', () => { + return { + default: vi.fn(), + }; +}); + +import * as gqlFetch from 'graphql-request'; +import { beforeEach, describe, expect, test, vi } from 'vitest'; import { ChainId } from '../src'; import { NETWORKS } from '../src/constants'; import { @@ -11,10 +19,13 @@ import { ReplacementUnderpriced, TransactionReplaced, WarnSubgraphApiKeyNotProvided, + ErrorRetryParametersMissing, } from '../src/error'; import { getSubgraphUrl, getUnixTimestamp, + customGqlFetch, + isIndexerError, isValidJson, isValidUrl, throwError, @@ -142,3 +153,189 @@ describe('throwError', () => { expect(() => throwError(errorObj)).toThrow(expectedError); }); }); + +describe('isIndexerError', () => { + test('returns false for null/undefined errors', () => { + expect(isIndexerError(null)).toBe(false); + expect(isIndexerError(undefined)).toBe(false); + expect(isIndexerError('')).toBe(false); + }); + + test('returns true for GraphQL errors with "bad indexers" message', () => { + const error = { + response: { + errors: [ + { + message: + 'bad indexers: {0xbdfb5ee5a2abf4fc7bb1bd1221067aef7f9de491: Timeout}', + }, + ], + }, + }; + expect(isIndexerError(error)).toBe(true); + }); + + test('returns false for regular GraphQL errors', () => { + const error = { + response: { + errors: [ + { + message: 'Field "unknownField" is not defined', + }, + ], + }, + }; + expect(isIndexerError(error)).toBe(false); + }); + + test('returns false for network/connection errors', () => { + const error = { + message: 'Network error: ECONNREFUSED', + }; + expect(isIndexerError(error)).toBe(false); + }); + + test('returns false for validation errors', () => { + const error = { + message: 'Invalid query syntax', + }; + expect(isIndexerError(error)).toBe(false); + }); +}); + +describe('customGqlFetch', () => { + const mockUrl = 'http://test-subgraph.com'; + const mockQuery = 'query { test }'; + const mockVariables = { id: '123' }; + + beforeEach(() => { + vi.clearAllMocks(); + vi.resetModules(); + }); + + test('calls gqlFetch directly when no config provided', async () => { + const expectedResult = { data: 'test' }; + const gqlFetchSpy = vi + .spyOn(gqlFetch, 'default') + .mockResolvedValue(expectedResult); + + const result = await customGqlFetch(mockUrl, mockQuery, mockVariables); + + expect(gqlFetchSpy).toHaveBeenCalledTimes(1); + expect(gqlFetchSpy).toHaveBeenCalledWith(mockUrl, mockQuery, mockVariables); + expect(result).toBe(expectedResult); + }); + + test('succeeds on first attempt with config', async () => { + const expectedResult = { data: 'test' }; + const gqlFetchSpy = vi + .spyOn(gqlFetch, 'default') + .mockResolvedValue(expectedResult); + + const result = await customGqlFetch(mockUrl, mockQuery, mockVariables, { + maxRetries: 3, + baseDelay: 100, + }); + + expect(gqlFetchSpy).toHaveBeenCalledTimes(1); + expect(result).toBe(expectedResult); + }); + + test('retries on bad indexers error', async () => { + const badIndexerError = { + response: { + errors: [{ message: 'bad indexers: {0x123: Timeout}' }], + }, + }; + const expectedResult = { data: 'success' }; + const gqlFetchSpy = vi + .spyOn(gqlFetch, 'default') + .mockRejectedValueOnce(badIndexerError) + .mockRejectedValueOnce(badIndexerError) + .mockResolvedValueOnce(expectedResult); + + const result = await customGqlFetch(mockUrl, mockQuery, mockVariables, { + maxRetries: 3, + baseDelay: 10, + }); + + expect(gqlFetchSpy).toHaveBeenCalledTimes(3); + expect(result).toBe(expectedResult); + }); + + test('throws immediately on non-indexer errors', async () => { + const regularError = new Error('Regular GraphQL error'); + const gqlFetchSpy = vi + .spyOn(gqlFetch, 'default') + .mockRejectedValue(regularError); + + await expect( + customGqlFetch(mockUrl, mockQuery, mockVariables, { + maxRetries: 3, + baseDelay: 10, + }) + ).rejects.toThrow('Regular GraphQL error'); + + expect(gqlFetchSpy).toHaveBeenCalledTimes(1); + }); + + test('throws after max retries exceeded', async () => { + const badIndexerError = { + response: { + errors: [{ message: 'bad indexers: {0x123: Timeout}' }], + }, + }; + const gqlFetchSpy = vi + .spyOn(gqlFetch, 'default') + .mockRejectedValue(badIndexerError); + + await expect( + customGqlFetch(mockUrl, mockQuery, mockVariables, { + maxRetries: 2, + baseDelay: 10, + }) + ).rejects.toEqual(badIndexerError); + + expect(gqlFetchSpy).toHaveBeenCalledTimes(3); + }); + + test('throws when retry options are incomplete', async () => { + const gqlFetchSpy = vi.spyOn(gqlFetch, 'default'); + + await expect( + customGqlFetch(mockUrl, mockQuery, mockVariables, { baseDelay: 10 }) + ).rejects.toBe(ErrorRetryParametersMissing); + + expect(gqlFetchSpy).not.toHaveBeenCalled(); + }); + + test('throws when only maxRetries is provided', async () => { + const gqlFetchSpy = vi.spyOn(gqlFetch, 'default'); + + await expect( + customGqlFetch(mockUrl, mockQuery, mockVariables, { maxRetries: 1 }) + ).rejects.toBe(ErrorRetryParametersMissing); + + expect(gqlFetchSpy).not.toHaveBeenCalled(); + }); + + test('uses custom maxRetries when provided', async () => { + const badIndexerError = { + response: { + errors: [{ message: 'bad indexers: {0x123: Timeout}' }], + }, + }; + const gqlFetchSpy = vi + .spyOn(gqlFetch, 'default') + .mockRejectedValue(badIndexerError); + + await expect( + customGqlFetch(mockUrl, mockQuery, mockVariables, { + maxRetries: 1, + baseDelay: 10, + }) + ).rejects.toEqual(badIndexerError); + + expect(gqlFetchSpy).toHaveBeenCalledTimes(2); + }); +}); diff --git a/packages/sdk/typescript/subgraph/config/aurora-testnet.json b/packages/sdk/typescript/subgraph/config/aurora-testnet.json deleted file mode 100644 index c7daff1f03..0000000000 --- a/packages/sdk/typescript/subgraph/config/aurora-testnet.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "network": "aurora-testnet", - "description": "HUMAN subgraph on Aurora Testnet", - "EscrowFactory": { - "address": "0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940", - "startBlock": 201537646, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33", - "startBlock": 201536119, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "1000000000000000000000000000", - "contractDeployer": "0xF3D9a0ba9FA14273C515e519DFD0826Ff87d5164" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "KVStore": { - "address": "0xD6D347ba6987519B4e42EcED43dF98eFf5465a23", - "startBlock": 201537661, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "Staking": { - "address": "0x7457d26a3C70Bd71F7557C773b303c1dB82BBB68", - "startBlock": 201537602, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - } -} diff --git a/yarn.lock b/yarn.lock index 3dd69e86c9..7a6cbff118 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4981,6 +4981,7 @@ __metadata: resolution: "@human-protocol/sdk@workspace:packages/sdk/typescript/human-protocol-sdk" dependencies: "@human-protocol/core": "workspace:*" + "@types/validator": "npm:^13.15.4" axios: "npm:^1.4.0" eslint: "npm:^8.55.0" ethers: "npm:~6.15.0" @@ -11703,7 +11704,7 @@ __metadata: languageName: node linkType: hard -"@types/validator@npm:^13.11.8": +"@types/validator@npm:^13.11.8, @types/validator@npm:^13.15.4": version: 13.15.4 resolution: "@types/validator@npm:13.15.4" checksum: 10c0/fca230ddae859f5a66d74b466608ed16c0bfd34700558972fcab789d50d4beb7b14a6419ee2d0aab9c288e82d1706029d1c5519225c4b8dacb20f72bc05d7722