We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87df3db commit 8783f95Copy full SHA for 8783f95
modules/abstract-utxo/src/transaction/decode.ts
@@ -57,3 +57,15 @@ export function decodePsbtWith(
57
return fixedScriptWallet.BitGoPsbt.fromBytes(psbt, toNetworkName(network));
58
}
59
60
+
61
+export function encodeTransaction(
62
+ transaction: utxolib.bitgo.UtxoTransaction<bigint | number> | utxolib.bitgo.UtxoPsbt | fixedScriptWallet.BitGoPsbt
63
+): Buffer {
64
+ if (transaction instanceof utxolib.bitgo.UtxoTransaction) {
65
+ return transaction.toBuffer();
66
+ } else if (transaction instanceof utxolib.bitgo.UtxoPsbt) {
67
68
+ } else {
69
+ return Buffer.from(transaction.serialize());
70
+ }
71
+}
0 commit comments