Skip to content

smplx_sdk: add wrapper over Txid for wait behaviour (TxReceipt)#62

Merged
Arvolear merged 2 commits into
devfrom
feat/transaction_receipt
Apr 29, 2026
Merged

smplx_sdk: add wrapper over Txid for wait behaviour (TxReceipt)#62
Arvolear merged 2 commits into
devfrom
feat/transaction_receipt

Conversation

@ikripaka
Copy link
Copy Markdown
Collaborator

@ikripaka ikripaka commented Apr 28, 2026

  • This PR suggests a bug fix and I've added the necessary tests.
  • This PR introduces a new feature and I've discussed the update in an Issue or with the team.
  • This PR is just a minor change like a typo fix.

  • add simplex::transaction::TxReceipt type to wrap behaviour over Txid. In this way, we need to wait for Txid to complete instead of invoking the provider
  • function to wait for elements::Txid remained in place
  • align tests

Now, interaction with the interface is changed in the following way.
Before:

let txid = alice.broadcast(&ft)?;
provider.wait(&txid)?;

After:

let tx_receipt = alice.broadcast(&ft)?;
tx_receipt.wait()?;

Needless to mention, that precious behaviour remained for compatibility.

@ikripaka ikripaka self-assigned this Apr 28, 2026
@ikripaka ikripaka requested a review from Arvolear as a code owner April 28, 2026 11:59
@ikripaka ikripaka added the enhancement New feature or request label Apr 28, 2026
@ikripaka ikripaka force-pushed the feat/transaction_receipt branch from e0edc8b to 9756d4c Compare April 28, 2026 12:21
@ikripaka ikripaka marked this pull request as draft April 28, 2026 12:39
@ikripaka ikripaka marked this pull request as ready for review April 28, 2026 12:55
@ikripaka ikripaka force-pushed the feat/transaction_receipt branch 3 times, most recently from 4ebfb7c to 5f0e856 Compare April 29, 2026 10:49
@ikripaka ikripaka changed the title smplx_sdk: add wrapper over Txid for wait behaviour smplx_sdk: add wrapper over Txid for wait behaviour (TxReceipt) Apr 29, 2026
Comment thread examples/basic/tests/basic_test.rs Outdated
Comment thread crates/sdk/src/transaction/txid.rs Outdated
Comment thread crates/sdk/src/transaction/txid.rs Outdated
Comment thread crates/sdk/src/transaction/txid.rs Outdated
Comment thread crates/sdk/src/transaction/txid.rs Outdated
@ikripaka ikripaka force-pushed the feat/transaction_receipt branch from 5f0e856 to c702e0d Compare April 29, 2026 15:22
- add simplex::transaction::TxReceipt type to wrap behavior over Txid. In this way we need to wait Txid for completing instead of invoking provider
- function to wait elements::Txid remained inplace
- align tests

# Conflicts:
#	fixtures/tests/basic_test.rs
#	fixtures/tests/confidential_test.rs
#	fixtures/tests/nested_sig.rs
@ikripaka ikripaka force-pushed the feat/transaction_receipt branch from c702e0d to cc7e12a Compare April 29, 2026 17:17
Comment thread crates/sdk/src/transaction/tx_receipt.rs Outdated
Copy link
Copy Markdown
Collaborator

@Arvolear Arvolear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Arvolear Arvolear merged commit c833e3d into dev Apr 29, 2026
9 checks passed
@Arvolear Arvolear deleted the feat/transaction_receipt branch April 29, 2026 19:47
Arvolear added a commit that referenced this pull request May 12, 2026
* fix badge

* smplx_generator: add rustfmt::skip (#63)

* Log level attribute for `simplex::test` (#61)

* impl log level attribute for test macro

* add global log level loaded from config

* control global logging level via cli command

* some refactor

* refactor and clean up changes from prev commits

* cleanup

* readme

* fix build

---------

Co-authored-by: Artem Chystiakov <artem.ch31@gmail.com>

* Minor refactoring (#65)

* Fix/reissuance (#66)

* Add ReissuanceInput and update FinalTransaction functions

* Refactor FinalInput struct

* Refactor FinalTransaction; add reissuance test

* Move ReissuanceInput logic to the IssuanceInput

* Convert IssuanceInput to enum

* Change IssuanceInput fields order

* smplx_sdk: add wrapper over Txid for wait behaviour (TxReceipt) (#62)

* smplx_sdk: add wrapper over Txid for wait behaviour

- add simplex::transaction::TxReceipt type to wrap behavior over Txid. In this way we need to wait Txid for completing instead of invoking provider
- function to wait elements::Txid remained inplace
- align tests

# Conflicts:
#	fixtures/tests/basic_test.rs
#	fixtures/tests/confidential_test.rs
#	fixtures/tests/nested_sig.rs

* Apply suggestion from @Arvolear

---------

Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>

* Add possibility to use NetworkUtils on tests (#68)

* smplx_test: add possibility to run network utils on tests

- add generate_blocks endpoint to ProviderTrait
- add function to generate desired block height in test
- add test for it

* smplx_test: fix lints

* Apply suggestions from code review

Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>

---------

Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>

* [refactor] Add `simplex new` and `simplex example` commands (#67)

* add new and example commands

* comment out test exec and add reference to example

* remove `example` command and move `new` to `init`

* initialize rust lib with config by default

* Apply suggestion

---------

Co-authored-by: stringhandler <stringhandler@protonmail.com>
Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>

* Add filters logic to the CLI test command (#72)

* Add more arguments to the CLI test command

* Add TODO

* Docs (#70)

* assets: add logo imgs

* smplx: add extended clippy linting

* add readme for smplx-sdk

* smplx: add extended clippy linting

* fix lints, which aren't related to docs

# Conflicts:
#	crates/cli/src/commands/core.rs
#	crates/cli/src/commands/init.rs

# Conflicts:
#	crates/cli/src/commands/test.rs

* smplx_test: fix typo in mine_until_height when returning Err value on success

* docs: fix clippy doc lints

# Conflicts:
#	crates/cli/src/cli.rs
#	crates/cli/src/commands/test.rs

* docs: change "asset id" on `AssetId`

* docs: remove custom lints from smplx-std Cargo.toml

* add additional lint to crates::sdk::lib.rs
* add additional lints to root Cargo.toml

* generator: add must_use attribute

* smplx-sdk readme

* Apply suggestions from code review

Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>

---------

Co-authored-by: Artem Chystiakov <artem.ch31@gmail.com>
Co-authored-by: Artem Chystiakov <47551140+Arvolear@users.noreply.github.com>

* rename a program function (#74)

* quick doc fix

* changelog

* version

* upd changelog

---------

Co-authored-by: Illia Kripaka <30872146+ikripaka@users.noreply.github.com>
Co-authored-by: Vitalii Volovyk <161724671+topologoanatom@users.noreply.github.com>
Co-authored-by: Kyrylo Riabov <kyryl.ryabov@gmail.com>
Co-authored-by: Oleh Komendant <44612825+Hrom131@users.noreply.github.com>
Co-authored-by: stringhandler <stringhandler@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants