@lifi/types 1.1.0 → 1.2.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.2.1](https://github.com/lifinance/types/compare/v1.2.0...v1.2.1) (2022-07-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **coins:** remove duplicated ETH definition on AUR ([b264800](https://github.com/lifinance/types/commit/b26480088c3d5e5c4a1f442c9e15d251565416b8))
11
+
12
+ ## [1.2.0](https://github.com/lifinance/types/compare/v1.1.1...v1.2.0) (2022-07-21)
13
+
14
+
15
+ ### Features
16
+
17
+ * add custom step and contract call endpoints ([#85](https://github.com/lifinance/types/issues/85)) ([bd49fae](https://github.com/lifinance/types/commit/bd49faefc924d7a06818ab6cb3589db633c58e9c))
18
+
19
+ ### [1.1.1](https://github.com/lifinance/types/compare/v1.1.0...v1.1.1) (2022-07-21)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * remove .DS_Store files ([ccd0112](https://github.com/lifinance/types/commit/ccd01122f15f099e17eb3253a87c008f65c991ba))
25
+
5
26
  ## [1.1.0](https://github.com/lifinance/types/compare/v1.0.1...v1.1.0) (2022-07-14)
6
27
 
7
28
 
package/dist/api.d.ts CHANGED
@@ -69,7 +69,7 @@ export interface GetTokenRequest {
69
69
  chain: number | string;
70
70
  token: string;
71
71
  }
72
- interface ToolConfiguration {
72
+ export interface ToolConfiguration {
73
73
  allowBridges?: string[];
74
74
  denyBridges?: string[];
75
75
  preferBridges?: string[];
@@ -90,6 +90,43 @@ export interface QuoteRequest extends ToolConfiguration {
90
90
  integrator?: string;
91
91
  referrer?: string;
92
92
  }
93
+ export interface ContractCallQuoteRequest extends ToolConfiguration {
94
+ fromChain: number | string;
95
+ fromToken: string;
96
+ fromAddress: string;
97
+ toChain: number | string;
98
+ toToken: string;
99
+ toAmount: string;
100
+ toContractAddress: string;
101
+ toContractCallData: string;
102
+ toContractGasLimit: string;
103
+ toApprovalAddress?: string;
104
+ toFallbackAddress?: string;
105
+ contractOutputsToken?: string;
106
+ slippage?: number | string;
107
+ integrator?: string;
108
+ referrer?: string;
109
+ }
110
+ export interface ContractCallQuotesRequest extends ToolConfiguration {
111
+ fromChain: number | string;
112
+ fromToken: string;
113
+ fromAddress: string;
114
+ toChain: number | string;
115
+ toFallbackAddress?: string;
116
+ toContractCalls: {
117
+ sendingAmount: string;
118
+ sendingToken: string;
119
+ receivingToken: string;
120
+ contractAddress: string;
121
+ approvalAddress?: string;
122
+ callData: string;
123
+ gasLimit: string;
124
+ }[];
125
+ order?: Order;
126
+ slippage?: number | string;
127
+ integrator?: string;
128
+ referrer?: string;
129
+ }
93
130
  export interface ConnectionsRequest extends ToolConfiguration {
94
131
  fromChain?: number | string;
95
132
  fromToken?: string;
@@ -168,6 +205,8 @@ export declare class LifiAPI {
168
205
  getToken(request: GetTokenRequest): Promise<Token>;
169
206
  getTokens(request: TokensRequest): Promise<TokensResponse>;
170
207
  getQuote(request: QuoteRequest): Promise<Step>;
208
+ getContractCallQuote(request: ContractCallQuoteRequest): Promise<Step>;
209
+ getContractCallQuotes(request: ContractCallQuotesRequest): Promise<Step>;
171
210
  getStatus(request: GetStatusRequest): Promise<StatusResponse>;
172
211
  getTools(request: ToolsRequest): Promise<ToolsResponse>;
173
212
  getChains(): ChainsResponse;
@@ -724,7 +724,7 @@ exports.supportedEVMChains = [
724
724
  {
725
725
  key: base_1.ChainKey.AUR,
726
726
  chainType: Chain_1.ChainType.EVM,
727
- name: 'Aurora Mainnet',
727
+ name: 'Aurora',
728
728
  coin: base_1.CoinKey.ETH,
729
729
  id: 1313161554,
730
730
  mainnet: true,
package/dist/coins.js CHANGED
@@ -497,6 +497,10 @@ var basicCoins = [
497
497
  address: '0x7FF4a56B32ee13D7D4D405887E0eA37d61Ed919e',
498
498
  decimals: 6,
499
499
  },
500
+ _m[base_1.ChainId.AUR] = {
501
+ address: '0x4988a896b1227218e4A686fdE5EabdcAbd91571f',
502
+ decimals: 6,
503
+ },
500
504
  // Testnets
501
505
  _m[base_1.ChainId.ROP] = {
502
506
  address: '0x110a13fc3efe6a245b50102d2d79b3e76125ae83',
@@ -593,6 +597,10 @@ var basicCoins = [
593
597
  address: '0x51e44FfaD5C2B122C8b635671FCC8139dc636E82',
594
598
  decimals: 6,
595
599
  },
600
+ _o[base_1.ChainId.AUR] = {
601
+ address: '0xB12BFcA5A55806AaF64E99521918A4bf0fC40802',
602
+ decimals: 6,
603
+ },
596
604
  // Testnets
597
605
  _o[base_1.ChainId.ROP] = {
598
606
  address: '0x07865c6e87b9f70255377e024ace6630c1eaa37f',
@@ -720,6 +728,10 @@ var basicCoins = [
720
728
  address: '0xF80699Dc594e00aE7bA200c7533a07C1604A106D',
721
729
  decimals: 8,
722
730
  },
731
+ _q[base_1.ChainId.AUR] = {
732
+ address: '0xF4eB217Ba2454613b15dBdea6e5f22276410e89e',
733
+ decimals: 8,
734
+ },
723
735
  _q),
724
736
  },
725
737
  // > WETH
@@ -799,6 +811,10 @@ var basicCoins = [
799
811
  address: '0x5842C5532b61aCF3227679a8b1BD0242a41752f2',
800
812
  decimals: 18,
801
813
  },
814
+ _r[base_1.ChainId.AUR] = {
815
+ address: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB',
816
+ decimals: 18,
817
+ },
802
818
  // Testnets
803
819
  _r[base_1.ChainId.ROP] = {
804
820
  address: '0xc778417e063141139fce010982780140aa0cd5ab',
@@ -1248,6 +1264,15 @@ exports.wrappedTokens = (_3 = {},
1248
1264
  name: 'Wrapped Evmos',
1249
1265
  logoURI: 'https://raw.githubusercontent.com/cronus-finance/token-list/main/assets/evmos/0xD4949664cD82660AaE99bEdc034a0deA8A0bd517/logo.png',
1250
1266
  },
1267
+ _3[base_1.ChainId.AUR] = {
1268
+ address: '0x0000000000000000000000000000000000000000',
1269
+ symbol: 'AETH',
1270
+ decimals: 18,
1271
+ chainId: base_1.ChainId.AUR,
1272
+ coinKey: 'AETH',
1273
+ name: 'AETH',
1274
+ logoURI: 'https://static.debank.com/image/aurora_token/logo_url/aurora/d61441782d4a08a7479d54aea211679e.png',
1275
+ },
1251
1276
  // Testnets
1252
1277
  _3[base_1.ChainId.ROP] = {
1253
1278
  // https://ropsten.etherscan.io/token/0xc778417e063141139fce010982780140aa0cd5ab
package/dist/step.d.ts CHANGED
@@ -67,7 +67,7 @@ export interface Execution {
67
67
  toToken?: Token;
68
68
  }
69
69
  export declare const emptyExecution: Execution;
70
- export declare type StepType = 'swap' | 'cross' | 'lifi';
70
+ export declare type StepType = 'swap' | 'cross' | 'lifi' | 'custom';
71
71
  export declare type StepTool = string;
72
72
  export interface StepBase {
73
73
  id: string;
@@ -100,4 +100,16 @@ export interface LifiStep extends StepBase {
100
100
  includedSteps: Step[];
101
101
  }
102
102
  export declare function isLifiStep(step: Step): step is LifiStep;
103
- export declare type Step = SwapStep | CrossStep | LifiStep;
103
+ export interface CustomStep extends StepBase {
104
+ type: 'custom';
105
+ action: Action;
106
+ estimate: Estimate;
107
+ destinationCallInfo: {
108
+ toContractAddress: string;
109
+ toContractCallData: string;
110
+ toFallbackAddress: string;
111
+ callDataGasLimit: string;
112
+ };
113
+ }
114
+ export declare function isCustomStep(step: Step): step is CustomStep;
115
+ export declare type Step = SwapStep | CrossStep | LifiStep | CustomStep;
package/dist/step.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isLifiStep = exports.isCrossStep = exports.isSwapStep = exports.emptyExecution = void 0;
3
+ exports.isCustomStep = exports.isLifiStep = exports.isCrossStep = exports.isSwapStep = exports.emptyExecution = void 0;
4
4
  exports.emptyExecution = {
5
5
  status: 'NOT_STARTED',
6
6
  process: [],
@@ -17,3 +17,7 @@ function isLifiStep(step) {
17
17
  return step.type === 'lifi';
18
18
  }
19
19
  exports.isLifiStep = isLifiStep;
20
+ function isCustomStep(step) {
21
+ return step.type === 'custom';
22
+ }
23
+ exports.isCustomStep = isCustomStep;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",