defistream 1.0.2__tar.gz → 1.0.4__tar.gz
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.
- {defistream-1.0.2 → defistream-1.0.4}/PKG-INFO +2 -3
- {defistream-1.0.2 → defistream-1.0.4}/README.md +1 -2
- {defistream-1.0.2 → defistream-1.0.4}/pyproject.toml +1 -1
- {defistream-1.0.2 → defistream-1.0.4}/src/defistream/__init__.py +1 -1
- {defistream-1.0.2 → defistream-1.0.4}/src/defistream/query.py +0 -8
- {defistream-1.0.2 → defistream-1.0.4}/tests/test_client.py +0 -7
- {defistream-1.0.2 → defistream-1.0.4}/.gitignore +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/LICENSE +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/sample_usage.py +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/src/defistream/client.py +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/src/defistream/exceptions.py +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/src/defistream/models.py +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/src/defistream/protocols.py +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/src/defistream/py.typed +0 -0
- {defistream-1.0.2 → defistream-1.0.4}/tests/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: defistream
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: Python client for the DeFiStream API
|
|
5
5
|
Project-URL: Homepage, https://defistream.dev
|
|
6
6
|
Project-URL: Documentation, https://docs.defistream.dev
|
|
@@ -413,8 +413,7 @@ print(f"Request cost: {client.last_response.request_cost}")
|
|
|
413
413
|
|
|
414
414
|
| Method | Protocols | Description |
|
|
415
415
|
|--------|-----------|-------------|
|
|
416
|
-
| `.token(symbol)` | ERC20 | Token symbol (USDT, USDC) or contract address |
|
|
417
|
-
| `.decimals(n)` | ERC20 | Token decimals when using custom address (default: 18) |
|
|
416
|
+
| `.token(symbol)` | ERC20 | Token symbol (USDT, USDC) or contract address (required) |
|
|
418
417
|
| `.sender(addr)` | ERC20, Native | Filter by sender address |
|
|
419
418
|
| `.receiver(addr)` | ERC20, Native | Filter by receiver address |
|
|
420
419
|
| `.min_amount(amt)` | ERC20, Native | Minimum transfer amount |
|
|
@@ -379,8 +379,7 @@ print(f"Request cost: {client.last_response.request_cost}")
|
|
|
379
379
|
|
|
380
380
|
| Method | Protocols | Description |
|
|
381
381
|
|--------|-----------|-------------|
|
|
382
|
-
| `.token(symbol)` | ERC20 | Token symbol (USDT, USDC) or contract address |
|
|
383
|
-
| `.decimals(n)` | ERC20 | Token decimals when using custom address (default: 18) |
|
|
382
|
+
| `.token(symbol)` | ERC20 | Token symbol (USDT, USDC) or contract address (required) |
|
|
384
383
|
| `.sender(addr)` | ERC20, Native | Filter by sender address |
|
|
385
384
|
| `.receiver(addr)` | ERC20, Native | Filter by receiver address |
|
|
386
385
|
| `.min_amount(amt)` | ERC20, Native | Minimum transfer amount |
|
|
@@ -107,10 +107,6 @@ class QueryBuilder:
|
|
|
107
107
|
"""Set token symbol or address (ERC20)."""
|
|
108
108
|
return self._copy_with(token=symbol)
|
|
109
109
|
|
|
110
|
-
def decimals(self, decimals: int) -> "QueryBuilder":
|
|
111
|
-
"""Set token decimals when using custom address (ERC20). Default: 18."""
|
|
112
|
-
return self._copy_with(decimals=decimals)
|
|
113
|
-
|
|
114
110
|
# AAVE specific
|
|
115
111
|
def eth_market_type(self, market_type: str) -> "QueryBuilder":
|
|
116
112
|
"""Set AAVE market type for ETH network: 'Core', 'Prime', or 'EtherFi'. Default: 'Core'."""
|
|
@@ -327,10 +323,6 @@ class AsyncQueryBuilder:
|
|
|
327
323
|
"""Set token symbol or address (ERC20)."""
|
|
328
324
|
return self._copy_with(token=symbol)
|
|
329
325
|
|
|
330
|
-
def decimals(self, decimals: int) -> "AsyncQueryBuilder":
|
|
331
|
-
"""Set token decimals when using custom address (ERC20). Default: 18."""
|
|
332
|
-
return self._copy_with(decimals=decimals)
|
|
333
|
-
|
|
334
326
|
# AAVE specific
|
|
335
327
|
def eth_market_type(self, market_type: str) -> "AsyncQueryBuilder":
|
|
336
328
|
"""Set AAVE market type for ETH network: 'Core', 'Prime', or 'EtherFi'. Default: 'Core'."""
|
|
@@ -246,13 +246,6 @@ class TestBuilderPattern:
|
|
|
246
246
|
assert query._params["since"] == "2024-01-01"
|
|
247
247
|
assert query._params["until"] == "2024-01-31"
|
|
248
248
|
|
|
249
|
-
def test_decimals_filter(self):
|
|
250
|
-
"""decimals should set param."""
|
|
251
|
-
client = DeFiStream(api_key="dsk_test")
|
|
252
|
-
query = client.erc20.transfers().decimals(6)
|
|
253
|
-
assert query._params["decimals"] == 6
|
|
254
|
-
|
|
255
|
-
|
|
256
249
|
class TestAsyncBuilderPattern:
|
|
257
250
|
"""Test async builder pattern."""
|
|
258
251
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|