Skip to content

Latest commit

 

History

History
249 lines (143 loc) · 4.76 KB

SwapCanisterController.md

File metadata and controls

249 lines (143 loc) · 4.76 KB

Class: SwapCanisterController

Table of contents

Methods

Properties

Constructors

Methods

addLiquidity

addLiquidity(params): Promise<void>

Parameters

Name Type
params AddLiquidityParams

Returns

Promise<void>


approve

approve(params): Promise<void>

Parameters

Name Type
params ApproveParams

Returns

Promise<void>


deposit

deposit(params): Promise<void>

Parameters

Name Type
params DepositParams

Returns

Promise<void>


depositTokensNeededBalance

depositTokensNeededBalance(params): Promise<void>

Parameters

Name Type Description
params DepositTokensNeededBalanceParams

Returns

Promise<void>


getAgentPrincipal

getAgentPrincipal(): Promise<Principal>

Returns

Promise<Principal>


getLPBalances

getLPBalances(principalId?): Promise<Balances>

Parameters

Name Type Description
principalId? string

Returns

Promise<Balances>


getPairList

getPairList(): Promise<List>

Returns

Promise<List>


getTokenBalance

getTokenBalance(params): Promise<Balance>

Parameters

Name Type
params GetTokenBalanceParams

Returns

Promise<Balance>


getTokenBalances

getTokenBalances(principalId?): Promise<BalanceList>

Parameters

Name Type Description
principalId? string

Returns

Promise<BalanceList>


getTokenList

getTokenList(): Promise<MetadataList>

Returns

Promise<MetadataList>


removeLiquidity

removeLiquidity(params): Promise<void>

Parameters

Name Type
params RemoveLiquidityParams

Returns

Promise<void>


swap

swap(params): Promise<void>

Parameters

Name Type
params SwapParams

Returns

Promise<void>


withdraw

withdraw(params): Promise<void>

Parameters

Name Type
params WithdrawParams

Returns

Promise<void>

Properties

balanceList

balanceList: null | BalanceList = null


pairList

pairList: null | List = null


tokenList

tokenList: null | MetadataList = null

Constructors

constructor

new SwapCanisterController(swapActor)

Parameters

Name Type Description
swapActor SwapActor