@1delta/bridge-configs 0.1.7 → 0.1.9
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/configs/test/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAEjB,MAAM,qBAAqB,CAAA;AA2B5B,eAAO,MAAM,UAAU,EAAE,gBAiCxB,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { normalizeDecimals } from '@1delta/lib-utils';
|
|
2
|
+
const NAME = 'test';
|
|
3
|
+
const errorCodes = {
|
|
4
|
+
ERROR: { code: 'ERROR', message: 'unknown error' },
|
|
5
|
+
};
|
|
6
|
+
const responseMapping = {
|
|
7
|
+
name: 'aggregator',
|
|
8
|
+
depositContract: 'tx.to',
|
|
9
|
+
toAmount: 'quote',
|
|
10
|
+
fee: {
|
|
11
|
+
destinationGasFee: 'destinationFee',
|
|
12
|
+
},
|
|
13
|
+
estimatedDuration: {
|
|
14
|
+
format: (data) => 0,
|
|
15
|
+
},
|
|
16
|
+
transactionData: {
|
|
17
|
+
data: 'tx.data',
|
|
18
|
+
value: 'tx.value',
|
|
19
|
+
to: 'tx.to',
|
|
20
|
+
},
|
|
21
|
+
interfaceParamData: {},
|
|
22
|
+
};
|
|
23
|
+
export const testConfig = {
|
|
24
|
+
name: NAME,
|
|
25
|
+
icon: {
|
|
26
|
+
light: 'test',
|
|
27
|
+
dark: 'test',
|
|
28
|
+
},
|
|
29
|
+
apiInterface: {
|
|
30
|
+
route: {
|
|
31
|
+
execute: async (crossChainParamsData) => {
|
|
32
|
+
const { fromAmount, fromTokenDecimals, toTokenDecimals } = crossChainParamsData;
|
|
33
|
+
const quote = normalizeDecimals(BigInt(fromAmount), fromTokenDecimals, toTokenDecimals);
|
|
34
|
+
return {
|
|
35
|
+
aggregator: NAME,
|
|
36
|
+
quote: quote.toString(),
|
|
37
|
+
destinationFee: 0,
|
|
38
|
+
tx: {
|
|
39
|
+
data: '0x00000000',
|
|
40
|
+
value: '0',
|
|
41
|
+
to: '0x0000000000000000000000000000000000000000',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
responseMapping,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
errorCodes,
|
|
49
|
+
};
|
|
50
|
+
export default testConfig;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './configs/axelar/data/axelarConfig';
|
|
|
4
4
|
export * from './configs/axelar/data/squidChains';
|
|
5
5
|
export * from './configs/axelar/route';
|
|
6
6
|
export { getCowSwapSlippage } from './configs/cowswap/utils/getCowSwapSlippage';
|
|
7
|
+
export { testConfig } from './configs/test/config';
|
|
7
8
|
export * from './types';
|
|
8
9
|
export * from './walletClient';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,2BAA2B,CAAA;AACzC,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAC/E,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,2BAA2B,CAAA;AACzC,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4,5 +4,6 @@ export * from './configs/axelar/data/axelarConfig';
|
|
|
4
4
|
export * from './configs/axelar/data/squidChains';
|
|
5
5
|
export * from './configs/axelar/route';
|
|
6
6
|
export { getCowSwapSlippage } from './configs/cowswap/utils/getCowSwapSlippage';
|
|
7
|
+
export { testConfig } from './configs/test/config';
|
|
7
8
|
export * from './types';
|
|
8
9
|
export * from './walletClient';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1delta/bridge-configs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Bridge and aggregator configurations for 1Delta",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"typescript": "^5.9.3"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@cowprotocol/cow-sdk": "^7.2.
|
|
14
|
+
"@cowprotocol/cow-sdk": "^7.2.9",
|
|
15
15
|
"@cowprotocol/sdk-viem-adapter": "^0.3.0",
|
|
16
|
-
"@mayanfinance/swap-sdk": "^12.
|
|
16
|
+
"@mayanfinance/swap-sdk": "^12.2.3",
|
|
17
17
|
"axios": "^1.13.2",
|
|
18
18
|
"lodash": "^4.17.21",
|
|
19
|
-
"viem": "^2.
|
|
19
|
+
"viem": "^2.43.5",
|
|
20
20
|
"@1delta/bridge-core": "0.1.3",
|
|
21
|
-
"@1delta/lib-utils": "0.1.
|
|
21
|
+
"@1delta/lib-utils": "0.1.10"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsc --project tsconfig.json",
|