@spicenet-io/spiceflow-ui 3.3.55-next.13 → 3.3.55-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-dynamic.js +1 -1
- package/dist/auth-privy.js +1 -1
- package/dist/index.cjs.js +12 -12
- package/dist/index.d.ts +2 -1
- package/dist/index.js +8 -8
- package/dist/utils/crossChainRouter/algebra.d.ts +148 -0
- package/dist/utils/crossChainRouter/liquidityVenues.d.ts +5 -0
- package/package.json +1 -1
- /package/dist/{Button-BOZW9JYu.js → Button-Cb6gLgj2.js} +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { type Address, type Hex } from "viem";
|
|
2
|
+
export interface AlgebraSwapConfig {
|
|
3
|
+
swapRouter: Address;
|
|
4
|
+
quoterV2: Address;
|
|
5
|
+
subgraphUrl: string;
|
|
6
|
+
chainIds?: number[];
|
|
7
|
+
}
|
|
8
|
+
export declare const algebraQuoterAbi: readonly [{
|
|
9
|
+
readonly name: "quoteExactInput";
|
|
10
|
+
readonly stateMutability: "nonpayable";
|
|
11
|
+
readonly inputs: readonly [{
|
|
12
|
+
readonly name: "path";
|
|
13
|
+
readonly type: "bytes";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "amountInRequired";
|
|
16
|
+
readonly type: "uint256";
|
|
17
|
+
}];
|
|
18
|
+
readonly outputs: readonly [{
|
|
19
|
+
readonly name: "amountOutList";
|
|
20
|
+
readonly type: "uint256[]";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "amountInList";
|
|
23
|
+
readonly type: "uint256[]";
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "sqrtPriceX96AfterList";
|
|
26
|
+
readonly type: "uint160[]";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "initializedTicksCrossedList";
|
|
29
|
+
readonly type: "uint32[]";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "gasEstimate";
|
|
32
|
+
readonly type: "uint256";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "feeList";
|
|
35
|
+
readonly type: "uint16[]";
|
|
36
|
+
}];
|
|
37
|
+
readonly type: "function";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "quoteExactOutput";
|
|
40
|
+
readonly stateMutability: "nonpayable";
|
|
41
|
+
readonly inputs: readonly [{
|
|
42
|
+
readonly name: "path";
|
|
43
|
+
readonly type: "bytes";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "amountOutRequired";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
}];
|
|
48
|
+
readonly outputs: readonly [{
|
|
49
|
+
readonly name: "amountOutList";
|
|
50
|
+
readonly type: "uint256[]";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "amountInList";
|
|
53
|
+
readonly type: "uint256[]";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "sqrtPriceX96AfterList";
|
|
56
|
+
readonly type: "uint160[]";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "initializedTicksCrossedList";
|
|
59
|
+
readonly type: "uint32[]";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "gasEstimate";
|
|
62
|
+
readonly type: "uint256";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "feeList";
|
|
65
|
+
readonly type: "uint16[]";
|
|
66
|
+
}];
|
|
67
|
+
readonly type: "function";
|
|
68
|
+
}];
|
|
69
|
+
export declare const algebraSwapRouterAbi: readonly [{
|
|
70
|
+
readonly name: "exactInput";
|
|
71
|
+
readonly stateMutability: "payable";
|
|
72
|
+
readonly inputs: readonly [{
|
|
73
|
+
readonly name: "params";
|
|
74
|
+
readonly type: "tuple";
|
|
75
|
+
readonly components: readonly [{
|
|
76
|
+
readonly name: "path";
|
|
77
|
+
readonly type: "bytes";
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "recipient";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "deadline";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "amountIn";
|
|
86
|
+
readonly type: "uint256";
|
|
87
|
+
}, {
|
|
88
|
+
readonly name: "amountOutMinimum";
|
|
89
|
+
readonly type: "uint256";
|
|
90
|
+
}];
|
|
91
|
+
}];
|
|
92
|
+
readonly outputs: readonly [{
|
|
93
|
+
readonly name: "amountOut";
|
|
94
|
+
readonly type: "uint256";
|
|
95
|
+
}];
|
|
96
|
+
readonly type: "function";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "exactOutput";
|
|
99
|
+
readonly stateMutability: "payable";
|
|
100
|
+
readonly inputs: readonly [{
|
|
101
|
+
readonly name: "params";
|
|
102
|
+
readonly type: "tuple";
|
|
103
|
+
readonly components: readonly [{
|
|
104
|
+
readonly name: "path";
|
|
105
|
+
readonly type: "bytes";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "recipient";
|
|
108
|
+
readonly type: "address";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "deadline";
|
|
111
|
+
readonly type: "uint256";
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "amountOut";
|
|
114
|
+
readonly type: "uint256";
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: "amountInMaximum";
|
|
117
|
+
readonly type: "uint256";
|
|
118
|
+
}];
|
|
119
|
+
}];
|
|
120
|
+
readonly outputs: readonly [{
|
|
121
|
+
readonly name: "amountIn";
|
|
122
|
+
readonly type: "uint256";
|
|
123
|
+
}];
|
|
124
|
+
readonly type: "function";
|
|
125
|
+
}];
|
|
126
|
+
export declare function encodeAlgebraPath(tokens: Address[]): Hex;
|
|
127
|
+
export interface AlgebraInputRoute {
|
|
128
|
+
amountOut: bigint;
|
|
129
|
+
path: Address[];
|
|
130
|
+
}
|
|
131
|
+
export declare function getBestAlgebraInputRoute(params: {
|
|
132
|
+
tokenIn: Address;
|
|
133
|
+
tokenOut: Address;
|
|
134
|
+
amountIn: bigint;
|
|
135
|
+
chainId: number;
|
|
136
|
+
config: AlgebraSwapConfig;
|
|
137
|
+
}): Promise<AlgebraInputRoute | null>;
|
|
138
|
+
export interface AlgebraOutputRoute {
|
|
139
|
+
amountIn: bigint;
|
|
140
|
+
path: Address[];
|
|
141
|
+
}
|
|
142
|
+
export declare function getBestAlgebraOutputRoute(params: {
|
|
143
|
+
tokenIn: Address;
|
|
144
|
+
tokenOut: Address;
|
|
145
|
+
amountOut: bigint;
|
|
146
|
+
chainId: number;
|
|
147
|
+
config: AlgebraSwapConfig;
|
|
148
|
+
}): Promise<AlgebraOutputRoute | null>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
2
|
import type { Call, SwapIntent, BatchEntry, ResolvedSwap } from "@spicenet-io/spiceflow-core";
|
|
3
|
+
import { type AlgebraSwapConfig } from "./algebra";
|
|
3
4
|
import type { ExactOutputVenue } from "../swapQuotes";
|
|
4
5
|
export type { ResolvedSwap };
|
|
5
6
|
export declare function isSwapIntent(entry: BatchEntry): entry is SwapIntent;
|
|
@@ -24,6 +25,9 @@ export declare const SATSUMA_CITREA_CONFIG: SatsumaVenueConfig;
|
|
|
24
25
|
export declare const UNIV3_BASE_CONFIG: SatsumaVenueConfig;
|
|
25
26
|
export declare function createSatsumaVenue(config: SatsumaVenueConfig): LiquidityVenue;
|
|
26
27
|
export declare function createSatsumaExactOutputVenue(config: SatsumaVenueConfig): ExactOutputVenue;
|
|
28
|
+
export declare const ALGEBRA_CITREA_CONFIG: AlgebraSwapConfig;
|
|
29
|
+
export declare function createAlgebraVenue(config: AlgebraSwapConfig): LiquidityVenue;
|
|
30
|
+
export declare function createAlgebraExactOutputVenue(config: AlgebraSwapConfig): ExactOutputVenue;
|
|
27
31
|
export interface LiquidityRegistry {
|
|
28
32
|
resolveSwapIntents: (entries: BatchEntry[], chainId: number, recipient: Address) => Promise<{
|
|
29
33
|
calls: Call[];
|
|
@@ -35,6 +39,7 @@ export interface LiquidityRegistry {
|
|
|
35
39
|
export interface LiquidityRegistryConfig {
|
|
36
40
|
oneInch?: OneInchVenueConfig;
|
|
37
41
|
satsuma?: SatsumaVenueConfig;
|
|
42
|
+
algebra?: AlgebraSwapConfig;
|
|
38
43
|
customVenues?: LiquidityVenue[];
|
|
39
44
|
}
|
|
40
45
|
export declare function createLiquidityRegistry(config?: LiquidityRegistryConfig): LiquidityRegistry;
|
package/package.json
CHANGED
|
File without changes
|