Refactor lib to return JSON serializable #54
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I'm working on a desktop (taker) GUI at https://github.com/pwltr/coinportal. It's built with Tauri which uses a foreign function interface-like abstraction to allow the Frontend to invoke Rust functions directly. For that to work I need Rust to return JSON serializable responses from the functions I want to call.
I'm pretty new to Rust and this was mainly a POC for a GUI. Would a change like this be interesting? This may also serve as a first step towards a full JSON RPC for teleport (#46). I'd be willing to look further into that in the future.
Changes
lib.rsto return a JSON serializable resultcli.rs, use the results from libTodo
.unwrap()s)Tests
All tests are passing, except for
test_standard_coinswap. It runs until the end but is marked as failed. Not sure what's wrong there.