xianLinter.showSuggestions: Show best practice suggestions
xianLinter.strictMode: Strict mode (warnings as errors)
🎯 Usage
The extension works automatically:
Open any .py file
If it's a Xian contract, you'll see real-time indicators
Errors appear underlined in red
Warnings in yellow
Suggestions in blue
Available commands
Linting Commands
Xian Linter: Analyze current file - Analyzes the active file
Xian Linter: Toggle Linter - Toggle the linter
Wallet & Deployment Commands 🆕
Xian Wallet: Import Wallet - Import your private key to enable deployment
Xian Wallet: Configure RPC - Set up network configuration
Xian Wallet: Show Wallet Info - View wallet and network information
Xian Wallet: Remove Wallet - Remove wallet from extension
Xian Linter: Deploy Contract - Deploy the current contract (button in tab bar)
🚀 Getting Started with Contract Deployment
1. Import Your Wallet
Open Command Palette (Ctrl+Shift+P)
Run Xian Wallet: Import Wallet
Enter your 64-character private key
Set a secure password for encryption
Optionally configure RPC settings
2. Deploy a Contract
Open a Xian contract file (.py with con_ prefix or containing @export)
Click the deploy button (🚀) in the tab bar, or use Xian Linter: Deploy Contract
Enter contract name (must start with con_)
Provide constructor arguments (JSON format, if needed)
Set stamp limit (gas limit)
Enter your wallet password
Monitor deployment progress and get transaction hash
3. Network Configuration
Default: Xian mainnet (https://node.xian.org)
Use Xian Wallet: Configure RPC to change networks
Supports custom RPC and explorer URLs
🔧 Development
To compile the extension:
npm install
npm run compile
To create the VSIX package:
npm install -g vsce
vsce package
📝 Usage example
# ❌ This will generate warnings
def _private_function(): # _ prefix not allowed
print("Hello") # print() not available
# ✅ This is correct
@export
def transfer(to: str, amount: float):
assert amount > 0, "Amount must be positive"
# ... transfer logic
🤝 Contributing
Fork the project
Create a branch for your feature
Commit your changes
Push to the branch
Open a Pull Request
📄 License
MIT License - see the LICENSE file for more details.