{"uid":"cap_tDxrDk3oXDlA6rAxybg5Z","slug":"bitcoin-nbits-to-target-and-difficulty-expander-ba3198d6","name":"Bitcoin nBits to Target and Difficulty Expander","description":"Expand Bitcoin nBits into a target and difficulty — Genesis402 / UnyKorn Operator Network","url":"https://twin.unykorn.org/btc-bits-to-target?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"params":{"type":"object","properties":{"bits":{"type":"string"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"type":"btc-bits-to-target","receipt":{"tx_hash":"0x<64hex>","amount_usd":0.002,"receipt_id":"g402-<16hex>"},"generated_at":"<iso8601>"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QkHaqUG89SKuMECLmTpo0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Expands a Bitcoin block header nBits field into its full 256-bit target hash and corresponding mining difficulty value","exampleAgentPrompt":"Can you expand Bitcoin nBits value 0x1d00ffff into its full target and tell me the corresponding mining difficulty?","exampleUseCases":[{"title":"Mining pool difficulty verification","prompt":"I have a Bitcoin block with nBits set to 0x170f3d80 — can you expand that into the full 256-bit target so I can verify whether our mined block hash is below it?"},{"title":"Historical block difficulty analysis","prompt":"What was the mining difficulty and full target hash for the Bitcoin genesis block? Its nBits value is 0x1d00ffff."},{"title":"Blockchain explorer enrichment","prompt":"I'm building a block explorer and need to show human-readable difficulty for each block. Can you decode nBits 0x1903a30c into its target and difficulty number?"}],"resultDescription":"Returns a JSON object with ok status, the decoded full 256-bit target value and computed mining difficulty derived from the provided nBits compact encoding, plus a payment receipt containing transaction hash, USD amount, and a Genesis402 receipt ID.","failureModes":["Invalid or malformed nBits hex string returns an error response","nBits value outside valid Bitcoin range may produce unexpected results","Payment failure or insufficient USDC balance prevents the call from completing","Network timeout from the UnyKorn operator node"],"whenToPreferThis":"Use this endpoint when you need to programmatically decode Bitcoin's compact nBits format into its full target representation and numeric difficulty — particularly useful for building block explorers, mining software, proof-of-work validators, or any tool that needs to interpret raw Bitcoin block header data without implementing the decoding logic yourself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T18:55:36.911Z","isFirstParty":false,"canonicalSlug":"bitcoin-nbits-to-target-and-difficulty-expander-ba3198d6"}