LTO Network
  • Getting started
  • What is LTO Network?
  • Tutorials
    • Buying and staking LTO
      • Exchanges
        • Binance
        • AscendEX (Bitmax)
        • Uniswap
        • PancakeSwap
        • Other exchanges
      • Creating your LTO web wallet
      • Using the LTO token bridge
      • Staking LTO tokens
    • Mining
      • Setup your node wallets
      • Node management
      • Public community nodes
    • Anchoring
      • Hashing
    • LetsFlow
  • Wallets
    • LTO Web Wallet
      • Using Ledger
    • Universal Wallet
    • LTO CLI
    • Third-Party Wallets
      • Stakely.io wallet
        • Web wallet
        • Commandline
    • ERC20 Token Swap
  • Running a node
    • Public node
      • Installation Guide
        • Mainnet & Testnet
        • Requirements
        • Configuration
        • (Virtual) Machine
        • Nginx reverse proxy (optional)
        • Troubleshooting FAQ
      • Cloud installation
        • Alibaba Cloud
        • AWS Elastic Beanstalk
        • Google Cloud
        • IBM Cloud
        • Microsoft Azure
        • OKD (OpenShift)
        • Raspberry Pi (Expert)
        • Ubuntu Linux with Container
        • Windows with Container
      • REST API
        • Address
        • Wallet
        • Lease Transactions
        • Peers
        • Blocks
        • Utils
        • FAQ
      • Security Notes
      • FAQ
      • Exchange integration guide
    • Anchor node
      • Installation Guide
        • Linux
        • MacOS
        • Windows
      • REST API
    • Identity node
      • Installation guide
        • Linux
        • MacOs
        • Windows
      • Configuration
        • Trust network
      • REST API
    • Workflow node
      • Installation Guide
        • MacOS
        • Windows
        • Ubuntu Linux
      • REST API
  • Ownables
    • What are Ownables?
    • Making your first ownable
    • Ownables SDK
      • Prerequisites
      • Setup
    • Ownables Architecture
      • Smart Contract
      • Widget
    • Ownables Bridge
  • Libraries
    • JavaScript
      • Accounts
      • Transactions
      • Event chain
      • Messages
      • Identities
      • HTTP Authentication
    • Python
      • Accounts
      • Public layer
    • PHP
      • Accounts
      • Identities
      • Public layer
      • Private layer
      • HTTP Authentication
      • Commandline scripts
    • Java
  • Protocol
    • Cryptography
    • Accounts
      • ED25519
      • secp256k1
      • secp256r1
    • Identities
      • Decentralized identifiers (DID)
      • Trust network
      • Verifiable credentials
    • Public layer
      • Transactions
        • Transfer
        • Lease
        • Cancel Lease
        • Mass Transfer
        • Set Script
        • Data
        • Anchor
        • Association
        • Revoke Association
        • Sponsorship
        • Cancel Sponsorship
        • Register
        • Burn
        • Mapped Anchor
        • Statement
      • Transaction fees
      • Consensus protocol
      • Activation Protocol
      • Data Structures
    • Private layer
      • Event chain
        • Event
      • Messaging
        • Sending messages
Powered by GitBook
On this page
  • Installation
  • Setup
  • Manage accounts
  • Public node
  • Information
  • Balance
  • Node
  • Transactions
  • Anchor
  • Associations
  • Data
  • Transfer
  • Mass-transfer
  • Burn
  • Leasing
  • Sponsorship
  • Script
  • Common options
  1. Wallets

LTO CLI

LTO wallet for the commandline terminal. Great for automating tasks.

PreviousUniversal WalletNextThird-Party Wallets

Last updated 4 months ago

Installation

pip install lto-cli

is the package installer for Python.

On some older operating systems the pip command is linked to Python 2. In that case use pip3 instead.

Setup

Manage accounts

lto account create
echo "my seed" | lto account seed --name foobar
lto account list
lto account show 3JuijVBB7NCwCz2Ae5HhCDsqCXzeBLRTyeL
lto account set-default foobar
lto account remove 3JuijVBB7NCwCz2Ae5HhCDsqCXzeBLRTyeL

Public node

lto node set https://nodes.lto.network
lto node show

Information

Balance

lto balance
lto balance 3MyGpJh6Bb8auF3HtSr2dSJjqQVxgqLynpK

Node

lto node status

Transactions

Anchor

HASH1=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
HASH2=d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35

lto anchor --hash $HASH1
lto anchor --hash $HASH1 --hash $HASH2   # Multiple anchors
lto anchor --hash $HASH2:$HASH1          # Mapped anchor

Associations

lto association issue --recipient 3MyGpJh6Bb8auF3HtSr2dSJjqQVxgqLynpK --type 1 --hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
lto association revoke --recipient 3MyGpJh6Bb8auF3HtSr2dSJjqQVxgqLynpK --type 1 --hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
lto association in
lto association out

Data

echo '{"foo": "bar"}' | lto data set
lto data get
lto data get --key=foo

Data is read as JSON from stdin.

Transfer

lto transfer --recipient 3MyGpJh6Bb8auF3HtSr2dSJjqQVxgqLynpK --amount 1000000000

Mass-transfer

echo "3N6MFpSbbzTozDcfkTUT5zZ2sNbJKFyRtRj:1000000000
3NBC7ETcdPbf4QAXSop5UCJ53yX34aGPXoz:800000000" | lto mass-transfer

Recipient/amount pairs are read from stdin.

Burn

lto burn --amount=1000

Leasing

lto lease create --recipient 3MyGpJh6Bb8auF3HtSr2dSJjqQVxgqLynpK --amount 1000000000
lto lease cancel --leaseid 6XmeG7SRWiw8pD6Uad6D9AAaY354v5TV6AJMhPpHMkqy
lto lease in
lto lease out

Sponsorship

lto sponsorship create --recipient 3MyGpJh6Bb8auF3HtSr2dSJjqQVxgqLynpK
lto sponsorship cancel --recipient 3MyGpJh6Bb8auF3HtSr2dSJjqQVxgqLynpK
lto sponsorship in

Script

match tx {
  case t:  TransferTransaction => false
  case mt: MassTransferTransaction => false
  case ss: SetScriptTransaction => false
  case b: BurnTransaction => false
  case _ => sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
}

This script will disallow transfer and burn transactions for an account and disable changing the script again. Your tokens will be locked if you use it!

cat myscript.ride | lto script

Common options

--network CHAINID
--account NAME|ADDRESS
--sponsor NAME|ADDRESS
--no-broadcast
--unsigned

--network

Use --network T or -T to use testnet instead of mainnet. You need to set up accounts specifically for testnet.

--account

Select one of the accounts configured during setup. The account can be referenced by name or address. The name is only known locally. If this option is omitted, the default account is used.

--sponsor

Choose an account to sponsor the transaction. The sponsor will co-sign the transaction and pay the transaction fee.

--no-broadcast

Create and sign the transaction, but don't broadcast it to the node. The JSON will be outputted.

--unsigned

Create the transaction, but don't sign it. This option should only be used in combination with --no-broadcast.

pip