Skip to content

add API to decode a swapstringΒ #61

@zoedberg

Description

@zoedberg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions