Using go, how can i get the public key of a signer from a signature? I have the a TransactionEnvelopeBuilder for a transaction, which includes all signatures (https://godoc.org/github.com/stellar/go/xdr#Signature), but i can't find a way to read the pk's of the signer. Any hint? Thanks

1 Answer 1


I'm not user of go, but I think the logic is the same for every language.

Here's how I do: I get the transaction sources accounts and compute the list of legit signers for this transaction, then I search for the one which can verify each signature.

Actually in JS SDK we can use the "hint" that give a clue (4 letters) about signer public key, but it's not robust because of potential collision. I'd be surprised go doesn't expose it.

The drawback is that account signers may change so if you need to find signers with certainty for old transaction you may have to go over the effects history to get any potential discarded signer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.