Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#446 Support for CompletableFuture in QuickTxBuilder #476

Merged
merged 8 commits into from
Dec 17, 2024
Merged

Conversation

satran004
Copy link
Member

@satran004 satran004 commented Dec 13, 2024

The completeAndWaitAsync methods provide asynchronous completion and monitoring status of the submitted transaction. These methods return a CompletableFuture that allows handling results or exceptions asynchronously.

  1. completeAndWaitAsync()

Submit the transaction and waits asynchronously with a default check interval of 2 seconds and logs the progress using the default logging mechanism.

  1. completeAndWaitAsync(Consumer logConsumer)

Submits the transaction and waits asynchronously, logging progress messages using the provided logConsumer. Default check interval 2 sec.

  1. completeAndWaitAsync(Consumer logConsumer, Executor executor)

Submits the transaction and waits asynchronously, using the provided 1logConsumer1 for logging and the specified executor for execution. Default check interval 2 sec.

  1. completeAndWaitAsync(Duration checkInterval, Consumer logConsumer)

Submits the transaction and waits asynchronously, checking the transaction status at the specified interval and logging progress messages using the provided logConsumer.

  1. completeAndWaitAsync(Duration checkInterval, Consumer logConsumer, Executor executor)

Submits the transaction and waits asynchronously, checking the transaction status at the specified interval. Logs progress messages using the provided logConsumer and executes the process using the specified executor.

Note: For Java 21 and above, virtual thread can be used by providing the custom executor.

Transaction States:
- TxStatus.SUBMITTED: Indicates that the transaction has been submitted.
- TxStatus.CONFIRMED: Indicates that the transaction has been included in a block.
- TxStatus.PENDING: Indicates a pending transaction.

satran004 and others added 8 commits October 7, 2024 19:09
* Add support for Optional types in blueprint processing

Implemented changes to handle Optional types in blueprint definitions. Added tests for processing blueprints with basic option types and ensured proper compilation. Updated schema and processing utilities to accommodate new Optional type handling.

* Add Pair type support and serialization logic

Added the Pair type to Type and JavaType enums. Updated BlueprintSchema, ConverterCodeGenerator, and ClassDefinitionGenerator to handle Pair serialization and deserialization. Introduced unit tests to verify Pair functionality.

* Fix package issue due to aiken stdlib definitions

* To fix #452 Add tests for ScheduledTransactionRedeemer model and related tests
Refactor `COSESignBuilder` and `COSESign1Builder` to handle external payloads and add support for payload hashing. Update `CIP30DataSigner` logic to remove redundant hashed payload header. Adjust tests to align with these changes and add new test files for Rust code comparisons.
Refactor COSESign builders for external payload and hashing
Replaced Constant class with a new TxResult class and TxStatus enum for better transaction result representation and status tracking. Updated QuickTxBuilder methods to return TxResult instead of Result<String>, incorporating status metadata. Adjusted related test cases and methods to align with the new structure.
Copy link

@satran004 satran004 merged commit e13b11e into master Dec 17, 2024
6 checks passed
@satran004 satran004 deleted the fix_446 branch December 17, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants