TNA Whitepaper
  • - TNA Intro -
    • Overview
    • Decentralized Names for Bitcoin
    • Taproot and Lightning Network
    • Supporting Multiple Asset Types
    • Omni-Chain Name Assets
  • - Developer Guide -
    • Technical Details
      • Tech Features
      • Key Components
    • Developer APIs
      • Resolution
        • Get Name Info
        • Get Names from an Address
        • Mint a Name
        • Burn a Name
        • Transfer a Name
      • Data Availability
        • Get Tree Status
        • Get Proof
        • Verify Proof
        • Add Block Txs
        • Get Block Height
        • Get Block Hash
        • Get Block Txids
  • - TNA Core -
    • TNA Core Overview
    • Yellowpaper: TNA Core - a Bitcoin DA framework
  • - Ecosystem -
    • Tokenomics
    • Roadmap
    • TNA FAQ
  • - Social Links -
    • Twitter
    • Telegram
    • Medium
Powered by GitBook
On this page
  1. - Developer Guide -
  2. Developer APIs
  3. Data Availability

Get Block Height

Retrieve the current height of the Bitcoin blockchain

Code samples


const headers = {
  'Accept':'application/json'
};

fetch('/bitcoin/current-height',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /bitcoin/current-height

Example responses

200 Response

{
  "code": 0,
  "message": "string",
  "data": {
    "height": 0
  }
}

Responses

Status
Meaning
Description
Schema

200

none

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» code

integer(int)

false

none

Error code

» message

string(string)

false

none

Error message

» data

object

false

none

Result data

»» height

integer(int)

false

none

The current height of the Bitcoin blockchain

PreviousAdd Block TxsNextGet Block Hash

Last updated 10 months ago

OK