Skip to content

Commit c4f4370

Browse files
authored
upgrade signers, add additional properties (#4)
* upgrade signers, add additional properties * rm tests
1 parent 69a3d0b commit c4f4370

File tree

108 files changed

+1431
-1870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1431
-1870
lines changed

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
disallowAdditionalPropertiesIfNotPresent: true
1+
disallowAdditionalPropertiesIfNotPresent: false
22
library: asyncio
33
packageName: lighter-sdk
44
projectName: lighter-sdk

lighter/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from lighter.models.account_pn_l import AccountPnL
4545
from lighter.models.account_position import AccountPosition
4646
from lighter.models.account_stats import AccountStats
47+
from lighter.models.account_trade_stats import AccountTradeStats
4748
from lighter.models.accounts import Accounts
4849
from lighter.models.api_key import ApiKey
4950
from lighter.models.block import Block
@@ -64,7 +65,6 @@
6465
from lighter.models.fee_bucket import FeeBucket
6566
from lighter.models.funding import Funding
6667
from lighter.models.fundings import Fundings
67-
from lighter.models.is_whitelisted import IsWhitelisted
6868
from lighter.models.l1_provider_info import L1ProviderInfo
6969
from lighter.models.layer2_basic_info import Layer2BasicInfo
7070
from lighter.models.liquidation import Liquidation
@@ -111,14 +111,11 @@
111111
from lighter.models.req_get_public_pools import ReqGetPublicPools
112112
from lighter.models.req_get_range_with_cursor import ReqGetRangeWithCursor
113113
from lighter.models.req_get_range_with_index import ReqGetRangeWithIndex
114-
from lighter.models.req_get_range_with_index_sortable import (
115-
ReqGetRangeWithIndexSortable,
116-
)
114+
from lighter.models.req_get_range_with_index_sortable import ReqGetRangeWithIndexSortable
117115
from lighter.models.req_get_recent_trades import ReqGetRecentTrades
118116
from lighter.models.req_get_trades import ReqGetTrades
119117
from lighter.models.req_get_tx import ReqGetTx
120118
from lighter.models.req_get_withdraw_history import ReqGetWithdrawHistory
121-
from lighter.models.req_is_whitelisted import ReqIsWhitelisted
122119
from lighter.models.result_code import ResultCode
123120
from lighter.models.simple_order import SimpleOrder
124121
from lighter.models.status import Status
@@ -132,7 +129,6 @@
132129
from lighter.models.txs import Txs
133130
from lighter.models.validator_info import ValidatorInfo
134131
from lighter.models.withdraw_history import WithdrawHistory
135-
from lighter.models.withdraw_history_cursor import WithdrawHistoryCursor
136132
from lighter.models.withdraw_history_item import WithdrawHistoryItem
137133
from lighter.models.zk_lighter_info import ZkLighterInfo
138134

lighter/api/account_api.py

Lines changed: 3 additions & 267 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from lighter.models.accounts import Accounts
2525
from lighter.models.detailed_accounts import DetailedAccounts
2626
from lighter.models.fee_bucket import FeeBucket
27-
from lighter.models.is_whitelisted import IsWhitelisted
2827
from lighter.models.public_pools import PublicPools
2928
from lighter.models.sub_accounts import SubAccounts
3029

@@ -906,7 +905,7 @@ async def apikeys(
906905
) -> AccountApiKeys:
907906
"""apikeys
908907
909-
Get account api key
908+
Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account.
910909
911910
:param account_index: (required)
912911
:type account_index: int
@@ -978,7 +977,7 @@ async def apikeys_with_http_info(
978977
) -> ApiResponse[AccountApiKeys]:
979978
"""apikeys
980979
981-
Get account api key
980+
Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account.
982981
983982
:param account_index: (required)
984983
:type account_index: int
@@ -1050,7 +1049,7 @@ async def apikeys_without_preload_content(
10501049
) -> RESTResponseType:
10511050
"""apikeys
10521051
1053-
Get account api key
1052+
Get account api key. Set `api_key_index` to 255 to retrieve all api keys associated with the account.
10541053
10551054
:param account_index: (required)
10561055
:type account_index: int
@@ -1429,269 +1428,6 @@ def _fee_bucket_serialize(
14291428

14301429

14311430

1432-
@validate_call
1433-
async def is_whitelisted(
1434-
self,
1435-
l1_address: StrictStr,
1436-
_request_timeout: Union[
1437-
None,
1438-
Annotated[StrictFloat, Field(gt=0)],
1439-
Tuple[
1440-
Annotated[StrictFloat, Field(gt=0)],
1441-
Annotated[StrictFloat, Field(gt=0)]
1442-
]
1443-
] = None,
1444-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1445-
_content_type: Optional[StrictStr] = None,
1446-
_headers: Optional[Dict[StrictStr, Any]] = None,
1447-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1448-
) -> IsWhitelisted:
1449-
"""isWhitelisted
1450-
1451-
Get is account whitelisted
1452-
1453-
:param l1_address: (required)
1454-
:type l1_address: str
1455-
:param _request_timeout: timeout setting for this request. If one
1456-
number provided, it will be total request
1457-
timeout. It can also be a pair (tuple) of
1458-
(connection, read) timeouts.
1459-
:type _request_timeout: int, tuple(int, int), optional
1460-
:param _request_auth: set to override the auth_settings for an a single
1461-
request; this effectively ignores the
1462-
authentication in the spec for a single request.
1463-
:type _request_auth: dict, optional
1464-
:param _content_type: force content-type for the request.
1465-
:type _content_type: str, Optional
1466-
:param _headers: set to override the headers for a single
1467-
request; this effectively ignores the headers
1468-
in the spec for a single request.
1469-
:type _headers: dict, optional
1470-
:param _host_index: set to override the host_index for a single
1471-
request; this effectively ignores the host_index
1472-
in the spec for a single request.
1473-
:type _host_index: int, optional
1474-
:return: Returns the result object.
1475-
""" # noqa: E501
1476-
1477-
_param = self._is_whitelisted_serialize(
1478-
l1_address=l1_address,
1479-
_request_auth=_request_auth,
1480-
_content_type=_content_type,
1481-
_headers=_headers,
1482-
_host_index=_host_index
1483-
)
1484-
1485-
_response_types_map: Dict[str, Optional[str]] = {
1486-
'200': "IsWhitelisted",
1487-
'400': "ResultCode",
1488-
}
1489-
response_data = await self.api_client.call_api(
1490-
*_param,
1491-
_request_timeout=_request_timeout
1492-
)
1493-
await response_data.read()
1494-
return self.api_client.response_deserialize(
1495-
response_data=response_data,
1496-
response_types_map=_response_types_map,
1497-
).data
1498-
1499-
1500-
@validate_call
1501-
async def is_whitelisted_with_http_info(
1502-
self,
1503-
l1_address: StrictStr,
1504-
_request_timeout: Union[
1505-
None,
1506-
Annotated[StrictFloat, Field(gt=0)],
1507-
Tuple[
1508-
Annotated[StrictFloat, Field(gt=0)],
1509-
Annotated[StrictFloat, Field(gt=0)]
1510-
]
1511-
] = None,
1512-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1513-
_content_type: Optional[StrictStr] = None,
1514-
_headers: Optional[Dict[StrictStr, Any]] = None,
1515-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1516-
) -> ApiResponse[IsWhitelisted]:
1517-
"""isWhitelisted
1518-
1519-
Get is account whitelisted
1520-
1521-
:param l1_address: (required)
1522-
:type l1_address: str
1523-
:param _request_timeout: timeout setting for this request. If one
1524-
number provided, it will be total request
1525-
timeout. It can also be a pair (tuple) of
1526-
(connection, read) timeouts.
1527-
:type _request_timeout: int, tuple(int, int), optional
1528-
:param _request_auth: set to override the auth_settings for an a single
1529-
request; this effectively ignores the
1530-
authentication in the spec for a single request.
1531-
:type _request_auth: dict, optional
1532-
:param _content_type: force content-type for the request.
1533-
:type _content_type: str, Optional
1534-
:param _headers: set to override the headers for a single
1535-
request; this effectively ignores the headers
1536-
in the spec for a single request.
1537-
:type _headers: dict, optional
1538-
:param _host_index: set to override the host_index for a single
1539-
request; this effectively ignores the host_index
1540-
in the spec for a single request.
1541-
:type _host_index: int, optional
1542-
:return: Returns the result object.
1543-
""" # noqa: E501
1544-
1545-
_param = self._is_whitelisted_serialize(
1546-
l1_address=l1_address,
1547-
_request_auth=_request_auth,
1548-
_content_type=_content_type,
1549-
_headers=_headers,
1550-
_host_index=_host_index
1551-
)
1552-
1553-
_response_types_map: Dict[str, Optional[str]] = {
1554-
'200': "IsWhitelisted",
1555-
'400': "ResultCode",
1556-
}
1557-
response_data = await self.api_client.call_api(
1558-
*_param,
1559-
_request_timeout=_request_timeout
1560-
)
1561-
await response_data.read()
1562-
return self.api_client.response_deserialize(
1563-
response_data=response_data,
1564-
response_types_map=_response_types_map,
1565-
)
1566-
1567-
1568-
@validate_call
1569-
async def is_whitelisted_without_preload_content(
1570-
self,
1571-
l1_address: StrictStr,
1572-
_request_timeout: Union[
1573-
None,
1574-
Annotated[StrictFloat, Field(gt=0)],
1575-
Tuple[
1576-
Annotated[StrictFloat, Field(gt=0)],
1577-
Annotated[StrictFloat, Field(gt=0)]
1578-
]
1579-
] = None,
1580-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
1581-
_content_type: Optional[StrictStr] = None,
1582-
_headers: Optional[Dict[StrictStr, Any]] = None,
1583-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1584-
) -> RESTResponseType:
1585-
"""isWhitelisted
1586-
1587-
Get is account whitelisted
1588-
1589-
:param l1_address: (required)
1590-
:type l1_address: str
1591-
:param _request_timeout: timeout setting for this request. If one
1592-
number provided, it will be total request
1593-
timeout. It can also be a pair (tuple) of
1594-
(connection, read) timeouts.
1595-
:type _request_timeout: int, tuple(int, int), optional
1596-
:param _request_auth: set to override the auth_settings for an a single
1597-
request; this effectively ignores the
1598-
authentication in the spec for a single request.
1599-
:type _request_auth: dict, optional
1600-
:param _content_type: force content-type for the request.
1601-
:type _content_type: str, Optional
1602-
:param _headers: set to override the headers for a single
1603-
request; this effectively ignores the headers
1604-
in the spec for a single request.
1605-
:type _headers: dict, optional
1606-
:param _host_index: set to override the host_index for a single
1607-
request; this effectively ignores the host_index
1608-
in the spec for a single request.
1609-
:type _host_index: int, optional
1610-
:return: Returns the result object.
1611-
""" # noqa: E501
1612-
1613-
_param = self._is_whitelisted_serialize(
1614-
l1_address=l1_address,
1615-
_request_auth=_request_auth,
1616-
_content_type=_content_type,
1617-
_headers=_headers,
1618-
_host_index=_host_index
1619-
)
1620-
1621-
_response_types_map: Dict[str, Optional[str]] = {
1622-
'200': "IsWhitelisted",
1623-
'400': "ResultCode",
1624-
}
1625-
response_data = await self.api_client.call_api(
1626-
*_param,
1627-
_request_timeout=_request_timeout
1628-
)
1629-
return response_data.response
1630-
1631-
1632-
def _is_whitelisted_serialize(
1633-
self,
1634-
l1_address,
1635-
_request_auth,
1636-
_content_type,
1637-
_headers,
1638-
_host_index,
1639-
) -> RequestSerialized:
1640-
1641-
_host = None
1642-
1643-
_collection_formats: Dict[str, str] = {
1644-
}
1645-
1646-
_path_params: Dict[str, str] = {}
1647-
_query_params: List[Tuple[str, str]] = []
1648-
_header_params: Dict[str, Optional[str]] = _headers or {}
1649-
_form_params: List[Tuple[str, str]] = []
1650-
_files: Dict[str, Union[str, bytes]] = {}
1651-
_body_params: Optional[bytes] = None
1652-
1653-
# process the path parameters
1654-
# process the query parameters
1655-
if l1_address is not None:
1656-
1657-
_query_params.append(('l1_address', l1_address))
1658-
1659-
# process the header parameters
1660-
# process the form parameters
1661-
# process the body parameter
1662-
1663-
1664-
# set the HTTP header `Accept`
1665-
if 'Accept' not in _header_params:
1666-
_header_params['Accept'] = self.api_client.select_header_accept(
1667-
[
1668-
'application/json'
1669-
]
1670-
)
1671-
1672-
1673-
# authentication setting
1674-
_auth_settings: List[str] = [
1675-
]
1676-
1677-
return self.api_client.param_serialize(
1678-
method='GET',
1679-
resource_path='/api/v1/isWhitelisted',
1680-
path_params=_path_params,
1681-
query_params=_query_params,
1682-
header_params=_header_params,
1683-
body=_body_params,
1684-
post_params=_form_params,
1685-
files=_files,
1686-
auth_settings=_auth_settings,
1687-
collection_formats=_collection_formats,
1688-
_host=_host,
1689-
_request_auth=_request_auth
1690-
)
1691-
1692-
1693-
1694-
16951431
@validate_call
16961432
async def pnl(
16971433
self,

lighter/api/info_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def layer2_basic_info(
5454
) -> Layer2BasicInfo:
5555
"""layer2BasicInfo
5656
57-
Get zklighter general info, including contract address, and count of transactions and active users
57+
Get zklighter general info, including transaction and block stats
5858
5959
:param _request_timeout: timeout setting for this request. If one
6060
number provided, it will be total request
@@ -118,7 +118,7 @@ async def layer2_basic_info_with_http_info(
118118
) -> ApiResponse[Layer2BasicInfo]:
119119
"""layer2BasicInfo
120120
121-
Get zklighter general info, including contract address, and count of transactions and active users
121+
Get zklighter general info, including transaction and block stats
122122
123123
:param _request_timeout: timeout setting for this request. If one
124124
number provided, it will be total request
@@ -182,7 +182,7 @@ async def layer2_basic_info_without_preload_content(
182182
) -> RESTResponseType:
183183
"""layer2BasicInfo
184184
185-
Get zklighter general info, including contract address, and count of transactions and active users
185+
Get zklighter general info, including transaction and block stats
186186
187187
:param _request_timeout: timeout setting for this request. If one
188188
number provided, it will be total request

0 commit comments

Comments
 (0)