lootex-cli
v0.0.5
Published
A command-line interface tool for interacting with Lootex, specifically designed for deploying NFT collections.
Readme
Lootex CLI
A command-line interface tool for interacting with Lootex, specifically designed for deploying NFT collections.
Installation
npm install -g lootex-cliUsage
lootex [command] [options]Commands
Deploy
Deploy a new NFT collection to a supported blockchain.
lootex deploy --imageFile <path> --walletPrivateKey <key> --authToken <token> --apiKey <key> [options]Required Options:
--imageFile <path>: Path to the image file for your NFT collection--walletPrivateKey <key>: Private key of the wallet used for deployment--authToken <token>: Authentication token for Lootex--apiKey <key>: Lootex API key
Optional Options:
--name <name>: Collection name (default: "My Awesome NFT Collection")--symbol <symbol>: Collection symbol (default: "MANFT")--chainId <id>: Chain ID for deployment (default: "1868")--assetName <name>: Asset name (default: same as collection name)--assetDescription <description>: Asset description (default: same as collection name)--startTime <timestamp>: Start time in milliseconds since epoch (default: 24 hours from now)--amount <amount>: Number of NFTs to mint (default: "1000")--price <price>: Price per NFT (default: "0")--creatorFeeAddress <address>: Address to receive the creator fee if isCreatorFee is set to true (default: wallet address)--isCreatorFee: Enable creator fee (default: false)
List
List an NFT for sale on the Lootex marketplace.
lootex list --tokenAddress <address> --tokenId <id> --pricePerToken <price> --chainId <id> [options]Required Options:
--tokenAddress <address>: NFT contract address--tokenId <id>: NFT token ID--pricePerToken <price>: Price per NFT in the smallest denomination of the currency--chainId <id>: Chain ID where the NFT exists
Optional Options:
--apiKey <key>: Lootex API key (can also use LOOTEX_API_KEY environment variable)--walletPrivateKey <key>: Private key of the wallet (can also use LOOTEX_PRIVATE_KEY environment variable)--tokenType <type>: Token type, either "ERC721" or "ERC1155" (default: "ERC721")--quantity <amount>: Amount to list for ERC1155 tokens (default: "1")--currency <address>: Currency address for payment (default: native token of the chain)--startTime <timestamp>: Start time in ms since epoch (default: immediate)--endTime <timestamp>: End time in ms since epoch--duration <ms>: Duration in ms (alternative to endTime)--fees <json>: Fees as JSON string
Buy
Buy one or more NFTs from listings on the Lootex marketplace.
lootex buy --orderHashes <hashes...> --chainId <id> [options]Required Options:
--orderHashes <hashes...>: Order hashes of the listings (can specify multiple)--chainId <id>: Chain ID where the orders exist
Optional Options:
--apiKey <key>: Lootex API key (can also use LOOTEX_API_KEY environment variable)--walletPrivateKey <key>: Private key of the wallet (can also use LOOTEX_PRIVATE_KEY environment variable)
Environment Variables
You can use the following environment variables instead of passing command-line options:
LOOTEX_API_KEY: Your Lootex API keyLOOTEX_PRIVATE_KEY: Your wallet's private key
Examples
Deploy a Collection
lootex deploy \
--imageFile ./my-nft.png \
--walletPrivateKey 0x123... \
--authToken abcdef... \
--apiKey xyz... \
--name "My NFT Collection" \
--symbol "MNFT" \
--chainId 1868 \
--amount 100 \
--price 0.1List an NFT for Sale
lootex list \
--tokenAddress 0x123... \
--tokenId 123 \
--pricePerToken 1000000000000000000 \
--chainId 1868 \
--walletPrivateKey 0x123... \
--apiKey xyz...Buy an NFT
lootex buy \
--orderHashes 0xabc... \
--chainId 1868 \
--walletPrivateKey 0x123... \
--apiKey xyz...