Skip to content

Commit

Permalink
Feat/pyonear types (#1)
Browse files Browse the repository at this point in the history
* feat: use pyonear structures

* feat: use pyonear structures

* feat: use pyonear structures
  • Loading branch information
pvolnov authored Dec 13, 2022
1 parent 0172425 commit 860e956
Show file tree
Hide file tree
Showing 30 changed files with 230 additions and 520 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.venv,.nox
max-line-length = 100
per-file-ignores = based58.pyi: E301,E302,F821
File renamed without changes.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ from pynear.dapps.core import NEAR
ACCOUNT_ID = "mydev.near"
PRIVATE_KEY = "ed25519:..."


async def main():
acc = Account(ACCOUNT_ID, PRIVATE_KEY)
acc = Account(ACCOUNT_ID, PRIVATE_KEY)

await acc.startup()
print(await acc.get_balance() / NEAR)
print(await acc.get_balance("bob.near") / NEAR)

await acc.startup()
print(await acc.get_balance() / NEAR)
print(await acc.get_balance("bob.near") / NEAR)
tr = await acc.send_money("bob.near", NEAR * 2)
print(tr.transaction.hash)
print(tr.logs)

tr = await acc.send_money("bob.near", NEAR * 2)
print(tr.transaction.hash)
print(tr.logs)

asyncio.run(main())
```
Expand All @@ -56,12 +58,14 @@ from pynear.dapps.core import NEAR
ACCOUNT_ID = "mydev.near"
PRIVATE_KEY = "ed25519:..."


async def main():
acc = Account(ACCOUNT_ID, PRIVATE_KEY)
acc = Account(ACCOUNT_ID, PRIVATE_KEY)

await acc.startup()
tr = await acc.phone.send_near_to_phone("+15626200911", NEAR // 10)
print(tr.transaction.hash)

await acc.startup()
tr = await acc.phone.send_near_to_phone("+15626200911", NEAR // 10)
print(tr.transaction.hash)

asyncio.run(main())
```
Expand Down
2 changes: 1 addition & 1 deletion docs/clients/fungible-token.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Fungible tokens transfer
Fungible tokens
======================


Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
9 changes: 0 additions & 9 deletions pynear/__init__.py

This file was deleted.

75 changes: 0 additions & 75 deletions pynear/serializer.py

This file was deleted.

51 changes: 0 additions & 51 deletions pynear/signer.py

This file was deleted.

Loading

0 comments on commit 860e956

Please sign in to comment.