Enso SDK is a JavaScript library for interacting with Enso API.
router
- Uses a single contract which acts as a universal routerdelegate
- Returns calldata in the form of delegateCalls for smart accountsdelegate-legacy
- Legacy version of delegate routingrouter-legacy
- Legacy version of router routingfromAddress
(Address): Ethereum address of the wallet to send the transaction fromreceiver?
(Address): Ethereum address of the receiver of the tokenOutspender?
(Address): Ethereum address of the spender of the tokenInchainId
(number): Chain ID of the network to execute the transaction ondestinationChainId?
(number): Chain ID of the destination network for cross-chain bridgingamountIn
(Quantity[]): Amount of tokenIn to swap in weislippage?
(Quantity): Slippage in basis points (1/10000)minAmountOut?
(Quantity[]): Minimum amount out in weitokenIn
(Address[]): Ethereum address of the token to swap fromtokenOut
(Address[]): Ethereum address of the token to swap toroutingStrategy
(RoutingStrategy): Routing strategy to usefee?
(Quantity[]): Fee in basis points for each amountIn valuefeeReceiver?
(Address): Address that will receive the collected feeignoreAggregators?
(string[]): List of swap aggregators to ignoreignoreStandards?
(string[]): List of standards to ignoretoEoa?
(boolean): Flag indicating if gained tokenOut should be sent to EOAreferralCode?
(string): Referral code included in on-chain eventPromise<RouteData>
fromAddress
(Address): Ethereum address of the wallet to send the transaction fromtokenAddress
(Address): ERC20 token address of the token to approvechainId
(number): Chain ID of the network to execute the transaction onamount
(Quantity): Amount of tokens to approve in weiPromise<ApproveData>
chainId
(number): Chain ID of the network to execute the transaction onfromAddress
(Address): Ethereum address of the wallet to send the transaction fromroutingStrategy
(RoutingStrategy): Routing strategy to usereceiver?
(Address): Ethereum address of the receiver of the tokenOutspender?
(Address): Ethereum address of the spender of the tokenInignoreAggregators?
(string[]): List of swap aggregators to ignorereferralCode?
(string): Referral code included in on-chain eventignoreStandards?
(string[]): List of standards to ignoreactions
(BundleAction[]): Array of actions to bundlePromise<BundleData>
chainId?
(number): Chain ID of the network to execute the transaction oneoaAddress
(Address): Address of the EOA to associate with the ensoWallet for balancesuseEoa?
(boolean): If true, returns balances for the provided eoaAddress instead of the associated ensoWalletPromise<WalletBalance[]>
project?
(string): The overarching project or platform associated with the DeFi tokenprotocolSlug?
(string): The specific standard integration or version of the DeFi projectunderlyingTokens?
(MultiAddress): Underlying tokens of defi tokenunderlyingTokensExact?
(MultiAddress): Exact composition of underlying tokensprimaryAddress?
(MultiAddress): Ethereum addresses for contract interactionaddress?
(MultiAddress): Ethereum addresses of the tokenschainId?
(number): Chain ID of the network of the tokentype?
(TokenType): Type of token (‘defi’ | ‘base’)apyFrom?
(Quantity): Only include tokens with APY over this valueapyTo?
(Quantity): Only include tokens with APY below this valuetvlFrom?
(Quantity): Only include tokens with TVL over this valuetvlTo?
(Quantity): Only include tokens with TVL below this valuepage?
(number): Pagination page number (pages are of length 1000)cursor?
(number): Cursor for paginationincludeMetadata?
(boolean): Whether to include token metadataname?
(string[]): Names of the tokenssymbol?
(string[]): Symbols of the tokensPromise<PaginatedTokenData>
chainId
(number): Chain ID of the network to search foraddress
(Address): Address of the token to search forPromise<PriceData>
chainId
(number): Chain ID of the network to search foraddresses
(Address[]): Addresses of tokens to check prices forPromise<PriceData[]>
chainId?
(number | string): Chain ID of the network to search forslug?
(string): Slug of the project to search forPromise<ProtocolData[]>
Promise<StandardData[]>
slug
(string): The protocol slugPromise<StandardData[]>
/shortcuts/bundle
endpoint.
Returns: Promise<ActionData[]>
slug
(string): The protocol slugPromise<ActionData[]>
chainId
(number): Chain ID of the network to execute the transaction onfromAddress
(Address): Ethereum address of the wallet to send the transaction fromroutingStrategy
(‘delegate’ | ‘delegate-legacy’): Routing strategy to usetokenIn
(Address[]): Input tokenspositionOut
(Address): Non-tokenized position to receiveslippage?
(Quantity): Slippage in basis pointsfee?
(Quantity[]): Fee in basis pointsfeeReceiver?
(Address): Fee receiver addressamountIn
(Quantity[]): Amount to sendreceiver
(Address): Receiver addressspender?
(Address): Spender addressreferralCode?
(string): Referral codePromise<RouteData>
chainId?
(number): Chain ID (optional)fromAddress
(string): Ethereum address of the walletdata
(IporShortcutInputData): IPOR shortcut input dataPromise<IporShortcutData>
project?
(string): The overarching project or platformprotocolSlug?
(string): The specific standard integrationchainId?
(number): Chain ID of the networkdestinationChainId?
(number): Destination chain ID for cross-chain bridgingaddress?
(Address[]): Ethereum addresses of positionsprimaryAddress?
(Address[]): Ethereum addresses for contract interactionpage?
(number): Pagination page numbercursor?
(number): Cursor for paginationPromise<PaginatedNonTokenizedPositionData>
name?
(string): Name of the network to search forchainId?
(string): Chain ID of the network to search forPromise<ConnectedNetwork[]>
Promise<Project[]>
project
(string): The project namePromise<ProtocolData[]>
chainId?
(number): Chain ID to filter aggregators forPromise<string[]>
chainId
(number): Chain ID to get volume forPromise<unknown>
Promise<string>
gas
estimate to set appropriate gas limitsUpdated