Closed gutenye closed 5 years ago
Hi there,
There was a JS-native serialization (but not deserialization) implementation in the older version of mymonero-core-js before we moved that stuff into C++ for serializing a constructed transaction object. vtnerd jokingly calls this the "cryptonote special" format.
I do think it would make general sense to add that stuff to mymonero-core-js, but I'd like to check the specifics of what you want to decode, how you'd like to be able to do so, etc. and see where it leads in terms of the API and featureset.
We have plans to propose and add block streaming / scanning here so there may also be overlap there.
Hi, Paul. Thanks for the quick reply.
Our wallet is light, and we use Monero Daemon API. Although it has decode_as_json
param which returns decoded tx response, this increase the response size a lot, and download time is a major bottleneck.
So we're getting all response in raw hex format, and do deserialization in client side.
The downside is that we may need to keep updating the source code after Monero bi-annual hard forks.
@gutenye what do you mean when you say "light"?
@gutenye what functionality are you looking for by decoding a tx? My gut says modifying the daemon (if necessary) to return JSON without big, likely unnecessary fields such as rctsig_prunable would be the simplest and possibly best solution.
I might also mention that I have some interest in writing decoding functionality in JS as a sort of educational and debug routine; it wouldn't necessarily be intended for production use.
@luigi1111 if so, how would you feel about working together to write it in C++ and exposing it via the JSON "serial bridge"? The decode/encode would be able to be gotten for 'free'.
I don't feel that really scratches the itch I was going for. Decode should already exist in C++ anyway; might be better to go that route for production use (though I think passing pruned is still the better option, depending on the purpose).
Closed as I have a pure-js implementation.
When I get transaction data from daemon API, it returns raw hex data, so I need to decode this data.
Does
mymonero-core-js
supports it? If not, is there a bridge to c++ code.I can not find any JavaScript implementation of monero serialization.