Provider Transaction Evaluator¶
-
cardano_error_t cardano_tx_evaluator_from_provider(cardano_provider_t *provider, cardano_tx_evaluator_t **tx_evaluator)¶
Creates a transaction evaluator from a provider.
This function initializes a new transaction evaluator (
tx_evaluator) using the specified blockchain data provider, allowing transactions to be evaluated based on the provider’s configuration and resources.Usage Example:
cardano_tx_evaluator_t* tx_evaluator = NULL; cardano_error_t result = cardano_tx_evaluator_from_provider(provider, &tx_evaluator); if (result == CARDANO_SUCCESS) { // The transaction evaluator was successfully created and is ready for use } // Release the evaluator when it is no longer needed cardano_tx_evaluator_unref(&tx_evaluator);Note
The caller is responsible for releasing the allocated memory of
tx_evaluatorby calling the appropriate release function.- Parameters:¶
- cardano_provider_t *provider¶
[in] A pointer to the cardano_provider_t instance that will be used to configure the transaction evaluator.
- cardano_tx_evaluator_t **tx_evaluator¶
[out] A double pointer to a cardano_tx_evaluator_t instance, which will be populated with the newly created transaction evaluator.
- Returns:¶
CARDANO_SUCCESS if the transaction evaluator was successfully created, or an appropriate error code indicating failure.