schnorr_sign_digest
Sign a raw 32-byte digest with a BIP-340 Schnorr signature using the wallet’s Taproot key for script-path spending, multisig coordination, or precomputed Bitcoin sighashes.
Instructions
Sign a raw 32-byte digest with Schnorr (BIP-340) using the wallet's Taproot private key. Use for Taproot script-path spending, multisig coordination, or any case where you need a BIP-340 Schnorr signature over a pre-computed hash (e.g., BIP-341 sighash). WARNING: This signs raw digests that cannot be human-verified — use confirmBlindSign=true after reviewing the digest. A signed sighash can authorize a Bitcoin spend the spending limit never sees, so the user must also enable it with AIBTC_ALLOW_BLIND_SIGN=true in this server's config. Returns a 64-byte signature and the x-only public key. Requires an unlocked wallet.
Tip: call earning_opportunities to see how to put your assets to work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| digest | Yes | 32-byte hex-encoded digest to sign (e.g., BIP-341 transaction sighash) | |
| auxRand | No | Optional 32-byte hex auxiliary randomness for BIP-340 (improves side-channel resistance) | |
| confirmBlindSign | No | Set to true to confirm you have reviewed the digest and accept the risk of signing a raw hash. Default is false, which returns a warning with the digest for review before signing. |