hermes-swap 0.0.19 → 0.0.21
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/cjs/index.d.ts +4 -2
- package/dist/cjs/index.js +1 -17
- package/dist/esm/index.d.ts +4 -2
- package/dist/esm/index.js +3 -2
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig,
|
|
2
|
-
|
|
1
|
+
import type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath } from './types.js';
|
|
2
|
+
import { ChainNameEnum, AddressConst, DexType } from './types.js';
|
|
3
|
+
export type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath };
|
|
4
|
+
export { ChainNameEnum, AddressConst, DexType };
|
|
3
5
|
declare class Hermes {
|
|
4
6
|
private config;
|
|
5
7
|
private providerMap;
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,14 +33,6 @@ __export(src_exports, {
|
|
|
33
33
|
ChainNameEnum: () => import_types.ChainNameEnum,
|
|
34
34
|
DexType: () => import_types.DexType,
|
|
35
35
|
Hermes: () => Hermes,
|
|
36
|
-
IBridgeParams: () => import_types.IBridgeParams,
|
|
37
|
-
IConfig: () => import_types.IConfig,
|
|
38
|
-
IExpectParams: () => import_types.IExpectParams,
|
|
39
|
-
IExpectPayload: () => import_types.IExpectPayload,
|
|
40
|
-
IReceipt: () => import_types.IReceipt,
|
|
41
|
-
IRouterPath: () => import_types.IRouterPath,
|
|
42
|
-
ISwapAndBridgeParams: () => import_types.ISwapAndBridgeParams,
|
|
43
|
-
ISwapParams: () => import_types.ISwapParams,
|
|
44
36
|
default: () => src_default
|
|
45
37
|
});
|
|
46
38
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -195,13 +187,5 @@ var src_default = Hermes;
|
|
|
195
187
|
AddressConst,
|
|
196
188
|
ChainNameEnum,
|
|
197
189
|
DexType,
|
|
198
|
-
Hermes
|
|
199
|
-
IBridgeParams,
|
|
200
|
-
IConfig,
|
|
201
|
-
IExpectParams,
|
|
202
|
-
IExpectPayload,
|
|
203
|
-
IReceipt,
|
|
204
|
-
IRouterPath,
|
|
205
|
-
ISwapAndBridgeParams,
|
|
206
|
-
ISwapParams
|
|
190
|
+
Hermes
|
|
207
191
|
});
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig,
|
|
2
|
-
|
|
1
|
+
import type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath } from './types.js';
|
|
2
|
+
import { ChainNameEnum, AddressConst, DexType } from './types.js';
|
|
3
|
+
export type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath };
|
|
4
|
+
export { ChainNameEnum, AddressConst, DexType };
|
|
3
5
|
declare class Hermes {
|
|
4
6
|
private config;
|
|
5
7
|
private providerMap;
|
package/dist/esm/index.js
CHANGED
|
@@ -15,14 +15,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
15
15
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
17
17
|
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); }
|
|
18
|
-
import {
|
|
18
|
+
import { ChainNameEnum, AddressConst, DexType } from "./types.js";
|
|
19
19
|
import { ethers } from 'ethers';
|
|
20
20
|
import { Contract } from 'ethers';
|
|
21
21
|
import QuoterAbi from "./abis/quoter.js";
|
|
22
22
|
import AggregatorAbi from "./abis/aggregator.js";
|
|
23
23
|
|
|
24
24
|
// 导出所有类型定义,方便用户使用
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
export { ChainNameEnum, AddressConst, DexType };
|
|
26
27
|
var Hermes = /*#__PURE__*/function () {
|
|
27
28
|
function Hermes(config) {
|
|
28
29
|
_classCallCheck(this, Hermes);
|