@strkfarm/sdk 1.1.58 → 1.1.59

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.
@@ -49159,6 +49159,7 @@ ${JSON.stringify(data, null, 2)}`;
49159
49159
  decimals: 8,
49160
49160
  coingeckId: void 0,
49161
49161
  displayDecimals: 6,
49162
+ priceProxySymbol: "WBTC",
49162
49163
  priceCheckAmount: 1e-3
49163
49164
  // 112000 * 0.0001 = $110.2
49164
49165
  }, {
@@ -49181,8 +49182,9 @@ ${JSON.stringify(data, null, 2)}`;
49181
49182
  decimals: 18,
49182
49183
  coingeckId: void 0,
49183
49184
  displayDecimals: 6,
49184
- priceCheckAmount: 1e-3
49185
+ priceCheckAmount: 1e-3,
49185
49186
  // 112000 * 0.0001 = $110.2
49187
+ priceProxySymbol: "WBTC"
49186
49188
  }, {
49187
49189
  name: "xLBTC",
49188
49190
  symbol: "xLBTC",
@@ -49462,6 +49464,7 @@ ${JSON.stringify(data, null, 2)}`;
49462
49464
  throw new Error("Not implemented");
49463
49465
  }
49464
49466
  async _getPriceEkubo(token, amountIn = new Web3Number(1, token.decimals), retry = 0) {
49467
+ logger2.verbose(`Getting price of ${token.symbol} using Ekubo, amountIn: ${amountIn.toWei()}`);
49465
49468
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
49466
49469
  const result2 = await axios_default.get(url);
49467
49470
  const data = result2.data;
@@ -239,6 +239,7 @@ var defaultTokens = [{
239
239
  decimals: 8,
240
240
  coingeckId: void 0,
241
241
  displayDecimals: 6,
242
+ priceProxySymbol: "WBTC",
242
243
  priceCheckAmount: 1e-3
243
244
  // 112000 * 0.0001 = $110.2
244
245
  }, {
@@ -261,8 +262,9 @@ var defaultTokens = [{
261
262
  decimals: 18,
262
263
  coingeckId: void 0,
263
264
  displayDecimals: 6,
264
- priceCheckAmount: 1e-3
265
+ priceCheckAmount: 1e-3,
265
266
  // 112000 * 0.0001 = $110.2
267
+ priceProxySymbol: "WBTC"
266
268
  }, {
267
269
  name: "xLBTC",
268
270
  symbol: "xLBTC",
@@ -542,6 +544,7 @@ var Pricer = class extends PricerBase {
542
544
  throw new Error("Not implemented");
543
545
  }
544
546
  async _getPriceEkubo(token, amountIn = new Web3Number(1, token.decimals), retry = 0) {
547
+ logger.verbose(`Getting price of ${token.symbol} using Ekubo, amountIn: ${amountIn.toWei()}`);
545
548
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
546
549
  const result = await axios2.get(url);
547
550
  const data = result.data;
package/dist/index.js CHANGED
@@ -386,6 +386,7 @@ var defaultTokens = [{
386
386
  decimals: 8,
387
387
  coingeckId: void 0,
388
388
  displayDecimals: 6,
389
+ priceProxySymbol: "WBTC",
389
390
  priceCheckAmount: 1e-3
390
391
  // 112000 * 0.0001 = $110.2
391
392
  }, {
@@ -408,8 +409,9 @@ var defaultTokens = [{
408
409
  decimals: 18,
409
410
  coingeckId: void 0,
410
411
  displayDecimals: 6,
411
- priceCheckAmount: 1e-3
412
+ priceCheckAmount: 1e-3,
412
413
  // 112000 * 0.0001 = $110.2
414
+ priceProxySymbol: "WBTC"
413
415
  }, {
414
416
  name: "xLBTC",
415
417
  symbol: "xLBTC",
@@ -689,6 +691,7 @@ var Pricer = class extends PricerBase {
689
691
  throw new Error("Not implemented");
690
692
  }
691
693
  async _getPriceEkubo(token, amountIn = new Web3Number(1, token.decimals), retry = 0) {
694
+ logger.verbose(`Getting price of ${token.symbol} using Ekubo, amountIn: ${amountIn.toWei()}`);
692
695
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
693
696
  const result = await import_axios2.default.get(url);
694
697
  const data = result.data;
package/dist/index.mjs CHANGED
@@ -280,6 +280,7 @@ var defaultTokens = [{
280
280
  decimals: 8,
281
281
  coingeckId: void 0,
282
282
  displayDecimals: 6,
283
+ priceProxySymbol: "WBTC",
283
284
  priceCheckAmount: 1e-3
284
285
  // 112000 * 0.0001 = $110.2
285
286
  }, {
@@ -302,8 +303,9 @@ var defaultTokens = [{
302
303
  decimals: 18,
303
304
  coingeckId: void 0,
304
305
  displayDecimals: 6,
305
- priceCheckAmount: 1e-3
306
+ priceCheckAmount: 1e-3,
306
307
  // 112000 * 0.0001 = $110.2
308
+ priceProxySymbol: "WBTC"
307
309
  }, {
308
310
  name: "xLBTC",
309
311
  symbol: "xLBTC",
@@ -583,6 +585,7 @@ var Pricer = class extends PricerBase {
583
585
  throw new Error("Not implemented");
584
586
  }
585
587
  async _getPriceEkubo(token, amountIn = new Web3Number(1, token.decimals), retry = 0) {
588
+ logger.verbose(`Getting price of ${token.symbol} using Ekubo, amountIn: ${amountIn.toWei()}`);
586
589
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
587
590
  const result = await axios2.get(url);
588
591
  const data = result.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "1.1.58",
3
+ "version": "1.1.59",
4
4
  "description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
5
5
  "typings": "dist/index.d.ts",
6
6
  "types": "dist/index.d.ts",
package/src/global.ts CHANGED
@@ -105,6 +105,7 @@ const defaultTokens: TokenInfo[] = [{
105
105
  decimals: 8,
106
106
  coingeckId: undefined,
107
107
  displayDecimals: 6,
108
+ priceProxySymbol: 'WBTC',
108
109
  priceCheckAmount: 0.001, // 112000 * 0.0001 = $110.2
109
110
  }, {
110
111
  name: 'xsBTC',
@@ -126,6 +127,7 @@ const defaultTokens: TokenInfo[] = [{
126
127
  coingeckId: undefined,
127
128
  displayDecimals: 6,
128
129
  priceCheckAmount: 0.001, // 112000 * 0.0001 = $110.2
130
+ priceProxySymbol: 'WBTC',
129
131
  }, {
130
132
  name: 'xLBTC',
131
133
  symbol: 'xLBTC',
@@ -201,6 +201,7 @@ export class Pricer extends PricerBase {
201
201
  }
202
202
 
203
203
  async _getPriceEkubo(token: TokenInfo, amountIn = new Web3Number(1, token.decimals), retry = 0): Promise<number> {
204
+ logger.verbose(`Getting price of ${token.symbol} using Ekubo, amountIn: ${amountIn.toWei()}`);
204
205
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
205
206
  const result = await axios.get(url);
206
207
  const data: any = result.data;