@defillama/sdk 5.0.172 → 5.0.173

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.
@@ -56,6 +56,28 @@ export declare class Balances {
56
56
  }[];
57
57
  };
58
58
  }>;
59
+ debug({ printTokenTable, minTokenUSDValue }?: {
60
+ printTokenTable?: boolean;
61
+ minTokenUSDValue?: number;
62
+ }): Promise<{
63
+ usdTvl: number;
64
+ usdTokenBalances: BalancesV1;
65
+ rawTokenBalances: BalancesV1;
66
+ labelBreakdown?: {
67
+ [key: string]: number;
68
+ } | undefined;
69
+ debugData?: {
70
+ tokenData: {
71
+ balance: string | number;
72
+ price: number;
73
+ decimals: number;
74
+ value: number;
75
+ confidence: number;
76
+ token: string;
77
+ symbol: string;
78
+ }[];
79
+ } | undefined;
80
+ }>;
59
81
  resizeBy(ratio: number): this;
60
82
  static getUSDValue(balances: BalancesV1, timestamp?: number): Promise<number>;
61
83
  static getUSDString(balances: BalancesV1, timestamp?: number): Promise<string>;
package/build/Balances.js CHANGED
@@ -185,6 +185,9 @@ class Balances {
185
185
  }
186
186
  return response;
187
187
  }
188
+ async debug({ printTokenTable = true, minTokenUSDValue } = {}) {
189
+ return this.getUSDJSONs({ debug: true, debugOptions: { printTokenTable, minTokenUSDValue } });
190
+ }
188
191
  resizeBy(ratio) {
189
192
  Object.keys(this._balances).forEach((token) => {
190
193
  this._balances[token] = Number(this._balances[token]) * ratio;
@@ -204,7 +204,7 @@ const DEPLOYMENT_BLOCK = {
204
204
  xrplevm: 1,
205
205
  katana: 1,
206
206
  mint: 1,
207
- btnx: 1,
207
+ btnx: 516999,
208
208
  vechain: 22103870,
209
209
  tac: 1,
210
210
  eventum: 1,
@@ -213,6 +213,12 @@ const DEPLOYMENT_BLOCK = {
213
213
  bitci: 1,
214
214
  plasma: 1,
215
215
  eteria: 918,
216
+ gatelayer: 1,
217
+ xone: 3752043,
218
+ mezo: 351760,
219
+ edu_chain: 16410660,
220
+ stratis: 1420372,
221
+ '0g': 6546802,
216
222
  };
217
223
  async function makeMultiCall(functionABI, calls, chain, block) {
218
224
  if (chain === 'tron')
@@ -316,4 +322,5 @@ const CUSTOM_MULTICALL_ADDRESSES = {
316
322
  'somnia': '0x5e44F178E8cF9B2F5409B6f18ce936aB817C5a11',
317
323
  'bitci': '0x777238B119cD07e6849b0817f284532DC0F9F8D9',
318
324
  'eteria': '0x8cC688B1F99b651ee00bB0Cb0aae61F416F8384b',
325
+ 'xone': '0xe39d7BCDdaBBD0526D143185Fb7b459099Fd40c9',
319
326
  };