Nubit
Nubit
  • Overview
    • Introduction
  • BitVM
    • BitVM IDE
    • Learn More
  • Modular Indexer
    • Introduction
    • Developer Guide
      • API Documentation
        • Modular Indexer API
        • Light Client API
      • Wallet Integration Guide
    • Learn More
  • External resources
    • Github
    • Linktree
    • X (Twitter)
    • Telegram
    • Discord
Powered by GitBook
On this page
  1. Modular Indexer
  2. Developer Guide
  3. API Documentation

Light Client API

Streamlined interfaces for querying balances, verifying transactions, and accessing brc-20 data efficiently.

PreviousModular Indexer APINextWallet Integration Guide

Last updated 11 months ago

Note: We are in the Alpha Testnet stage, so the API may undergo incompatible changes in the future. If you encounter any issues, please join our to get in touch with the Nubit Team.


Discord

brc20_verifiable_light_block_height

get

Get the latest synced block height of the brc20 indexer.

Responses
200
Success
*/*
Responseobject
get
GET /v1/brc20_verifiable/light/block_height HTTP/1.1
Host: 
Accept: */*
200

Success

800000

brc20_verifiable_light_current_checkpoints

get
Responses
200
Success
application/json
500
Failed
application/json
get
GET /v1/brc20_verifiable/light/checkpoints HTTP/1.1
Host: 
Accept: */*
{
  "error": "Internal Server Error",
  "code": 500
}

brc20_verifiable_light_last_checkpoint

get
Responses
200
Success
application/json
500
Failed
application/json
get
GET /v1/brc20_verifiable/light/last_checkpoint HTTP/1.1
Host: 
Accept: */*
{
  "checkPoint": {
    "url": "text",
    "name": "text",
    "version": "text",
    "metaProtocol": "text",
    "height": "text",
    "hash": "text",
    "commitment": "text"
  },
  "sourceS3": {
    "region": "text",
    "bucket": "text",
    "name": "text"
  },
  "sourceDa": {
    "network": "text",
    "namespaceID": "text",
    "name": "text"
  }
}

brc20_verifiable_light_state

get
Responses
200
Success
application/json
get
GET /v1/brc20_verifiable/light/state HTTP/1.1
Host: 
Accept: */*
200

Success

{
  "state": "system is ready"
}
  • GETbrc20_verifiable_light_current_balance_of_wallet
  • GETbrc20_verifiable_light_current_balance_of_pkscript
  • GETbrc20_verifiable_light_block_height
  • GETbrc20_verifiable_light_current_checkpoints
  • GETbrc20_verifiable_light_last_checkpoint
  • GETbrc20_verifiable_light_state

brc20_verifiable_light_current_balance_of_wallet

get

Get the latest balance of the wallet on its latest pkscript.

Query parameters
tickstringOptional

Token name of BRC-20,example: btcs

walletstringOptional

Address of tick

Body
objectOptional
Responses
200
Success
application/json
500
Failed
application/json
get
GET /v1/brc20_verifiable/light/current_balance_of_wallet HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "error": null,
  "result": {
    "availableBalance": "text",
    "overallBalance": "text",
    "pkscript": "text"
  },
  "proof": "text"
}

brc20_verifiable_light_current_balance_of_pkscript

get

Get the latest balance of the wallet on its latest pkscript.

Query parameters
tickstringOptional

Token name

pkscriptstringOptional

the pkscript of tick

Body
objectOptional
Responses
200
Success
application/json
500
Failed
application/json
get
GET /v1/brc20_verifiable/light/current_balance_of_pkscript HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "error": null,
  "result": {
    "availableBalance": "text",
    "overallBalance": "text"
  },
  "proof": "text"
}