mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-29 09:07:59 +03:00
add eps types to services
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@orionprotocol/sdk",
|
"name": "@orionprotocol/sdk",
|
||||||
"version": "0.19.48-dev.2-rc-0",
|
"version": "0.19.48-dev.2-rc-1",
|
||||||
"description": "Orion Protocol SDK",
|
"description": "Orion Protocol SDK",
|
||||||
"main": "./lib/index.cjs",
|
"main": "./lib/index.cjs",
|
||||||
"module": "./lib/index.js",
|
"module": "./lib/index.js",
|
||||||
|
|||||||
@@ -125,8 +125,6 @@ export default async function generateSwapCalldata({
|
|||||||
return { swapDescription, calldata }
|
return { swapDescription, calldata }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export async function generateUni2Calls(
|
export async function generateUni2Calls(
|
||||||
exchangeAddress: string,
|
exchangeAddress: string,
|
||||||
path: SafeArray<SwapInfo>
|
path: SafeArray<SwapInfo>
|
||||||
|
|||||||
@@ -500,6 +500,12 @@ class AggregatorWS {
|
|||||||
minAmountIn: json.ma,
|
minAmountIn: json.ma,
|
||||||
path: json.ps,
|
path: json.ps,
|
||||||
exchanges: json.e,
|
exchanges: json.e,
|
||||||
|
exchangeContractPath: json.eps.map((path) => ({
|
||||||
|
poolAddress: path.p,
|
||||||
|
assetIn: path.ai,
|
||||||
|
assetOut: path.ao,
|
||||||
|
factory: path.f,
|
||||||
|
})),
|
||||||
poolOptimal: json.po,
|
poolOptimal: json.po,
|
||||||
...(json.oi) && {
|
...(json.oi) && {
|
||||||
orderInfo: {
|
orderInfo: {
|
||||||
|
|||||||
@@ -164,6 +164,13 @@ export type SwapInfoAlternative = {
|
|||||||
availableAmountOut?: number | undefined
|
availableAmountOut?: number | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ExchangeContractPath = {
|
||||||
|
poolAddress: string
|
||||||
|
assetIn: string
|
||||||
|
assetOut: string
|
||||||
|
factory: string
|
||||||
|
}
|
||||||
|
|
||||||
export type SwapInfoBase = {
|
export type SwapInfoBase = {
|
||||||
swapRequestId: string
|
swapRequestId: string
|
||||||
assetIn: string
|
assetIn: string
|
||||||
@@ -174,6 +181,7 @@ export type SwapInfoBase = {
|
|||||||
minAmountOut: number
|
minAmountOut: number
|
||||||
|
|
||||||
path: string[]
|
path: string[]
|
||||||
|
exchangeContractPath: ExchangeContractPath[]
|
||||||
exchanges?: string[] | undefined
|
exchanges?: string[] | undefined
|
||||||
poolOptimal: boolean
|
poolOptimal: boolean
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user