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

txnbuild/transaction: add a way of doing external signing of transactions without transaction.Sign(..) #5138

Open
Pownieh opened this issue Dec 7, 2023 · 0 comments

Comments

@Pownieh
Copy link

Pownieh commented Dec 7, 2023

What problem does your feature solve?

This allows users of the stellar-go library to implement their own signing algorithm. This is beneficial for anyone wanting to sign without having direct access to the private key (and thus cannot produce the required KeyPair), such as when using a cold wallet or using a secret shared private key.

What would you like to see?

The signing algorithm requires hashing the TransactionEnvelope, which is currently a private property (envelope) of the Transaction type. Once this envelope has been hashed and signed, this has to be set in the transaction, something that also cannot be done (without using clone(...) of txnbuild/transaction). Therefore, adding either a way of getting the envelope directly (like done here), or adding a specific way of getting the hash of the envelope and then afterwards setting the signatures, would allow someone to implement their own signing protocol.

What alternatives are there?

Alternatives to the two approaches described above include injecting once own signing function directly and likely other options.

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

1 participant