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

Support attaching signatures to transactions #251

Open
jasonpaulos opened this issue Oct 7, 2021 · 0 comments
Open

Support attaching signatures to transactions #251

jasonpaulos opened this issue Oct 7, 2021 · 0 comments

Comments

@jasonpaulos
Copy link
Contributor

Summary

This SDK has the ability to create a signed transaction given a private key using the SignTransaction function from the crypto package. However, we should also support use cases where the SDK does not have access the private key, such as if the key is on another system or stored in a hardware wallet.

We can support this by providing a function which creates a signed transaction based on an arbitrary signature, which can be computed elsewhere.

Scope

I propose creating the following new function in the crypto package:

  • AttachTransactionSignature(tx types.Transaction, signer types.Address, signature []byte) (txid string, stxBytes []byte)
    • Create a signed transaction using an existing signature. This would be very similar to the existing SignTransaction function, except it accepts the signature as an input. And if signer is not the same as the sender of the transaction, the AuthAddr field should be set on the signed transaction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant