Crate soroswap_library

Crate soroswap_library 

Source

Structs§

SoroswapLibrary
SoroswapLibraryArgs
SoroswapLibraryArgs is a type for building arg lists for functions defined in “SoroswapLibrary”.
SoroswapLibraryClient
SoroswapLibraryClient is a client for calling the contract defined in “SoroswapLibrary”.

Enums§

SoroswapLibraryError

Traits§

SoroswapLibraryTrait

Functions§

get_amount_in
Given an output amount of an asset and pair reserves, returns a required input amount of the other asset.
get_amount_out
Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset.
get_amounts_in
Performs chained getAmountIn calculations on any number of pairs.
get_amounts_out
Performs chained getAmountOut calculations on any number of pairs.
get_reserves_with_factory
Fetches and sorts the reserves for a pair of tokens.
get_reserves_with_pair
Fetches and sorts the reserves for a pair of tokens given the pair address.
pair_for
Calculates the deterministic address for a pair without making any external calls. check https://github.com/paltalabs/deterministic-address-soroban
quote
Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset.
sort_tokens
Sorts two token addresses in a consistent order.