@lifi/types 1.18.0 → 1.20.0

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,43 @@
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.20.0](https://github.com/lifinance/types/compare/v1.19.0...v1.20.0) (2022-12-21)
6
+
7
+
8
+ ### Features
9
+
10
+ * add types for quests ([#116](https://github.com/lifinance/types/issues/116)) ([ce923d3](https://github.com/lifinance/types/commit/ce923d311ce3921c736ae75e3316fb66415b98b4))
11
+
12
+ ## [1.19.0](https://github.com/lifinance/types/compare/v1.8.0...v1.19.0) (2022-12-09)
13
+
14
+
15
+ ### Features
16
+
17
+ * add arbitrum goerli ([a6cc01d](https://github.com/lifinance/types/commit/a6cc01d7573fd39630d7cbbb60ff23dfd693f952))
18
+ * add execution gas info and substatus ([#115](https://github.com/lifinance/types/issues/115)) ([ac32647](https://github.com/lifinance/types/commit/ac326472ad25f28486ba0b901b747d0559707742))
19
+ * add gas info in tx info ([#111](https://github.com/lifinance/types/issues/111)) ([d56277d](https://github.com/lifinance/types/commit/d56277dd22ad19fded6e0aa2a7d5ee2c67861f19))
20
+ * add gnosis bridge logo ([#101](https://github.com/lifinance/types/issues/101)) ([47c322e](https://github.com/lifinance/types/commit/47c322e3c10a92a7c3bccd73461ae5a1da61e415))
21
+ * add Pangolin DEX on AVA ([#110](https://github.com/lifinance/types/issues/110)) ([6f85bf1](https://github.com/lifinance/types/commit/6f85bf19f7be34e9866840134d0bb18a11cef1ec))
22
+ * add solana tokens to coins ([#112](https://github.com/lifinance/types/issues/112)) ([c848cdc](https://github.com/lifinance/types/commit/c848cdc6ff8b9b247e19ad46f6ff40c082e034e9))
23
+ * add support for token symbols in /routes ([#107](https://github.com/lifinance/types/issues/107)) ([b149aa0](https://github.com/lifinance/types/commit/b149aa0f43b3a9e78beb7b2e536979bbb6766ade))
24
+ * **api:** include nativeToken in chains response ([#104](https://github.com/lifinance/types/issues/104)) ([caf6262](https://github.com/lifinance/types/commit/caf6262ca634e063d832f0495710cb5b54a8f3ae))
25
+ * extend interface with integrator fee methods ([#99](https://github.com/lifinance/types/issues/99)) ([75f107f](https://github.com/lifinance/types/commit/75f107fc06dfbb9312f9026a68676d499c2a188b))
26
+ * moved lifiApi class to the backend ([#106](https://github.com/lifinance/types/issues/106)) ([b416a9c](https://github.com/lifinance/types/commit/b416a9c716423465faa26ae7aca6f652ba5c9587))
27
+ * **omni:** add logo for omni bridge ([#105](https://github.com/lifinance/types/issues/105)) ([64ed097](https://github.com/lifinance/types/commit/64ed097fead9ccbcd6cd60dbf9df2ffdada6cec9))
28
+ * update multicall addresses ([c2f9c3c](https://github.com/lifinance/types/commit/c2f9c3c4156471ee791aa5730baae595d25fddcc))
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * a lifi step should always have includedSteps ([#118](https://github.com/lifinance/types/issues/118)) ([e0b662b](https://github.com/lifinance/types/commit/e0b662b240f7ce5f5a5de8fc533a339f31e1ef76))
34
+ * adjust Arbitrum One name ([#102](https://github.com/lifinance/types/issues/102)) ([530ba68](https://github.com/lifinance/types/commit/530ba68e415c2c6e279aa60749ffaf1cbd579ef1))
35
+ * align integrator withdrawal endpoint ([4de24fb](https://github.com/lifinance/types/commit/4de24fb25795d44053dfa27e09b5716fdf63ea57))
36
+ * **EVMOS:** fix name of native evmos coin ([#103](https://github.com/lifinance/types/issues/103)) ([60490c0](https://github.com/lifinance/types/commit/60490c000e3fea06eca415e1c53619ff46ba1208))
37
+ * export ExtendedChain ([73f3cc5](https://github.com/lifinance/types/commit/73f3cc5007973aad48cdb59b4f93542e8cc2541d))
38
+ * replaced nomad versions of tokens with multichain ([#100](https://github.com/lifinance/types/issues/100)) ([e5b2726](https://github.com/lifinance/types/commit/e5b2726e5cb66e56e8716dab667342b4642dc1ca))
39
+ * revert changes in /routes ([#109](https://github.com/lifinance/types/issues/109)) ([5fd4234](https://github.com/lifinance/types/commit/5fd4234ccab68ad8558180a3923d6e363eb5ce1d))
40
+ * update solana supported chains to include network information ([#117](https://github.com/lifinance/types/issues/117)) ([f3bb532](https://github.com/lifinance/types/commit/f3bb5329f4c034521170b05d64286b4fd2cd3a0c))
41
+
5
42
  ## [1.18.0](https://github.com/lifinance/types/compare/v1.17.1...v1.18.0) (2022-11-23)
6
43
 
7
44
 
@@ -1,2 +1,7 @@
1
1
  import { _Chain } from './Chain';
2
- export type SolanaChain = _Chain;
2
+ import { AddEthereumChainParameter } from './EVMChain';
3
+ export interface SolanaChain extends _Chain {
4
+ tokenlistUrl?: string;
5
+ metamask: AddEthereumChainParameter;
6
+ multicallAddress?: string;
7
+ }
@@ -1,8 +1,9 @@
1
- import { supportedEVMChains } from './supported.chains';
1
+ import { supportedEVMChains, supportedSolanaChains } from './supported.chains';
2
2
  const supportedChains = [
3
3
  // This will be added in the future
4
4
  // ...supportedSolanaChains,
5
5
  ...supportedEVMChains,
6
+ ...supportedSolanaChains,
6
7
  ];
7
8
  export const getChainByKey = (chainKey) => {
8
9
  const chain = supportedChains.find((c) => c.key === chainKey);
@@ -1207,9 +1207,24 @@ export const supportedSolanaChains = [
1207
1207
  mainnet: true,
1208
1208
  logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/solana.svg',
1209
1209
  faucetUrls: ['https://stakely.io/faucet/solana-sol'],
1210
+ metamask: {
1211
+ chainId: ChainId.SOL.toString(),
1212
+ blockExplorerUrls: [
1213
+ 'https://explorer.solana.com/',
1214
+ 'https://solscan.io/',
1215
+ 'https://solana.fm/',
1216
+ ],
1217
+ chainName: 'Solana',
1218
+ nativeCurrency: {
1219
+ name: 'SOL',
1220
+ symbol: 'SOL',
1221
+ decimals: 9,
1222
+ },
1223
+ rpcUrls: ['https://api.mainnet-beta.solana.com'],
1224
+ },
1210
1225
  },
1211
1226
  ];
1212
1227
  // This assignment is required to avoid breaking
1213
1228
  // changes with the new non EVM support types release
1214
1229
  // This will be removed in the future
1215
- export const supportedChains = supportedEVMChains;
1230
+ export const supportedChains = [...supportedEVMChains, ...supportedSolanaChains];
@@ -1,2 +1,7 @@
1
1
  import { _Chain } from './Chain';
2
- export type SolanaChain = _Chain;
2
+ import { AddEthereumChainParameter } from './EVMChain';
3
+ export interface SolanaChain extends _Chain {
4
+ tokenlistUrl?: string;
5
+ metamask: AddEthereumChainParameter;
6
+ multicallAddress?: string;
7
+ }
@@ -6,6 +6,7 @@ const supportedChains = [
6
6
  // This will be added in the future
7
7
  // ...supportedSolanaChains,
8
8
  ...supported_chains_1.supportedEVMChains,
9
+ ...supported_chains_1.supportedSolanaChains,
9
10
  ];
10
11
  const getChainByKey = (chainKey) => {
11
12
  const chain = supportedChains.find((c) => c.key === chainKey);
@@ -1210,9 +1210,24 @@ exports.supportedSolanaChains = [
1210
1210
  mainnet: true,
1211
1211
  logoURI: 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/solana.svg',
1212
1212
  faucetUrls: ['https://stakely.io/faucet/solana-sol'],
1213
+ metamask: {
1214
+ chainId: base_1.ChainId.SOL.toString(),
1215
+ blockExplorerUrls: [
1216
+ 'https://explorer.solana.com/',
1217
+ 'https://solscan.io/',
1218
+ 'https://solana.fm/',
1219
+ ],
1220
+ chainName: 'Solana',
1221
+ nativeCurrency: {
1222
+ name: 'SOL',
1223
+ symbol: 'SOL',
1224
+ decimals: 9,
1225
+ },
1226
+ rpcUrls: ['https://api.mainnet-beta.solana.com'],
1227
+ },
1213
1228
  },
1214
1229
  ];
1215
1230
  // This assignment is required to avoid breaking
1216
1231
  // changes with the new non EVM support types release
1217
1232
  // This will be removed in the future
1218
- exports.supportedChains = exports.supportedEVMChains;
1233
+ exports.supportedChains = [...exports.supportedEVMChains, ...exports.supportedSolanaChains];
@@ -6,3 +6,4 @@ export * from './exchanges';
6
6
  export * from './step';
7
7
  export * from './api';
8
8
  export * from './multicall';
9
+ export * from './quests';
package/dist/cjs/index.js CHANGED
@@ -22,3 +22,4 @@ __exportStar(require("./exchanges"), exports);
22
22
  __exportStar(require("./step"), exports);
23
23
  __exportStar(require("./api"), exports);
24
24
  __exportStar(require("./multicall"), exports);
25
+ __exportStar(require("./quests"), exports);
@@ -0,0 +1,24 @@
1
+ export interface BaseQuest {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ }
6
+ export interface QuestStatus extends BaseQuest {
7
+ completed: boolean;
8
+ }
9
+ export type GetQuestStatusRequest = {
10
+ questId: string;
11
+ walletAddress: string;
12
+ };
13
+ export type GetQuestsStatusRequest = {
14
+ walletAddress: string;
15
+ };
16
+ export type GetQuestStatusResponse = {
17
+ quest: QuestStatus;
18
+ };
19
+ export type GetQuestsStatusResponse = {
20
+ quests: QuestStatus[];
21
+ };
22
+ export type GetAllQuestsResponse = {
23
+ quests: BaseQuest[];
24
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/cjs/step.js CHANGED
@@ -14,7 +14,7 @@ function isCrossStep(step) {
14
14
  }
15
15
  exports.isCrossStep = isCrossStep;
16
16
  function isLifiStep(step) {
17
- return step.type === 'lifi';
17
+ return (step.type === 'lifi' && step.includedSteps && step.includedSteps.length > 0);
18
18
  }
19
19
  exports.isLifiStep = isLifiStep;
20
20
  function isCustomStep(step) {
package/dist/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './exchanges';
6
6
  export * from './step';
7
7
  export * from './api';
8
8
  export * from './multicall';
9
+ export * from './quests';
package/dist/index.js CHANGED
@@ -6,3 +6,4 @@ export * from './exchanges';
6
6
  export * from './step';
7
7
  export * from './api';
8
8
  export * from './multicall';
9
+ export * from './quests';
@@ -0,0 +1,24 @@
1
+ export interface BaseQuest {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ }
6
+ export interface QuestStatus extends BaseQuest {
7
+ completed: boolean;
8
+ }
9
+ export type GetQuestStatusRequest = {
10
+ questId: string;
11
+ walletAddress: string;
12
+ };
13
+ export type GetQuestsStatusRequest = {
14
+ walletAddress: string;
15
+ };
16
+ export type GetQuestStatusResponse = {
17
+ quest: QuestStatus;
18
+ };
19
+ export type GetQuestsStatusResponse = {
20
+ quests: QuestStatus[];
21
+ };
22
+ export type GetAllQuestsResponse = {
23
+ quests: BaseQuest[];
24
+ };
package/dist/quests.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/step.js CHANGED
@@ -9,7 +9,7 @@ export function isCrossStep(step) {
9
9
  return step.type === 'cross';
10
10
  }
11
11
  export function isLifiStep(step) {
12
- return step.type === 'lifi';
12
+ return (step.type === 'lifi' && step.includedSteps && step.includedSteps.length > 0);
13
13
  }
14
14
  export function isCustomStep(step) {
15
15
  return step.type === 'custom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/types",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "Types for the LI.FI stack",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/index.js",