I am looking to unmarshal a pre-built transaction envelope for signing using the new txnbuild package in the Go SDK but I'm missing a step and can't find the correct way to unmarshal. This is what I have so far:
// Unmarshall the envelope var decoded xdr.TransactionEnvelope err = xdr.SafeUnmarshalBase64(env, &decoded) // env is the xdr string check(err, "Unmarshal transaction envelope") tx := // convert to txnbuild transaction... but how? // Rebuild, sign, encode and prepare response txe, err := tx.BuildSignEncode(signer.(*keypair.Full)) check(err, "Rebuild, sign and encode transaction")
I think I just need to convert the xdr.TransactionEnvelope to a txnbuild.Transaction for signing.