compass_api_sdk 0.9.37__py3-none-any.whl → 0.9.38__py3-none-any.whl

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.

Potentially problematic release.


This version of compass_api_sdk might be problematic. Click here for more details.

@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "compass_api_sdk"
6
- __version__: str = "0.9.37"
6
+ __version__: str = "0.9.38"
7
7
  __openapi_doc_version__: str = "0.0.1"
8
8
  __gen_version__: str = "2.647.2"
9
- __user_agent__: str = "speakeasy-sdk/python 0.9.37 2.647.2 0.0.1 compass_api_sdk"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.9.38 2.647.2 0.0.1 compass_api_sdk"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -1,10 +1,17 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from compass_api_sdk.types import BaseModel
4
+ from compass_api_sdk.types import (
5
+ BaseModel,
6
+ Nullable,
7
+ OptionalNullable,
8
+ UNSET,
9
+ UNSET_SENTINEL,
10
+ )
5
11
  from compass_api_sdk.utils import FieldMetadata, QueryParamMetadata
6
12
  from enum import Enum
7
- from typing_extensions import Annotated, TypedDict
13
+ from pydantic import model_serializer
14
+ from typing_extensions import Annotated, NotRequired, TypedDict
8
15
 
9
16
 
10
17
  class TokenPriceChain(str, Enum):
@@ -71,6 +78,8 @@ class TokenPriceToken(str, Enum):
71
78
  class TokenPriceRequestTypedDict(TypedDict):
72
79
  chain: TokenPriceChain
73
80
  r"""The chain to use."""
81
+ block: NotRequired[Nullable[int]]
82
+ r"""Optional block number (defaults to latest)."""
74
83
  token: TokenPriceToken
75
84
  r"""The symbol of the token for which to get the price."""
76
85
 
@@ -82,8 +91,44 @@ class TokenPriceRequest(BaseModel):
82
91
  ] = TokenPriceChain.ETHEREUM_MAINNET
83
92
  r"""The chain to use."""
84
93
 
94
+ block: Annotated[
95
+ OptionalNullable[int],
96
+ FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
97
+ ] = UNSET
98
+ r"""Optional block number (defaults to latest)."""
99
+
85
100
  token: Annotated[
86
101
  TokenPriceToken,
87
102
  FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
88
103
  ] = TokenPriceToken.AAVE
89
104
  r"""The symbol of the token for which to get the price."""
105
+
106
+ @model_serializer(mode="wrap")
107
+ def serialize_model(self, handler):
108
+ optional_fields = ["block"]
109
+ nullable_fields = ["block"]
110
+ null_default_fields = []
111
+
112
+ serialized = handler(self)
113
+
114
+ m = {}
115
+
116
+ for n, f in type(self).model_fields.items():
117
+ k = f.alias or n
118
+ val = serialized.get(k)
119
+ serialized.pop(k, None)
120
+
121
+ optional_nullable = k in optional_fields and k in nullable_fields
122
+ is_set = (
123
+ self.__pydantic_fields_set__.intersection({n})
124
+ or k in null_default_fields
125
+ ) # pylint: disable=no-member
126
+
127
+ if val is not None and val != UNSET_SENTINEL:
128
+ m[k] = val
129
+ elif val != UNSET_SENTINEL and (
130
+ not k in optional_fields or (optional_nullable and is_set)
131
+ ):
132
+ m[k] = val
133
+
134
+ return m
@@ -193,6 +193,7 @@ class TokenSDK(BaseSDK):
193
193
  *,
194
194
  chain: models.TokenPriceChain = models.TokenPriceChain.ETHEREUM_MAINNET,
195
195
  token: models.TokenPriceToken = models.TokenPriceToken.AAVE,
196
+ block: OptionalNullable[int] = UNSET,
196
197
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
197
198
  server_url: Optional[str] = None,
198
199
  timeout_ms: Optional[int] = None,
@@ -208,6 +209,7 @@ class TokenSDK(BaseSDK):
208
209
 
209
210
  :param chain: The chain to use.
210
211
  :param token: The symbol of the token for which to get the price.
212
+ :param block: Optional block number (defaults to latest).
211
213
  :param retries: Override the default retry configuration for this method
212
214
  :param server_url: Override the default server URL for this method
213
215
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -225,6 +227,7 @@ class TokenSDK(BaseSDK):
225
227
 
226
228
  request = models.TokenPriceRequest(
227
229
  chain=chain,
230
+ block=block,
228
231
  token=token,
229
232
  )
230
233
 
@@ -287,6 +290,7 @@ class TokenSDK(BaseSDK):
287
290
  *,
288
291
  chain: models.TokenPriceChain = models.TokenPriceChain.ETHEREUM_MAINNET,
289
292
  token: models.TokenPriceToken = models.TokenPriceToken.AAVE,
293
+ block: OptionalNullable[int] = UNSET,
290
294
  retries: OptionalNullable[utils.RetryConfig] = UNSET,
291
295
  server_url: Optional[str] = None,
292
296
  timeout_ms: Optional[int] = None,
@@ -302,6 +306,7 @@ class TokenSDK(BaseSDK):
302
306
 
303
307
  :param chain: The chain to use.
304
308
  :param token: The symbol of the token for which to get the price.
309
+ :param block: Optional block number (defaults to latest).
305
310
  :param retries: Override the default retry configuration for this method
306
311
  :param server_url: Override the default server URL for this method
307
312
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -319,6 +324,7 @@ class TokenSDK(BaseSDK):
319
324
 
320
325
  request = models.TokenPriceRequest(
321
326
  chain=chain,
327
+ block=block,
322
328
  token=token,
323
329
  )
324
330
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: compass_api_sdk
3
- Version: 0.9.37
3
+ Version: 0.9.38
4
4
  Summary: Compass API SDK.
5
5
  Author: royalnine
6
6
  Requires-Python: >=3.9.2
@@ -2,7 +2,7 @@ compass_api_sdk/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,4
2
2
  compass_api_sdk/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpvjjVwk,118
3
3
  compass_api_sdk/_hooks/sdkhooks.py,sha256=eVxHB2Q_JG6zZx5xn74i208ij-fpTHqq2jod6fbghRQ,2503
4
4
  compass_api_sdk/_hooks/types.py,sha256=4qXm6dEntJOC2QeOdTklcc53oFzTU3HBb1xGdZ-kBXY,3059
5
- compass_api_sdk/_version.py,sha256=IS85_6A1bVK8V8KyLpr-ZCv2_xsp6cj-JrZIecVLwhY,474
5
+ compass_api_sdk/_version.py,sha256=SjMr-1yXtBYvcW5GI8gBrQEc8H7OvXkYPTfNW17i5Ks,474
6
6
  compass_api_sdk/aave_v3.py,sha256=HGztClaMj2E00gESokwbsZ9aiNGV1-okkrDzxUIZtJA,117024
7
7
  compass_api_sdk/aerodrome_slipstream.py,sha256=_-tqCHmWlvbMfVl2hHvMpJfRKJVHAHEhB30oYwcqEY8,78375
8
8
  compass_api_sdk/basesdk.py,sha256=PQNcMD7BiLruZwOuU2TeWIE_zQ0iO--XYUFmIDr5zX0,11844
@@ -180,7 +180,7 @@ compass_api_sdk/models/syposition.py,sha256=AZK-1B3zsZphz-zmYOR_cTONyyhbPJnVe3x9
180
180
  compass_api_sdk/models/token_addressop.py,sha256=4rmH4aUL9rPQWpeI3YSUPr-UVgIvB8q4QEMRHPHMv7g,2161
181
181
  compass_api_sdk/models/token_balanceop.py,sha256=IJ9QjyIDvpNNvGzeUF9E4FsCR8Q-tciB6zvFcskK_ic,1793
182
182
  compass_api_sdk/models/token_enum.py,sha256=klu_nFSPn35oWFaduBEjRQm5WjkNOpZztRVj0FucuK4,1166
183
- compass_api_sdk/models/token_priceop.py,sha256=jNamVMzjbrQ3Q0eIQE77-Fqvm4-luwzbLS3IB_7G1sY,2161
183
+ compass_api_sdk/models/token_priceop.py,sha256=Bff1htpluvAXud2luoOtatbfxJAP6kQS_u7r5mrpLGI,3487
184
184
  compass_api_sdk/models/tokenaddressresponse.py,sha256=alnjhUzaC_oBUWl1iyoSTh3La_I49CT5YyrPNN0ukmk,399
185
185
  compass_api_sdk/models/tokenbalanceresponse.py,sha256=CvSBOatB-SsFtkXkfYsOplcJyN0AhmP1PailafwloPs,1193
186
186
  compass_api_sdk/models/tokeninfo.py,sha256=XJxb3m5dS8sRBGCpHS128VemtSU4q09EXOEwaA6mc2o,483
@@ -236,7 +236,7 @@ compass_api_sdk/sdk.py,sha256=rQ3ANGf0BxHoZc9hCQvsxkNc9qOW3DbGAuOz_sy3o7g,7865
236
236
  compass_api_sdk/sdkconfiguration.py,sha256=5nec4ViMLCsNWBd3DyEv8zWqU5Z77YZfzwX69jkdSnM,1607
237
237
  compass_api_sdk/sky.py,sha256=aELi_jmvjUqBxaEmnc4FPiX9k4hffHzY7vHgdhaG8bE,40405
238
238
  compass_api_sdk/smart_account.py,sha256=gEgiIopK9TrRD_BmLy2lw1voh24khfsZYrtwF5913d0,8646
239
- compass_api_sdk/token_sdk.py,sha256=vgA-JAvoFx7yQ90pQBl34W0mEWUdwLQWmv6z0agM_OY,31704
239
+ compass_api_sdk/token_sdk.py,sha256=Q6zmDEtcya4-f6TclCXCNTFlq3xyAOQt9npMHNzERAg,31978
240
240
  compass_api_sdk/transaction_bundler.py,sha256=nF2XiAwEt0F96TvsY3PscNs0V92x5exL6touYrMSFqA,30268
241
241
  compass_api_sdk/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
242
242
  compass_api_sdk/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
@@ -258,6 +258,6 @@ compass_api_sdk/utils/security.py,sha256=ktep3HKwbFs-MLxUYTM8Jd4v-ZBum5_Z0u1PFId
258
258
  compass_api_sdk/utils/serializers.py,sha256=_I2LpPIXnaN9LFxgBFUKj5w38Dd9TcOhNYL_sH6bIo8,6439
259
259
  compass_api_sdk/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
260
260
  compass_api_sdk/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
261
- compass_api_sdk-0.9.37.dist-info/METADATA,sha256=hWTYQPCy4L0M4LQVhOAGVQSv1vLwYPUC8slFzFN36mE,28654
262
- compass_api_sdk-0.9.37.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
263
- compass_api_sdk-0.9.37.dist-info/RECORD,,
261
+ compass_api_sdk-0.9.38.dist-info/METADATA,sha256=fy20mvdnVIARjSi6osekTRp8o7hKxfAp83okCKcVjvo,28654
262
+ compass_api_sdk-0.9.38.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
263
+ compass_api_sdk-0.9.38.dist-info/RECORD,,