Loading signed/serialized transfers #600
Unanswered
ccherry-arculus
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a client that will sign/serialize offline and attempting to submit via this SDK. So far no luck. The same serialized bytes load in fine using the Java SDK. Just curious if this is supported yet?
FYI - just as a reference my Java code looks like this which works but we would prefer to use the GO sdk.
Client client = Client.forName("mainnet"); // Note that I do NOT set an operator on the client
SignedTransaction tx = null;
Transaction<?> txn = null;
ByteString bs = ByteString.copyFrom(txBytes); // The TX bytes is a valid signed/serialized tx from some remote client
com.hedera.hashgraph.sdk.proto.Transaction txnProto = com.hedera.hashgraph.sdk.proto.Transaction.newBuilder()
.setSignedTransactionBytes(bs).build();
TransactionList txList = TransactionList.newBuilder().addTransactionList(txnProto).build();
txn = Transaction.fromBytes(txList.toByteArray());
TransactionResponse response = txn.execute(client);
Beta Was this translation helpful? Give feedback.
All reactions