跳到正文
TakoAPI
返回技能列表

xian-sdk-skill

由 endogen 提供

AI & LLMs
821下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Build applications on the Xian blockchain using the xian-py Python SDK.

描述

该技能的功能

xian-py is a Python SDK for building applications on the Xian blockchain. It handles wallet creation, token transfers, smart contract deployment, and state queries. Supports both synchronous and async patterns for high-throughput use cases.

Provides both sync and async interfaces plus stamp estimation, so you can prototype quickly and optimize for production without switching libraries.

何时使用

  • Transfer tokens between Xian wallets programmatically
  • Deploy and interact with smart contracts on Xian
  • Query contract state and token balances
  • Build a DEX swap interface using async batch calls
  • Encrypt messages between two wallet addresses

示例工作流

输入

User asks: deploy a simple token contract and transfer 100 tokens to another address

智能体
  1. 1

    Create a wallet from an existing private key using Wallet(private_key)

  2. 2

    Initialize Xian client with node URL and wallet

  3. 3

    Define contract code with balances Hash, seed constructor, and transfer function

  4. 4

    Call xian.submit_contract('my_token', code) to deploy

  5. 5

    Call xian.send_tx('my_token', 'transfer', {'to': recipient, 'amount': 100}) to transfer tokens

输出

Contract deployed and transfer confirmed with tx_hash returned in result dict

前置要求

  • Xian node URL (self-hosted or public endpoint)
  • Private key or mnemonic for a funded Xian wallet

安装

clawhub install endogen/xian-sdk-skill

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接