solanaj icon indicating copy to clipboard operation
solanaj copied to clipboard

How to parse serialized data?

Open ovicloud opened this issue 1 year ago • 9 comments

var transaction = VersionedTransaction.deserialize(swapTransactionBuf); How to implement it in Java?

ovicloud avatar Jan 31 '24 08:01 ovicloud

I don't think there's a native deserialize yet (feel free to add), but you can send it to simulateTransaction and get info from that.

skynetcap avatar Feb 06 '24 20:02 skynetcap

https://github.com/itsmelodewyk/java-jup-ag/blob/f0ee3d1bd95a3b0fa18e42ea18d94c96bab814c9/src/main/java/utils/VersionedTransaction.java#L42

this might help you

Mykke24 avatar Apr 27 '24 17:04 Mykke24

Why can't I see anything on the link above? Where is VersionedTransaction for java ? :(

jekka001 avatar Jun 20 '24 11:06 jekka001

为什么我在上面链接上看不到任何内容? Java 的 VersionedTransaction 在哪里?:(

Have you found a solution yet @jekka001

bestRunner avatar Jul 06 '24 13:07 bestRunner

为什么我在上面链接上看不到任何内容? Java 的 VersionedTransaction 在哪里?:(

Have you found a solution yet @jekka001

No, this solution is not exist.

Now, I'm writing my own solution and I think It will be work

jekka001 avatar Jul 06 '24 13:07 jekka001

Any updates on this issue if anyone has found a solution? I am trying to deserialize Jupiter's swap API response.

i-contemplator avatar Aug 05 '24 02:08 i-contemplator

Any updates on this issue if anyone has found a solution? I am trying to deserialize Jupiter's swap API response.

Yes I found solution, but I'm not ready to share it

jekka001 avatar Aug 05 '24 06:08 jekka001

Cool. I am also working on my solution and will share it here once I get it.

i-contemplator avatar Aug 05 '24 15:08 i-contemplator

I have a solution here that deserializes the transaction. I also added the Jupiter program to swap tokens that use the deserializer. Feel free to give any feedback. https://github.com/i-contemplator/solanaj/pull/1/files

i-contemplator avatar Aug 13 '24 07:08 i-contemplator