Leth is the Command Line Interface tool for interacting with a Lightstreams node and Smart Vault. Leth also exposes a HTTP API for accessing these same commands from a client.
leth
The Leth tool run at the command line.
leth [flags]
Options
-h, --help help for leth
acl
Features Leth Access Control List (ACL) capabilities such as granting file permissions.
leth acl [flags]
Options
-h, --help help for acl
acl grant
Grant an ACL permission to another account.
Usage:
leth acl grant --nodeid=1 --network=rinkeby --permission=read --acl=0xd966aa573f8AcBfEb3724B661B420c258ceA5D38 --owner=0xadC486F16F003897fb927e22438cb1b820f79879 --to=0xadc486f16f003897fb927e22438cb1b820f79879
--acl string ACL ID (Deployed Smart Contract Hex Addr) associated with the stored file.
-h, --help help for grant
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--owner string The account with rights to grant the ACL permission.
--permission string Permission to grant. Possible values: [noaccess,read,write,admin]
--to string Account address to whom the permission should be granted.
--acl string ACL ID (Deployed Smart Contract Hex Addr) associated with the stored file.
-h, --help help for grant-public
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--owner string The account with rights to grant the ACL permission.
--acl string ACL ID (Deployed Smart Contract Hex Addr) associated with the stored file.
-h, --help help for revoke-public
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--owner string The account with rights to grant the ACL permission.
-h, --help help for auth
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--token string Token to authenticate.
--peer string PeerID who generated this token.
docs
Generates LETH / usage docs based on code into the: 'docs/cmd/auto/generated'.
leth docs [flags]
Options
-h, --help help for docs
init
Initializes new Lightstreams node for connecting to the chosen network.
leth init [flags]
Options
--force Force node data initialization, erase previous folder in case this exists. False by default.
-h, --help help for init
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
run
Runs full Leth node by spawning blockchain and IPFS daemons.
leth run [flags]
Options
-h, --help help for run
--https Serves an HTTPs server on your localhost. False by default.
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
shop
Features capabilities for selling/buying digital content.
leth shop [flags]
Options
-h, --help help for shop
shop buy
Allows an account to purchase permission to access a copy of the digital content from a seller.
--acl string ACL ID to buy.
--from string The account buying the ACL permission.
-h, --help help for buy
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--shop string Shop ID where ACL can be bought.
shop create
Creates a smart contract for managing the sale of digital content.
--from string The owner of the shop.
-h, --help help for create
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
shop sell
Specifies digital content for sale that to the smart contract controlling access permissions to the digital content.
--acl leth storage add ACL ID to sell (returned by leth storage add /).
--from string The account with rights to sell an ACL permission in the shop.
-h, --help help for sell
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--price/wei string For how much PHTs in Wei can users buy this ACL?
--shop leth shop create Shop ID where ACL can be sold/bought. (returned by leth shop create /).
user
Capabilities for managing a user's account.
leth user [flags]
Options
-h, --help help for user
user signin
Generates an authentication token to be used verifying a user's identity.
Usage:
leth user signin --nodeid=1 --network=rinkeby --account=0xadc486f16f003897fb927e22438cb1b820f79879 --peer=QmW6hffkDWCYK988j1oyAi26F6HEkHDvQ7qKKxoSNJwmyS
--account string Your account HEX address to login with.
-h, --help help for signin
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--peer string The PeerId of the Smart Vault node where this token will be valid for.
-h, --help help for signup
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--account string Account address to check balance for.
-h, --help help for balance
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
wallet transfer
Transfer funds from an account to another.
Usage:
leth wallet transfer --nodeid=1 --network=rinkeby --from=0xadc486f16f003897fb927e22438cb1b820f79879 --to=0x0dD46808e9780E4a23dd562962300bA029bCfFEf --value=1200000000000000000
--from string Account address to transfer Ether from.
-h, --help help for transfer
--network string Possible values: 'sirius', 'mainnet', 'standalone', 'rinkeby', 'ganache'.
--nodeid int ID of the node in order to support multiple nodes on the same machine. 0 by default.
--to string Account address to transfer Ether to.
--value string Amount of Ether to transfer in Wei format. 1 ETH = 1000000000000000000 Wei