hermes-swap 0.1.8 → 0.1.10

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.
@@ -5,12 +5,18 @@ export interface IConfig {
5
5
  quoterAddress: Record<string, string>;
6
6
  aggregatorAddress: Record<string, string>;
7
7
  hermesSignalDomain?: string;
8
+ flashbotSigner: string;
8
9
  }
9
10
  export interface IExpectParams {
10
11
  chain: ChainNameEnum;
11
12
  amountInWei: bigint;
12
13
  path: IRouterPath[];
13
14
  }
15
+ export interface IBatchExpectParams {
16
+ chain: ChainNameEnum;
17
+ amountInWei: bigint[];
18
+ path: IRouterPath[][];
19
+ }
14
20
  export interface ISwapParams {
15
21
  user: string;
16
22
  chain: ChainNameEnum;
@@ -18,6 +24,13 @@ export interface ISwapParams {
18
24
  path: IRouterPath[];
19
25
  minAmountOutList: bigint[];
20
26
  }
27
+ export interface IBatchMultiSwapParams {
28
+ users: string[];
29
+ chain: ChainNameEnum;
30
+ amountInWeis: bigint[];
31
+ paths: IRouterPath[][];
32
+ minAmountOutLists: bigint[][];
33
+ }
21
34
  export interface IBridgeParams {
22
35
  chain: ChainNameEnum;
23
36
  user: string;
@@ -51,7 +64,18 @@ export interface IReceipt {
51
64
  hash: string;
52
65
  from: string;
53
66
  to: string;
54
- logs: ILog[];
67
+ }
68
+ export interface IBatchReceipt {
69
+ hash: string;
70
+ from: string;
71
+ to: string | null;
72
+ userResults: Array<{
73
+ user: string;
74
+ amountIn: bigint;
75
+ amountOut: bigint;
76
+ fromToken: string;
77
+ toToken: string;
78
+ }>;
55
79
  }
56
80
  export interface ICalldata {
57
81
  to: string;
@@ -103,6 +127,7 @@ export declare enum DexType {
103
127
  CURVE128 = "curve128",
104
128
  CURVE256 = "curve256",
105
129
  CAMELOTV2 = "camelotv2",
130
+ CAMELOTV3 = "camelotv3",
106
131
  PANCAKEV2 = "pancakev2",
107
132
  AERODROME = "aerodrome",
108
133
  PANCAKEV3 = "pancakev3",
@@ -115,7 +140,10 @@ export declare enum DexType {
115
140
  SHADOWV3 = "shadowv3",
116
141
  FRAXSWAPV2 = "fraxswapv2",
117
142
  AERODROMEV2 = "aerodromev2",
118
- SHADOWV2 = "shadowv2"
143
+ SHADOWV2 = "shadowv2",
144
+ BLACKHOLEV3 = "blackholev3",
145
+ BLACKHOLEV2 = "blackholev2",
146
+ FLUID = "fluid"
119
147
  }
120
148
  export declare enum IEstimateType {
121
149
  BRIDGE = "bridge",
@@ -327,6 +355,11 @@ export declare const AddressConst: {
327
355
  usdt: {
328
356
  eth: string;
329
357
  base: string;
358
+ avax: string;
359
+ arb: string;
360
+ };
361
+ susde: {
362
+ arb: string;
330
363
  };
331
364
  drv: {
332
365
  eth: string;
@@ -390,6 +423,14 @@ export declare const AddressConst: {
390
423
  sonic: string;
391
424
  etherlink: string;
392
425
  fraxtal: string;
426
+ avax: string;
427
+ };
428
+ vertai: {
429
+ avax: string;
430
+ };
431
+ xaut: {
432
+ avax: string;
433
+ arb: string;
393
434
  };
394
435
  link: {
395
436
  eth: string;
package/dist/esm/types.js CHANGED
@@ -4,6 +4,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
5
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import { EndpointId } from '@layerzerolabs/lz-definitions';
7
+ ;
7
8
  export var DexType = /*#__PURE__*/function (DexType) {
8
9
  DexType["FX"] = "f(x)";
9
10
  DexType["UNISWAPV2"] = "uniswapv2";
@@ -12,6 +13,7 @@ export var DexType = /*#__PURE__*/function (DexType) {
12
13
  DexType["CURVE128"] = "curve128";
13
14
  DexType["CURVE256"] = "curve256";
14
15
  DexType["CAMELOTV2"] = "camelotv2";
16
+ DexType["CAMELOTV3"] = "camelotv3";
15
17
  DexType["PANCAKEV2"] = "pancakev2";
16
18
  DexType["AERODROME"] = "aerodrome";
17
19
  DexType["PANCAKEV3"] = "pancakev3";
@@ -25,6 +27,9 @@ export var DexType = /*#__PURE__*/function (DexType) {
25
27
  DexType["FRAXSWAPV2"] = "fraxswapv2";
26
28
  DexType["AERODROMEV2"] = "aerodromev2";
27
29
  DexType["SHADOWV2"] = "shadowv2";
30
+ DexType["BLACKHOLEV3"] = "blackholev3";
31
+ DexType["BLACKHOLEV2"] = "blackholev2";
32
+ DexType["FLUID"] = "fluid";
28
33
  return DexType;
29
34
  }({});
30
35
  export var IEstimateType = /*#__PURE__*/function (IEstimateType) {
@@ -235,7 +240,12 @@ export var AddressConst = {
235
240
  },
236
241
  usdt: {
237
242
  eth: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
238
- base: '0xfde4c96c8593536e31f229ea8f37b2ada2699bb2'
243
+ base: '0xfde4c96c8593536e31f229ea8f37b2ada2699bb2',
244
+ avax: '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7',
245
+ arb: '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9'
246
+ },
247
+ susde: {
248
+ arb: '0x211Cc4DD073734dA055fbF44a2b4667d5E5fE5d2'
239
249
  },
240
250
  drv: {
241
251
  eth: '0xB1D1eae60EEA9525032a6DCb4c1CE336a1dE71BE'
@@ -298,7 +308,15 @@ export var AddressConst = {
298
308
  eth: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
299
309
  sonic: '0x29219dd400f2Bf60E5a23d13Be72B486D4038894',
300
310
  etherlink: '0x796Ea11Fa2dD751eD01b53C372fFDB4AAa8f00F9',
301
- fraxtal: '0xDcc0F2D8F90FDe85b10aC1c8Ab57dc0AE946A543'
311
+ fraxtal: '0xDcc0F2D8F90FDe85b10aC1c8Ab57dc0AE946A543',
312
+ avax: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'
313
+ },
314
+ vertai: {
315
+ avax: '0x6EDac263561DA41aDe155a992759260FAFb87B43'
316
+ },
317
+ xaut: {
318
+ avax: '0x2775d5105276781B4b85bA6eA6a6653bEeD1dd32',
319
+ arb: '0x40461291347e1eCbb09499F3371D3f17f10d7159'
302
320
  },
303
321
  link: {
304
322
  eth: '0x514910771AF9Ca656af840dff83E8264EcF986CA'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-swap",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "A TypeScript utility library for swap and bridge",
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
@@ -48,7 +48,9 @@
48
48
  "typescript": "^5.9.2"
49
49
  },
50
50
  "dependencies": {
51
+ "@flashbots/ethers-provider-bundle": "^1.0.0",
51
52
  "@layerzerolabs/lz-definitions": "3.0.126",
53
+ "axios": "^1.13.2",
52
54
  "dotenv": "^17.2.3",
53
55
  "ethers": "^6.15.0"
54
56
  }