%global _empty_manifest_terminate_build 0 Name: python-lto Version: 1.4.1 Release: 1 Summary: LTO Network Python API License: MIT License URL: https://github.com/ltonetwork/lto-api.python Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a8/1b/77bcbc3c25638251a97d44f9c0402cc8c6897ec64b90573c99a15a0d4c4e/lto-1.4.1.tar.gz BuildArch: noarch Requires: python3-requests Requires: python3-PyNaCl Requires: python3-pyblake2 Requires: python3-base58 Requires: python3-ecdsa Requires: python3-inflection Requires: python3-freezegun Requires: python3-mnemonic Requires: python3-eth-utils Requires: python3-pycryptodome Requires: python3-pysha3 %description ![LTO github readme](https://user-images.githubusercontent.com/100821/196711741-96cd4ba5-932a-4e95-b420-42d4d61c21fd.png) # lto-api.python Python client library for interacting with LTO Network ## Accounts ### Create an account The chain_id is 'L' for the mainnet and 'T' testnet ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create() ``` ### Create an account from seed ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_seed(seed) ``` ### Create an account from public key ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_public_key(public_key) ``` ### Create an account from private key ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_private_key(private_key) ``` ## Executing Transactions ### Create transaction First a transaction needs to be created. ```python from src.LTO.Transactions.Transfer import Transfer transaction = Transfer(recipient, amount) ``` The Transaction needs then to be signed. In order to sign a transaction an account is needed. ### Sign transaction ```python transaction.sign_with(account) ``` ### Broadcast transaction For last the transaction needs to be broadcasted to the node. In order to do so we need to connect to the node using the PublicNode class. ```python from src.LTO.PublicNode import PublicNode node = PublicNode(url) ``` The url refers to the node, there are many nodes available, here there are two examples, one for the mainnet and one for the testnet * https://nodes.lto.network * https://testnet.lto.network ```python transaction.broadcast_to(node) ``` ## Transactions ### Transfer Transaction ```python from lto.transactions import Transfer transaction = Transfer(recipient, amount) ``` ### Mass Transfer Transaction ```python from lto.transactions import MassTransfer transaction = MassTransfer(transfers) ``` ### Anchor Transaction ```python from lto.transactions import Anchor transaction = Anchor(anchor) ``` ### Lease Transaction ```python from lto.transactions import Lease transaction = Lease(recipient, amount) ``` ### Cancel Lease Transaction ```python from lto.transactions import CancelLease transaction = CancelLease(lease_id) ``` ### SetScript Transaction ```python from lto.transactions import SetScript transaction = SetScript(script) ``` ### Sponsorship transaction ```python from lto.transactions import Sponsorship transaction = Sponsorship(recipient) ``` ### Cancel Sponsorship transaction ```python from lto.transactions import CancelSponsorship transaction = CancelSponsorship(recipient) ``` ### Association transaction ```python from lto.transactions import Association transaction = Association(recipient, association_type, anchor) ``` ### Revoke Association transaction ```python from lto.transactions import RevokeAssociation transaction = RevokeAssociation(recipient, association_type, anchor) ``` ### Data transaction ```python from lto.transactions import Data transaction = Data(data_entries) ``` ### Register transaction ```python from lto.transactions import Register transaction = Register(account2, account3) ``` ### Burn transaction ```python from lto.transactions import Burn transaction = Burn(amount) ``` %package -n python3-lto Summary: LTO Network Python API Provides: python-lto BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-lto ![LTO github readme](https://user-images.githubusercontent.com/100821/196711741-96cd4ba5-932a-4e95-b420-42d4d61c21fd.png) # lto-api.python Python client library for interacting with LTO Network ## Accounts ### Create an account The chain_id is 'L' for the mainnet and 'T' testnet ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create() ``` ### Create an account from seed ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_seed(seed) ``` ### Create an account from public key ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_public_key(public_key) ``` ### Create an account from private key ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_private_key(private_key) ``` ## Executing Transactions ### Create transaction First a transaction needs to be created. ```python from src.LTO.Transactions.Transfer import Transfer transaction = Transfer(recipient, amount) ``` The Transaction needs then to be signed. In order to sign a transaction an account is needed. ### Sign transaction ```python transaction.sign_with(account) ``` ### Broadcast transaction For last the transaction needs to be broadcasted to the node. In order to do so we need to connect to the node using the PublicNode class. ```python from src.LTO.PublicNode import PublicNode node = PublicNode(url) ``` The url refers to the node, there are many nodes available, here there are two examples, one for the mainnet and one for the testnet * https://nodes.lto.network * https://testnet.lto.network ```python transaction.broadcast_to(node) ``` ## Transactions ### Transfer Transaction ```python from lto.transactions import Transfer transaction = Transfer(recipient, amount) ``` ### Mass Transfer Transaction ```python from lto.transactions import MassTransfer transaction = MassTransfer(transfers) ``` ### Anchor Transaction ```python from lto.transactions import Anchor transaction = Anchor(anchor) ``` ### Lease Transaction ```python from lto.transactions import Lease transaction = Lease(recipient, amount) ``` ### Cancel Lease Transaction ```python from lto.transactions import CancelLease transaction = CancelLease(lease_id) ``` ### SetScript Transaction ```python from lto.transactions import SetScript transaction = SetScript(script) ``` ### Sponsorship transaction ```python from lto.transactions import Sponsorship transaction = Sponsorship(recipient) ``` ### Cancel Sponsorship transaction ```python from lto.transactions import CancelSponsorship transaction = CancelSponsorship(recipient) ``` ### Association transaction ```python from lto.transactions import Association transaction = Association(recipient, association_type, anchor) ``` ### Revoke Association transaction ```python from lto.transactions import RevokeAssociation transaction = RevokeAssociation(recipient, association_type, anchor) ``` ### Data transaction ```python from lto.transactions import Data transaction = Data(data_entries) ``` ### Register transaction ```python from lto.transactions import Register transaction = Register(account2, account3) ``` ### Burn transaction ```python from lto.transactions import Burn transaction = Burn(amount) ``` %package help Summary: Development documents and examples for lto Provides: python3-lto-doc %description help ![LTO github readme](https://user-images.githubusercontent.com/100821/196711741-96cd4ba5-932a-4e95-b420-42d4d61c21fd.png) # lto-api.python Python client library for interacting with LTO Network ## Accounts ### Create an account The chain_id is 'L' for the mainnet and 'T' testnet ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create() ``` ### Create an account from seed ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_seed(seed) ``` ### Create an account from public key ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_public_key(public_key) ``` ### Create an account from private key ```python from lto.accounts.ed25519 import AccountFactory account = AccountFactory(chain_id).create_from_private_key(private_key) ``` ## Executing Transactions ### Create transaction First a transaction needs to be created. ```python from src.LTO.Transactions.Transfer import Transfer transaction = Transfer(recipient, amount) ``` The Transaction needs then to be signed. In order to sign a transaction an account is needed. ### Sign transaction ```python transaction.sign_with(account) ``` ### Broadcast transaction For last the transaction needs to be broadcasted to the node. In order to do so we need to connect to the node using the PublicNode class. ```python from src.LTO.PublicNode import PublicNode node = PublicNode(url) ``` The url refers to the node, there are many nodes available, here there are two examples, one for the mainnet and one for the testnet * https://nodes.lto.network * https://testnet.lto.network ```python transaction.broadcast_to(node) ``` ## Transactions ### Transfer Transaction ```python from lto.transactions import Transfer transaction = Transfer(recipient, amount) ``` ### Mass Transfer Transaction ```python from lto.transactions import MassTransfer transaction = MassTransfer(transfers) ``` ### Anchor Transaction ```python from lto.transactions import Anchor transaction = Anchor(anchor) ``` ### Lease Transaction ```python from lto.transactions import Lease transaction = Lease(recipient, amount) ``` ### Cancel Lease Transaction ```python from lto.transactions import CancelLease transaction = CancelLease(lease_id) ``` ### SetScript Transaction ```python from lto.transactions import SetScript transaction = SetScript(script) ``` ### Sponsorship transaction ```python from lto.transactions import Sponsorship transaction = Sponsorship(recipient) ``` ### Cancel Sponsorship transaction ```python from lto.transactions import CancelSponsorship transaction = CancelSponsorship(recipient) ``` ### Association transaction ```python from lto.transactions import Association transaction = Association(recipient, association_type, anchor) ``` ### Revoke Association transaction ```python from lto.transactions import RevokeAssociation transaction = RevokeAssociation(recipient, association_type, anchor) ``` ### Data transaction ```python from lto.transactions import Data transaction = Data(data_entries) ``` ### Register transaction ```python from lto.transactions import Register transaction = Register(account2, account3) ``` ### Burn transaction ```python from lto.transactions import Burn transaction = Burn(amount) ``` %prep %autosetup -n lto-1.4.1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-lto -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 1.4.1-1 - Package Spec generated