Subfrost API Documentation
website·Indexed 32 days ago
https://api.subfrost.io/docsA comprehensive API platform for Bitcoin and blockchain data, featuring JSON-RPC and REST endpoints for Alkanes, BRC-20, Ordinals, and mempool data. It provides tools for threshold signature wallets via FROST, server-side Lua scripting, and specialized indexers like Metashrew and OPI. The platform includes a CLI (alkanes-cli), a TypeScript SDK (@alkanes/ts-sdk), and support for WalletConnect-style protocols for mobile app signature requests.
What's inside Subfrost
- The Subfrost API supports the SUBFROST Bitcoin-native L0 extension framework. It provides a JSON-RPC Gateway for unified access to Bitcoin Core, Esplora, Ord, BRC20, and Alkanes APIs; a REST API for high-level blockchain data; server-side Lua scripting with RPC access; and real-time data access for mempool, UTXOs, inscriptions, and runes.
Overview of Alkanes JSON-RPC methods
The
alkanes_*namespace provides access to the Alkanes protocol (a variant of protorunes and subprotocol of runes) on Bitcoin L1. These methods are convenience wrappers that encode inputs into aMessageContextParcelprotobuf, callmetashrew_view, and decode the result.Recommendation: For new integrations, prefer calling
metashrew_viewdirectly for stable behavior and broader feature coverage. The mapping between convenience methods and their canonicalmetashrew_viewfunctions is as follows:Convenience method metashrew_view function Notes alkanes_protorunesbyaddressprotorunesbyaddressDEPRECATED in v3.0. Use Esplora UTXO API + protorunesbyoutpoint.alkanes_getbytecodegetbytecodealkanes_simulatesimulateUse for read-only contract evaluation. alkanes_metametaReturns narrow token-shape; use metashrew_viewfor non-token alkanes.alkanes_tracetracealkanes_traceblocktraceblockOverview of alkanes-cli and @alkanes/ts-sdk
Thealkanes-clitool and@alkanes/ts-sdklibrary provide a comprehensive interface for interacting with the Alkanes protocol, Bitcoin blockchain, and SUBFROST APIs. Key capabilities include wallet management (HD wallets), Alkanes protocol operations (contracts, swaps, liquidity), Bitcoin operations (UTXOs, blocks), and support for Ordinals, Runes, and BRC20-Prog EVM-compatible contracts.Overview of the Ethereum Public Mempool API
The Ethereum Mempool API provides a live view of the public mempool ingested directly from the
ethdevp2p wire network. This allows users to see transactions before they are mined and before they appear in many RPC providers' pools.Important Constraints:
- Public Mempool Only: It only tracks transactions propagating over devp2p. Private orderflow (e.g., Flashbots or exclusive builder RPCs) is not captured.
- Preview Status: The service is in preview; users should use the
seqfield and handleresetevents to manage potential stream gaps.
# JSON-RPC Endpoint POST https://mainnet.subfrost.io/v4/{api_key}/ethereum/mempool # WebSocket Change Stream Endpoint GET wss://mainnet.subfrost.io/v4/{api_key}/ethereum/mempool/wsOverview of SUBFROST Threshold Wallet
SUBFROST provides threshold signature wallet functionality for regtest environments using the FROST (Flexible Round-Optimized Schnorr Threshold signatures) protocol. It implements a 9-of-6 threshold multisig system where 9 signers participate and 6 signatures are required to authorize transactions. The system derives Native SegWit (P2WPKH) addresses from the FROST public key. The wallet keystore is persistent and survives pod restarts and environment resets.Overview of the Subfrost Orderbook API
The Subfrost Orderbook API provides a read-optimized surface (via REST and WebSocket) over off-chain PSBT order books that settle on Bitcoin via alkanes. It supports two primary sources: 'orbitals' (NFT ↔ DIESEL listings/offers) and 'lending' (pre-signed loan-offer PSBTs). Note: This API is currently in Beta and subject to change; it is not recommended for production-critical flows.Understand Subfrost API service capabilities
Subfrost API, operated by Subzero Research Inc., provides a unified API gateway for Bitcoin blockchain data. It offers access to Bitcoin Core, Esplora, Ordinals, Runes, Alkanes, and related protocols via JSON-RPC endpoints, REST APIs, and Lua scripting capabilities.Get rune information by name
Useord_runeto get details about a specific rune. The rune name should include spacers (e.g.,•).{ "jsonrpc": "2.0", "method": "ord_rune", "params": ["UNCOMMON•GOODS"], "id": 1 }Get satoshi ordinal details
Useord_satto retrieve information about a specific satoshi by its ordinal number, including rarity, block, and associated inscriptions.{ "jsonrpc": "2.0", "method": "ord_sat", "params": [1000000000000], "id": 1 }Track frUSD deposits on Ethereum via JSON-RPC
The frUSD indexer allows developers to track deposits made into the frUSD vault on Ethereum, indexed by the BTC recipient script. This is used to determine if a cross-chain deposit has landed on Ethereum and the amount deposited. The API uses a dedicated endpoint separate from the main Subfrost API.
Endpoint:
POST https://mainnet.subfrost.io/v4/<your-api-key>/ethereum/frusd(Note: The free anchor/v4/jsonrpc/ethereum/frusdis available without a key for public on-chain history.)Query Rune information by name
Use theord runecommand to get details about a Rune. If the rune name contains a bullet character (•), ensure it is included in the query string.alkanes-cli -p mainnet \ --jsonrpc-url https://mainnet.subfrost.io/v4/jsonrpc \ ord rune "UNCOMMON•GOODS"Get inscription details by ID
Useord_inscriptionto retrieve full details about a specific Ordinal inscription. The inscription ID must be in the formattxidi0.{ "jsonrpc": "2.0", "method": "ord_inscription", "params": ["6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0"], "id": 1 }