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

Add Block Txs

Add a Bitcoin block transactions to the tree

Code samples

const inputBody = '{
  "hash": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/tree/add-block-transaction',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /tree/add-block-transaction

Body parameter

{
  "hash": "string"
}

Parameters

Name
In
Type
Required
Description

body

body

tna-da.api.tree.v1.BlockTxsReq

true

none

Example responses

200 Response

{
  "code": 0,
  "message": "string",
  "data": {
    "txs": [
      {
        "txid": "string",
        "version": 0,
        "locktime": 0,
        "vin": [
          {}
        ],
        "vout": [
          {}
        ],
        "size": 0,
        "weight": 0,
        "fee": 0,
        "status": {
          "confirmed": true,
          "block_height": 0,
          "block_hash": "string",
          "block_time": 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

»» txs

object

false

none

List of transactions added to the tree

»»» txid

string(string)

false

none

Transaction ID

»»» version

integer(int)

false

none

Transaction version

»»» locktime

integer(int)

false

none

Transaction locktime

»»» vin

object

false

none

Transaction inputs

»»» vout

object

false

none

Transaction outputs

»»» size

integer(int)

false

none

Transaction size in bytes

»»» weight

integer(int)

false

none

Transaction weight

»»» fee

integer(int)

false

none

Transaction fee

»»» status

object

false

none

none

»»»» confirmed

boolean(bool)

false

none

Whether the transaction is confirmed

»»»» block_height

integer(int)

false

none

Block height at which the transaction is included

»»»» block_hash

string(string)

false

none

Block hash at which the transaction is included

»»»» block_time

integer(int)

false

none

Time at which the block was mined

PreviousVerify ProofNextGet Block Height

Last updated 11 months ago

OK