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
}

Last updated