styx

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Styx Skill

Styx Skill

Trustless BTC→sBTC conversion via the Styx protocol by FaktoryFun. Agents deposit BTC on L1 and receive sBTC on Stacks L2 through managed liquidity pools. Uses
@faktoryfun/styx-sdk
.
通过FaktoryFun推出的Styx协议实现无需信任的BTC→sBTC转换。Agent在L1层存入BTC,即可通过托管流动性池在Stacks L2层获得sBTC。本工具使用
@faktoryfun/styx-sdk
开发。

How It Works

工作流程

  1. Check pool liquidity
    pool-status
    shows available sBTC in the pool
  2. Create deposit reservation
    deposit
    reserves pool liquidity and returns a deposit ID
  3. Build & sign transaction — The SDK provides UTXOs and deposit address; the agent builds and signs locally with
    @scure/btc-signer
  4. Broadcast — Signed transaction is broadcast to mempool.space
  5. Track status
    status
    monitors the deposit through confirmation
  1. 查询资金池流动性 ——
    pool-status
    命令可显示资金池中可用的sBTC数量
  2. 创建存款预留 ——
    deposit
    命令会锁定资金池流动性并返回存款ID
  3. 构建并签名交易 —— SDK提供UTXO和存款地址;Agent通过
    @scure/btc-signer
    在本地构建并签名交易
  4. 广播交易 —— 已签名的交易将广播至mempool.space
  5. 追踪状态 ——
    status
    命令可监控存款直至确认完成

Pools

资金池信息

Pool IDTypeMin DepositMax DepositSwap Types
main
Legacy10,000 sats300,000 satssbtc, usda, pepe
aibtc
AI BTC10,000 sats1,000,000 satssbtc, aibtc
资金池ID类型最低存款额最高存款额兑换类型
main
传统型10,000聪300,000聪sbtc, usda, pepe
aibtc
AI BTC10,000聪1,000,000聪sbtc, aibtc

Subcommands

子命令

pool-status

pool-status

bun run styx/styx.ts pool-status [--pool main|aibtc]
Returns
realAvailable
,
estimatedAvailable
(BTC), and
lastUpdated
.
bun run styx/styx.ts pool-status [--pool main|aibtc]
返回
realAvailable
estimatedAvailable
(以BTC为单位)以及
lastUpdated
字段。

pools

pools

bun run styx/styx.ts pools
Lists all available pools with configs and active status.
bun run styx/styx.ts pools
列出所有可用资金池的配置及活跃状态。

fees

fees

bun run styx/styx.ts fees
Returns current Bitcoin network fee estimates (low/medium/high in sat/vB).
bun run styx/styx.ts fees
返回当前比特币网络的手续费估算值(低/中/高,单位:聪/字节)。

price

price

bun run styx/styx.ts price
Returns current BTC price in USD.
bun run styx/styx.ts price
返回当前BTC的美元价格。

deposit

deposit

bun run styx/styx.ts deposit --amount <sats> --stx-receiver <addr> --btc-sender <addr> [--pool main|aibtc] [--fee low|medium|high]
Full headless deposit flow: creates reservation, prepares PSBT, signs with wallet key, broadcasts to mempool.space, and updates deposit status. Requires an unlocked wallet.
bun run styx/styx.ts deposit --amount <sats> --stx-receiver <addr> --btc-sender <addr> [--pool main|aibtc] [--fee low|medium|high]
完整的无头存款流程:创建预留、生成PSBT、使用钱包密钥签名、广播至mempool.space并更新存款状态。要求钱包处于解锁状态。

status

status

bun run styx/styx.ts status --id <deposit-id>
bun run styx/styx.ts status --txid <btc-txid>
Check deposit status by deposit ID or Bitcoin transaction ID.
bun run styx/styx.ts status --id <deposit-id>
bun run styx/styx.ts status --txid <btc-txid>
通过存款ID或比特币交易ID查询存款状态。

history

history

bun run styx/styx.ts history --address <stx-addr>
Get deposit history for a Stacks address.
bun run styx/styx.ts history --address <stx-addr>
获取指定Stacks地址的存款历史记录。

Deposit Statuses

存款状态

  • initiated
    — Deposit record created, liquidity reserved
  • broadcast
    — Bitcoin tx broadcast to mempool
  • processing
    — At least 1 BTC confirmation
  • confirmed
    — Required confirmations reached, sBTC minted
  • refund-requested
    — User requested refund
  • canceled
    — Deposit canceled, liquidity released
  • initiated
    —— 已创建存款记录,流动性已锁定
  • broadcast
    —— 比特币交易已广播至内存池
  • processing
    —— 至少获得1次BTC网络确认
  • confirmed
    —— 达到所需确认次数,sBTC已铸造完成
  • refund-requested
    —— 用户已发起退款请求
  • canceled
    —— 存款已取消,流动性已释放

Notes

注意事项

  • Always check
    pool-status
    before depositing to verify sufficient liquidity
  • Update deposit status after broadcast — this is critical for accurate pool accounting
  • Min deposit: 10,000 sats (0.0001 BTC). Max varies by pool.
  • The SDK uses a pre-configured API key for the Styx backend
  • 存款前务必通过
    pool-status
    确认资金池有足够流动性
  • 交易广播后请更新存款状态——这对资金池的准确核算至关重要
  • 最低存款额:10,000聪(0.0001 BTC)。最高存款额因资金池而异。
  • SDK使用预配置的API密钥对接Styx后端服务