@ref-finance/ref-sdk 1.4.4-beta.0-development → 1.4.5

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/dist/ref.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { TokenMetadata, FTStorageBalance, RefFiViewFunctionOptions } from './types';
2
2
  import { Transaction } from './types';
3
3
  export declare const REPLACE_TOKENS: string[];
4
- export declare const init_env: (env: string, indexerUrl?: string | undefined) => {
4
+ export declare const init_env: (env: string, indexerUrl?: string | undefined, nodeUrl?: string | undefined) => {
5
5
  config: {
6
6
  networkId: string;
7
7
  nodeUrl: string;
package/dist/types.d.ts CHANGED
@@ -53,6 +53,7 @@ export interface StablePool {
53
53
  rates: string[];
54
54
  pool_kind: StablePoolKind;
55
55
  partialAmountIn?: string;
56
+ degens?: string[];
56
57
  }
57
58
  export interface SmartRoutingInputPool {
58
59
  id: number;
package/dist/utils.d.ts CHANGED
@@ -2,7 +2,6 @@ import { Pool, PoolRPCView, StablePool, SmartRoutingInputPool, Transaction, Esti
2
2
  import BN from 'bn.js';
3
3
  import * as math from 'mathjs';
4
4
  import Big from 'big.js';
5
- import { SignAndSendTransactionsParams } from '@near-wallet-selector/core/lib/wallet';
6
5
  import { TokenMetadata } from './types';
7
6
  export declare const parsePool: (pool: PoolRPCView, id?: number | undefined) => Pool;
8
7
  export declare const poolFormatter: (pool: Pool) => SmartRoutingInputPool;
@@ -34,7 +33,21 @@ export declare const transformTransactions: (transactions: Transaction[], Accoun
34
33
  };
35
34
  }[];
36
35
  }[];
37
- export declare const WalletSelectorTransactions: (transactions: Transaction[], AccountId: string) => SignAndSendTransactionsParams;
36
+ export declare const WalletSelectorTransactions: (transactions: Transaction[], AccountId: string) => {
37
+ transactions: {
38
+ signerId: string;
39
+ receiverId: string;
40
+ actions: {
41
+ type: string;
42
+ params: {
43
+ methodName: string;
44
+ args: object;
45
+ gas: string;
46
+ deposit: string;
47
+ };
48
+ }[];
49
+ }[];
50
+ };
38
51
  export declare const separateRoutes: (actions: EstimateSwapView[], outputToken: string) => EstimateSwapView[][];
39
52
  export declare const calculateExchangeRate: (from: string, to: string, precision?: number | undefined) => string;
40
53
  export declare const getAvgFee: (estimates: EstimateSwapView[], outputToken: string, parsedAmountIn: string) => number;
@@ -8,7 +8,7 @@ export declare const getUnRatedPoolDetail: ({ id }: {
8
8
  export declare const getDegenPoolDetail: ({ id }: {
9
9
  id: string | number;
10
10
  }) => Promise<any>;
11
- export declare const getStablePools: (stablePools: Pool[]) => Promise<any[]>;
11
+ export declare const getStablePools: (stablePools: Pool[]) => Promise<any>;
12
12
  export declare const getPool: (id: number) => Promise<Pool>;
13
13
  export declare const getPoolByIds: (ids: number[]) => Promise<Pool[]>;
14
14
  export declare const getRefPools: (page?: number, perPage?: number) => Promise<Pool[]>;
@@ -49,6 +49,7 @@ export declare const getStablePoolEstimate: ({ tokenIn, tokenOut, amountIn, stab
49
49
  amp: number;
50
50
  pool_kind: import("../types").StablePoolKind;
51
51
  partialAmountIn?: string | undefined;
52
+ degens?: string[] | undefined;
52
53
  };
53
54
  outputToken: string;
54
55
  inputToken: string;
@@ -78,6 +79,7 @@ export declare const singlePoolSwap: ({ tokenIn, tokenOut, simplePools, amountIn
78
79
  amp: number;
79
80
  pool_kind: import("../types").StablePoolKind;
80
81
  partialAmountIn?: string | undefined;
82
+ degens?: string[] | undefined;
81
83
  };
82
84
  outputToken: string;
83
85
  inputToken: string;
@@ -118,6 +120,7 @@ export declare const getPoolEstimate: ({ tokenIn, tokenOut, amountIn, stablePool
118
120
  amp: number;
119
121
  pool_kind: import("../types").StablePoolKind;
120
122
  partialAmountIn?: string | undefined;
123
+ degens?: string[] | undefined;
121
124
  };
122
125
  outputToken: string;
123
126
  inputToken: string;
@@ -143,7 +146,7 @@ export declare function getHybridStableSmart(tokenIn: TokenMetadata, tokenOut: T
143
146
  tvl: number;
144
147
  token0_ref_price: string;
145
148
  Dex?: string | undefined;
146
- pool_kind?: "STABLE_SWAP" | "RATED_SWAP" | "SIMPLE_POOL" | undefined;
149
+ pool_kind?: "STABLE_SWAP" | "RATED_SWAP" | "DEGEN_SWAP" | "SIMPLE_POOL" | undefined;
147
150
  rates?: {
148
151
  [id: string]: string;
149
152
  } | undefined;
@@ -159,6 +162,7 @@ export declare function getHybridStableSmart(tokenIn: TokenMetadata, tokenOut: T
159
162
  shares_total_supply: string;
160
163
  amp: number;
161
164
  pool_kind: import("../types").StablePoolKind;
165
+ degens?: string[] | undefined;
162
166
  };
163
167
  tokens: TokenMetadata[];
164
168
  inputToken: string;
@@ -181,7 +185,7 @@ export declare function getHybridStableSmart(tokenIn: TokenMetadata, tokenOut: T
181
185
  tvl: number;
182
186
  token0_ref_price: string;
183
187
  Dex?: string | undefined;
184
- pool_kind?: "STABLE_SWAP" | "RATED_SWAP" | "SIMPLE_POOL" | undefined;
188
+ pool_kind?: "STABLE_SWAP" | "RATED_SWAP" | "DEGEN_SWAP" | "SIMPLE_POOL" | undefined;
185
189
  rates?: {
186
190
  [id: string]: string;
187
191
  } | undefined;
@@ -197,6 +201,7 @@ export declare function getHybridStableSmart(tokenIn: TokenMetadata, tokenOut: T
197
201
  shares_total_supply: string;
198
202
  amp: number;
199
203
  pool_kind: import("../types").StablePoolKind;
204
+ degens?: string[] | undefined;
200
205
  };
201
206
  tokens: TokenMetadata[];
202
207
  inputToken: string;
@@ -225,6 +230,7 @@ export declare function getHybridStableSmart(tokenIn: TokenMetadata, tokenOut: T
225
230
  amp: number;
226
231
  pool_kind: import("../types").StablePoolKind;
227
232
  partialAmountIn?: string | undefined;
233
+ degens?: string[] | undefined;
228
234
  };
229
235
  } | {
230
236
  tokens: TokenMetadata[];
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.4-beta.0-development",
2
+ "version": "1.4.5",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",