Neucron
Search
K
Comment on page

Data Integrity

Use the blockchain to records event/data that exists at a particular point of time. This data cannot be tampered with. The transaction can always be verified on the blockchain for proof of data.
Bitcom protocol exists to upload files on the blockchain with its encoding specified, so that it can be decoded, interpreted and presented by blockchain explorers like whatsonchain.
Go to the File API to upload files on the blockchain such that they can be viewed.
  1. 1.
    Click `Choose File` which will open your local file selector window to chose a file
  2. 2.
    Click Execute
  3. 3.
    You will receive the blockchain transaction link on the email you signed up with

Upload File (Bitcom)

post
https://dev.neucron.io
/tx/file
Upload file on blockchain

Upload Data on Blockchain

The Neucron API provides an endpoint /tx/postdata that allows users to upload data to the blockchain, ensuring data integrity and immutability. In this documentation, we will cover how to use this endpoint to post data on the blockchain.

Endpoint Details

  • URL: https://dev.neucron.io/tx/postdata
  • Method: POST
  • Consumes: application/json
  • Produces: application/json
  • Tags: Data Integrity
  • Summary: Upload Data on Blockchain

Request

To upload data to the blockchain, you need to send a POST request to the /tx/postdata endpoint. The request should include the following parameters:
  • X-Neucron-App-ID: A header parameter for specifying the app ID.
  • X-Neucron-Key-ID: A header parameter for specifying the key ID.
  • X-Neucron-Key-Secret: A header parameter for specifying the key secret.
  • X-Neucron-User-ID: A header parameter for specifying the user ID.
  • walletID: A query parameter for specifying the wallet ID.
  • sendRequest: The request body should contain the message you want to post on the blockchain in the models.AddDataUtxo schema. This field is required.

Request Body (Example)

{
"message": "This is the data message to be posted on the blockchain."
}

Request Example (cURL)

curl -X 'POST' \
'https://dev.neucron.io/tx/postdata' \
-H 'accept: application/json' \
-H 'Authorization: YOUR_BEARER_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"message": "This is the data message to be posted on the blockchain."
}'
Replace 'YOUR_BEARER_TOKEN' with your actual Bearer Token and customize the request body according to the data message you want to post on the blockchain.

Response

The API responds with a JSON object containing information about the data posting status. Here's the response structure:
{
"data": {
"$ref": "#/definitions/models.BroadcastResponse"
}
}
  • data: An object representing the result of the data posting operation. The structure of this object depends on the models.BroadcastResponse definition.

Response Codes

  • 200: OK - The data was successfully posted on the blockchain, and the response contains the posting status.
  • 400: Bad Request - If there's an issue with the request or validation, you'll receive an error response.
  • 404: Not Found - If the specified resource or endpoint is not found, you'll receive an error response.
  • 500: Internal Server Error - If there's a problem with the server, you'll receive an error response.
Ensure that you provide the correct Bearer Token and customize the request body according to the data message you want to post on the blockchain when making the request to upload data on the blockchain.
post
https://dev.neucron.io
/tx/postdata
Upload data on blockchain

Sign Message

Introduction

The "/tx/mesign" endpoint allows you to add a message to sign, which will be signed by one of your wallet private keys. This operation ensures data integrity and security for your messages. This documentation provides details on how to use this endpoint effectively.

Endpoint Information

  • Endpoint: /tx/mesign
  • HTTP Method: POST
  • Tags: Data Integrity
  • Summary: Add a message to sign

Authentication

To access this endpoint, you need to include a valid bearer token in your request headers. The token should be obtained through authentication.

Request Headers

  • X-Neucron-App-ID (string, required): Your application's ID.
  • X-Neucron-Key-ID (string, required): The ID of your key.
  • X-Neucron-Key-Secret (string, required): The secret key associated with your key ID.
  • X-Neucron-User-ID (string, required): The user ID associated with the operation.

Request Parameters

Query Parameters

  • walletID (string, query): The ID of the wallet where the message will be signed.

Request Body

  • sendRequest (object, required): An object containing the message to be signed. It follows the schema defined in "#/definitions/models.AddDataUtxo".

Responses

The endpoint provides the following responses:

200 OK

  • Description: The request was successful.
  • Response Body: The response body follows the schema defined in "#/definitions/models.Mesignresponce".

400 Bad Request

  • Description: The request was malformed or contained invalid data.
  • Response Body: The response body follows the schema defined in "#/definitions/errorhandler.ClientError".

404 Not Found

  • Description: The requested resource was not found.
  • Response Body: The response body follows the schema defined in "#/definitions/errorhandler.ClientError".

500 Internal Server Error

  • Description: An internal server error occurred.
  • Response Body: The response body follows the schema defined in "#/definitions/errorhandler.ClientError".

Example Request

POST /tx/mesign
Host: your-api-host.com
Content-Type: application/json
Authorization: Bearer <your-access-token>
{
"X-Neucron-App-ID": "<your-app-id>",
"X-Neucron-Key-ID": "<your-key-id>",
"X-Neucron-Key-Secret": "<your-key-secret>",
"X-Neucron-User-ID": "<your-user-id>",
"walletID": "<wallet-id>",
"sendRequest": {
// Message data according to the schema in "#/definitions/models.AddDataUtxo"
}
}

Example Response (200 OK)

{
// Response data according to the schema in "#/definitions/models.Mesignresponce"
}

Example Response (400 Bad Request)

{
// Error response data according to the schema in "#/definitions/errorhandler.ClientError"
}

Example Response (404 Not Found)

{
// Error response data according to the schema in "#/definitions/errorhandler.ClientError"
}

Example Response (500 Internal Server Error)

{
// Error response data according to the schema in "#/definitions/errorhandler.ClientError"
}

Conclusion

The "/tx/mesign" endpoint allows you to sign messages for data integrity and security. Ensure you provide the required authentication headers and handle potential error responses according to the provided schemas.
post
https://dev.neucron.io
/tx/mesign
Sign message on blockchain

Upload File (1 SAT Ordinal)

Introduction

The "/tx/upload" endpoint allows you to upload a file to the blockchain, ensuring data integrity and security. This documentation provides details on how to use this endpoint effectively.

Endpoint Information

  • Endpoint: /tx/upload
  • HTTP Method: POST
  • Tags: Data Integrity
  • Summary: Upload a file to the blockchain

Authentication

To access this endpoint, you need to include a valid bearer token in your request headers. The token should be obtained through authentication.

Request Headers

  • X-Neucron-App-ID (string, required): Your application's ID.
  • X-Neucron-Key-ID (string, required): The ID of your key.
  • X-Neucron-Key-Secret (string, required): The secret key associated with your key ID.
  • X-Neucron-User-ID (string, required): The user ID associated with the operation.

Request Parameters

Query Parameters

  • walletID (string, query): The ID of the wallet where the file will be uploaded.

Request Body

  • upfile (file, formData, required): The file to be uploaded.

Responses

The endpoint provides the following responses:

200 OK

  • Description: The request was successful.
  • Response Body: The response body follows the schema defined in "#/definitions/models.BroadcastResponse".

400 Bad Request

  • Description: The request was malformed or contained invalid data.
  • Response Body: The response body follows the schema defined in "#/definitions/errorhandler.ClientError".

404 Not Found

  • Description: The requested resource was not found.
  • Response Body: The response body follows the schema defined in "#/definitions/errorhandler.ClientError".

500 Internal Server Error

  • Description: An internal server error occurred.
  • Response Body: The response body follows the schema defined in "#/definitions/errorhandler.ClientError".

Example Request

POST /tx/upload
Host: your-api-host.com
Content-Type: multipart/form-data
Authorization: Bearer <your-access-token>
{
"X-Neucron-App-ID": "<your-app-id>",
"X-Neucron-Key-ID": "<your-key-id>",
"X-Neucron-Key-Secret": "<your-key-secret>",
"X-Neucron-User-ID": "<your-user-id>"
}

Example Response (200 OK)

{
// Response data according to the schema in "#/definitions/models.BroadcastResponse"
}

Example Response (400 Bad Request)

{
// Error response data according to the schema in "#/definitions/errorhandler.ClientError"
}

Example Response (404 Not Found)

{
// Error response data according to the schema in "#/definitions/errorhandler.ClientError"
}

Example Response (500 Internal Server Error)

{
// Error response data according to the schema in "#/definitions/errorhandler.ClientError"
}

Conclusion

The "/tx/upload" endpoint allows you to upload files to the blockchain, ensuring data integrity and security. Ensure you provide the required authentication headers and handle potential error responses according to the provided schemas.
post
https://dev.neucron.io
/tx/upload
Upload file on blockchain (1 SAT Ordinal)