psbt
PSBT (Partially Signed Bitcoin Transaction) construction and signing — build PSBTs for ordinals purchases, estimate fees, sign with the active wallet, and broadcast finalized PSBTs.
What this skill does
# PSBT Skill
Provides PSBT (Partially Signed Bitcoin Transaction) construction and signing operations on the Bitcoin L1. PSBTs enable multi-party signing workflows such as ordinals marketplace purchases where both buyer and seller must sign before broadcast.
- **estimate-fee** — Read-only fee estimation for a PSBT given its structure.
- **sign** — Sign one or more PSBT inputs with the active unlocked wallet (P2WPKH or Taproot keys).
- **broadcast** — Finalize a fully signed PSBT and broadcast it to the Bitcoin network via mempool.space.
## Usage
```
bun run psbt/psbt.ts <subcommand> [options]
```
## Subcommands
### estimate-fee
Estimate the network fee in satoshis for a given PSBT. Parses the transaction structure and computes vsize-based fee estimate for fast, medium, and slow fee tiers.
```
bun run psbt/psbt.ts estimate-fee --psbt <base64>
```
Options:
- `--psbt <base64>` (required) — PSBT in base64 format
Output:
```json
{
"network": "mainnet",
"vsize": 253,
"inputsLength": 2,
"outputsLength": 3,
"feeEstimates": {
"fast": { "satPerVb": 12, "totalSats": 3036 },
"medium": { "satPerVb": 6, "totalSats": 1518 },
"slow": { "satPerVb": 2, "totalSats": 506 }
},
"currentFeeSats": "1200"
}
```
### sign
Sign PSBT inputs with the active wallet's BTC private keys (P2WPKH and/or Taproot). The wallet must be unlocked before calling this subcommand.
```
bun run psbt/psbt.ts sign --psbt <base64>
```
Options:
- `--psbt <base64>` (required) — PSBT in base64 format to sign
- `--inputs <indexes>` (optional) — Comma-separated input indexes to sign (signs all signable inputs if omitted)
- `--finalize` (optional) — Finalize signed inputs immediately (default: false)
Output:
```json
{
"success": true,
"network": "mainnet",
"signedInputs": [1, 2],
"finalizedInputs": [],
"skippedInputs": [{ "index": 0, "reason": "no matching key for this input" }],
"psbtBase64": "<updated-base64>"
}
```
### broadcast
Finalize a fully signed PSBT and broadcast it to the Bitcoin network via mempool.space.
```
bun run psbt/psbt.ts broadcast --psbt <base64>
```
Options:
- `--psbt <base64>` (required) — Fully signed PSBT in base64 format
Output:
```json
{
"success": true,
"network": "mainnet",
"txid": "abc123...",
"explorerUrl": "https://mempool.space/tx/abc123...",
"txHex": "0200..."
}
```
## Notes
- Wallet must be unlocked with `bun run wallet/wallet.ts unlock` before calling `sign`.
- For ordinals purchase PSBTs (built by the MCP tool `psbt_create_ordinal_buy`): input index 0 is the seller's inscription UTXO; buyer inputs start at index 1. Sign only buyer inputs (index 1+) unless you are the seller.
- `broadcast` calls `tx.finalize()` — all inputs must be fully signed or it will throw.
- Fee estimates in `estimate-fee` are based on the PSBT's current vsize; they reflect the signed transaction size, not the unsigned size.
Related in Web3
xaut-trade
IncludedBuy or sell XAUT (Tether Gold) on Ethereum. Supports market orders (Uniswap V3) and limit orders (UniswapX). Wallet modes: Foundry keystore or WDK. Delegates non-XAUT intents to registered skills (e.g. Polymarket prediction markets, Hyperliquid trading). Triggers: buy XAUT, XAUT trade, swap USDT for XAUT, sell XAUT, swap XAUT for USDT, limit order, limit buy XAUT, limit sell XAUT, check limit order, cancel limit order, XAUT when, create wallet, setup wallet, polymarket, prediction market, bet on, odds on, hyperliquid, perp, perpetual, long, short, open long, open short, close position, leverage.
qfc-openclaw-skill
IncludedQFC blockchain interaction — wallet, faucet, chain queries, staking, epoch & finality, AI inference
gate-dex-trade
IncludedExecutes on-chain token swaps via Gate DEX. Use when user wants to swap, buy, sell, exchange, or convert tokens, or bridge cross-chain. Covers full swap flow: price quotes, transaction build, signing, and submission. Do NOT use for read-only data lookups or wallet account management.
hunch
IncludedDiscover, bet on, track, and settle Hunch prediction markets in natural language. Trigger when a user wants to bet, take a position, or get odds on a crypto outcome — token market-cap milestones and flips, launchpad races (Bankr vs pump.fun volume / #1-days / launches over a cap), token head-to-head outperformance, mcap strike-ladders, and up/down price rounds. Also trigger on "what can I bet on about $TOKEN", "odds on …", "take YES/NO on …", "show my Hunch bets", "did my market resolve". Settles in USDC on Base via x402 (≤ $10 / bet); every bet returns an on-chain proof.
opensea
IncludedQuery NFT data, trade on the Seaport marketplace, and swap ERC20 tokens across Ethereum, Base, Arbitrum, Optimism, Polygon, and more.
polymarket
IncludedTrade on Polymarket prediction markets (CLOB V2) from a Privy EOA wallet. Search markets, place/cancel orders, manage positions. No private key handling. Use when the user wants to bet on event outcomes (e.g. "buy YES at 0.65 on the ceasefire market", "what are my open positions", "close my Trump bet").