NxtFi
  • NxtFi Blockchain
  • Testing Network
  • Block Viewer
  • Playground
  • Authentication
  • Create New Block
  • Blockchain Libraries
    • NxtFi Tools
    • Javascript - CreateBlock
  • Smart Contracts
  • The Storage System
  • Upload Media Files
  • Blockchain API Interactions
  • Access Control Layer
    • How it Works
    • Syntax & Smart Contract requirements
    • Example
  • API - Listing Files
  • API Reference
    • Get node health
    • Get the last block
    • Get block information by hash
    • Get block information by timestamp
    • Get block information by height
    • Get files from storage by scope
    • Storage tracking interactions
    • Storage tracking timestamp block info
    • Submit new block
    • Presign media file upload
Powered by GitBook
On this page
  • Creates a new block
  • Example in curl
  • Response
  1. API Reference

Submit new block

Put a new block into the blockchain

Creates a new block

PUT https://test-001-node.cloud.nxtfi.tech/v2/newBlock

Request Body

Name
Type
Description

prevhash*

String

Last recorded hash of the scope

height*

Number

Heght of the last block of the scope + 1

version*

Number

API version

data*

String

Block Content

timestamp*

Number

by*

String

Transaction Signer name

scope*

String

Scope name

signature*

String

RSA-PSS signature of the object

{ prevHash, height, version, data, timestamp, scope }

hash*

String

Example in curl

curl --location --request PUT 'https://test-001-node.cloud.nxtfi.tech/v2/newBlock' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prevHash": "bd125e337f0cc7782b0e3465157b60535151362220f490650bed6b4be69bbb4b",
    "height": 14,
    "version": 2,
    "data": "Hello World!",
    "timestamp": 1676462543625,
    "scope": "DATA",
    "signature": "Vicd0mJ1mtXHleomOYsZ1oIZCeu+5P6EZLP/yRAABbvueTdMmJ1YbfnrbQ44ZJtAVwTI0NljyDoU62QvgnTEyCaJWwGR9URW+cAf15tupbkefJWrawmTOWuu3p4kBbOlF2Vk2oClnsUOpUrnzQ7AfdTa30bH87xpHLPUlvmxMw3Q3iCBH8908chKO/t/b7bI/8PGVDejYx13g2UCvJB0dcFHS8XAhAE0NwKpN33KVLCGAc5EoxLKF2mTCw5EejGxh19DbK05RbRZ8GL2j5MikyFlYVZexRIs6T3Rwr5zBacm1xw+P52WHRaDDHyAkVKd3XCvN6P18HRJWd5he+IOiw==",
    "by": "DATA",
    "hash": "d1966d2adabdcd65eb904dec2abc1179f02e2e6a5b3428e4ddf05d3a9a7a0276"
}'

Response

{
    "verified": true,
    "queued": true
}
PreviousStorage tracking timestamp block infoNextPresign media file upload

Last updated 2 years ago

Timestamp in format

Cryptographic hash (digest) encrypted with

Unix
SHA-256