py-near 1.1.57__tar.gz → 1.1.59__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.
Files changed (44) hide show
  1. {py_near-1.1.57/src/py_near.egg-info → py_near-1.1.59}/PKG-INFO +1 -1
  2. {py_near-1.1.57 → py_near-1.1.59}/pyproject.toml +2 -2
  3. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/wallet.py +14 -8
  4. {py_near-1.1.57 → py_near-1.1.59/src/py_near.egg-info}/PKG-INFO +1 -1
  5. {py_near-1.1.57 → py_near-1.1.59}/LICENSE +0 -0
  6. {py_near-1.1.57 → py_near-1.1.59}/README.md +0 -0
  7. {py_near-1.1.57 → py_near-1.1.59}/setup.cfg +0 -0
  8. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/__init__.py +0 -0
  9. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/account.py +0 -0
  10. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/constants.py +0 -0
  11. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/__init__.py +0 -0
  12. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/core.py +0 -0
  13. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/ft/__init__.py +0 -0
  14. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/ft/async_client.py +0 -0
  15. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/ft/exceptions.py +0 -0
  16. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/ft/models.py +0 -0
  17. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/fts.py +0 -0
  18. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/keypom/__init__.py +0 -0
  19. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/keypom/async_client.py +0 -0
  20. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/keypom/exceptions.py +0 -0
  21. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/keypom/models.py +0 -0
  22. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/staking/__init__.py +0 -0
  23. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/staking/async_client.py +0 -0
  24. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/staking/exceptions.py +0 -0
  25. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/dapps/staking/models.py +0 -0
  26. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/exceptions/__init__.py +0 -0
  27. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/exceptions/exceptions.py +0 -0
  28. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/exceptions/provider.py +0 -0
  29. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/models.py +0 -0
  30. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/__init__.py +0 -0
  31. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/auth/__init__.py +0 -0
  32. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/auth/auth_2fa.py +0 -0
  33. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/auth/base.py +0 -0
  34. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/auth/core.py +0 -0
  35. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/auth/default_auth.py +0 -0
  36. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/auth/keys_auth.py +0 -0
  37. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/mpc/models.py +0 -0
  38. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/providers.py +0 -0
  39. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/transactions.py +0 -0
  40. {py_near-1.1.57 → py_near-1.1.59}/src/py_near/utils.py +0 -0
  41. {py_near-1.1.57 → py_near-1.1.59}/src/py_near.egg-info/SOURCES.txt +0 -0
  42. {py_near-1.1.57 → py_near-1.1.59}/src/py_near.egg-info/dependency_links.txt +0 -0
  43. {py_near-1.1.57 → py_near-1.1.59}/src/py_near.egg-info/top_level.txt +0 -0
  44. {py_near-1.1.57 → py_near-1.1.59}/tests/test_account.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-near
3
- Version: 1.1.57
3
+ Version: 1.1.59
4
4
  Summary: Pretty simple and fully asynchronous framework for working with NEAR blockchain
5
5
  Author-email: pvolnov <petr@herewallet.app>
6
6
  License: Permission is hereby granted, free of charge, to any
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "py-near"
3
- version = "1.1.57"
3
+ version = "1.1.59"
4
4
  description = "Pretty simple and fully asynchronous framework for working with NEAR blockchain"
5
5
  authors = ["pvolnov <petr@herewallet.app>"]
6
6
  readme = "README.md"
@@ -27,7 +27,7 @@ twine = "^6.1.0"
27
27
 
28
28
  [project]
29
29
  name = "py-near"
30
- version = "1.1.57"
30
+ version = "1.1.59"
31
31
  description = "Pretty simple and fully asynchronous framework for working with NEAR blockchain"
32
32
  authors = [{ name = "pvolnov", email = "petr@herewallet.app" }]
33
33
  license = { file = "LICENSE" }
@@ -45,9 +45,9 @@ class MPCWallet:
45
45
  :param default_root_pk: Default auth key for HOT Protocol, if provided, derive = sha256(default_root_pk.public_key).digest()
46
46
  """
47
47
  self.near_account = near_account
48
- if len(default_root_pk) != 32:
49
- raise ValueError("Default root pk should be 32 bytes")
50
48
  if default_root_pk:
49
+ if len(default_root_pk) != 32:
50
+ raise ValueError("Default root pk should be 32 bytes")
51
51
  self.default_root_pk = default_root_pk
52
52
  private_key_obj = self.derive_private_key(0)
53
53
  derive = sha256(private_key_obj.verify_key.encode()).digest()
@@ -98,7 +98,12 @@ class MPCWallet:
98
98
  )
99
99
 
100
100
  async def create_wallet(
101
- self, auth_account_id: str, metadata: str = "", auth_to_add_msg="", key_gen=1
101
+ self,
102
+ auth_account_id: str,
103
+ metadata: str = "",
104
+ auth_to_add_msg="",
105
+ key_gen=1,
106
+ timeout=30,
102
107
  ):
103
108
  """
104
109
  Create wallet with keys.auth.hot.tg auth method.
@@ -132,16 +137,16 @@ class MPCWallet:
132
137
  "metadata": metadata or None,
133
138
  },
134
139
  ),
135
- timeout=30,
140
+ timeout=timeout,
136
141
  )
137
142
  return s.json()
138
143
 
139
- async def get_ecdsa_public_key(self) -> bytes:
144
+ async def get_ecdsa_public_key(self, timeout=10) -> bytes:
140
145
  resp = (
141
146
  await self._client.post(
142
147
  f"{self.hot_rpc}/public_key",
143
148
  json=dict(wallet_derive=base58.b58encode(self.derive).decode()),
144
- timeout=10,
149
+ timeout=timeout,
145
150
  follow_redirects=True,
146
151
  )
147
152
  ).json()
@@ -158,6 +163,7 @@ class MPCWallet:
158
163
  message_body: Optional[bytes] = None,
159
164
  curve_type: CurveType = CurveType.SECP256K1,
160
165
  auth_methods: List[AuthContract] = None,
166
+ timeout=10,
161
167
  ):
162
168
  if not self.default_root_pk:
163
169
  raise ValueError("Default auth key is required")
@@ -184,7 +190,7 @@ class MPCWallet:
184
190
  proof=proof,
185
191
  key_type=curve_type,
186
192
  ),
187
- timeout=10,
193
+ timeout=timeout,
188
194
  follow_redirects=True,
189
195
  )
190
196
  resp = resp.json()
@@ -258,4 +264,4 @@ class MPCWallet:
258
264
  "user_payloads": user_payloads,
259
265
  },
260
266
  included=True,
261
- )
267
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-near
3
- Version: 1.1.57
3
+ Version: 1.1.59
4
4
  Summary: Pretty simple and fully asynchronous framework for working with NEAR blockchain
5
5
  Author-email: pvolnov <petr@herewallet.app>
6
6
  License: Permission is hereby granted, free of charge, to any
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes