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

Missing valid_until field for setting transaction expiration in tonutils-go #248

Open
slashramin opened this issue Sep 7, 2024 · 1 comment

Comments

@slashramin
Copy link

Hi,

According to the TON documentation and other SDKs (like TonWeb), there is typically a valid_until field that allows the user to specify the expiration time of a transaction. This is essential for creating timed transactions (e.g., a transaction that expires in 3 seconds).

However, I could not find any such field or method for setting a transaction's expiration in this package.

Would it be possible to implement this field or provide an alternative method to set the expiration for transactions in tonutils-go? This feature is available in other SDKs and would be a valuable addition here.

In other SDKs (e.g., TonWeb), the expiration time is set using the validUntil field, like:

validUntil: Date.now() + 1000 * 3 // Transaction expires in 3 seconds
Thank you for your work on this project!

@xssnick
Copy link
Owner

xssnick commented Sep 8, 2024

Hi, this functionality is already exists, you can set valid until for wallet versions which are supports it, e.g v4, using: w.GetSpec().(*wallet.SpecV4R2) .SetMessagesTTL(seconds), spec type depends on wallet version

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

No branches or pull requests

2 participants