Loading...
Loading...
Compare original and translation side by side
bun run btc/btc.ts <subcommand> [options]bun run btc/btc.ts <subcommand> [options]bun run btc/btc.ts balance [--address <addr>]--address{
"address": "bc1q...",
"network": "mainnet",
"balance": { "satoshis": 500000, "btc": "0.005 BTC" },
"confirmed": { "satoshis": 500000, "btc": "0.005 BTC" },
"unconfirmed": { "satoshis": 0, "btc": "0 BTC" },
"utxoCount": 2,
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts balance [--address <addr>]--address{
"address": "bc1q...",
"network": "mainnet",
"balance": { "satoshis": 500000, "btc": "0.005 BTC" },
"confirmed": { "satoshis": 500000, "btc": "0.005 BTC" },
"unconfirmed": { "satoshis": 0, "btc": "0 BTC" },
"utxoCount": 2,
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts fees{
"network": "mainnet",
"fees": {
"fast": { "satPerVb": 15, "target": "~10 minutes (next block)" },
"medium": { "satPerVb": 8, "target": "~30 minutes" },
"slow": { "satPerVb": 3, "target": "~1 hour" }
},
"economy": { "satPerVb": 1, "target": "~24 hours" },
"minimum": { "satPerVb": 1, "target": "minimum relay fee" },
"unit": "sat/vB"
}bun run btc/btc.ts fees{
"network": "mainnet",
"fees": {
"fast": { "satPerVb": 15, "target": "~10 minutes (next block)" },
"medium": { "satPerVb": 8, "target": "~30 minutes" },
"slow": { "satPerVb": 3, "target": "~1 hour" }
},
"economy": { "satPerVb": 1, "target": "~24 hours" },
"minimum": { "satPerVb": 1, "target": "minimum relay fee" },
"unit": "sat/vB"
}bun run btc/btc.ts utxos [--address <addr>] [--confirmed-only]--address--confirmed-only{
"address": "bc1q...",
"network": "mainnet",
"utxos": [
{
"txid": "abc123...",
"vout": 0,
"value": { "satoshis": 500000, "btc": "0.005 BTC" },
"confirmed": true,
"blockHeight": 800000,
"blockTime": "2024-01-01T00:00:00.000Z"
}
],
"summary": {
"count": 1,
"totalValue": { "satoshis": 500000, "btc": "0.005 BTC" },
"confirmedCount": 1,
"unconfirmedCount": 0
},
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts utxos [--address <addr>] [--confirmed-only]--address--confirmed-only{
"address": "bc1q...",
"network": "mainnet",
"utxos": [
{
"txid": "abc123...",
"vout": 0,
"value": { "satoshis": 500000, "btc": "0.005 BTC" },
"confirmed": true,
"blockHeight": 800000,
"blockTime": "2024-01-01T00:00:00.000Z"
}
],
"summary": {
"count": 1,
"totalValue": { "satoshis": 500000, "btc": "0.005 BTC" },
"confirmedCount": 1,
"unconfirmedCount": 0
},
"explorerUrl": "https://mempool.space/address/bc1q..."
}--include-ordinalsbun run btc/btc.ts transfer --recipient <addr> --amount <satoshis> [--fee-rate fast|medium|slow|<number>] [--include-ordinals]--recipient--amount--fee-ratefastmediumslowmedium--include-ordinals{
"success": true,
"txid": "def456...",
"explorerUrl": "https://mempool.space/tx/def456...",
"transaction": {
"recipient": "bc1q...",
"amount": { "satoshis": 100000, "btc": "0.001 BTC" },
"fee": { "satoshis": 1200, "btc": "0.000012 BTC", "rateUsed": "8 sat/vB" },
"change": { "satoshis": 398800, "btc": "0.003988 BTC" },
"vsize": 150,
"utxoType": "cardinal-only"
},
"sender": "bc1q...",
"network": "mainnet"
}--include-ordinalsbun run btc/btc.ts transfer --recipient <addr> --amount <satoshis> [--fee-rate fast|medium|slow|<number>] [--include-ordinals]--recipient--amount--fee-ratefastmediumslowmedium--include-ordinals{
"success": true,
"txid": "def456...",
"explorerUrl": "https://mempool.space/tx/def456...",
"transaction": {
"recipient": "bc1q...",
"amount": { "satoshis": 100000, "btc": "0.001 BTC" },
"fee": { "satoshis": 1200, "btc": "0.000012 BTC", "rateUsed": "8 sat/vB" },
"change": { "satoshis": 398800, "btc": "0.003988 BTC" },
"vsize": 150,
"utxoType": "cardinal-only"
},
"sender": "bc1q...",
"network": "mainnet"
}bun run btc/btc.ts get-cardinal-utxos [--address <addr>] [--confirmed-only]--address--confirmed-only{
"address": "bc1q...",
"network": "mainnet",
"type": "cardinal",
"utxos": [...],
"summary": { "count": 2, "totalValue": { "satoshis": 500000, "btc": "0.005 BTC" }, "confirmedCount": 2, "unconfirmedCount": 0 },
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts get-cardinal-utxos [--address <addr>] [--confirmed-only]--address--confirmed-only{
"address": "bc1q...",
"network": "mainnet",
"type": "cardinal",
"utxos": [...],
"summary": { "count": 2, "totalValue": { "satoshis": 500000, "btc": "0.005 BTC" }, "confirmedCount": 2, "unconfirmedCount": 0 },
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts get-ordinal-utxos [--address <addr>] [--confirmed-only]--address--confirmed-only{
"address": "bc1q...",
"network": "mainnet",
"type": "ordinal",
"utxos": [...],
"summary": { "count": 1, "totalValue": { "satoshis": 546, "btc": "0.00000546 BTC" }, "confirmedCount": 1, "unconfirmedCount": 0 },
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts get-ordinal-utxos [--address <addr>] [--confirmed-only]--address--confirmed-only{
"address": "bc1q...",
"network": "mainnet",
"type": "ordinal",
"utxos": [...],
"summary": { "count": 1, "totalValue": { "satoshis": 546, "btc": "0.00000546 BTC" }, "confirmedCount": 1, "unconfirmedCount": 0 },
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts get-inscriptions [--address <addr>]--address{
"address": "bc1q...",
"network": "mainnet",
"inscriptions": [
{
"id": "abc123...i0",
"number": 12345,
"contentType": "text/plain",
"contentLength": 42,
"output": "abc123...:0",
"location": "abc123...:0:0",
"offset": 0,
"genesis": {
"txid": "abc123...",
"blockHeight": 800000,
"blockHash": "000000...",
"timestamp": "2024-01-01T00:00:00.000Z"
}
}
],
"summary": { "count": 1, "contentTypes": ["text/plain"] },
"explorerUrl": "https://mempool.space/address/bc1q..."
}bun run btc/btc.ts get-inscriptions [--address <addr>]--address{
"address": "bc1q...",
"network": "mainnet",
"inscriptions": [
{
"id": "abc123...i0",
"number": 12345,
"contentType": "text/plain",
"contentLength": 42,
"output": "abc123...:0",
"location": "abc123...:0:0",
"offset": 0,
"genesis": {
"txid": "abc123...",
"blockHeight": 800000,
"blockHash": "000000...",
"timestamp": "2024-01-01T00:00:00.000Z"
}
}
],
"summary": { "count": 1, "contentTypes": ["text/plain"] },
"explorerUrl": "https://mempool.space/address/bc1q..."
}get-cardinal-utxosget-ordinal-utxosget-inscriptionstransferbun run wallet/wallet.ts unlockget-cardinal-utxosget-ordinal-utxosget-inscriptionstransferbun run wallet/wallet.ts unlock