@dynamic-labs/sdk-api 0.0.970 → 0.0.972

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.0.970",
3
+ "version": "0.0.972",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -5109,6 +5109,9 @@ class SDKApi extends runtime.BaseAPI {
5109
5109
  if (requestParameters.offset !== undefined) {
5110
5110
  queryParameters['offset'] = requestParameters.offset;
5111
5111
  }
5112
+ if (requestParameters.tokenAddress !== undefined) {
5113
+ queryParameters['tokenAddress'] = requestParameters.tokenAddress;
5114
+ }
5112
5115
  const headerParameters = {};
5113
5116
  if (this.configuration && this.configuration.accessToken) {
5114
5117
  const token = this.configuration.accessToken;
@@ -5159,6 +5162,9 @@ class SDKApi extends runtime.BaseAPI {
5159
5162
  if (requestParameters.offset !== undefined) {
5160
5163
  queryParameters['offset'] = requestParameters.offset;
5161
5164
  }
5165
+ if (requestParameters.tokenAddress !== undefined) {
5166
+ queryParameters['tokenAddress'] = requestParameters.tokenAddress;
5167
+ }
5162
5168
  const headerParameters = {};
5163
5169
  const response = await this.request({
5164
5170
  path: `/sdk/{environmentId}/chains/{chainName}/transactions/{address}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"chainName"}}`, encodeURIComponent(String(requestParameters.chainName))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
@@ -624,6 +624,7 @@ export interface GetWalletTransactionsRequest {
624
624
  networkId: number;
625
625
  limit?: number;
626
626
  offset?: string;
627
+ tokenAddress?: string;
627
628
  }
628
629
  export interface GetWalletTransactionsOptionsRequest {
629
630
  environmentId: string;
@@ -632,6 +633,7 @@ export interface GetWalletTransactionsOptionsRequest {
632
633
  networkId: number;
633
634
  limit?: number;
634
635
  offset?: string;
636
+ tokenAddress?: string;
635
637
  }
636
638
  export interface GlobalWalletConnectionsOptionsRequest {
637
639
  environmentId: string;
@@ -5105,6 +5105,9 @@ class SDKApi extends BaseAPI {
5105
5105
  if (requestParameters.offset !== undefined) {
5106
5106
  queryParameters['offset'] = requestParameters.offset;
5107
5107
  }
5108
+ if (requestParameters.tokenAddress !== undefined) {
5109
+ queryParameters['tokenAddress'] = requestParameters.tokenAddress;
5110
+ }
5108
5111
  const headerParameters = {};
5109
5112
  if (this.configuration && this.configuration.accessToken) {
5110
5113
  const token = this.configuration.accessToken;
@@ -5155,6 +5158,9 @@ class SDKApi extends BaseAPI {
5155
5158
  if (requestParameters.offset !== undefined) {
5156
5159
  queryParameters['offset'] = requestParameters.offset;
5157
5160
  }
5161
+ if (requestParameters.tokenAddress !== undefined) {
5162
+ queryParameters['tokenAddress'] = requestParameters.tokenAddress;
5163
+ }
5158
5164
  const headerParameters = {};
5159
5165
  const response = await this.request({
5160
5166
  path: `/sdk/{environmentId}/chains/{chainName}/transactions/{address}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"chainName"}}`, encodeURIComponent(String(requestParameters.chainName))).replace(`{${"address"}}`, encodeURIComponent(String(requestParameters.address))),
@@ -21,6 +21,7 @@ function TokenBalanceFromJSONTyped(json, ignoreDiscriminator) {
21
21
  'logoURI': json['logoURI'],
22
22
  'balance': json['balance'],
23
23
  'rawBalance': json['rawBalance'],
24
+ 'rawBalanceString': json['rawBalanceString'],
24
25
  'price': !runtime.exists(json, 'price') ? undefined : json['price'],
25
26
  'marketValue': !runtime.exists(json, 'marketValue') ? undefined : json['marketValue'],
26
27
  'liquidityPoolSizeUsd': !runtime.exists(json, 'liquidityPoolSizeUsd') ? undefined : json['liquidityPoolSizeUsd'],
@@ -44,6 +45,7 @@ function TokenBalanceToJSON(value) {
44
45
  'logoURI': value.logoURI,
45
46
  'balance': value.balance,
46
47
  'rawBalance': value.rawBalance,
48
+ 'rawBalanceString': value.rawBalanceString,
47
49
  'price': value.price,
48
50
  'marketValue': value.marketValue,
49
51
  'liquidityPoolSizeUsd': value.liquidityPoolSizeUsd,
@@ -58,11 +58,23 @@ export interface TokenBalance {
58
58
  */
59
59
  balance: number;
60
60
  /**
61
- * Raw token balance in the smallest unit
61
+ * Raw token balance in the smallest unit, as a number. WARNING: loses precision
62
+ * above 2^53 (~9.007e15). For 18-decimal tokens this is every realistic balance
63
+ * over ~0.009 of one unit. Use rawBalanceString for any precision-sensitive use
64
+ * case (exact-amount validation against on-chain state, swap fromAmount, transfer
65
+ * amounts). Retained for backwards compatibility.
62
66
  * @type {number}
63
67
  * @memberof TokenBalance
64
68
  */
65
69
  rawBalance: number;
70
+ /**
71
+ * Raw token balance in the smallest unit, as a decimal string. Precision-safe for
72
+ * any token amount. Use BigInt(rawBalanceString) for math, or pass directly to
73
+ * APIs that accept string-encoded amounts (LI.FI, viem, ethers, etc.).
74
+ * @type {string}
75
+ * @memberof TokenBalance
76
+ */
77
+ rawBalanceString: string;
66
78
  /**
67
79
  * Current price per token in USD
68
80
  * @type {number}
@@ -17,6 +17,7 @@ function TokenBalanceFromJSONTyped(json, ignoreDiscriminator) {
17
17
  'logoURI': json['logoURI'],
18
18
  'balance': json['balance'],
19
19
  'rawBalance': json['rawBalance'],
20
+ 'rawBalanceString': json['rawBalanceString'],
20
21
  'price': !exists(json, 'price') ? undefined : json['price'],
21
22
  'marketValue': !exists(json, 'marketValue') ? undefined : json['marketValue'],
22
23
  'liquidityPoolSizeUsd': !exists(json, 'liquidityPoolSizeUsd') ? undefined : json['liquidityPoolSizeUsd'],
@@ -40,6 +41,7 @@ function TokenBalanceToJSON(value) {
40
41
  'logoURI': value.logoURI,
41
42
  'balance': value.balance,
42
43
  'rawBalance': value.rawBalance,
44
+ 'rawBalanceString': value.rawBalanceString,
43
45
  'price': value.price,
44
46
  'marketValue': value.marketValue,
45
47
  'liquidityPoolSizeUsd': value.liquidityPoolSizeUsd,