@codex-data/sdk 2.3.30 → 2.3.32

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']>;
@@ -291,7 +291,7 @@ export type BalancesInput = {
291
291
  limit?: InputMaybe<Scalars['Int']['input']>;
292
292
  /** The network IDs to filter by. */
293
293
  networks?: InputMaybe<Array<Scalars['Int']['input']>>;
294
- /** Whether to remove scam tokens from the response. */
294
+ /** Whether to remove scam tokens from the response. Removes tokens labelled as scams, plus unlabelled tokens whose trading data identifies them as dead dust: no trade in the last 24 hours, or $1,000 or less of pool liquidity. Tokens with no trading history anywhere are kept: filtering is deliberately conservative, and clients wanting aggressive spam removal (e.g. by token symbol) should filter client-side. */
295
295
  removeScams?: InputMaybe<Scalars['Boolean']['input']>;
296
296
  /** The attribute to sort the list on. Defaults to BALANCE (raw token amount). */
297
297
  sortBy?: InputMaybe<BalancesSortAttribute>;
@@ -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
  }
@@ -14097,11 +14098,11 @@ export declare enum TradingPeriod {
14097
14098
  Week = "WEEK",
14098
14099
  Year = "YEAR"
14099
14100
  }
14100
- /** 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. */
14101
14102
  export declare enum UiAmountMode {
14102
- /** 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. */
14103
14104
  Raw = "RAW",
14104
- /** 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. */
14105
14106
  Scaled = "SCALED"
14106
14107
  }
14107
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 = {}));
@@ -2204,12 +2205,12 @@ var TradingPeriod;
2204
2205
  TradingPeriod["Week"] = "WEEK";
2205
2206
  TradingPeriod["Year"] = "YEAR";
2206
2207
  })(TradingPeriod || (exports.TradingPeriod = TradingPeriod = {}));
2207
- /** 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. */
2208
2209
  var UiAmountMode;
2209
2210
  (function (UiAmountMode) {
2210
- /** 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. */
2211
2212
  UiAmountMode["Raw"] = "RAW";
2212
- /** 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. */
2213
2214
  UiAmountMode["Scaled"] = "SCALED";
2214
2215
  })(UiAmountMode || (exports.UiAmountMode = UiAmountMode = {}));
2215
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 = {}));
@@ -2197,12 +2198,12 @@ export var TradingPeriod;
2197
2198
  TradingPeriod["Week"] = "WEEK";
2198
2199
  TradingPeriod["Year"] = "YEAR";
2199
2200
  })(TradingPeriod || (TradingPeriod = {}));
2200
- /** 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. */
2201
2202
  export var UiAmountMode;
2202
2203
  (function (UiAmountMode) {
2203
- /** 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. */
2204
2205
  UiAmountMode["Raw"] = "RAW";
2205
- /** 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. */
2206
2207
  UiAmountMode["Scaled"] = "SCALED";
2207
2208
  })(UiAmountMode || (UiAmountMode = {}));
2208
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.30",
3
+ "version": "2.3.32",
4
4
  "engines": {
5
5
  "node": ">=17.5.0"
6
6
  },