SdkRouter
SDK class encapsulating router functions.
Hierarchy
SdkShared
↳
SdkRouter
Methods
addLiquidityForRouter
▸ addLiquidityForRouter(params
): Promise
<TransactionRequest
>
Returns the transaction request for adding liquidity to a router.
Parameters
Name | Type | Description |
---|---|---|
|
| addLiquidityForRouter parameters object. |
|
| The amount of the token to add. |
|
| The domain ID. |
|
| The address of the router. |
|
| The address of the token. |
Returns
Promise
<TransactionRequest
>
providers.TransactionRequest object.
removeRouterLiquidity
▸ removeRouterLiquidity(params
): Promise
<TransactionRequest
>
Returns the transaction request for removing liquidity from a router.
Remarks
This function is permissioned to the router owner only.
Parameters
Name | Type | Description |
---|---|---|
|
| removeRouterLiquidity parameters object. |
|
| The amount of the token to add. |
|
| The domain ID. |
|
| The address where the removed funds will be delivered. |
|
| The address of the token. |
Returns
Promise
<TransactionRequest
>
providers.TransactionRequest object.
removeRouterLiquidityFor
▸ removeRouterLiquidityFor(params
): Promise
<TransactionRequest
>
Parameters
Name | Type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Returns
Promise
<TransactionRequest
>
create
▸ Static
create(_config
): Promise
<SdkRouter
>
Create a singleton instance of the SdkRouter class.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
|
| undefined | SdkConfig object. |
|
| undefined | Chain config, at minimum with providers for each chain. |
|
| undefined | Signer address for transactions. |
|
| "info" | (optional) Logging severity level. |
|
| "mainnet" | (optional) Blockchain environment to interact with. |
Returns
Promise
<SdkRouter
>
providers.TransactionRequest object.
Example
See the Deployments page for all domain IDs and asset addresses.
Last updated