- ActorAdapter
- Assets
- Liquidity
- MaximalPaths
- Pair
- Price
- Swap
- SwapCanisterController
- SwapIDL
- Token
- TokenIDL
- Types
- checkIfObject
- createSwapActor
- createTokenActor
- deserialize
- findMaximalPaths
- findReverseMaximalPaths
- formatAmount
- getDeadline
- parseAllPairs
- parseSupportedTokenList
- parseUserLPBalances
- removeEmptyPairs
- serialize
- toBigNumber
- toExponential
Ƭ CheckIfOptions: Object
| Name | Type |
|---|---|
isNegative? |
boolean |
isNotANumber? |
boolean |
isZero? |
boolean |
• Const Default: Object
| Name | Type |
|---|---|
ENV |
string |
IC_HOST |
string |
SLIPPAGE |
number |
SWAP_CANISTER_ID |
string |
▸ checkIfObject(object, options): boolean
| Name | Type | Description |
|---|---|---|
object |
Object |
- |
options |
CheckIfOptions |
boolean
▸ createSwapActor(options?): Promise<SwapActor>
| Name | Type | Description |
|---|---|---|
options |
CreateSwapActorOptions |
Promise<SwapActor>
▸ createTokenActor(options): Promise<TokenActor>
| Name | Type | Description |
|---|---|---|
options |
CreateTokenActorOptions |
Promise<TokenActor>
▸ deserialize<T>(jsonString): undefined | T
| Name | Type |
|---|---|
T |
any |
| Name | Type | Description |
|---|---|---|
jsonString |
string |
undefined | T
▸ findMaximalPaths(pairList, tokenList, source, initialAmount): NodeList
| Name | Type |
|---|---|
pairList |
List |
tokenList |
MetadataList |
source |
string |
initialAmount |
BigNumber |
▸ findReverseMaximalPaths(pairList, tokenList, source, initialAmount): NodeList
| Name | Type |
|---|---|
pairList |
List |
tokenList |
MetadataList |
source |
string |
initialAmount |
BigNumber |
▸ formatAmount(amount): string
| Name | Type |
|---|---|
amount |
string |
string
▸ getDeadline(): bigint
bigint
▸ parseAllPairs(response): List
| Name | Type | Description |
|---|---|---|
response |
PairInfoExt[] |
▸ parseSupportedTokenList(response): MetadataList
| Name | Type | Description |
|---|---|---|
response |
TokenInfoExt[] |
▸ parseUserLPBalances(response): Balances
| Name | Type | Description |
|---|---|---|
response |
[string, bigint][] |
▸ removeEmptyPairs(pairList): List
| Name | Type |
|---|---|
pairList |
List |
▸ serialize<T>(data): string
| Name |
|---|
T |
| Name | Type | Description |
|---|---|---|
data |
T |
string
▸ toBigNumber(num?, options?): BigNumber
| Name | Type |
|---|---|
num? |
Number |
options? |
ToBigNumberOptions |
BigNumber
▸ toExponential(decimals): BigNumber
| Name | Type |
|---|---|
decimals |
Number |
BigNumber