Subfrost API Documentation

website·Indexed 32 days ago

https://api.subfrost.io/docs

A 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.

Tokens
39.9K
Snippets
282
Records
333
Agent score
58%

What's inside Subfrost

  1. Overview of Subfrost API capabilities

    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.
  2. 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 a MessageContextParcel protobuf, call metashrew_view, and decode the result.

    Recommendation: For new integrations, prefer calling metashrew_view directly for stable behavior and broader feature coverage. The mapping between convenience methods and their canonical metashrew_view functions is as follows:

    Convenience methodmetashrew_view functionNotes
    alkanes_protorunesbyaddressprotorunesbyaddressDEPRECATED in v3.0. Use Esplora UTXO API + protorunesbyoutpoint.
    alkanes_getbytecodegetbytecode
    alkanes_simulatesimulateUse for read-only contract evaluation.
    alkanes_metametaReturns narrow token-shape; use metashrew_view for non-token alkanes.
    alkanes_tracetrace
    alkanes_traceblocktraceblock
  3. Overview of alkanes-cli and @alkanes/ts-sdk

    The alkanes-cli tool and @alkanes/ts-sdk library 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.
  4. Overview of the Ethereum Public Mempool API

    The Ethereum Mempool API provides a live view of the public mempool ingested directly from the eth devp2p 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 seq field and handle reset events 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/ws
  5. Overview 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.
  6. 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.
  7. 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.
  8. Get rune information by name

    Use ord_rune to 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
    }
  9. Get satoshi ordinal details

    Use ord_sat to 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
    }
  10. 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/frusd is available without a key for public on-chain history.)

  11. Query Rune information by name

    Use the ord rune command 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"
  12. Get inscription details by ID

    Use ord_inscription to retrieve full details about a specific Ordinal inscription. The inscription ID must be in the format txidi0.
    {
      "jsonrpc": "2.0",
      "method": "ord_inscription",
      "params": ["6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0"],
      "id": 1
    }