Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

Latest commit

 

History

History
241 lines (221 loc) · 9.62 KB

current-block.md

File metadata and controls

241 lines (221 loc) · 9.62 KB

Get the current block

Request

* = Requiered

Property Value
*Endpoint GET https://api.bitclout.com/api/v1/
*Headers content-type: application/json

Response

{
  "Error": String,
    "Header": {
      "BlockHashHex": String,
      "Version": Integer,
      "PrevBlockHashHex": String,
      "TransactionMerkleRootHex": String,
      "TstampSecs": Integer,
      "Height": Integer,
      "Nonce": Integer
  },
  "Transactions": [
    {
      "TransactionIDBase58Check": String,
      "RawTransactionHex": String,
      "Inputs": [
        {
          "TransactionIDBase58Check": String,
          "Index": Integer
        }
      ]
     "Outputs": [
        {
          "PublicKeyBase58Check": String,
          "AmountNanos": Integer
     ]
     "SignatureHex": String,
     "TransactionType": TransactionType
     "BlockHashHex": String,
     "TransactionMetadata": {
        "BlockHashHex": String,
        "TxnIndexInBlock": String,
        "TxnType": TransactionType,
        "TransactorPublicKeyBase58Check": String,
        "AffectedPublicKeys": [
          {
            "PublicKeyBase58Check": String,
            "Metadata": PublicKeyType,
          }
        ],
        "BasicTransferTxindexMetadata": {
          "TotalInputNanos": Integer,
          "TotalOutputNanos" Integer,
          "FeeNanos": Integer,
          "UtxoOpsDump": String
        },
        "BitcoinExchangeTxindexMetadata": {
          "BitcoinSpendAddress": String,
          "SatoshisBurned": Integer,
          "NanosCreated": Integer,
          "TotalNanosPurchasedBefore": Long,
          "TotalNanosPurchasedAfter": Long,
          "BitcoinTxnHash": String
        },
        "CreatorCoinTxindexMetadata": {
          "OperationType": "buy" | "sell",
          "BitCloutToSellNanos": Integer,
          "CreatorCoinToSellNanos": Integer,
          "BitCloutToAddNanos": Integer
         },
        "UpdateProfileTxindexMetadata": {
          "ProfilePublicKeyBase58Check": String,
          "NewUsername": String,
          "NewDescription": String,
          "NewProfilePic": String,
          "NewCreatorBasisPoints": Integer,
          "NewStakeMultipleBasisPoints": Integer,
          "IsHidden": Boolean
        },
        "SubmitPostTxindexMetadata": {
          "PostHashBeingModifiedHex": String,
          "ParentPostHashHex": String,
          "LikeTxindexMetadata": {
            "IsUnlike": Boolean,
            "PostHashHex": String
          },
          "FollowTxindexMetadata": {
            "IsUnfollow": Boolean
          },
          "PrivateMessageTxindexMetadata": {
            "TimestampNanos": Long
          },
          "SwapIdentityTxindexMetadata": {
            < UNKNOWN TYPES >
          }
        }
      }
    }
  ]
}

Types

Header

Type Description
"BlockHashHex" Hash of the current block in hex
"Version" Version of the current block
"PrevBlockHashHex" Hash of the previous block in hex
"TransactionMerkleRootHex" < UNKNOWN >
"TstampSecs" UNIX timestamp of the block
"Height" The current block's height
"Nonce" < UNKNOWN >

TxnType

Type Description
"BASIC_TRANSFER" Transfer of BitClout
"UPDATE_PROFILE" Profile Update (Name, Bio, etc)
"FOLLOW" Follow (Or unfollow) a user
"CREATOR_COIN" Purchase (Or sell) a creator coin
"SUBMIT_POST" Create (Or hide) post
"LIKE" Like (Or unlike) post
"BLOCK_REWARD" Reward for mining a block
"BITCOIN_EXCHANGE" For Purchases of $BitClout using $BTC
"PRIVATE_MESSAGE" Private message between accounts

AffectedPublicKey Metadata

Type Description
"BasicTransferOutput" Public key of the user who engaged in an action
"ProfilePublicKeyBase58Check" ???
"FollowedPublicKeyBase58Check" Public key of the user who received a follow (Or unfollow)
"CreatorPublicKey" Public key of the creator whose coin was purchased (Or sold)
"PosterPublicKeyBase58Check" Public key of the liked posts author

Transaction

Type Description
"TransactionIDBase58Check" Transaction ID in Base 58
"RawTransactionHex" Raw Hex Transaction ID
"Inputs" Array of Transaction Inputs
"Outputs" Arrat of Transaction Outputs
"SignatureHex" Transaction Signature in Hex
"TransactionMetadata" Transaction Meta Data

Input

Type Description
"TransactionIDBase58Check" Transaction ID in Base 58
"Index" < UNKNOWN >

Output

Type Description
"PublicKeyBase58Check" Author's Pulic Key in Base 58
"AmountNanos" < UNKNOWN >

TransactionMetadata

Type Description
"BlockHashHex" Transaction's block in hex
"TxnIndexInBlock" Transaction's index in it's block
"TxnType" Transaction Type
"AffectedPublicKeys" Array of users affected by the transaction
"BasicTransferTxindexMetadata" Nano metadata
"BitcoinExchangeTxindexMetadata" Bitcoin exchange metadata
"CreatorCoinTxindexMetadata" Creator Coin transaction metadata
"UpdateProfileTxindexMetadata" Profile Update meta data
"SubmitPostTxindexMetadata" Created (Or hidden) post's metadata
"LikeTxindexMetadata" Meta data of liked (Or unliked) post
"FollowTxindexMetadata" Meta data of follow (Or Unfollow)
"SwapIdentityTxindexMetadata" < UNKNOWN >

BasicTransferTxindexMetadata

Type Description
"TotalInputNanos" Nano's inputed into the transaction
"TotalOutputNanos" Nano's outputted into the transaction
"FeeNanos" Nano fee paid for the transaction (Input - Output)
"UtxoOpsDump" < UNKNOWN >

BitcoinExchangeTxindexMetadata

Type Description
"BitcoinSpendAddress" Public key address of incoming satoshis
"SatoshisBurned" $BTC spent on $BitClout
"NanosCreated" < UNKNOWN >
"TotalNanosPurchasedBefore" < UNKNOWN >
"TotalNanosPurchasedAfter" < UNKNOWN >
"BitcoinTxnHash" Tx Hash of $BTC transaction

CreatorCoinTxindexMetadata

Type Description
"OperationType" Transaction Type, "buy" or "sell"
"BitCloutToSellNanos" BitClout paid for creator coin
"CreatorCoinToSellNanos" Creator Coin sold for BitClout
"BitCloutToAddNanos" < UNKNOWN >

UpdateProfileTxindexMetadata

Type Description
"ProfilePublicKeyBase58Check" User's public key in Base 58
"NewUsername" User's new username
"NewDescription" User's new bio
"NewProfilePic" User's new profile image
"NewCreatorBasisPoints" < UNKNOWN >
"NewStakeMultipleBasisPoints" < UNKNOWN >
"IsHidden" < UNKNOWN >

SubmitPostTxindexMetadata

Type Description
"PostHashBeingModifiedHex" Transaction ID of the modified post
"ParentPostHashHex" Transaction ID of the parent post (When the modified post is a reply)

LikeTxindexMetadata

Type Description
"IsUnlike" Whether the transaction was an unlike (rather than a like)
"PostHashHex" Transaction ID of the liked post

FollowTxindexMetadata

Type Description
"IsUnfollow" Whether the transaction was an unfollow (rather than a follow)

PrivateMessageTxindexMetadata

Type Description
"TimestampNanos" < UNKNOWN >

SwapIdentityTxindexMetadata

Type Description
"< UNKNOWN TYPES >" < UNKNOWN >