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

Make Transaction from account signing public #630

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Deniallugo
Copy link

Problem

It's impossible to use web3 library for signing transactions without using any transport.

Description

In our project, we use the signer regardless of the transport and fill all necessary fields by our logic. We do not need to go to the transport to get nonce and gas price. But we want to use Transaction for signing because rlp encoding/decoding is not trivial and it's easy to make a mistake here.

Solution

I made the necessary struct public it allows us to use just a private key for the signing structure, where all necessary fields are filled.

Signed-off-by: deniallugo <deniallugo@gmail.com>
Copy link
Owner

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

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

Hi @Deniallugo and sorry for the delay!

While I'm okay with the idea of exposing the Transaction type, I don't like the location where it ends up being exposed and that it is in fact a re-export.

Would you mind moving the Transaction type and all it's implementations to the signing module, which is already public? (instead of exposing it from api).

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.

None yet

2 participants