Add a new API to decode a swapstring.
- endpoint:
/decodeswapstring
- method:
POST (needed to pass the parameter in a request body)
- request body:
DecodeSwapstringRequest { swapstring: String } (the swapstring to decode)
- response body:
pub(crate) struct DecodeSwapstringResponse {
pub(crate) qty_from: u64,
pub(crate) qty_to: u64,
pub(crate) from_asset: Option<String>,
pub(crate) to_asset: Option<String>,
pub(crate) expiry: u64,
pub(crate) payment_hash: String,
}
- documentation: add to
README.md and openapi.yaml
- hint: check
SwapString::from_str
Add a new API to decode a swapstring.
/decodeswapstringPOST(needed to pass the parameter in a request body)DecodeSwapstringRequest { swapstring: String }(the swapstring to decode)README.mdandopenapi.yamlSwapString::from_str