Hi I was working with Stellar on Javascript for offline signing and to keep the QR code after signing short I enveloped the transaction and converted it to XDR.
Using,
const signedTx = await transaction.toEnvelope().toXDR('base64');
Now how do I convert it back to the transaction object so that I can submit it?
I tried submitting this transaction but I keep on getting the error,
TypeError: transaction.toEnvelope is not a function
at Server.<anonymous> (/opt/game/main/node_modules/stellar-sdk/lib/server.js:115:22)
at step (/opt/game/main/node_modules/tslib/tslib.js:136:27)
at Object.next (/opt/game/main/node_modules/tslib/tslib.js:117:57)
at /opt/game/main/node_modules/tslib/tslib.js:110:75
at new Promise (<anonymous>)
at Object.__awaiter (/opt/game/main/node_modules/tslib/tslib.js:106:16)
at Server.submitTransaction (/opt/game/node_modules/stellar-sdk/lib/server.js:111:24)