hermes-swap 0.0.29 → 0.0.30
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 -4
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/types.d.ts +5 -1
- package/dist/cjs/types.js +4 -0
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/types.d.ts +5 -1
- package/dist/esm/types.js +4 -0
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath } from './types.js';
|
|
2
|
-
import { ChainNameEnum, AddressConst, DexType, BridgeType,
|
|
3
|
-
export type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath,
|
|
4
|
-
export { ChainNameEnum, AddressConst, DexType, BridgeType,
|
|
1
|
+
import type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath, SupportContracts } from './types.js';
|
|
2
|
+
import { ChainNameEnum, AddressConst, DexType, BridgeType, IEstimateType } from './types.js';
|
|
3
|
+
export type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath, SupportContracts };
|
|
4
|
+
export { ChainNameEnum, AddressConst, DexType, BridgeType, IEstimateType };
|
|
5
5
|
declare class Hermes {
|
|
6
6
|
private config;
|
|
7
7
|
private providerMap;
|
package/dist/cjs/index.js
CHANGED
|
@@ -34,7 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
ChainNameEnum: () => import_types.ChainNameEnum,
|
|
35
35
|
DexType: () => import_types.DexType,
|
|
36
36
|
Hermes: () => Hermes,
|
|
37
|
-
|
|
37
|
+
IEstimateType: () => import_types.IEstimateType,
|
|
38
38
|
default: () => src_default
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -511,5 +511,5 @@ var src_default = Hermes;
|
|
|
511
511
|
ChainNameEnum,
|
|
512
512
|
DexType,
|
|
513
513
|
Hermes,
|
|
514
|
-
|
|
514
|
+
IEstimateType
|
|
515
515
|
});
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -106,7 +106,8 @@ export declare enum DexType {
|
|
|
106
106
|
CURVE128PAYABLE = "curve128_payable",
|
|
107
107
|
CURVE256PAYABLE = "curve256_payable",
|
|
108
108
|
VSDCRVWITHDRAW = "vsdCRV_withdraw",
|
|
109
|
-
VSDCRVDEPOSIT = "vsdCRV_deposit"
|
|
109
|
+
VSDCRVDEPOSIT = "vsdCRV_deposit",
|
|
110
|
+
ASDCRVWITHDRAW = "asdCRV_withdraw"
|
|
110
111
|
}
|
|
111
112
|
export declare enum IEstimateType {
|
|
112
113
|
BRIDGE = "bridge",
|
|
@@ -311,6 +312,9 @@ export declare const AddressConst: {
|
|
|
311
312
|
vsdcrv: {
|
|
312
313
|
eth: string;
|
|
313
314
|
};
|
|
315
|
+
asdcrv: {
|
|
316
|
+
eth: string;
|
|
317
|
+
};
|
|
314
318
|
arb: {
|
|
315
319
|
arb: string;
|
|
316
320
|
};
|
package/dist/cjs/types.js
CHANGED
|
@@ -40,6 +40,7 @@ var DexType = /* @__PURE__ */ ((DexType2) => {
|
|
|
40
40
|
DexType2["CURVE256PAYABLE"] = "curve256_payable";
|
|
41
41
|
DexType2["VSDCRVWITHDRAW"] = "vsdCRV_withdraw";
|
|
42
42
|
DexType2["VSDCRVDEPOSIT"] = "vsdCRV_deposit";
|
|
43
|
+
DexType2["ASDCRVWITHDRAW"] = "asdCRV_withdraw";
|
|
43
44
|
return DexType2;
|
|
44
45
|
})(DexType || {});
|
|
45
46
|
var IEstimateType = /* @__PURE__ */ ((IEstimateType2) => {
|
|
@@ -245,6 +246,9 @@ var AddressConst = {
|
|
|
245
246
|
vsdcrv: {
|
|
246
247
|
eth: "0xE079ac07463ff375Ce48E8A9D76211C10696F3B8"
|
|
247
248
|
},
|
|
249
|
+
asdcrv: {
|
|
250
|
+
eth: "0x43E54C2E7b3e294De3A155785F52AB49d87B9922"
|
|
251
|
+
},
|
|
248
252
|
arb: {
|
|
249
253
|
arb: "0x912CE59144191C1204E64559FE8253a0e49E6548"
|
|
250
254
|
},
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath } from './types.js';
|
|
2
|
-
import { ChainNameEnum, AddressConst, DexType, BridgeType,
|
|
3
|
-
export type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath,
|
|
4
|
-
export { ChainNameEnum, AddressConst, DexType, BridgeType,
|
|
1
|
+
import type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath, SupportContracts } from './types.js';
|
|
2
|
+
import { ChainNameEnum, AddressConst, DexType, BridgeType, IEstimateType } from './types.js';
|
|
3
|
+
export type { IExpectParams, ISwapParams, IBridgeParams, ISwapAndBridgeParams, IReceipt, IConfig, IExpectPayload, IRouterPath, SupportContracts };
|
|
4
|
+
export { ChainNameEnum, AddressConst, DexType, BridgeType, IEstimateType };
|
|
5
5
|
declare class Hermes {
|
|
6
6
|
private config;
|
|
7
7
|
private providerMap;
|
package/dist/esm/index.js
CHANGED
|
@@ -15,7 +15,7 @@ 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 { ChainNameEnum, AddressConst, DexType, BridgeType,
|
|
18
|
+
import { ChainNameEnum, AddressConst, DexType, BridgeType, IEstimateType } from "./types.js";
|
|
19
19
|
import { ethers } from 'ethers';
|
|
20
20
|
import { Contract } from 'ethers';
|
|
21
21
|
import QuoterAbi from "./abis/quoter.js";
|
|
@@ -23,7 +23,7 @@ import AggregatorAbi from "./abis/aggregator.js";
|
|
|
23
23
|
|
|
24
24
|
// 导出所有类型定义,方便用户使用
|
|
25
25
|
|
|
26
|
-
export { ChainNameEnum, AddressConst, DexType, BridgeType,
|
|
26
|
+
export { ChainNameEnum, AddressConst, DexType, BridgeType, IEstimateType };
|
|
27
27
|
var Hermes = /*#__PURE__*/function () {
|
|
28
28
|
function Hermes(config) {
|
|
29
29
|
_classCallCheck(this, Hermes);
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -106,7 +106,8 @@ export declare enum DexType {
|
|
|
106
106
|
CURVE128PAYABLE = "curve128_payable",
|
|
107
107
|
CURVE256PAYABLE = "curve256_payable",
|
|
108
108
|
VSDCRVWITHDRAW = "vsdCRV_withdraw",
|
|
109
|
-
VSDCRVDEPOSIT = "vsdCRV_deposit"
|
|
109
|
+
VSDCRVDEPOSIT = "vsdCRV_deposit",
|
|
110
|
+
ASDCRVWITHDRAW = "asdCRV_withdraw"
|
|
110
111
|
}
|
|
111
112
|
export declare enum IEstimateType {
|
|
112
113
|
BRIDGE = "bridge",
|
|
@@ -311,6 +312,9 @@ export declare const AddressConst: {
|
|
|
311
312
|
vsdcrv: {
|
|
312
313
|
eth: string;
|
|
313
314
|
};
|
|
315
|
+
asdcrv: {
|
|
316
|
+
eth: string;
|
|
317
|
+
};
|
|
314
318
|
arb: {
|
|
315
319
|
arb: string;
|
|
316
320
|
};
|
package/dist/esm/types.js
CHANGED
|
@@ -12,6 +12,7 @@ export var DexType = /*#__PURE__*/function (DexType) {
|
|
|
12
12
|
DexType["CURVE256PAYABLE"] = "curve256_payable";
|
|
13
13
|
DexType["VSDCRVWITHDRAW"] = "vsdCRV_withdraw";
|
|
14
14
|
DexType["VSDCRVDEPOSIT"] = "vsdCRV_deposit";
|
|
15
|
+
DexType["ASDCRVWITHDRAW"] = "asdCRV_withdraw";
|
|
15
16
|
return DexType;
|
|
16
17
|
}({});
|
|
17
18
|
export var IEstimateType = /*#__PURE__*/function (IEstimateType) {
|
|
@@ -217,6 +218,9 @@ export var AddressConst = {
|
|
|
217
218
|
vsdcrv: {
|
|
218
219
|
eth: '0xE079ac07463ff375Ce48E8A9D76211C10696F3B8'
|
|
219
220
|
},
|
|
221
|
+
asdcrv: {
|
|
222
|
+
eth: '0x43E54C2E7b3e294De3A155785F52AB49d87B9922'
|
|
223
|
+
},
|
|
220
224
|
arb: {
|
|
221
225
|
arb: '0x912CE59144191C1204E64559FE8253a0e49E6548'
|
|
222
226
|
},
|