@1delta/bridge-configs 0.1.8 → 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,4 @@
1
+ import { CrossChainConfig } from '@1delta/bridge-core';
2
+ export declare const testConfig: CrossChainConfig;
3
+ export default testConfig;
4
+ //# sourceMappingURL=config.d.ts.map
@@ -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
@@ -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';
@@ -4202,8 +4202,6 @@ export declare const getWalletClient: () => {
4202
4202
  authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
4203
4203
  } ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)> ? T_4 extends "legacy" ? import("viem").TransactionSerializedLegacy : never : never : never)>>;
4204
4204
  signTypedData: <const typedData extends {
4205
- [key: string]: unknown;
4206
- } | {
4207
4205
  [x: string]: readonly import("viem").TypedDataParameter[];
4208
4206
  [x: `address[${string}]`]: undefined;
4209
4207
  [x: `bool[${string}]`]: undefined;
@@ -4408,6 +4406,8 @@ export declare const getWalletClient: () => {
4408
4406
  uint240?: undefined;
4409
4407
  uint248?: undefined;
4410
4408
  uint256?: undefined;
4409
+ } | {
4410
+ [key: string]: unknown;
4411
4411
  }, primaryType extends string>(args: import("viem").SignTypedDataParameters<typedData, primaryType, import("viem").Account | undefined>) => Promise<import("viem").SignTypedDataReturnType>;
4412
4412
  switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
4413
4413
  waitForCallsStatus: (parameters: import("viem").WaitForCallsStatusParameters) => Promise<import("viem").WaitForCallsStatusReturnType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1delta/bridge-configs",
3
- "version": "0.1.8",
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.3",
14
+ "@cowprotocol/cow-sdk": "^7.2.9",
15
15
  "@cowprotocol/sdk-viem-adapter": "^0.3.0",
16
- "@mayanfinance/swap-sdk": "^12.1.0",
16
+ "@mayanfinance/swap-sdk": "^12.2.3",
17
17
  "axios": "^1.13.2",
18
18
  "lodash": "^4.17.21",
19
- "viem": "^2.41.2",
20
- "@1delta/lib-utils": "0.1.8",
21
- "@1delta/bridge-core": "0.1.3"
19
+ "viem": "^2.43.5",
20
+ "@1delta/bridge-core": "0.1.3",
21
+ "@1delta/lib-utils": "0.1.10"
22
22
  },
23
23
  "scripts": {
24
24
  "build": "tsc --project tsconfig.json",