Chains
X-Chain (Exchange)
The X-Chain handles UTXO-based asset transfers using DAG consensus.
The X-Chain (UTXO Chain) is the asset creation and transfer platform on Lux Network. It uses a UTXO model (similar to Bitcoin) with DAG-based consensus for high-throughput parallel transaction processing. The X-Chain is powered by the XVM.
Purpose
- Asset Creation: Create fungible tokens, NFTs, and variable-cap assets
- Fast Transfers: UTXO-based transfers with sub-second finality via DAG consensus
- Cross-Chain Transfers: Import and export assets between X-Chain, P-Chain, and C-Chain
- NFT Support: Native NFT creation and transfer without smart contracts
RPC Endpoint
https://api.lux.network/{network}/ext/bc/XThe X-Chain API uses the xvm namespace with Lux-style JSON-RPC.
Configuration
{
"network": {},
"checksums-enabled": true,
"tx-fee": 1000,
"create-asset-tx-fee": 10000
}Fee Schedule
| Operation | Fee (nanoLUX) |
|---|---|
| Base transaction | 1,000 |
| Create asset | 10,000 |
RPC Methods
Asset Operations
- xvm.createAsset -- Create a new fungible asset with initial holders and minters
- xvm.createFixedCapAsset -- Create a fixed-supply fungible asset
- xvm.createVariableCapAsset -- Create a variable-supply fungible asset
- xvm.createNFTAsset -- Create a new NFT collection
- xvm.getAssetDescription -- Get name, symbol, and denomination of an asset
- xvm.mint -- Mint additional units of a variable-cap asset
- xvm.mintNFT -- Mint a new NFT in an existing collection
Transfer Operations
- xvm.send -- Send a single asset to an address
- xvm.sendMultiple -- Send multiple assets in a single transaction
- xvm.sendNFT -- Send an NFT to an address
- xvm.import -- Import assets from another chain (P-Chain or C-Chain)
- xvm.export -- Export assets to another chain
Query Operations
- xvm.getBalance -- Get balance of a specific asset for an address
- xvm.getAllBalances -- Get all asset balances for an address
- xvm.getUTXOs -- Get UTXOs for given addresses (paginated, max 1024 addresses)
- xvm.getTx -- Get a transaction by ID
- xvm.getTxStatus -- Get the status of a transaction
- xvm.getAddressTxs -- Get transactions associated with an address
- xvm.getBlock -- Get a block by ID
- xvm.getBlockByHeight -- Get a block by height
- xvm.getHeight -- Get the current chain height
Key Management
- xvm.createAddress -- Create a new address controlled by the given user
- xvm.listAddresses -- List addresses controlled by the given user
- xvm.exportKey -- Export a private key
- xvm.importKey -- Import a private key
Transaction Submission
- xvm.issueTx -- Issue a signed transaction to the network
Example: Get All Balances
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "xvm.getAllBalances",
"params": {
"address": "X-lux1..."
},
"id": 1
}' -H "Content-Type: application/json" \
https://api.lux.network/mainnet/ext/bc/XExample: Create a Fixed-Cap Asset
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "xvm.createFixedCapAsset",
"params": {
"name": "MyToken",
"symbol": "MTK",
"denomination": 6,
"initialHolders": [
{
"address": "X-lux1...",
"amount": 1000000
}
],
"from": ["X-lux1..."],
"username": "user",
"password": "pass"
},
"id": 1
}' -H "Content-Type: application/json" \
https://api.lux.network/mainnet/ext/bc/XRelated LPs
See lps.lux.network for the relevant Lux Proposals governing this chain.