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

Convenience function to determine current size of transaction #2489

Open
jbair06 opened this issue Aug 26, 2024 · 0 comments
Open

Convenience function to determine current size of transaction #2489

jbair06 opened this issue Aug 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jbair06
Copy link
Member

jbair06 commented Aug 26, 2024

Problem

In order to determine the size of the transaction to ensure it is within the size limits, a few steps needs to be taken. Currently, the most accurate way to do this looks similar to this:
const request = await transaction._makeRequestAsync(); proto.Transaction.encode(request).finish().length

Especially for new developers, a method on the transaction that returns this value would be very helpful for client side apps.

Solution

Add a convenience function that will return the protobuf size of the transaction that will actually be received by the network.

Alternatives

No response

@jbair06 jbair06 added the enhancement New feature or request label Aug 26, 2024
@hashgraph hashgraph deleted a comment Aug 26, 2024
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

No branches or pull requests

1 participant