LTO Network
Search…
Python
Python client library for interacting with LTO Network
Visit the project on Github

Installation

1
pip install lto
Copied!

Usage

1
from lto import LTO
2
from lto.public_node import PublicNode
3
4
seed = "manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add"
5
6
account = LTO("T").Account(seed='seed')
7
node = PublicNode("https://testnet.lto.network")
8
9
amount = 1000.0 # Amount of LTO to transfer
10
recipient = "3Jo1JCrBvnWCg37VDxMXAjYhsS9rRDLBSze"
11
12
transaction = Transfer(recipient, amount)
13
transaction.sign_with(account)
14
transaction.broadcast_to(node)
Copied!
To check the response from the node is easy, just modify the last line and add a print
1
response = transaction.broadcast_to(node)
2
print(response.to_json())
Copied!
Copy link