LTO Network
Search…
Latest version
Getting started
Tutorials
Buying and staking LTO
Mining
Anchoring
Live Contracts
Wallets
LTO wallet
Third-Party Wallets
ERC20 Token Swap
Running a node
Public node
Anchor node
Identity node
Workflow node
Libraries
JavaScript
Python
Accounts
Public layer
PHP
Java
Go
Protocol
Cryptography
Accounts
Identities
Public layer
Private layer
Powered By
GitBook
Accounts
Creation
Create an account
1
from lto import LTO
2
​
3
account = LTO(chain_id).Account()
Copied!
Create an account from seed
1
from lto import LTO
2
​
3
account = LTO(chain_id).Account(seed=my_seed)
Copied!
Create an account from public key
1
from lto import LTO
2
​
3
account = LTO(chain_id).Account(public_key=my_pub_key)
Copied!
Create an account from private key
1
from lto import LTO
2
​
3
account = LTO(chain_id).Account(provate_key=my_priv_key)
Copied!
Different encryption algorithms
If not specified EdDSA is default:
ed25519
1
account = LTO(chain_id).Account()
Copied!
For ECDSA we have two available curves:
secp256k1
1
account = LTO(chain_id).Account(key_type = "secp256k1")
Copied!
secp256r1
1
account = LTO(chain_id).Account(key_type = "secp256r1")
Copied!
​
Signing
Signing a message
We first need to convert the string to bytes using our crypto library
1
from lto import crypto
2
​
3
message = crypto.str2bytes("test")
4
signature = account.sign(message)
Copied!
Verifying a message
1
account.verify_signature(message, signature)
Copied!
Libraries - Previous
Python
Next
Public layer
Last modified
1mo ago
Copy link
Contents
Creation
Create an account
Create an account from seed
Create an account from public key
Create an account from private key
Different encryption algorithms
If not specified EdDSA is default:
For ECDSA we have two available curves:
Signing
Signing a message
Verifying a message