Aggregator SDK
A thin wrapper over the Panora API to provide functions to swap between any two tokens easily
Installation
Panora's published package can be found here at NPM:
Usage
1. Importing the libraries and creating an instance
2. Swap Functions
Panora provides two functions to perform the swap
ExactInSwap: When fromTokenAmount is entered, this function executes and returns the maximum toTokenAmount that will be received.
ExactOutSwap: When toTokenAmount is entered, this function executes and returns the minimum fromTokenAmount that has to be paid.
i. ExactInSwap:
ii. ExactOutSwap:
3. Quote Functions
Panora provides two functions to get the quotes:
ExactInSwapQuote: When fromTokenAmount is entered, this function informs the maximum toTokenAmount that will be received.
ExactOut SwapQuote: When toTokenAmount is entered, this function informs the minimum fromTokenAmount that has to be paid.
i. ExactInSwapQuote
ii. ExactOutSwapQuote
Last updated