taproot-multisig

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Taproot Multisig Skill

Taproot多签Skill

Agent-to-agent Bitcoin Taproot multisig. Proven on mainnet — Arc completed a 2-of-2 (block 937,849) and 3-of-3 (block 938,206) using BIP-340 Schnorr, BIP-342 OP_CHECKSIGADD, and QuorumClaw coordination.
Agent间的Bitcoin Taproot多签功能。已在主网验证——Arc使用BIP-340 Schnorr、BIP-342 OP_CHECKSIGADD和QuorumClaw协作完成了2-of-2(区块937,849)和3-of-3(区块938,206)多签交易。

Usage

使用方法

bun run taproot-multisig/taproot-multisig.ts <subcommand> [options]
bun run taproot-multisig/taproot-multisig.ts <subcommand> [options]

Subcommands

子命令

get-pubkey

get-pubkey

Get your x-only Taproot internal public key for registering with a multisig coordinator. Requires unlocked wallet.
bash
bun run taproot-multisig/taproot-multisig.ts get-pubkey
Output:
json
{
  "success": true,
  "internalPubKey": "abc123...",
  "taprootAddress": "bc1p...",
  "network": "mainnet",
  "keyFormat": "x-only (32 bytes)",
  "derivationPath": "m/86'/0'/0'/0/0",
  "usage": "Register internalPubKey when joining a multisig.",
  "warning": "Always register internalPubKey, NOT the tweaked key."
}
获取你的仅x格式Taproot内部公钥,用于在多签协调器中注册。需要解锁钱包。
bash
bun run taproot-multisig/taproot-multisig.ts get-pubkey
输出:
json
{
  "success": true,
  "internalPubKey": "abc123...",
  "taprootAddress": "bc1p...",
  "network": "mainnet",
  "keyFormat": "x-only (32 bytes)",
  "usage": "加入多签时请注册internalPubKey。",
  "warning": "请始终注册internalPubKey,而非调整后的密钥。"
}

verify-cosig

verify-cosig

Verify a BIP-340 Schnorr signature from a co-signer. No wallet unlock required.
bash
bun run taproot-multisig/taproot-multisig.ts verify-cosig \
  --digest <64-char-hex> \
  --signature <128-char-hex> \
  --public-key <64-char-hex>
Options:
  • --digest
    (required) — 32-byte sighash from coordination API
  • --signature
    (required) — 64-byte BIP-340 Schnorr signature from co-signer
  • --public-key
    (required) — 32-byte x-only public key of the co-signer
Output:
json
{
  "success": true,
  "isValid": true,
  "digest": "...",
  "signature": "...",
  "publicKey": "...",
  "message": "Signature is valid — this co-signer's key signed this digest."
}
验证来自共同签名者的BIP-340 Schnorr签名。无需解锁钱包。
bash
bun run taproot-multisig/taproot-multisig.ts verify-cosig \
  --digest <64-char-hex> \
  --signature <128-char-hex> \
  --public-key <64-char-hex>
选项:
  • --digest
    (必填)——来自协调API的32字节sighash
  • --signature
    (必填)——来自共同签名者的64字节BIP-340 Schnorr签名
  • --public-key
    (必填)——共同签名者的32字节仅x格式公钥
输出:
json
{
  "success": true,
  "isValid": true,
  "digest": "...",
  "signature": "...",
  "publicKey": "...",
  "message": "签名有效——该共同签名者的密钥已签署此摘要。"
}

guide

guide

Print the complete step-by-step Taproot multisig workflow as JSON.
bash
bun run taproot-multisig/taproot-multisig.ts guide
Returns the full workflow: key registration, sighash signing, co-signer verification, witness stack format, and the BIP-86 internal-vs-tweaked key gotcha.
以JSON格式打印完整的Taproot多签分步工作流。
bash
bun run taproot-multisig/taproot-multisig.ts guide
返回完整工作流:密钥注册、sighash签名、共同签名者验证、见证栈格式,以及BIP-86内部密钥与调整后密钥的注意事项。

Key Signing Command

密钥签名命令

Signing a sighash uses the
signing
skill, not this skill:
bash
bun run signing/signing.ts schnorr-sign-digest \
  --digest <sighash_hex> \
  --confirm-blind-sign
This signs with your BIP-86 internal Taproot key (
m/86'/0'/0'/0/0
). Always register
internalPubKey
from
get-pubkey
so the keys match.
签署sighash需要使用
signing
Skill,而非本Skill:
bash
bun run signing/signing.ts schnorr-sign-digest \
  --digest <sighash_hex> \
  --confirm-blind-sign
此命令使用你的BIP-86 Taproot内部密钥(
m/86'/0'/0'/0/0
)进行签名。请务必注册来自
get-pubkey
internalPubKey
,以确保密钥匹配。

Critical: Internal Key vs Tweaked Key

重要提示:内部密钥与调整后密钥

Register
internalPubKey
. Sign with
schnorr-sign-digest
. They match.
The tweaked pubkey (embedded in your
bc1p...
address) is different from the internal pubkey. If you register the tweaked key but sign with the internal key, your signature is valid but against the wrong key — the coordination API rejects it.
请注册
internalPubKey
,使用
schnorr-sign-digest
签名。二者必须匹配。
调整后的公钥(嵌入在你的
bc1p...
地址中)与内部公钥不同。如果你注册的是调整后的密钥,但使用内部密钥签名,你的签名本身有效,但对应的密钥错误——协调API会拒绝该签名。

Proven Transactions

已验证交易

TypeTXIDBlockSigners
2-of-2
d05806c87ceae62e8f47daafb9fe4842c837fa3f333864cd5a5ec9d2a38cf96b
937,849Arc + Aetos
3-of-3
47dbaf5185b582902b43241e757c6bc6a1c60b4418453d93b2ffbb0315f87e92
938,206Arc + Aetos + Bitclaw
类型TXID区块签名者
2-of-2多签
d05806c87ceae62e8f47daafb9fe4842c837fa3f333864cd5a5ec9d2a38cf96b
937,849Arc + Aetos
3-of-3多签
47dbaf5185b582902b43241e757c6bc6a1c60b4418453d93b2ffbb0315f87e92
938,206Arc + Aetos + Bitclaw