py-near 1.1.52__tar.gz → 1.1.54__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.
- {py_near-1.1.52 → py_near-1.1.54}/PKG-INFO +38 -19
- {py_near-1.1.52 → py_near-1.1.54}/pyproject.toml +9 -12
- py_near-1.1.54/setup.cfg +4 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/account.py +6 -6
- py_near-1.1.54/src/py_near.egg-info/PKG-INFO +165 -0
- py_near-1.1.54/src/py_near.egg-info/SOURCES.txt +42 -0
- py_near-1.1.54/src/py_near.egg-info/dependency_links.txt +1 -0
- py_near-1.1.54/src/py_near.egg-info/top_level.txt +1 -0
- py_near-1.1.54/tests/test_account.py +13 -0
- py_near-1.1.52/src/py_near/dapps/__pycache__/__init__.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/__pycache__/core.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/__pycache__/fts.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/ft/__pycache__/__init__.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/ft/__pycache__/async_client.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/ft/__pycache__/exceptions.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/ft/__pycache__/models.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/staking/__pycache__/__init__.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/staking/__pycache__/async_client.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/staking/__pycache__/exceptions.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/dapps/staking/__pycache__/models.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/exceptions/__pycache__/__init__.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/exceptions/__pycache__/exceptions.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/exceptions/__pycache__/provider.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/__pycache__/__init__.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/__pycache__/models.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/__pycache__/wallet.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/auth/__pycache__/__init__.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/auth/__pycache__/auth_2fa.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/auth/__pycache__/base.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/auth/__pycache__/default_auth.cpython-311.pyc +0 -0
- py_near-1.1.52/src/py_near/mpc/auth/__pycache__/keys_auth.cpython-311.pyc +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/LICENSE +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/README.md +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/constants.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/core.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/ft/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/ft/async_client.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/ft/exceptions.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/ft/models.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/fts.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/keypom/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/keypom/async_client.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/keypom/exceptions.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/keypom/models.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/staking/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/staking/async_client.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/staking/exceptions.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/dapps/staking/models.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/exceptions/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/exceptions/exceptions.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/exceptions/provider.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/models.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/auth/__init__.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/auth/auth_2fa.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/auth/base.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/auth/core.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/auth/default_auth.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/auth/keys_auth.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/models.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/mpc/wallet.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/providers.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/transactions.py +0 -0
- {py_near-1.1.52 → py_near-1.1.54}/src/py_near/utils.py +0 -0
@@ -1,25 +1,45 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: py-near
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.54
|
4
4
|
Summary: Pretty simple and fully asynchronous framework for working with NEAR blockchain
|
5
|
-
Author: pvolnov
|
6
|
-
|
7
|
-
|
5
|
+
Author-email: pvolnov <petr@herewallet.app>
|
6
|
+
License: Permission is hereby granted, free of charge, to any
|
7
|
+
person obtaining a copy of this software and associated
|
8
|
+
documentation files (the "Software"), to deal in the
|
9
|
+
Software without restriction, including without
|
10
|
+
limitation the rights to use, copy, modify, merge,
|
11
|
+
publish, distribute, sublicense, and/or sell copies of
|
12
|
+
the Software, and to permit persons to whom the Software
|
13
|
+
is furnished to do so, subject to the following
|
14
|
+
conditions:
|
15
|
+
|
16
|
+
The above copyright notice and this permission notice
|
17
|
+
shall be included in all copies or substantial portions
|
18
|
+
of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
21
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
22
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
23
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
24
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
25
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
26
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
27
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
28
|
+
DEALINGS IN THE SOFTWARE.
|
29
|
+
|
30
|
+
Project-URL: homepage, https://github.com/pvolnov/py-near
|
31
|
+
Project-URL: documentation, https://py-near.readthedocs.io/en/latest
|
32
|
+
Project-URL: repository, https://github.com/pvolnov/py-near
|
33
|
+
Project-URL: changelog, https://github.com/pvolnov/py-near/blob/main/CHANGELOG.md
|
34
|
+
Project-URL: funding, https://opencollective.com/py-near
|
35
|
+
Project-URL: twitter, https://twitter.com/p_volnov
|
36
|
+
Keywords: python,near,async
|
8
37
|
Classifier: Programming Language :: Python :: 3
|
9
|
-
Classifier:
|
10
|
-
Classifier:
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
13
|
-
Requires-Dist: base58 (>=2.1.1,<3.0.0)
|
14
|
-
Requires-Dist: eth-keys (>=0.6.1,<0.7.0)
|
15
|
-
Requires-Dist: eth-utils (>=5.2.0,<6.0.0)
|
16
|
-
Requires-Dist: frozenlist (>=1.4.1,<2.0.0)
|
17
|
-
Requires-Dist: httpx (==0.26.0)
|
18
|
-
Requires-Dist: loguru (>=0.7.2,<0.8.0)
|
19
|
-
Requires-Dist: py-near-primitives (==0.2.3)
|
20
|
-
Requires-Dist: pydantic (>=2.6.2,<3.0.0)
|
21
|
-
Requires-Dist: pynacl (>=1.5.0,<2.0.0)
|
38
|
+
Classifier: License :: OSI Approved :: MIT License
|
39
|
+
Classifier: Operating System :: OS Independent
|
22
40
|
Description-Content-Type: text/markdown
|
41
|
+
License-File: LICENSE
|
42
|
+
Dynamic: license-file
|
23
43
|
|
24
44
|
# py-near
|
25
45
|
|
@@ -143,4 +163,3 @@ for t in task:
|
|
143
163
|
|
144
164
|
This project exists thanks to all the people who contribute. [[Code of conduct](CODE_OF_CONDUCT.md)].
|
145
165
|
<a href="https://github.com/pvolnov/py-near/graphs/contributors"><img src="https://opencollective.com/py-near/contributors.svg?width=890&button=false" /></a>
|
146
|
-
|
@@ -1,21 +1,19 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "py-near"
|
3
|
-
version = "1.1.
|
4
|
-
description="Pretty simple and fully asynchronous framework for working with NEAR blockchain"
|
3
|
+
version = "1.1.54"
|
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"
|
7
7
|
|
8
8
|
[tool.poetry.dependencies]
|
9
9
|
base58 = "^2.1.1"
|
10
10
|
python = ">=3.8,<3.12"
|
11
|
-
httpx = "0.26.0"
|
12
|
-
py-near-primitives = "0.2.
|
11
|
+
httpx = ">=0.26.0"
|
12
|
+
py-near-primitives = "0.2.4"
|
13
13
|
frozenlist = "^1.4.1"
|
14
14
|
pynacl = "^1.5.0"
|
15
15
|
loguru = "^0.7.2"
|
16
16
|
pydantic = "^2.6.2"
|
17
|
-
eth-utils = "^5.2.0"
|
18
|
-
eth-keys = "^0.6.1"
|
19
17
|
|
20
18
|
[tool.poetry.group.dev.dependencies]
|
21
19
|
black = "^21.12b0"
|
@@ -25,13 +23,14 @@ flake8 = "^4.0.1"
|
|
25
23
|
Sphinx = "^4.3.2"
|
26
24
|
sphinx-rtd-theme = "^1.0.0"
|
27
25
|
pytest-asyncio = "^0.23.5"
|
26
|
+
twine = "^6.1.0"
|
28
27
|
|
29
28
|
[project]
|
30
29
|
name = "py-near"
|
31
|
-
version = "1.1.
|
30
|
+
version = "1.1.54"
|
32
31
|
description = "Pretty simple and fully asynchronous framework for working with NEAR blockchain"
|
33
|
-
authors = [
|
34
|
-
license = {file = "LICENSE"}
|
32
|
+
authors = [{ name = "pvolnov", email = "petr@herewallet.app" }]
|
33
|
+
license = { file = "LICENSE" }
|
35
34
|
|
36
35
|
keywords = ["python", "near", "async"]
|
37
36
|
classifiers = [
|
@@ -62,7 +61,5 @@ twitter = "https://twitter.com/p_volnov"
|
|
62
61
|
|
63
62
|
[tool.pytest.ini_options]
|
64
63
|
addopts = "--capture=no --tb=native"
|
65
|
-
testpaths = [
|
66
|
-
"tests",
|
67
|
-
]
|
64
|
+
testpaths = ["tests"]
|
68
65
|
asyncio_mode = "auto"
|
py_near-1.1.54/setup.cfg
ADDED
@@ -4,6 +4,8 @@ import json
|
|
4
4
|
import sys
|
5
5
|
from typing import List, Union, Dict, Optional
|
6
6
|
|
7
|
+
from nacl.signing import VerifyKey
|
8
|
+
|
7
9
|
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
|
8
10
|
from collections.abc import MutableSet, MutableMapping
|
9
11
|
|
@@ -86,8 +88,8 @@ class Account(object):
|
|
86
88
|
logger.error(f"Can't decode private key {pk[:10]}")
|
87
89
|
continue
|
88
90
|
private_key = signing.SigningKey(pk[:32], encoder=encoding.RawEncoder)
|
89
|
-
|
90
|
-
self._signer_by_pk[
|
91
|
+
public_key_b58 = base58.b58encode(private_key.verify_key.encode()).decode("utf-8")
|
92
|
+
self._signer_by_pk[public_key_b58] = pk
|
91
93
|
self._free_signers.put_nowait(pk)
|
92
94
|
self._signers.append(pk)
|
93
95
|
|
@@ -206,8 +208,6 @@ class Account(object):
|
|
206
208
|
|
207
209
|
private_key = signing.SigningKey(pk[:32], encoder=encoding.RawEncoder)
|
208
210
|
public_key = private_key.verify_key
|
209
|
-
public_key.to_curve25519_public_key()
|
210
|
-
|
211
211
|
resp = await self._provider.get_access_key(
|
212
212
|
self.account_id, base58.b58encode(public_key.encode()).decode("utf8")
|
213
213
|
)
|
@@ -449,14 +449,14 @@ class Account(object):
|
|
449
449
|
await self._update_last_block_hash()
|
450
450
|
|
451
451
|
private_key = signing.SigningKey(pk[:32], encoder=encoding.RawEncoder)
|
452
|
-
verifying_key = private_key.verify_key
|
452
|
+
verifying_key: VerifyKey = private_key.verify_key
|
453
453
|
return DelegateActionModel(
|
454
454
|
sender_id=self.account_id,
|
455
455
|
receiver_id=receiver_id,
|
456
456
|
actions=actions,
|
457
457
|
nonce=access_key.nonce + 1,
|
458
458
|
max_block_height=self._latest_block_height + 1000,
|
459
|
-
public_key=base58.b58encode(verifying_key.
|
459
|
+
public_key=base58.b58encode(verifying_key.encode()).decode("utf-8"),
|
460
460
|
)
|
461
461
|
|
462
462
|
def sign_delegate_transaction(
|
@@ -0,0 +1,165 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: py-near
|
3
|
+
Version: 1.1.54
|
4
|
+
Summary: Pretty simple and fully asynchronous framework for working with NEAR blockchain
|
5
|
+
Author-email: pvolnov <petr@herewallet.app>
|
6
|
+
License: Permission is hereby granted, free of charge, to any
|
7
|
+
person obtaining a copy of this software and associated
|
8
|
+
documentation files (the "Software"), to deal in the
|
9
|
+
Software without restriction, including without
|
10
|
+
limitation the rights to use, copy, modify, merge,
|
11
|
+
publish, distribute, sublicense, and/or sell copies of
|
12
|
+
the Software, and to permit persons to whom the Software
|
13
|
+
is furnished to do so, subject to the following
|
14
|
+
conditions:
|
15
|
+
|
16
|
+
The above copyright notice and this permission notice
|
17
|
+
shall be included in all copies or substantial portions
|
18
|
+
of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
21
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
22
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
23
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
24
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
25
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
26
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
27
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
28
|
+
DEALINGS IN THE SOFTWARE.
|
29
|
+
|
30
|
+
Project-URL: homepage, https://github.com/pvolnov/py-near
|
31
|
+
Project-URL: documentation, https://py-near.readthedocs.io/en/latest
|
32
|
+
Project-URL: repository, https://github.com/pvolnov/py-near
|
33
|
+
Project-URL: changelog, https://github.com/pvolnov/py-near/blob/main/CHANGELOG.md
|
34
|
+
Project-URL: funding, https://opencollective.com/py-near
|
35
|
+
Project-URL: twitter, https://twitter.com/p_volnov
|
36
|
+
Keywords: python,near,async
|
37
|
+
Classifier: Programming Language :: Python :: 3
|
38
|
+
Classifier: License :: OSI Approved :: MIT License
|
39
|
+
Classifier: Operating System :: OS Independent
|
40
|
+
Description-Content-Type: text/markdown
|
41
|
+
License-File: LICENSE
|
42
|
+
Dynamic: license-file
|
43
|
+
|
44
|
+
# py-near
|
45
|
+
|
46
|
+
[](https://opencollective.com/py-near)
|
47
|
+
[](https://pypi.org/project/py-near)
|
48
|
+
[](https://pypi.python.org/pypi/py-near)
|
49
|
+
[](https://py-near.readthedocs.io/en/latest)
|
50
|
+
[](https://github.com/pvolnov/py-near/issues)
|
51
|
+
[](https://opensource.org/licenses/MIT)
|
52
|
+
[](https://twitter.com/p_volnov)
|
53
|
+
|
54
|
+
[//]: # ([](https://pypi.org/project/py-near))
|
55
|
+
|
56
|
+
|
57
|
+
**py-near** is a pretty simple and fully asynchronous framework for working with NEAR blockchain.
|
58
|
+
|
59
|
+
## Examples
|
60
|
+
<details>
|
61
|
+
<summary>📚 Click to see some basic examples</summary>
|
62
|
+
|
63
|
+
|
64
|
+
**Few steps before getting started...**
|
65
|
+
- Install the latest stable version of py-near, simply running `pip install py-near`
|
66
|
+
- Create NEAR account and get your private key [wallet](https://wallet.near.org/create)
|
67
|
+
|
68
|
+
### Simple money transfer
|
69
|
+
|
70
|
+
```python
|
71
|
+
from py_near.account import Account
|
72
|
+
import asyncio
|
73
|
+
from py_near.dapps.core import NEAR
|
74
|
+
|
75
|
+
ACCOUNT_ID = "bob.near"
|
76
|
+
PRIVATE_KEY = "ed25519:..."
|
77
|
+
|
78
|
+
|
79
|
+
async def main():
|
80
|
+
acc = Account(ACCOUNT_ID, PRIVATE_KEY)
|
81
|
+
|
82
|
+
await acc.startup()
|
83
|
+
print(await acc.get_balance() / NEAR)
|
84
|
+
print(await acc.get_balance("bob.near") / NEAR)
|
85
|
+
|
86
|
+
tr = await acc.send_money("bob.near", NEAR * 2)
|
87
|
+
print(tr.transaction.hash)
|
88
|
+
print(tr.logs)
|
89
|
+
|
90
|
+
|
91
|
+
asyncio.run(main())
|
92
|
+
```
|
93
|
+
|
94
|
+
### Transfer money by phone number
|
95
|
+
|
96
|
+
```python
|
97
|
+
from py_near.account import Account
|
98
|
+
import asyncio
|
99
|
+
from py_near.dapps.core import NEAR
|
100
|
+
|
101
|
+
ACCOUNT_ID = "bob.near"
|
102
|
+
PRIVATE_KEY = "ed25519:..."
|
103
|
+
|
104
|
+
|
105
|
+
async def main():
|
106
|
+
acc = Account(ACCOUNT_ID, PRIVATE_KEY)
|
107
|
+
|
108
|
+
await acc.startup()
|
109
|
+
tr = await acc.phone.send_near_to_phone("+15626200911", NEAR // 10)
|
110
|
+
print(tr.transaction.hash)
|
111
|
+
|
112
|
+
|
113
|
+
asyncio.run(main())
|
114
|
+
```
|
115
|
+
|
116
|
+
### Parallel requests
|
117
|
+
|
118
|
+
Only one parallel request can be made from one private key.
|
119
|
+
All transaction calls execute sequentially.
|
120
|
+
To make several parallel calls you need to use several private keys
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
```python3
|
125
|
+
acc = Account("bob.near", private_key1)
|
126
|
+
|
127
|
+
for i in range(2):
|
128
|
+
signer = InMemorySigner.from_random(AccountId("bob.near"), KeyType.ED25519)
|
129
|
+
await acc.add_full_access_public_key(str(signer.public_key))
|
130
|
+
print(signer.secret_key)
|
131
|
+
```
|
132
|
+
|
133
|
+
Now we can call transactions in parallel
|
134
|
+
|
135
|
+
```python3
|
136
|
+
acc = Account("bob.near", [private_key1, private_key2, private_key3])
|
137
|
+
# request time = count transactions / count public keys
|
138
|
+
tasks = [
|
139
|
+
asyncio.create_task(acc.send_money("alisa.near", 1)),
|
140
|
+
asyncio.create_task(acc.send_money("alisa.near", 1)),
|
141
|
+
asyncio.create_task(acc.send_money("alisa.near", 1)),
|
142
|
+
]
|
143
|
+
for t in task:
|
144
|
+
await t
|
145
|
+
```
|
146
|
+
|
147
|
+
</details>
|
148
|
+
|
149
|
+
|
150
|
+
## Official py-near resources:
|
151
|
+
- News: [@herewallet](https://t.me/herewallet)
|
152
|
+
- Social media:
|
153
|
+
- 🇺🇸 [Telegram](https://t.me/neafiol)
|
154
|
+
- 🇺🇸 [Twitter](https://twitter.com/p_volnov)
|
155
|
+
- PyPI: [py-near](https://pypi.python.org/pypi/py-near)
|
156
|
+
- Documentation: [py-near.readthedocs.io](https://py-near.readthedocs.io/en/latest)
|
157
|
+
- Source: [Github repo](https://github.com/pvolnov/py-near)
|
158
|
+
- Issues/Bug tracker: [Github issues tracker](https://github.com/pvolnov/py-near/issues)
|
159
|
+
|
160
|
+
## Contributors
|
161
|
+
|
162
|
+
### Code Contributors
|
163
|
+
|
164
|
+
This project exists thanks to all the people who contribute. [[Code of conduct](CODE_OF_CONDUCT.md)].
|
165
|
+
<a href="https://github.com/pvolnov/py-near/graphs/contributors"><img src="https://opencollective.com/py-near/contributors.svg?width=890&button=false" /></a>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
LICENSE
|
2
|
+
README.md
|
3
|
+
pyproject.toml
|
4
|
+
src/py_near/__init__.py
|
5
|
+
src/py_near/account.py
|
6
|
+
src/py_near/constants.py
|
7
|
+
src/py_near/models.py
|
8
|
+
src/py_near/providers.py
|
9
|
+
src/py_near/transactions.py
|
10
|
+
src/py_near/utils.py
|
11
|
+
src/py_near.egg-info/PKG-INFO
|
12
|
+
src/py_near.egg-info/SOURCES.txt
|
13
|
+
src/py_near.egg-info/dependency_links.txt
|
14
|
+
src/py_near.egg-info/top_level.txt
|
15
|
+
src/py_near/dapps/__init__.py
|
16
|
+
src/py_near/dapps/core.py
|
17
|
+
src/py_near/dapps/fts.py
|
18
|
+
src/py_near/dapps/ft/__init__.py
|
19
|
+
src/py_near/dapps/ft/async_client.py
|
20
|
+
src/py_near/dapps/ft/exceptions.py
|
21
|
+
src/py_near/dapps/ft/models.py
|
22
|
+
src/py_near/dapps/keypom/__init__.py
|
23
|
+
src/py_near/dapps/keypom/async_client.py
|
24
|
+
src/py_near/dapps/keypom/exceptions.py
|
25
|
+
src/py_near/dapps/keypom/models.py
|
26
|
+
src/py_near/dapps/staking/__init__.py
|
27
|
+
src/py_near/dapps/staking/async_client.py
|
28
|
+
src/py_near/dapps/staking/exceptions.py
|
29
|
+
src/py_near/dapps/staking/models.py
|
30
|
+
src/py_near/exceptions/__init__.py
|
31
|
+
src/py_near/exceptions/exceptions.py
|
32
|
+
src/py_near/exceptions/provider.py
|
33
|
+
src/py_near/mpc/__init__.py
|
34
|
+
src/py_near/mpc/models.py
|
35
|
+
src/py_near/mpc/wallet.py
|
36
|
+
src/py_near/mpc/auth/__init__.py
|
37
|
+
src/py_near/mpc/auth/auth_2fa.py
|
38
|
+
src/py_near/mpc/auth/base.py
|
39
|
+
src/py_near/mpc/auth/core.py
|
40
|
+
src/py_near/mpc/auth/default_auth.py
|
41
|
+
src/py_near/mpc/auth/keys_auth.py
|
42
|
+
tests/test_account.py
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
py_near
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import pytest
|
2
|
+
|
3
|
+
from py_near.account import Account
|
4
|
+
|
5
|
+
|
6
|
+
@pytest.mark.asyncio
|
7
|
+
async def test_account_get_balance():
|
8
|
+
acc = Account(
|
9
|
+
account_id="bob.testnet",
|
10
|
+
rpc_addr="https://rpc.testnet.near.org",
|
11
|
+
)
|
12
|
+
|
13
|
+
assert await acc.get_balance(account_id=acc.account_id) > 0
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|