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

Mint a Name

Mint a Name

Code samples

const inputBody = '{
  "name": "string",
  "signature": "string",
  "message": "string",
  "createdAt": 0,
  "id": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://tna-btc.com/api/tapname',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /api/tapname

Body parameter

{
  "name": "string",
  "signature": "string",
  "message": "string",
  "createdAt": 0,
  "id": "string"
}

Parameters

Name
Type
Required
Restrictions
Description

name

string(string)

true

none

mint tapname

signature

string(string)

true

none

signature

message

string(string)

true

none

signed message

createdAt

integer(int)

true

none

current timestamp

id

string(string)

true

none

signature generated id

Example responses

200 Response

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

Responses

Status
Meaning
Description
Schema

200

Success

none

Inline

400

Failed

see error message

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

PreviousGet Names from an AddressNextBurn a Name

Last updated 11 months ago