deltadefi 0.0.6__py3-none-any.whl → 0.0.7__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 deltadefi might be problematic. Click here for more details.

@@ -16,6 +16,7 @@ from deltadefi.responses import (
16
16
  SubmitDepositTransactionResponse,
17
17
  SubmitWithdrawalTransactionResponse,
18
18
  )
19
+ from deltadefi.responses.accounts import GetOperationKeyResponse
19
20
 
20
21
 
21
22
  class Accounts(API):
@@ -28,6 +29,17 @@ class Accounts(API):
28
29
  def __init__(self, api_key=None, base_url=None, **kwargs):
29
30
  super().__init__(api_key=api_key, base_url=base_url, **kwargs)
30
31
 
32
+ def get_operation_key(self, **kwargs) -> GetOperationKeyResponse:
33
+ """
34
+ Get the encrypted operation key.
35
+
36
+ Returns:
37
+ A GetOperationKeyResponse object containing the encrypted operation key and its hash.
38
+ """
39
+
40
+ url_path = "/operation-key"
41
+ return self.send_request("GET", self.group_url_path + url_path, kwargs)
42
+
31
43
  def create_new_api_key(self, **kwargs) -> CreateNewAPIKeyResponse:
32
44
  """
33
45
  Create a new API key.
@@ -30,14 +30,16 @@ class ApiClient:
30
30
  """
31
31
  if network == "mainnet":
32
32
  self.network_id = 1
33
- base_url = "https://api-dev.deltadefi.io" # TODO: input production link once available
33
+ self.base_url = "https://api-dev.deltadefi.io" # TODO: input production link once available
34
34
  else:
35
35
  self.network_id = 0
36
- base_url = "https://api-dev.deltadefi.io"
36
+ self.base_url = "https://api-dev.deltadefi.io"
37
+
38
+ if base_url:
39
+ self.base_url = base_url
37
40
 
38
41
  self.api_key = api_key
39
42
  self.wallet = wallet
40
- self.base_url = base_url
41
43
 
42
44
  self.accounts = Accounts(base_url=base_url, api_key=api_key)
43
45
  self.app = App(base_url=base_url, api_key=api_key)
@@ -14,6 +14,12 @@ class CreateNewAPIKeyResponse:
14
14
  api_key: str
15
15
 
16
16
 
17
+ @dataclass
18
+ class GetOperationKeyResponse:
19
+ encrypted_operation_key: str
20
+ operation_key_hash: str
21
+
22
+
17
23
  @dataclass
18
24
  class BuildDepositTransactionResponse:
19
25
  tx_hex: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: deltadefi
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Python SDK for DeltaDeFi protocol.
5
5
  License: Apache-2.0
6
6
  Keywords: cardano
@@ -101,6 +101,16 @@ submit_order_response = api.order.submit_place_order_transaction(signed_tx="<sig
101
101
  print(submit_order_response)
102
102
  ```
103
103
 
104
+ ## Development
105
+
106
+ ### Tests
107
+
108
+ Testing sdk:
109
+
110
+ ```sh
111
+ DELTADEFI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make test
112
+ ```
113
+
104
114
  ## License
105
115
 
106
116
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>
@@ -4,9 +4,9 @@ deltadefi/api_resources/__init__.py,sha256=_SGHTpaQTIBvh9Rm868IT5pXpvvGBPqz3bxkY
4
4
  deltadefi/api_resources/auth.py,sha256=Mpl4Dbh_d_gGhwLo2CtBSKxZ21DC74x-qjVhlczZCDE,278
5
5
  deltadefi/api_resources/validation.py,sha256=vz-hovpLy9SMOIFGcBHC8vWZH8CJRlQP8rcbbTSM-PM,1375
6
6
  deltadefi/clients/__init__.py,sha256=AoK_kj_UKpxtCa3_if3yeHFAzHli9Mg-tsrUKOX7eH8,38
7
- deltadefi/clients/accounts.py,sha256=I3Yh82iHVK932u2Luvewbxk_KJ-WVLYqH048XBFgrsQ,5347
7
+ deltadefi/clients/accounts.py,sha256=i4Xjfb4KQH3VqrBbjZ4ovKJSf2nO2VzZm1KptHM5B4M,5781
8
8
  deltadefi/clients/app.py,sha256=TOgRlP83p91r7oS4ez8Gfm8soQzFHrJAmOHZJoGZ4SM,712
9
- deltadefi/clients/clients.py,sha256=Yzxkpf9-PA6LdYiJtmap1DrE3U5Sd4VNDGjexZxVbcs,2197
9
+ deltadefi/clients/clients.py,sha256=Upr2twP4i_j507TijUzmQMx8ZVhuiwoEYWjg_L484qs,2233
10
10
  deltadefi/clients/market.py,sha256=v8hK06oXC73qS3IjvWDempHq_-9T6OW2pckIcDR7P2M,2580
11
11
  deltadefi/clients/order.py,sha256=kuv2mPnQeE-P66fylZEp9vXuqyhM26_MxKreY-VkoWo,3850
12
12
  deltadefi/constants/__init__.py,sha256=7LkrzfLTJsCCUl5IgZYrl-AbY_cf1fftcLklgnBYDTs,40
@@ -17,8 +17,8 @@ deltadefi/lib/utils.py,sha256=zuQFAKQphbGxDdPzBURw4A2n3AkRSbzmjMLHPLm9Ed4,1035
17
17
  deltadefi/models/__init__.py,sha256=oDJj6Y4gXN6C7Oz_t2fq8hej-D0G9OqfXjL4Jaeq8z8,37
18
18
  deltadefi/models/models.py,sha256=vnNFFPMQcOOSKhONHNHXJIx4wddV4IKeBszykiqWCwk,1182
19
19
  deltadefi/responses/__init__.py,sha256=JKSIUQu6qI_XhbAR2mVMCKNvR6x_vFZdyLGOuQTVrVY,64
20
- deltadefi/responses/accounts.py,sha256=aVQq1CqebIQz0YuNphFlA2fGBgvmf8FpboJzToEiY2g,939
20
+ deltadefi/responses/accounts.py,sha256=tw88KfALO3hifBaXcPYh4ZtPASLjXIz20HH96SZ96LQ,1044
21
21
  deltadefi/responses/responses.py,sha256=etlx83GgZC2noLKo8GKrmDo3Xhwup-g8Ob29f0WYA4I,993
22
- deltadefi-0.0.6.dist-info/METADATA,sha256=63Xkio2msUWQkRKcqLU5u7sjRzYNoV-RUFxd7r6jhHY,3081
23
- deltadefi-0.0.6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
24
- deltadefi-0.0.6.dist-info/RECORD,,
22
+ deltadefi-0.0.7.dist-info/METADATA,sha256=LH-955ot3NUYxeELlRk566aj-yGlvtfh3P9KmP7Z0po,3194
23
+ deltadefi-0.0.7.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
24
+ deltadefi-0.0.7.dist-info/RECORD,,