crypticorn 2.1.0__py3-none-any.whl → 2.1.2__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.
- crypticorn/auth/client/__init__.py +0 -6
- crypticorn/auth/client/api/auth_api.py +5 -8
- crypticorn/auth/client/models/__init__.py +0 -6
- crypticorn/auth/client/models/create_api_key_request.py +3 -6
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +3 -6
- crypticorn/auth/client/models/whoami200_response.py +0 -3
- crypticorn/common/auth.py +5 -6
- crypticorn/common/scopes.py +2 -5
- {crypticorn-2.1.0.dist-info → crypticorn-2.1.2.dist-info}/METADATA +1 -1
- {crypticorn-2.1.0.dist-info → crypticorn-2.1.2.dist-info}/RECORD +12 -12
- {crypticorn-2.1.0.dist-info → crypticorn-2.1.2.dist-info}/WHEEL +0 -0
- {crypticorn-2.1.0.dist-info → crypticorn-2.1.2.dist-info}/top_level.txt +0 -0
@@ -77,12 +77,6 @@ from crypticorn.auth.client.models.logout_default_response import LogoutDefaultR
|
|
77
77
|
from crypticorn.auth.client.models.logout_default_response_issues_inner import (
|
78
78
|
LogoutDefaultResponseIssuesInner,
|
79
79
|
)
|
80
|
-
from crypticorn.auth.client.models.oauth_callback200_response import (
|
81
|
-
OauthCallback200Response,
|
82
|
-
)
|
83
|
-
from crypticorn.auth.client.models.oauth_callback200_response_user import (
|
84
|
-
OauthCallback200ResponseUser,
|
85
|
-
)
|
86
80
|
from crypticorn.auth.client.models.refresh_token_info200_response import (
|
87
81
|
RefreshTokenInfo200Response,
|
88
82
|
)
|
@@ -30,9 +30,6 @@ from crypticorn.auth.client.models.create_api_key_request import CreateApiKeyReq
|
|
30
30
|
from crypticorn.auth.client.models.get_api_keys200_response_inner import (
|
31
31
|
GetApiKeys200ResponseInner,
|
32
32
|
)
|
33
|
-
from crypticorn.auth.client.models.oauth_callback200_response import (
|
34
|
-
OauthCallback200Response,
|
35
|
-
)
|
36
33
|
from crypticorn.auth.client.models.refresh_token_info200_response import (
|
37
34
|
RefreshTokenInfo200Response,
|
38
35
|
)
|
@@ -1297,7 +1294,7 @@ class AuthApi:
|
|
1297
1294
|
_content_type: Optional[StrictStr] = None,
|
1298
1295
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1299
1296
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1300
|
-
) ->
|
1297
|
+
) -> AuthorizeUser200Response:
|
1301
1298
|
"""OAuth Callback
|
1302
1299
|
|
1303
1300
|
Handles the OAuth callback from Google.
|
@@ -1347,7 +1344,7 @@ class AuthApi:
|
|
1347
1344
|
)
|
1348
1345
|
|
1349
1346
|
_response_types_map: Dict[str, Optional[str]] = {
|
1350
|
-
"200": "
|
1347
|
+
"200": "AuthorizeUser200Response",
|
1351
1348
|
}
|
1352
1349
|
response_data = await self.api_client.call_api(
|
1353
1350
|
*_param, _request_timeout=_request_timeout
|
@@ -1377,7 +1374,7 @@ class AuthApi:
|
|
1377
1374
|
_content_type: Optional[StrictStr] = None,
|
1378
1375
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1379
1376
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1380
|
-
) -> ApiResponse[
|
1377
|
+
) -> ApiResponse[AuthorizeUser200Response]:
|
1381
1378
|
"""OAuth Callback
|
1382
1379
|
|
1383
1380
|
Handles the OAuth callback from Google.
|
@@ -1427,7 +1424,7 @@ class AuthApi:
|
|
1427
1424
|
)
|
1428
1425
|
|
1429
1426
|
_response_types_map: Dict[str, Optional[str]] = {
|
1430
|
-
"200": "
|
1427
|
+
"200": "AuthorizeUser200Response",
|
1431
1428
|
}
|
1432
1429
|
response_data = await self.api_client.call_api(
|
1433
1430
|
*_param, _request_timeout=_request_timeout
|
@@ -1507,7 +1504,7 @@ class AuthApi:
|
|
1507
1504
|
)
|
1508
1505
|
|
1509
1506
|
_response_types_map: Dict[str, Optional[str]] = {
|
1510
|
-
"200": "
|
1507
|
+
"200": "AuthorizeUser200Response",
|
1511
1508
|
}
|
1512
1509
|
response_data = await self.api_client.call_api(
|
1513
1510
|
*_param, _request_timeout=_request_timeout
|
@@ -56,12 +56,6 @@ from crypticorn.auth.client.models.logout_default_response import LogoutDefaultR
|
|
56
56
|
from crypticorn.auth.client.models.logout_default_response_issues_inner import (
|
57
57
|
LogoutDefaultResponseIssuesInner,
|
58
58
|
)
|
59
|
-
from crypticorn.auth.client.models.oauth_callback200_response import (
|
60
|
-
OauthCallback200Response,
|
61
|
-
)
|
62
|
-
from crypticorn.auth.client.models.oauth_callback200_response_user import (
|
63
|
-
OauthCallback200ResponseUser,
|
64
|
-
)
|
65
59
|
from crypticorn.auth.client.models.refresh_token_info200_response import (
|
66
60
|
RefreshTokenInfo200Response,
|
67
61
|
)
|
@@ -53,7 +53,6 @@ class CreateApiKeyRequest(BaseModel):
|
|
53
53
|
"read:hive:model",
|
54
54
|
"read:hive:data",
|
55
55
|
"write:hive:model",
|
56
|
-
"write:hive:data",
|
57
56
|
"read:trade:bots",
|
58
57
|
"write:trade:bots",
|
59
58
|
"read:trade:api_keys",
|
@@ -71,15 +70,13 @@ class CreateApiKeyRequest(BaseModel):
|
|
71
70
|
"read:pay:payments",
|
72
71
|
"read:pay:products",
|
73
72
|
"write:pay:products",
|
74
|
-
"read:pay:
|
75
|
-
"write:pay:
|
76
|
-
"read:pay:now_payments",
|
77
|
-
"write:pay:now_payments",
|
73
|
+
"read:pay:now",
|
74
|
+
"write:pay:now",
|
78
75
|
"read:predictions",
|
79
76
|
]
|
80
77
|
):
|
81
78
|
raise ValueError(
|
82
|
-
"each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', '
|
79
|
+
"each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:api_keys', 'write:trade:api_keys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:predictions')"
|
83
80
|
)
|
84
81
|
return value
|
85
82
|
|
@@ -53,7 +53,6 @@ class GetApiKeys200ResponseInner(BaseModel):
|
|
53
53
|
"read:hive:model",
|
54
54
|
"read:hive:data",
|
55
55
|
"write:hive:model",
|
56
|
-
"write:hive:data",
|
57
56
|
"read:trade:bots",
|
58
57
|
"write:trade:bots",
|
59
58
|
"read:trade:api_keys",
|
@@ -71,15 +70,13 @@ class GetApiKeys200ResponseInner(BaseModel):
|
|
71
70
|
"read:pay:payments",
|
72
71
|
"read:pay:products",
|
73
72
|
"write:pay:products",
|
74
|
-
"read:pay:
|
75
|
-
"write:pay:
|
76
|
-
"read:pay:now_payments",
|
77
|
-
"write:pay:now_payments",
|
73
|
+
"read:pay:now",
|
74
|
+
"write:pay:now",
|
78
75
|
"read:predictions",
|
79
76
|
]
|
80
77
|
):
|
81
78
|
raise ValueError(
|
82
|
-
"each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', '
|
79
|
+
"each list item must be one of ('read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:api_keys', 'write:trade:api_keys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:predictions')"
|
83
80
|
)
|
84
81
|
return value
|
85
82
|
|
@@ -34,7 +34,6 @@ class Whoami200Response(BaseModel):
|
|
34
34
|
picture: Optional[StrictStr] = None
|
35
35
|
username: Optional[StrictStr] = None
|
36
36
|
phone: Optional[StrictStr] = None
|
37
|
-
apikeys: Optional[List[StrictStr]] = None
|
38
37
|
__properties: ClassVar[List[str]] = [
|
39
38
|
"email",
|
40
39
|
"id",
|
@@ -42,7 +41,6 @@ class Whoami200Response(BaseModel):
|
|
42
41
|
"picture",
|
43
42
|
"username",
|
44
43
|
"phone",
|
45
|
-
"apikeys",
|
46
44
|
]
|
47
45
|
|
48
46
|
model_config = ConfigDict(
|
@@ -101,7 +99,6 @@ class Whoami200Response(BaseModel):
|
|
101
99
|
"picture": obj.get("picture"),
|
102
100
|
"username": obj.get("username"),
|
103
101
|
"phone": obj.get("phone"),
|
104
|
-
"apikeys": obj.get("apikeys"),
|
105
102
|
}
|
106
103
|
)
|
107
104
|
return _obj
|
crypticorn/common/auth.py
CHANGED
@@ -23,20 +23,19 @@ apikey_header = APIKeyHeader(
|
|
23
23
|
|
24
24
|
def Security( # noqa: N802
|
25
25
|
dependency: Annotated[
|
26
|
-
|
27
|
-
]
|
26
|
+
Callable[..., Any], Doc("A dependable callable (like a function).")
|
27
|
+
],
|
28
28
|
scopes: Annotated[
|
29
|
-
|
29
|
+
list[Scope],
|
30
30
|
Doc("API scopes required for the *path operation*."),
|
31
|
-
] =
|
31
|
+
] = [],
|
32
32
|
use_cache: Annotated[
|
33
33
|
bool, Doc("Whether to cache the dependency during a single request.")
|
34
34
|
] = True,
|
35
35
|
) -> Any:
|
36
36
|
"""Security Dependency. Extends the fastapi.Security class to support enum scopes instead of strings."""
|
37
37
|
|
38
|
-
|
39
|
-
scopes_str = [s.value for s in scopes] if scopes else None
|
38
|
+
scopes_str = [s.value if isinstance(s, Enum) else s for s in scopes] if scopes else None
|
40
39
|
|
41
40
|
return params.Security(
|
42
41
|
dependency=dependency, scopes=scopes_str, use_cache=use_cache
|
crypticorn/common/scopes.py
CHANGED
@@ -16,13 +16,12 @@ class Scope(str, Enum):
|
|
16
16
|
READ_HIVE_MODEL = "read:hive:model"
|
17
17
|
READ_HIVE_DATA = "read:hive:data"
|
18
18
|
WRITE_HIVE_MODEL = "write:hive:model"
|
19
|
-
WRITE_HIVE_DATA = "write:hive:data"
|
20
19
|
|
21
20
|
# Trade scopes
|
22
21
|
READ_TRADE_BOTS = "read:trade:bots"
|
23
22
|
WRITE_TRADE_BOTS = "write:trade:bots"
|
24
|
-
|
25
|
-
|
23
|
+
READ_TRADE_APIKEYS = "read:trade:api_keys"
|
24
|
+
WRITE_TRADE_APIKEYS = "write:trade:api_keys"
|
26
25
|
READ_TRADE_ORDERS = "read:trade:orders"
|
27
26
|
READ_TRADE_ACTIONS = "read:trade:actions"
|
28
27
|
WRITE_TRADE_ACTIONS = "write:trade:actions"
|
@@ -38,8 +37,6 @@ class Scope(str, Enum):
|
|
38
37
|
READ_PAY_PAYMENTS = "read:pay:payments"
|
39
38
|
READ_PAY_PRODUCTS = "read:pay:products"
|
40
39
|
WRITE_PAY_PRODUCTS = "write:pay:products"
|
41
|
-
READ_PAY_SUBSCRIPTIONS = "read:pay:subscriptions"
|
42
|
-
WRITE_PAY_SUBSCRIPTIONS = "write:pay:subscriptions"
|
43
40
|
READ_PAY_NOW = "read:pay:now"
|
44
41
|
WRITE_PAY_NOW = "write:pay:now"
|
45
42
|
|
@@ -2,7 +2,7 @@ crypticorn/__init__.py,sha256=TL41V09dmtbd2ee07wmOuG9KJJpyvLMPJi5DEd9bDyU,129
|
|
2
2
|
crypticorn/client.py,sha256=PHtTaV8hWiR-IXcZhQlwEY38q-PhqQjf-JiqaN2MPWg,1844
|
3
3
|
crypticorn/auth/__init__.py,sha256=JAl1tBLK9pYLr_-YKaj581c-c94PWLoqnatTIVAVvMM,81
|
4
4
|
crypticorn/auth/main.py,sha256=ljPuO27VDiOO-jnNycBn96X8UbVHPgOUglj46ib3OjM,1336
|
5
|
-
crypticorn/auth/client/__init__.py,sha256=
|
5
|
+
crypticorn/auth/client/__init__.py,sha256=ziGgrJ7judjAwOaSKF-7lgs1zhE-XEZkMYKD0WUkHfs,4990
|
6
6
|
crypticorn/auth/client/api_client.py,sha256=H2jviD8CKiFnK1ZZXWKbSdBszBYcCQNcga9pwgM03D4,26908
|
7
7
|
crypticorn/auth/client/api_response.py,sha256=WhxwYDSMm6wPixp9CegO8dJzjFxDz3JF1yCq9s0ZqKE,639
|
8
8
|
crypticorn/auth/client/configuration.py,sha256=GNyY6hld-m9Dr7YPngRP5RQGg7o90SsSsSsq7VhyGVs,17715
|
@@ -11,20 +11,20 @@ crypticorn/auth/client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
11
11
|
crypticorn/auth/client/rest.py,sha256=RPbNRRbq7GtH9EBsQxaKT6NtSN8pIp1NmO1SKYZ9vVo,6944
|
12
12
|
crypticorn/auth/client/api/__init__.py,sha256=c-MlPvmOXSsk_ragrcUe8WkOuCPTTpJ8maSp2sER0EU,339
|
13
13
|
crypticorn/auth/client/api/admin_api.py,sha256=Bp52mo4XPDSzVsHolqAykAFpsaioNASY8qDfAUInxgU,21223
|
14
|
-
crypticorn/auth/client/api/auth_api.py,sha256=
|
14
|
+
crypticorn/auth/client/api/auth_api.py,sha256=3MS0t5n5_dh_OsnxlxAGocxsA_OxOixoy6CeBwyWWEE,124189
|
15
15
|
crypticorn/auth/client/api/service_api.py,sha256=xMQKbP9p6fNdJmFa3qMq2RXvE_Brt9HmtprBxEzb0Nk,12423
|
16
16
|
crypticorn/auth/client/api/user_api.py,sha256=nJJ_qD2RYDd6yQ9twHjtwhMJ9lEMSSE91IKltpFC3h0,103457
|
17
17
|
crypticorn/auth/client/api/wallet_api.py,sha256=AF6PSfv5bAnHpThe0Mtz1LD9qhWcd99lMOo7TJDGIt0,68927
|
18
|
-
crypticorn/auth/client/models/__init__.py,sha256=
|
18
|
+
crypticorn/auth/client/models/__init__.py,sha256=T0I3N-rI2A-VQ2BN9o8Nejt2Z5frT4V7fBmbBMceYHM,4082
|
19
19
|
crypticorn/auth/client/models/add_wallet200_response.py,sha256=ibNUhAku-i2Bglo6ibyQ3V-JlFFauvswYy4doZUNiN4,2559
|
20
20
|
crypticorn/auth/client/models/add_wallet_request.py,sha256=w86tiy1vtlymB7ET0opmENQiEKAGAEjXTC-w4T3LHT4,3204
|
21
21
|
crypticorn/auth/client/models/authorize_user200_response.py,sha256=tkhq7TaQK4li03HKXzrH0GzXa-GIkDVJTUKZ-Qp0USE,3381
|
22
22
|
crypticorn/auth/client/models/authorize_user200_response_auth.py,sha256=h1PFbqzF96ssj7t7dMMKiNtRjRu44kPNUydevJm8vKo,3228
|
23
23
|
crypticorn/auth/client/models/authorize_user_request.py,sha256=VZKmGc91nIhWwoKNTbYZ4oFPYuFNcLxEBvWl-HcM0r8,2981
|
24
24
|
crypticorn/auth/client/models/create_api_key200_response.py,sha256=dj6G4vqSTDoUY3jT3_RbUxsLdg_2W-BvfYfwP9O9RJE,2479
|
25
|
-
crypticorn/auth/client/models/create_api_key_request.py,sha256=
|
25
|
+
crypticorn/auth/client/models/create_api_key_request.py,sha256=UHRtVGudMK0h-ePJ_whlwqO0W6UVTQqNSeCBjo1A6wQ,4707
|
26
26
|
crypticorn/auth/client/models/create_user_request.py,sha256=kqVBJatlPtoYC1-nZnP2Mx2qZP2ATXffod7hTdWtoCY,3501
|
27
|
-
crypticorn/auth/client/models/get_api_keys200_response_inner.py,sha256=
|
27
|
+
crypticorn/auth/client/models/get_api_keys200_response_inner.py,sha256=YH7vEVQBgnrMV4EgD6WdkTJhC3h3l-Z-dNN2DJOSP5c,4845
|
28
28
|
crypticorn/auth/client/models/list_wallets200_response.py,sha256=OB8nKlBflpj8dXhjTeTewxjSRok3LnllZZ5ZKISDRvE,4752
|
29
29
|
crypticorn/auth/client/models/list_wallets200_response_balances_inner.py,sha256=sLebeWVenEeiHpiCgxQR8iCMlAgjtC6K8CKq6v9g-Ok,4043
|
30
30
|
crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py,sha256=rqXN7WVEhmeJxDKCSK5sxwWXvmn-Gnf810MGWwIUXII,3623
|
@@ -53,12 +53,12 @@ crypticorn/auth/client/models/verify_email200_response_auth_auth.py,sha256=bc819
|
|
53
53
|
crypticorn/auth/client/models/verify_email_request.py,sha256=8MBfxPTLn5X6Z3vE2blxmOtqDhU9tu7O7AyaxkHBG6w,2464
|
54
54
|
crypticorn/auth/client/models/verify_wallet_request.py,sha256=b0DAocvhKzPXPjM62DZqezlHxq3cNL7UVKl0d2judHQ,2691
|
55
55
|
crypticorn/auth/client/models/wallet_verified200_response.py,sha256=QILnTLsCKdI-WdV_fsLBy1UH4ZZU-U-wWJ9ot8v08tI,2465
|
56
|
-
crypticorn/auth/client/models/whoami200_response.py,sha256=
|
56
|
+
crypticorn/auth/client/models/whoami200_response.py,sha256=uehdq5epgeOphhrIR3tbrseflxcLAzGyKF-VW-o5cY8,2974
|
57
57
|
crypticorn/common/__init__.py,sha256=lY87VMTkIEqto6kcEjC1YWsUvT03QuPmXwxCaeWE854,196
|
58
|
-
crypticorn/common/auth.py,sha256=
|
58
|
+
crypticorn/common/auth.py,sha256=fpKxIECjywOOa9VCLDXXzFO7JaD64WfW68tBuLbkDX0,1188
|
59
59
|
crypticorn/common/auth_client.py,sha256=7ptCkWZwuMSIFTx3gajOH4CScPFG-Pn5gLe1m_NY5AQ,7622
|
60
60
|
crypticorn/common/errors.py,sha256=jGAS7TONKhdaRfft7w-0wrJ3BBTzqS6u03susiqAF0w,12723
|
61
|
-
crypticorn/common/scopes.py,sha256=
|
61
|
+
crypticorn/common/scopes.py,sha256=pRD9RauSRSxVGo8k5b2x66h3Wy2aaVEcluZvu6aMTE0,1418
|
62
62
|
crypticorn/common/urls.py,sha256=_NMhvhZXOsZpDBbgucqu0yboRFox6JVMlOoQq_Y5SGA,432
|
63
63
|
crypticorn/hive/__init__.py,sha256=hRfTlEzEql4msytdUC_04vfaHzVKG5CGZle1M-9QFgY,81
|
64
64
|
crypticorn/hive/main.py,sha256=RmCYSR0jwmfYWTK89dt79DuGPjEaip9XQs_LWNWr_tc,1036
|
@@ -225,7 +225,7 @@ crypticorn/trade/client/models/trading_action_type.py,sha256=jW0OsNz_ZNXlITxAfh9
|
|
225
225
|
crypticorn/trade/client/models/update_notification.py,sha256=B9QUuVRNpk1e5G8o0WFgIg3inm-OX7KJAJcjVnRzYx8,3046
|
226
226
|
crypticorn/trade/client/models/validation_error.py,sha256=uTkvsKrOAt-21UC0YPqCdRl_OMsuu7uhPtWuwRSYvv0,3228
|
227
227
|
crypticorn/trade/client/models/validation_error_loc_inner.py,sha256=22ql-H829xTBgfxNQZsqd8fS3zQt9tLW1pj0iobo0jY,5131
|
228
|
-
crypticorn-2.1.
|
229
|
-
crypticorn-2.1.
|
230
|
-
crypticorn-2.1.
|
231
|
-
crypticorn-2.1.
|
228
|
+
crypticorn-2.1.2.dist-info/METADATA,sha256=u4D3IWbrCj_sVH9-_9yeulEzF2kgaVu7E6FjD_1aMl0,3120
|
229
|
+
crypticorn-2.1.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
230
|
+
crypticorn-2.1.2.dist-info/top_level.txt,sha256=EP3NY216qIBYfmvGl0L2Zc9ItP0DjGSkiYqd9xJwGcM,11
|
231
|
+
crypticorn-2.1.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|