@ichidao/ichi-vaults-sdk 0.0.1 → 0.0.3

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.
@@ -2,13 +2,14 @@
2
2
  /**
3
3
  * @license
4
4
  * author: ICHI DAO <core@ichi.org>
5
- * ichi-vaults-sdk.js v0.0.1
5
+ * ichi-vaults-sdk.js v0.0.3
6
6
  * Released under the MIT license.
7
7
  */
8
8
 
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  var tslib_1 = require("tslib");
11
11
  /* eslint-disable import/prefer-default-export */
12
+ // eslint-disable-next-line import/no-cycle
12
13
  tslib_1.__exportStar(require("./functions/balances"), exports);
13
14
  tslib_1.__exportStar(require("./functions/deposit"), exports);
14
15
  tslib_1.__exportStar(require("./functions/withdraw"), exports);
package/dist/src/index.js CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* eslint-disable import/prefer-default-export */
18
+ // eslint-disable-next-line import/no-cycle
18
19
  __exportStar(require("./functions/balances"), exports);
19
20
  __exportStar(require("./functions/deposit"), exports);
20
21
  __exportStar(require("./functions/withdraw"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAAiD;AACjD,uDAAqC;AACrC,sDAAoC;AACpC,uDAAqC;AACrC,oDAAkC;AAClC,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAAiD;AACjD,2CAA2C;AAC3C,uDAAqC;AACrC,sDAAoC;AACpC,uDAAqC;AACrC,oDAAkC;AAClC,gDAA8B"}
@@ -1,3 +1,4 @@
1
1
  import { SupportedDex, SupportedChainId } from '../types';
2
- import { VaultQueryData } from '../types/vaultQueryData';
2
+ import { VaultQueryData, VaultsByTokensQueryData } from '../types/vaultQueryData';
3
3
  export declare function getIchiVaultInfo(chainId: SupportedChainId, dex: SupportedDex, vaultAddress: string): Promise<VaultQueryData['ichiVault']>;
4
+ export declare function getVaultsByTokens(chainId: SupportedChainId, dex: SupportedDex, depositTokenAddress: string, pairedTokenAddress: string): Promise<VaultsByTokensQueryData['ichiVaults']>;
@@ -11,7 +11,8 @@ export declare enum SupportedChainId {
11
11
  export declare enum SupportedDex {
12
12
  UniswapV3 = 0,
13
13
  Retro = 1,
14
- Pancakeswap = 2
14
+ Pancakeswap = 2,
15
+ Ramses = 3
15
16
  }
16
17
  export declare const ichiVaultDecimals = 18;
17
18
  export type TotalAmountsBN = [BigNumber, BigNumber] & {
@@ -30,3 +31,10 @@ export type UserAmounts = [string, string] & {
30
31
  amount0: string;
31
32
  amount1: string;
32
33
  };
34
+ export interface IchiVault {
35
+ id: string;
36
+ tokenA: string;
37
+ tokenB: string;
38
+ allowTokenA: boolean;
39
+ allowTokenB: boolean;
40
+ }
@@ -1,10 +1,7 @@
1
- export interface IchiVault {
2
- id: string;
3
- tokenA: string;
4
- tokenB: string;
5
- allowTokenA: boolean;
6
- allowTokenB: boolean;
7
- }
1
+ import { IchiVault } from '..';
8
2
  export interface VaultQueryData {
9
3
  ichiVault: IchiVault;
10
4
  }
5
+ export interface VaultsByTokensQueryData {
6
+ ichiVaults: IchiVault[];
7
+ }
@@ -11,7 +11,8 @@ export declare enum SupportedChainId {
11
11
  export declare enum SupportedDex {
12
12
  UniswapV3 = 0,
13
13
  Retro = 1,
14
- Pancakeswap = 2
14
+ Pancakeswap = 2,
15
+ Ramses = 3
15
16
  }
16
17
  export declare const ichiVaultDecimals = 18;
17
18
  export type TotalAmountsBN = [BigNumber, BigNumber] & {
@@ -30,3 +31,10 @@ export type UserAmounts = [string, string] & {
30
31
  amount0: string;
31
32
  amount1: string;
32
33
  };
34
+ export interface IchiVault {
35
+ id: string;
36
+ tokenA: string;
37
+ tokenB: string;
38
+ allowTokenA: boolean;
39
+ allowTokenB: boolean;
40
+ }
@@ -13,6 +13,7 @@ var SupportedDex;
13
13
  SupportedDex[SupportedDex["UniswapV3"] = 0] = "UniswapV3";
14
14
  SupportedDex[SupportedDex["Retro"] = 1] = "Retro";
15
15
  SupportedDex[SupportedDex["Pancakeswap"] = 2] = "Pancakeswap";
16
+ SupportedDex[SupportedDex["Ramses"] = 3] = "Ramses";
16
17
  })(SupportedDex = exports.SupportedDex || (exports.SupportedDex = {}));
17
18
  exports.ichiVaultDecimals = 18;
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAOA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,mEAAgB,CAAA;IAChB,6DAAW,CAAA;IACX,+DAAa,CAAA;IACb,sDAAQ,CAAA;AACV,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,yDAAS,CAAA;IACT,iDAAK,CAAA;IACL,6DAAW,CAAA;AACb,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAEY,QAAA,iBAAiB,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;AAOA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,mEAAgB,CAAA;IAChB,6DAAW,CAAA;IACX,+DAAa,CAAA;IACb,sDAAQ,CAAA;AACV,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAED,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,yDAAS,CAAA;IACT,iDAAK,CAAA;IACL,6DAAW,CAAA;IACX,mDAAM,CAAA;AACR,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAEY,QAAA,iBAAiB,GAAG,EAAE,CAAC"}
@@ -1,10 +1,7 @@
1
- export interface IchiVault {
2
- id: string;
3
- tokenA: string;
4
- tokenB: string;
5
- allowTokenA: boolean;
6
- allowTokenB: boolean;
7
- }
1
+ import { IchiVault } from '..';
8
2
  export interface VaultQueryData {
9
3
  ichiVault: IchiVault;
10
4
  }
5
+ export interface VaultsByTokensQueryData {
6
+ ichiVaults: IchiVault[];
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichidao/ichi-vaults-sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "The ICHI Vaults SDK",
5
5
  "main": "dist/src/index.cjs.js",
6
6
  "module": "dist/src/index.esm.js",