pillar

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pillar Skill

Pillar 智能钱包操作工具

Provides Pillar smart wallet operations in two modes:
  • pillar.ts — Browser-handoff mode. Creates an operation on the Pillar backend, opens the Pillar frontend in the user's browser for signing, then polls for the result. Requires the user to be logged in at pillarbtc.com.
  • pillar-direct.ts — Agent-signed direct mode. Generates and manages a local secp256k1 signing keypair. Signs SIP-018 structured data locally, submits directly to the Pillar backend API. No browser needed; gas is sponsored by the backend.
提供Pillar智能钱包的两种操作模式:
  • pillar.ts — 浏览器转交模式。在Pillar后端创建操作,在用户浏览器中打开Pillar前端进行签名,然后轮询等待结果。要求用户已在pillarbtc.com登录。
  • pillar-direct.ts — 代理签名直接模式。生成并管理本地secp256k1签名密钥对。在本地对SIP-018结构化数据进行签名,直接提交至Pillar后端API。无需浏览器;Gas费用由后端赞助。

pillar.ts — Browser-Handoff Mode

pillar.ts — 浏览器转交模式

Usage

使用方法

bun run pillar/pillar.ts <subcommand> [options]
bun run pillar/pillar.ts <subcommand> [options]

Subcommands

子命令

connect

connect

Connect to your Pillar smart wallet. Opens the Pillar website; if logged in, automatically connects and saves the wallet address locally.
bun run pillar/pillar.ts connect
连接你的Pillar智能钱包。打开Pillar网站;若已登录,会自动连接并将钱包地址本地保存。
bun run pillar/pillar.ts connect

disconnect

disconnect

Disconnect from Pillar. Clears the locally stored wallet session.
bun run pillar/pillar.ts disconnect
断开与Pillar的连接。清除本地存储的钱包会话。
bun run pillar/pillar.ts disconnect

status

status

Check if connected to Pillar and get the current wallet address.
bun run pillar/pillar.ts status
检查是否已连接Pillar并获取当前钱包地址。
bun run pillar/pillar.ts status

send

send

Send sBTC from your Pillar smart wallet. Opens the frontend for signing, then waits for confirmation.
bun run pillar/pillar.ts send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
Options:
  • --to
    (required) — Recipient: BNS name, Pillar wallet name, or Stacks address
  • --amount
    (required) — Amount in satoshis
  • --recipient-type
    (optional) —
    bns
    (default),
    wallet
    , or
    address
从你的Pillar智能钱包发送sBTC。打开前端进行签名,然后等待确认。
bun run pillar/pillar.ts send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
选项:
  • --to
    (必填)—— 接收方:BNS名称、Pillar钱包名称或Stacks地址
  • --amount
    (必填)—— 金额,单位为聪(satoshis)
  • --recipient-type
    (可选)——
    bns
    (默认)、
    wallet
    address

fund

fund

Fund your Pillar smart wallet via exchange deposit, BTC wallet, or sBTC wallet.
bun run pillar/pillar.ts fund --method exchange|btc|sbtc [--amount <sats>]
Options:
  • --method
    (required) —
    exchange
    ,
    btc
    , or
    sbtc
  • --amount
    (optional) — Amount in satoshis
通过交易所充值、BTC钱包或sBTC钱包为你的Pillar智能钱包充值。
bun run pillar/pillar.ts fund --method exchange|btc|sbtc [--amount <sats>]
选项:
  • --method
    (必填)——
    exchange
    btc
    sbtc
  • --amount
    (可选)—— 金额,单位为聪

add-admin

add-admin

Add a backup admin address to your Pillar smart wallet for recovery.
bun run pillar/pillar.ts add-admin [--admin-address <SP...>]
Options:
  • --admin-address
    (optional) — Stacks address to add as backup admin
为你的Pillar智能钱包添加备份管理员地址以用于账户恢复。
bun run pillar/pillar.ts add-admin [--admin-address <SP...>]
选项:
  • --admin-address
    (可选)—— 要添加为备份管理员的Stacks地址

supply

supply

Earn yield by supplying sBTC to Zest Protocol. No leverage, no liquidation risk.
bun run pillar/pillar.ts supply [--amount <sats>]
Options:
  • --amount
    (optional) — Amount in satoshis
将sBTC供给Zest协议以赚取收益。无杠杆,无清算风险。
bun run pillar/pillar.ts supply [--amount <sats>]
选项:
  • --amount
    (可选)—— 金额,单位为聪

auto-compound

auto-compound

Configure auto-compound for your Pillar wallet.
bun run pillar/pillar.ts auto-compound [--min-sbtc <sats>] [--trigger <sats>]
Options:
  • --min-sbtc
    (optional) — Minimum sBTC to keep in wallet (sats)
  • --trigger
    (optional) — Amount above minimum that triggers auto-compound (sats)
为你的Pillar钱包配置自动复投。
bun run pillar/pillar.ts auto-compound [--min-sbtc <sats>] [--trigger <sats>]
选项:
  • --min-sbtc
    (可选)—— 钱包中需保留的最小sBTC数量(单位:聪)
  • --trigger
    (可选)—— 超过最小数量后触发自动复投的金额(单位:聪)

unwind

unwind

Close or reduce your leveraged sBTC position.
bun run pillar/pillar.ts unwind [--percentage <1-100>]
Options:
  • --percentage
    (optional) — Percentage of position to unwind (1-100)
平仓或降低你的杠杆sBTC持仓。
bun run pillar/pillar.ts unwind [--percentage <1-100>]
选项:
  • --percentage
    (可选)—— 要平仓的持仓比例(1-100)

boost

boost

Create or increase a leveraged sBTC position (up to 1.5x).
bun run pillar/pillar.ts boost [--amount <sats>]
Options:
  • --amount
    (optional) — Amount in satoshis to boost
创建或增加杠杆sBTC持仓(最高1.5倍)。
bun run pillar/pillar.ts boost [--amount <sats>]
选项:
  • --amount
    (可选)—— 要增持的金额,单位为聪

position

position

View your Pillar wallet balance and Zest position. Opens the position page in the browser.
bun run pillar/pillar.ts position
查看你的Pillar钱包余额和Zest持仓。在浏览器中打开持仓页面。
bun run pillar/pillar.ts position

create-wallet

create-wallet

Create a new Pillar smart wallet. Opens the Pillar website to complete registration.
bun run pillar/pillar.ts create-wallet [--referral <wallet-address>]
Options:
  • --referral
    (optional) — Referral wallet address
创建新的Pillar智能钱包。打开Pillar网站完成注册。
bun run pillar/pillar.ts create-wallet [--referral <wallet-address>]
选项:
  • --referral
    (可选)—— 推荐人钱包地址

invite

invite

Get your Pillar referral link to invite friends.
bun run pillar/pillar.ts invite
获取你的Pillar推荐链接以邀请好友。
bun run pillar/pillar.ts invite

dca-invite

dca-invite

Invite a DCA partner by email or wallet address.
bun run pillar/pillar.ts dca-invite --partner <email-or-address>
Options:
  • --partner
    (required) — Partner's email address or Stacks wallet address
通过邮箱或钱包地址邀请DCA合作伙伴。
bun run pillar/pillar.ts dca-invite --partner <email-or-address>
选项:
  • --partner
    (必填)—— 合作伙伴的邮箱地址或Stacks钱包地址

dca-partners

dca-partners

View your DCA partners and weekly status.
bun run pillar/pillar.ts dca-partners
查看你的DCA合作伙伴及每周状态。
bun run pillar/pillar.ts dca-partners

dca-leaderboard

dca-leaderboard

View the DCA streak leaderboard.
bun run pillar/pillar.ts dca-leaderboard
查看DCA连续参与排行榜。
bun run pillar/pillar.ts dca-leaderboard

dca-status

dca-status

Check your DCA schedule status.
bun run pillar/pillar.ts dca-status

检查你的DCA计划状态。
bun run pillar/pillar.ts dca-status

pillar-direct.ts — Agent-Signed Direct Mode

pillar-direct.ts — 代理签名直接模式

Usage

使用方法

bun run pillar/pillar-direct.ts <subcommand> [options]
All direct operations are mainnet-only. Gas is sponsored by the Pillar backend.
bun run pillar/pillar-direct.ts <subcommand> [options]
所有直接操作仅支持主网。Gas费用由Pillar后端赞助。

Key Management Subcommands

密钥管理子命令

key-generate

key-generate

Generate a new secp256k1 signing keypair. Returns the compressed public key.
bun run pillar/pillar-direct.ts key-generate [--smart-wallet <contract-id>]
Options:
  • --smart-wallet
    (optional) — Smart wallet contract ID (default: "pending")
生成新的secp256k1签名密钥对。返回压缩公钥。
bun run pillar/pillar-direct.ts key-generate [--smart-wallet <contract-id>]
选项:
  • --smart-wallet
    (可选)—— 智能钱包合约ID(默认:"pending")

key-unlock

key-unlock

Unlock a signing key using the auto-derived password.
bun run pillar/pillar-direct.ts key-unlock [--key-id <id>]
Options:
  • --key-id
    (optional) — Key ID to unlock (unlocks first stored key if omitted)
使用自动派生的密码解锁签名密钥。
bun run pillar/pillar-direct.ts key-unlock [--key-id <id>]
选项:
  • --key-id
    (可选)—— 要解锁的密钥ID(若省略则解锁第一个存储的密钥)

key-lock

key-lock

Lock the signing key, clearing sensitive data from memory.
bun run pillar/pillar-direct.ts key-lock
锁定签名密钥,从内存中清除敏感数据。
bun run pillar/pillar-direct.ts key-lock

key-info

key-info

Show signing key info: pubkey, smart wallet, lock status, and all stored keys.
bun run pillar/pillar-direct.ts key-info
显示签名密钥信息:公钥、智能钱包、锁定状态及所有存储的密钥。
bun run pillar/pillar-direct.ts key-info

Direct Operation Subcommands

直接操作子命令

direct-boost

direct-boost

Create or increase a leveraged sBTC position (up to 1.5x). Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-boost --sbtc-amount <sats> --aeusdc-to-borrow <amount> --min-sbtc-from-swap <sats>
Options:
  • --sbtc-amount
    (required) — sBTC amount in sats to supply as collateral
  • --aeusdc-to-borrow
    (required) — aeUSDC amount to borrow (6 decimals)
  • --min-sbtc-from-swap
    (required) — Min sBTC from swap in sats (slippage protection)
创建或增加杠杆sBTC持仓(最高1.5倍)。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-boost --sbtc-amount <sats> --aeusdc-to-borrow <amount> --min-sbtc-from-swap <sats>
选项:
  • --sbtc-amount
    (必填)—— 作为抵押品供给的sBTC金额,单位为聪
  • --aeusdc-to-borrow
    (必填)—— 要借入的aeUSDC金额(6位小数)
  • --min-sbtc-from-swap
    (必填)—— 兑换获得的最小sBTC数量(单位:聪,滑点保护)

direct-unwind

direct-unwind

Close or reduce your leveraged sBTC position. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-unwind --sbtc-to-swap <sats> --sbtc-to-withdraw <sats> --min-aeusdc-from-swap <amount>
Options:
  • --sbtc-to-swap
    (required) — sBTC to swap to aeUSDC for repayment (sats)
  • --sbtc-to-withdraw
    (required) — sBTC to withdraw after repayment (sats)
  • --min-aeusdc-from-swap
    (required) — Min aeUSDC from swap (6 decimals, slippage protection)
平仓或降低你的杠杆sBTC持仓。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-unwind --sbtc-to-swap <sats> --sbtc-to-withdraw <sats> --min-aeusdc-from-swap <amount>
选项:
  • --sbtc-to-swap
    (必填)—— 兑换为aeUSDC以偿还借款的sBTC数量(单位:聪)
  • --sbtc-to-withdraw
    (必填)—— 偿还借款后要提取的sBTC数量(单位:聪)
  • --min-aeusdc-from-swap
    (必填)—— 兑换获得的最小aeUSDC数量(6位小数,滑点保护)

direct-supply

direct-supply

Earn yield by supplying sBTC to Zest. No leverage, no liquidation risk. Agent-signed.
bun run pillar/pillar-direct.ts direct-supply --sbtc-amount <sats>
Options:
  • --sbtc-amount
    (required) — sBTC amount in sats to supply
将sBTC供给Zest以赚取收益。无杠杆,无清算风险。代理签名。
bun run pillar/pillar-direct.ts direct-supply --sbtc-amount <sats>
选项:
  • --sbtc-amount
    (必填)—— 要供给的sBTC金额,单位为聪

direct-send

direct-send

Send sBTC from your Pillar smart wallet. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
Options:
  • --to
    (required) — Recipient: BNS name, Pillar wallet name, or Stacks address
  • --amount
    (required) — Amount in satoshis
  • --recipient-type
    (optional) —
    bns
    (default),
    wallet
    , or
    address
从你的Pillar智能钱包发送sBTC。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-send --to <recipient> --amount <sats> [--recipient-type bns|wallet|address]
选项:
  • --to
    (必填)—— 接收方:BNS名称、Pillar钱包名称或Stacks地址
  • --amount
    (必填)—— 金额,单位为聪
  • --recipient-type
    (可选)——
    bns
    (默认)、
    wallet
    address

direct-auto-compound

direct-auto-compound

Configure auto-compound. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-auto-compound --enabled true|false --min-sbtc <sats> --trigger <sats>
Options:
  • --enabled
    (required) — Enable (
    true
    ) or disable (
    false
    ) auto-compound
  • --min-sbtc
    (required) — Minimum sBTC to keep in wallet (sats)
  • --trigger
    (required) — Amount above minimum that triggers auto-compound (sats)
配置自动复投。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-auto-compound --enabled true|false --min-sbtc <sats> --trigger <sats>
选项:
  • --enabled
    (必填)—— 启用(
    true
    )或禁用(
    false
    )自动复投
  • --min-sbtc
    (必填)—— 钱包中需保留的最小sBTC数量(单位:聪)
  • --trigger
    (必填)—— 超过最小数量后触发自动复投的金额(单位:聪)

direct-position

direct-position

View your Pillar smart wallet balances and Zest position. No signing needed.
bun run pillar/pillar-direct.ts direct-position
查看你的Pillar智能钱包余额和Zest持仓。无需签名。
bun run pillar/pillar-direct.ts direct-position

direct-withdraw-collateral

direct-withdraw-collateral

Withdraw sBTC collateral from Zest. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-withdraw-collateral --sbtc-amount <sats>
Options:
  • --sbtc-amount
    (required) — sBTC amount in sats to withdraw
从Zest提取sBTC抵押品。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-withdraw-collateral --sbtc-amount <sats>
选项:
  • --sbtc-amount
    (必填)—— 要提取的sBTC金额,单位为聪

direct-add-admin

direct-add-admin

Add a backup admin address. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-add-admin --new-admin <SP...>
Options:
  • --new-admin
    (required) — Stacks address to add as backup admin
添加备份管理员地址。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-add-admin --new-admin <SP...>
选项:
  • --new-admin
    (必填)—— 要添加为备份管理员的Stacks地址

direct-create-wallet

direct-create-wallet

Create a new Pillar smart wallet for agent direct operations. Generates keypair, unlocks it, and deploys.
bun run pillar/pillar-direct.ts direct-create-wallet --wallet-name <name> [--referred-by <contract-id>]
Options:
  • --wallet-name
    (required) — Wallet name (3-20 chars, lowercase letters, numbers, hyphens)
  • --referred-by
    (optional) — Contract address of referring wallet
为代理直接操作创建新的Pillar智能钱包。生成密钥对、解锁并部署。
bun run pillar/pillar-direct.ts direct-create-wallet --wallet-name <name> [--referred-by <contract-id>]
选项:
  • --wallet-name
    (必填)—— 钱包名称(3-20个字符,仅支持小写字母、数字、连字符)
  • --referred-by
    (可选)—— 推荐钱包的合约地址

DCA Subcommands

DCA子命令

direct-dca-invite

direct-dca-invite

Invite a DCA partner. Uses wallet address from signing key session.
bun run pillar/pillar-direct.ts direct-dca-invite --partner <email-or-address>
Options:
  • --partner
    (required) — Partner's email or Stacks wallet address
邀请DCA合作伙伴。使用签名密钥会话中的钱包地址。
bun run pillar/pillar-direct.ts direct-dca-invite --partner <email-or-address>
选项:
  • --partner
    (必填)—— 合作伙伴的邮箱或Stacks钱包地址

direct-dca-partners

direct-dca-partners

View your DCA partners and weekly status.
bun run pillar/pillar-direct.ts direct-dca-partners
查看你的DCA合作伙伴及每周状态。
bun run pillar/pillar-direct.ts direct-dca-partners

direct-dca-leaderboard

direct-dca-leaderboard

View the DCA streak leaderboard.
bun run pillar/pillar-direct.ts direct-dca-leaderboard
查看DCA连续参与排行榜。
bun run pillar/pillar-direct.ts direct-dca-leaderboard

direct-dca-status

direct-dca-status

Check your DCA schedule status.
bun run pillar/pillar-direct.ts direct-dca-status
检查你的DCA计划状态。
bun run pillar/pillar-direct.ts direct-dca-status

Utility Subcommands

实用工具子命令

direct-quote

direct-quote

Get a boost quote (leverage, LTV, swap details) before executing.
bun run pillar/pillar-direct.ts direct-quote --sbtc-amount <sats>
Options:
  • --sbtc-amount
    (required) — sBTC amount in sats to boost
在执行前获取杠杆增持报价(杠杆率、贷款价值比、兑换详情)。
bun run pillar/pillar-direct.ts direct-quote --sbtc-amount <sats>
选项:
  • --sbtc-amount
    (必填)—— 要增持的sBTC金额,单位为聪

direct-resolve-recipient

direct-resolve-recipient

Resolve a recipient (BNS name, wallet name, or address) before sending.
bun run pillar/pillar-direct.ts direct-resolve-recipient --to <recipient> [--recipient-type bns|wallet|address]
Options:
  • --to
    (required) — Recipient to resolve
  • --recipient-type
    (optional) —
    bns
    (default),
    wallet
    , or
    address
在发送前解析接收方(BNS名称、钱包名称或地址)。
bun run pillar/pillar-direct.ts direct-resolve-recipient --to <recipient> [--recipient-type bns|wallet|address]
选项:
  • --to
    (必填)—— 要解析的接收方
  • --recipient-type
    (可选)——
    bns
    (默认)、
    wallet
    address

Stacking Subcommands

STX质押子命令

direct-stack-stx

direct-stack-stx

Stack STX via Fast Pool or Stacking DAO. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-stack-stx --stx-amount <microStx> --pool fast-pool|stacking-dao
Options:
  • --stx-amount
    (required) — Amount of STX in micro-STX (1 STX = 1,000,000)
  • --pool
    (required) —
    fast-pool
    or
    stacking-dao
通过Fast Pool或Stacking DAO质押STX。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-stack-stx --stx-amount <microStx> --pool fast-pool|stacking-dao
选项:
  • --stx-amount
    (必填)—— STX金额,单位为微STX(1 STX = 1,000,000微STX)
  • --pool
    (必填)——
    fast-pool
    stacking-dao

direct-revoke-fast-pool

direct-revoke-fast-pool

Revoke Fast Pool STX delegation. Agent-signed, no browser needed.
bun run pillar/pillar-direct.ts direct-revoke-fast-pool
撤销Fast Pool的STX委托。代理签名,无需浏览器。
bun run pillar/pillar-direct.ts direct-revoke-fast-pool

direct-stacking-status

direct-stacking-status

Check stacking status. No signing needed — reads on-chain data.
bun run pillar/pillar-direct.ts direct-stacking-status
检查质押状态。无需签名——读取链上数据。
bun run pillar/pillar-direct.ts direct-stacking-status

Notes

注意事项

  • Browser-handoff mode requires being connected via
    pillar.ts connect
    first
  • Direct mode requires a signing key; use
    direct-create-wallet
    to create one or
    key-generate
    for an existing wallet
  • Direct mode operations are mainnet-only
  • Pillar backend sponsors gas for all direct mode transactions
  • Poll timeout for browser-handoff is 5 minutes by default (override with
    PILLAR_POLL_TIMEOUT_MS
    env var)
  • Session stored at
    ~/.aibtc/pillar-session.json
    ; signing keys at
    ~/.aibtc/signing-keys/
  • 浏览器转交模式需先通过
    pillar.ts connect
    连接
  • 直接模式需要签名密钥;使用
    direct-create-wallet
    创建新钱包,或使用
    key-generate
    为现有钱包生成密钥
  • 直接模式操作仅支持主网
  • Pillar后端为所有直接模式交易赞助Gas费用
  • 浏览器转交模式的轮询超时默认5分钟(可通过环境变量
    PILLAR_POLL_TIMEOUT_MS
    覆盖)
  • 会话存储在
    ~/.aibtc/pillar-session.json
    ;签名密钥存储在
    ~/.aibtc/signing-keys/