Skip to content

Latest commit

 

History

History
818 lines (502 loc) · 14 KB

SwapIDL.Swap.md

File metadata and controls

818 lines (502 loc) · 14 KB

Interface: Swap

SwapIDL.Swap

Table of contents

Methods

Methods

addAuth

addAuth(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 Principal

Returns

Promise<boolean>


addLiquidity

addLiquidity(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6): Promise<TxReceipt>

Parameters

Name Type
arg_0 Principal
arg_1 Principal
arg_2 bigint
arg_3 bigint
arg_4 bigint
arg_5 bigint
arg_6 bigint

Returns

Promise<TxReceipt>


addToken

addToken(arg_0): Promise<Result>

Parameters

Name Type
arg_0 Principal

Returns

Promise<Result>


allowance

allowance(arg_0, arg_1, arg_2): Promise<bigint>

Parameters

Name Type
arg_0 string
arg_1 Principal
arg_2 Principal

Returns

Promise<bigint>


approve

approve(arg_0, arg_1, arg_2): Promise<boolean>

Parameters

Name Type
arg_0 string
arg_1 Principal
arg_2 bigint

Returns

Promise<boolean>


balanceOf

balanceOf(arg_0, arg_1): Promise<bigint>

Parameters

Name Type
arg_0 string
arg_1 Principal

Returns

Promise<bigint>


checkTxCounter

checkTxCounter(): Promise<boolean>

Returns

Promise<boolean>


createPair

createPair(arg_0, arg_1): Promise<TxReceipt>

Parameters

Name Type
arg_0 Principal
arg_1 Principal

Returns

Promise<TxReceipt>


decimals

decimals(arg_0): Promise<number>

Parameters

Name Type
arg_0 string

Returns

Promise<number>


deposit

deposit(arg_0, arg_1): Promise<TxReceipt>

Parameters

Name Type
arg_0 Principal
arg_1 bigint

Returns

Promise<TxReceipt>


depositTo

depositTo(arg_0, arg_1, arg_2): Promise<TxReceipt>

Parameters

Name Type
arg_0 Principal
arg_1 Principal
arg_2 bigint

Returns

Promise<TxReceipt>


getAllPairs

getAllPairs(): Promise<PairInfoExt[]>

Returns

Promise<PairInfoExt[]>


getDSwapInfo

getDSwapInfo(): Promise<DSwapInfo>

Returns

Promise<DSwapInfo>


getLPTokenId

getLPTokenId(arg_0, arg_1): Promise<string>

Parameters

Name Type
arg_0 Principal
arg_1 Principal

Returns

Promise<string>


getNumPairs

getNumPairs(): Promise<bigint>

Returns

Promise<bigint>


getPair

getPair(arg_0, arg_1): Promise<[] | [PairInfoExt]>

Parameters

Name Type
arg_0 Principal
arg_1 Principal

Returns

Promise<[] | [PairInfoExt]>


getPairs

getPairs(arg_0, arg_1): Promise<[PairInfoExt[], bigint]>

Parameters

Name Type
arg_0 bigint
arg_1 bigint

Returns

Promise<[PairInfoExt[], bigint]>


getSupportedTokenList

getSupportedTokenList(): Promise<TokenInfoExt[]>

Returns

Promise<TokenInfoExt[]>


getSupportedTokenListByName

getSupportedTokenListByName(arg_0, arg_1, arg_2): Promise<[TokenInfoExt[], bigint]>

Parameters

Name Type
arg_0 string
arg_1 bigint
arg_2 bigint

Returns

Promise<[TokenInfoExt[], bigint]>


getSupportedTokenListSome

getSupportedTokenListSome(arg_0, arg_1): Promise<[TokenInfoExt[], bigint]>

Parameters

Name Type
arg_0 bigint
arg_1 bigint

Returns

Promise<[TokenInfoExt[], bigint]>


getUserBalances

getUserBalances(arg_0): Promise<[string, bigint][]>

Parameters

Name Type
arg_0 Principal

Returns

Promise<[string, bigint][]>


getUserInfo

getUserInfo(arg_0): Promise<UserInfo>

Parameters

Name Type
arg_0 Principal

Returns

Promise<UserInfo>


getUserInfoAbove

getUserInfoAbove(arg_0, arg_1, arg_2): Promise<UserInfo>

Parameters

Name Type
arg_0 Principal
arg_1 bigint
arg_2 bigint

Returns

Promise<UserInfo>


getUserInfoByNamePageAbove

getUserInfoByNamePageAbove(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, arg_8): Promise<UserInfoPage>

Parameters

Name Type
arg_0 Principal
arg_1 bigint
arg_2 string
arg_3 bigint
arg_4 bigint
arg_5 bigint
arg_6 string
arg_7 bigint
arg_8 bigint

Returns

Promise<UserInfoPage>


getUserLPBalances

getUserLPBalances(arg_0): Promise<[string, bigint][]>

Parameters

Name Type
arg_0 Principal

Returns

Promise<[string, bigint][]>


getUserLPBalancesAbove

getUserLPBalancesAbove(arg_0, arg_1): Promise<[string, bigint][]>

Parameters

Name Type
arg_0 Principal
arg_1 bigint

Returns

Promise<[string, bigint][]>


lazySwap

lazySwap(arg_0, arg_1, arg_2, arg_3): Promise<TxReceipt>

Parameters

Name Type
arg_0 bigint
arg_1 bigint
arg_2 string[]
arg_3 Principal

Returns

Promise<TxReceipt>


name

name(arg_0): Promise<string>

Parameters

Name Type
arg_0 string

Returns

Promise<string>


removeAuth

removeAuth(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 Principal

Returns

Promise<boolean>


removeLiquidity

removeLiquidity(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6): Promise<TxReceipt>

Parameters

Name Type
arg_0 Principal
arg_1 Principal
arg_2 bigint
arg_3 bigint
arg_4 bigint
arg_5 Principal
arg_6 bigint

Returns

Promise<TxReceipt>


setAddTokenThresh

setAddTokenThresh(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 bigint

Returns

Promise<boolean>


setFeeForToken

setFeeForToken(arg_0, arg_1): Promise<boolean>

Parameters

Name Type
arg_0 string
arg_1 bigint

Returns

Promise<boolean>


setFeeOn

setFeeOn(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 boolean

Returns

Promise<boolean>


setFeeTo

setFeeTo(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 Principal

Returns

Promise<boolean>


setGlobalTokenFee

setGlobalTokenFee(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 bigint

Returns

Promise<boolean>


setMaxTokens

setMaxTokens(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 bigint

Returns

Promise<boolean>


setOwner

setOwner(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 Principal

Returns

Promise<boolean>


setStorageCanisterId

setStorageCanisterId(arg_0): Promise<boolean>

Parameters

Name Type
arg_0 Principal

Returns

Promise<boolean>


swapExactTokensForTokens

swapExactTokensForTokens(arg_0, arg_1, arg_2, arg_3, arg_4): Promise<TxReceipt>

Parameters

Name Type
arg_0 bigint
arg_1 bigint
arg_2 string[]
arg_3 Principal
arg_4 bigint

Returns

Promise<TxReceipt>


swapTokensForExactTokens

swapTokensForExactTokens(arg_0, arg_1, arg_2, arg_3, arg_4): Promise<TxReceipt>

Parameters

Name Type
arg_0 bigint
arg_1 bigint
arg_2 string[]
arg_3 Principal
arg_4 bigint

Returns

Promise<TxReceipt>


symbol

symbol(arg_0): Promise<string>

Parameters

Name Type
arg_0 string

Returns

Promise<string>


totalSupply

totalSupply(arg_0): Promise<bigint>

Parameters

Name Type
arg_0 string

Returns

Promise<bigint>


transfer

transfer(arg_0, arg_1, arg_2): Promise<boolean>

Parameters

Name Type
arg_0 string
arg_1 Principal
arg_2 bigint

Returns

Promise<boolean>


transferFrom

transferFrom(arg_0, arg_1, arg_2, arg_3): Promise<boolean>

Parameters

Name Type
arg_0 string
arg_1 Principal
arg_2 Principal
arg_3 bigint

Returns

Promise<boolean>


withdraw

withdraw(arg_0, arg_1): Promise<TxReceipt>

Parameters

Name Type
arg_0 Principal
arg_1 bigint

Returns

Promise<TxReceipt>


withdrawTo

withdrawTo(arg_0, arg_1, arg_2): Promise<TxReceipt>

Parameters

Name Type
arg_0 Principal
arg_1 Principal
arg_2 bigint

Returns

Promise<TxReceipt>