@codex-data/sdk 2.3.29 → 2.3.31

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.
@@ -248,7 +248,7 @@ export type Balance = {
248
248
  address: Scalars['String']['output'];
249
249
  /** The balance held by the wallet. */
250
250
  balance: Scalars['String']['output'];
251
- /** The balance held by the wallet in USD. */
251
+ /** The balance held by the wallet in USD. Computed from `shiftedBalance`, NOT from `uiBalance` — for a B20 asset token those differ by the token's multiplier, so do not recompute this as `uiBalance * tokenPriceUsd`. */
252
252
  balanceUsd?: Maybe<Scalars['String']['output']>;
253
253
  /** The time that this address first held a token. */
254
254
  firstHeldTimestamp?: Maybe<Scalars['Int']['output']>;
@@ -266,9 +266,9 @@ export type Balance = {
266
266
  tokenId: Scalars['String']['output'];
267
267
  /** Unix timestamp (seconds) of the token's most recent trade/market event across all pools we track. Token-level (not specific to this wallet). Useful for filtering out dead/worthless tokens, e.g. no activity in months. */
268
268
  tokenLastTradedTimestamp?: Maybe<Scalars['Int']['output']>;
269
- /** The token price in USD. */
269
+ /** The token price in USD, per raw token — the same units as `shiftedBalance`. For a B20 asset token this does NOT pair with `uiBalance`, which is multiplier-adjusted; multiplying the two over-counts by the multiplier. Use `balanceUsd` for position value. */
270
270
  tokenPriceUsd?: Maybe<Scalars['String']['output']>;
271
- /** The wallet balance expressed for UI display. Defaults to shiftedBalance. When uiAmountMode is RAW, Token-2022 balances are divided by the active UI amount multiplier when available. */
271
+ /** The wallet balance expressed for UI display. Defaults to shiftedBalance. For Token-2022 tokens, RAW divides out the active UI amount multiplier. For B20 asset tokens, SCALED multiplies by the active multiplier so the value reflects redeemable units rather than raw token count. IMPORTANT: that B20 adjustment is applied ONLY by the `balances` query, which is the one place a `uiAmountMode` is resolved. Every other source of a Balance — `holders`, `refreshBalances`, `primeBalance`, and the subscriptions — returns the raw `shiftedBalance` here, so the same holding can read differently across them. Display only: it does not share units with `tokenPriceUsd`, so do not multiply the two. */
272
272
  uiBalance?: Maybe<Scalars['Float']['output']>;
273
273
  /** The block number at which this balance was last updated. Null when the block is unknown (e.g. native balances) or the underlying balance record cannot be found. */
274
274
  updatedAtBlock?: Maybe<Scalars['Int']['output']>;
@@ -299,7 +299,7 @@ export type BalancesInput = {
299
299
  sortDirection?: InputMaybe<RankingDirection>;
300
300
  /** The token IDs (`address:networkId`) or addresses to request the balance for. Requires a list of `networks` if only passing addresses. Include native network balances using `native` as the token address. Only applied when using `walletAddress` (not `walletId`). Max 200 tokens. */
301
301
  tokens?: InputMaybe<Array<Scalars['String']['input']>>;
302
- /** Controls how uiBalance is expressed. SCALED returns the stored RPC UI amount. RAW removes the active Token-2022 UI amount multiplier when available. Defaults to SCALED. */
302
+ /** Controls how uiBalance is expressed. SCALED returns the Token-2022 stored RPC UI amount, and multiplies B20 balances by their active multiplier. RAW removes the active Token-2022 UI amount multiplier and returns B20 balances unchanged. Defaults to SCALED. */
303
303
  uiAmountMode?: InputMaybe<UiAmountMode>;
304
304
  /** The wallet address to filter by. */
305
305
  walletAddress?: InputMaybe<Scalars['String']['input']>;
@@ -318,7 +318,7 @@ export type BalancesResponse = {
318
318
  };
319
319
  /** The attribute to sort balances by. */
320
320
  export declare enum BalancesSortAttribute {
321
- /** Sort by raw token balance amount (default). */
321
+ /** Sort by raw token balance amount (default). Note this orders on `shiftedBalance`, not `uiBalance` — a list rendering `uiBalance` for B20 asset tokens can therefore look mis-ordered, since each token's multiplier differs. Sort by USD_VALUE if the displayed order must match the displayed column. */
322
322
  Balance = "BALANCE",
323
323
  /** Sort by USD value (descending). */
324
324
  UsdValue = "USD_VALUE"
@@ -2888,6 +2888,7 @@ export declare enum LiquidityLockProtocol {
2888
2888
  Doppler = "DOPPLER",
2889
2889
  MeteoraDammV2 = "METEORA_DAMM_V2",
2890
2890
  O1Exchange = "O1_EXCHANGE",
2891
+ PonsV2 = "PONS_V2",
2891
2892
  UncxV2 = "UNCX_V2",
2892
2893
  UncxV3 = "UNCX_V3"
2893
2894
  }
@@ -13319,6 +13320,8 @@ export type TokenFilters = {
13319
13320
  totalFees12?: InputMaybe<NumberFilter>;
13320
13321
  /** Filter by total fees in the past 24 hours. */
13321
13322
  totalFees24?: InputMaybe<NumberFilter>;
13323
+ /** The token's cumulative route-backed liquidity in USD, summed across the token's pairs with valid routing liquidity. Distinct from `liquidity`, which covers the top pair only. */
13324
+ totalLiquidityUsd?: InputMaybe<NumberFilter>;
13322
13325
  /** Whether to ignore pairs/tokens not relevant to trending. This is done checking against a few factors and ignoring uninteresting tokens like stables / network tokens. If you want all tokens regardless of these checks, then don't include this field. (default) If you want only tokens that fail the trending ignore checks, then set it to `true`. (i.e. stablecoins, rugs, network base tokens) If you want only tokens that pass the trending ignore checks, then set it to `false`. */
13323
13326
  trendingIgnored?: InputMaybe<Scalars['Boolean']['input']>;
13324
13327
  /** The number of transactions in the past hour. */
@@ -13688,6 +13691,7 @@ export declare enum TokenRankingAttribute {
13688
13691
  TotalFees5m = "totalFees5m",
13689
13692
  TotalFees12 = "totalFees12",
13690
13693
  TotalFees24 = "totalFees24",
13694
+ TotalLiquidityUsd = "totalLiquidityUsd",
13691
13695
  TrendingScore = "trendingScore",
13692
13696
  TrendingScore1 = "trendingScore1",
13693
13697
  TrendingScore4 = "trendingScore4",
@@ -14094,11 +14098,11 @@ export declare enum TradingPeriod {
14094
14098
  Week = "WEEK",
14095
14099
  Year = "YEAR"
14096
14100
  }
14097
- /** Controls whether uiBalance returns the stored RPC UI balance or removes Token-2022 UI amount multipliers. */
14101
+ /** Controls whether uiBalance is expressed in multiplier-adjusted or raw units. The two supported standards store opposite things, so the mode applies in opposite directions. */
14098
14102
  export declare enum UiAmountMode {
14099
- /** Return raw token amounts by removing Token-2022 UI amount multipliers where available. */
14103
+ /** Return raw token amounts: Token-2022 balances have their UI amount multiplier removed; B20 balances are already raw and pass through unchanged. */
14100
14104
  Raw = "RAW",
14101
- /** Return the stored RPC UI balance. This is the default. */
14105
+ /** Return multiplier-adjusted amounts: Token-2022 balances are the stored RPC UI amount; B20 balances are multiplied by the token's active multiplier. This is the default. */
14102
14106
  Scaled = "SCALED"
14103
14107
  }
14104
14108
  /** An unconfirmed token transaction. */
@@ -14,7 +14,7 @@ var AlertRecurrence;
14
14
  /** The attribute to sort balances by. */
15
15
  var BalancesSortAttribute;
16
16
  (function (BalancesSortAttribute) {
17
- /** Sort by raw token balance amount (default). */
17
+ /** Sort by raw token balance amount (default). Note this orders on `shiftedBalance`, not `uiBalance` — a list rendering `uiBalance` for B20 asset tokens can therefore look mis-ordered, since each token's multiplier differs. Sort by USD_VALUE if the displayed order must match the displayed column. */
18
18
  BalancesSortAttribute["Balance"] = "BALANCE";
19
19
  /** Sort by USD value (descending). */
20
20
  BalancesSortAttribute["UsdValue"] = "USD_VALUE";
@@ -293,6 +293,7 @@ var LiquidityLockProtocol;
293
293
  LiquidityLockProtocol["Doppler"] = "DOPPLER";
294
294
  LiquidityLockProtocol["MeteoraDammV2"] = "METEORA_DAMM_V2";
295
295
  LiquidityLockProtocol["O1Exchange"] = "O1_EXCHANGE";
296
+ LiquidityLockProtocol["PonsV2"] = "PONS_V2";
296
297
  LiquidityLockProtocol["UncxV2"] = "UNCX_V2";
297
298
  LiquidityLockProtocol["UncxV3"] = "UNCX_V3";
298
299
  })(LiquidityLockProtocol || (exports.LiquidityLockProtocol = LiquidityLockProtocol = {}));
@@ -2148,6 +2149,7 @@ var TokenRankingAttribute;
2148
2149
  TokenRankingAttribute["TotalFees5m"] = "totalFees5m";
2149
2150
  TokenRankingAttribute["TotalFees12"] = "totalFees12";
2150
2151
  TokenRankingAttribute["TotalFees24"] = "totalFees24";
2152
+ TokenRankingAttribute["TotalLiquidityUsd"] = "totalLiquidityUsd";
2151
2153
  TokenRankingAttribute["TrendingScore"] = "trendingScore";
2152
2154
  TokenRankingAttribute["TrendingScore1"] = "trendingScore1";
2153
2155
  TokenRankingAttribute["TrendingScore4"] = "trendingScore4";
@@ -2203,12 +2205,12 @@ var TradingPeriod;
2203
2205
  TradingPeriod["Week"] = "WEEK";
2204
2206
  TradingPeriod["Year"] = "YEAR";
2205
2207
  })(TradingPeriod || (exports.TradingPeriod = TradingPeriod = {}));
2206
- /** Controls whether uiBalance returns the stored RPC UI balance or removes Token-2022 UI amount multipliers. */
2208
+ /** Controls whether uiBalance is expressed in multiplier-adjusted or raw units. The two supported standards store opposite things, so the mode applies in opposite directions. */
2207
2209
  var UiAmountMode;
2208
2210
  (function (UiAmountMode) {
2209
- /** Return raw token amounts by removing Token-2022 UI amount multipliers where available. */
2211
+ /** Return raw token amounts: Token-2022 balances have their UI amount multiplier removed; B20 balances are already raw and pass through unchanged. */
2210
2212
  UiAmountMode["Raw"] = "RAW";
2211
- /** Return the stored RPC UI balance. This is the default. */
2213
+ /** Return multiplier-adjusted amounts: Token-2022 balances are the stored RPC UI amount; B20 balances are multiplied by the token's active multiplier. This is the default. */
2212
2214
  UiAmountMode["Scaled"] = "SCALED";
2213
2215
  })(UiAmountMode || (exports.UiAmountMode = UiAmountMode = {}));
2214
2216
  /** The state of the wallet backfill. */
@@ -7,7 +7,7 @@ export var AlertRecurrence;
7
7
  /** The attribute to sort balances by. */
8
8
  export var BalancesSortAttribute;
9
9
  (function (BalancesSortAttribute) {
10
- /** Sort by raw token balance amount (default). */
10
+ /** Sort by raw token balance amount (default). Note this orders on `shiftedBalance`, not `uiBalance` — a list rendering `uiBalance` for B20 asset tokens can therefore look mis-ordered, since each token's multiplier differs. Sort by USD_VALUE if the displayed order must match the displayed column. */
11
11
  BalancesSortAttribute["Balance"] = "BALANCE";
12
12
  /** Sort by USD value (descending). */
13
13
  BalancesSortAttribute["UsdValue"] = "USD_VALUE";
@@ -286,6 +286,7 @@ export var LiquidityLockProtocol;
286
286
  LiquidityLockProtocol["Doppler"] = "DOPPLER";
287
287
  LiquidityLockProtocol["MeteoraDammV2"] = "METEORA_DAMM_V2";
288
288
  LiquidityLockProtocol["O1Exchange"] = "O1_EXCHANGE";
289
+ LiquidityLockProtocol["PonsV2"] = "PONS_V2";
289
290
  LiquidityLockProtocol["UncxV2"] = "UNCX_V2";
290
291
  LiquidityLockProtocol["UncxV3"] = "UNCX_V3";
291
292
  })(LiquidityLockProtocol || (LiquidityLockProtocol = {}));
@@ -2141,6 +2142,7 @@ export var TokenRankingAttribute;
2141
2142
  TokenRankingAttribute["TotalFees5m"] = "totalFees5m";
2142
2143
  TokenRankingAttribute["TotalFees12"] = "totalFees12";
2143
2144
  TokenRankingAttribute["TotalFees24"] = "totalFees24";
2145
+ TokenRankingAttribute["TotalLiquidityUsd"] = "totalLiquidityUsd";
2144
2146
  TokenRankingAttribute["TrendingScore"] = "trendingScore";
2145
2147
  TokenRankingAttribute["TrendingScore1"] = "trendingScore1";
2146
2148
  TokenRankingAttribute["TrendingScore4"] = "trendingScore4";
@@ -2196,12 +2198,12 @@ export var TradingPeriod;
2196
2198
  TradingPeriod["Week"] = "WEEK";
2197
2199
  TradingPeriod["Year"] = "YEAR";
2198
2200
  })(TradingPeriod || (TradingPeriod = {}));
2199
- /** Controls whether uiBalance returns the stored RPC UI balance or removes Token-2022 UI amount multipliers. */
2201
+ /** Controls whether uiBalance is expressed in multiplier-adjusted or raw units. The two supported standards store opposite things, so the mode applies in opposite directions. */
2200
2202
  export var UiAmountMode;
2201
2203
  (function (UiAmountMode) {
2202
- /** Return raw token amounts by removing Token-2022 UI amount multipliers where available. */
2204
+ /** Return raw token amounts: Token-2022 balances have their UI amount multiplier removed; B20 balances are already raw and pass through unchanged. */
2203
2205
  UiAmountMode["Raw"] = "RAW";
2204
- /** Return the stored RPC UI balance. This is the default. */
2206
+ /** Return multiplier-adjusted amounts: Token-2022 balances are the stored RPC UI amount; B20 balances are multiplied by the token's active multiplier. This is the default. */
2205
2207
  UiAmountMode["Scaled"] = "SCALED";
2206
2208
  })(UiAmountMode || (UiAmountMode = {}));
2207
2209
  /** The state of the wallet backfill. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codex-data/sdk",
3
- "version": "2.3.29",
3
+ "version": "2.3.31",
4
4
  "engines": {
5
5
  "node": ">=17.5.0"
6
6
  },