Comment on page
Asset
The
/asset/register
endpoint allows you to register an asset and returns the assetID
. This endpoint is a POST request and is used to register different types of assets on the Neucron platform. It is protected with Bearer Token authentication. Below are the details of this endpoint:- URL:
https://dev.neucron.io/asset/register?assetType=assetType
- Replace
assetType
in the URL with the actual type of asset you want to register.
- Method: POST
- Consumes:
application/json
- Produces:
application/json
- Tags: Asset
- Summary: Register Asset
The request to register an asset 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.
- assetType: A query parameter specifying the type of asset you want to register. This parameter is required.
Here's an example CURL request to register an asset on the Neucron platform:
curl -X 'POST' \
'https://dev.neucron.io/asset/register?assetType=assetType' \
-H 'accept: application/json' \
-H 'Authorization: <Your_Bearer_Token>' \
-d ''
Replace
<Your_Bearer_Token>
with your actual Bearer Token and provide the correct assetType
in the URL based on the type of asset you want to register.The API responds with a JSON object containing the
assetID
of the registered asset. Here's the response structure:{
"data": {
"assetID": "string"
},
"status_code": "integer"
}
data.assetID
: A string representing theassetID
of the registered asset.status_code
: An integer representing the HTTP status code.
200
: OK - The asset was successfully registered, and theassetID
is provided in the response.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.
Please make sure to replace
<Your_Bearer_Token>
with your actual Bearer Token and specify the correct assetType
in the URL when making the request to register an asset.Oops, something is missing.We could not find the original source to display this content.
The
/asset/create
endpoint allows you to issue a smart contract, creating a new asset. This endpoint is used to create tokens or digital assets on the Neucron platform. It is a POST request endpoint and is protected with Bearer Token authentication. Below are the details of this endpoint:- URL:
https://dev.neucron.io/asset/create
- Method: POST
- Consumes:
application/json
- Produces:
application/json
- Tags: Asset
- Summary: Issue Smart Contract
The request to create a smart contract (asset) 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 specifying the ID of the wallet where the smart contract will be issued.
- sendRequest: The request body should include a JSON object representing the smart contract (asset) to be created. This object should conform to the
models.Token
schema.
Here's an example of the request body for creating a smart contract (asset):
{
"decimals": 0,
"description": "A gifting test token.",
"image": "string",
"name": "Store Bonus Points",
"properties": {
"issuer": {
"email": "[email protected]",
"governingLaw": "India",
"issuerCountry": "India",
"jurisdiction": "India",
"legalForm": "Limited",
"organisation": "Timechain Labs Pvt. Ltd."
},
"legal": {
"licenceId": "stastoken.com",
"terms": "STAS, Inc. retains all rights to the token script. Use is subject to terms at https://stastoken.com/license."
},
"meta": {
"legal": {
"terms": "Your token terms and description."
},
"media": [
{
"URI": "string",
"altURI": "string",
"type": "string"
}
],
"schemaId": "STAS1.0",
"website": "timechainlabs.io"
}
},
"protocolId": "STAS",
"satsPerToken": 2,
"splitable": true,
"symbol": "SBP",
"totalSupply": 10
}
This example represents a smart contract (asset) with various properties, including its name, description, issuer information, legal details, and more.
The API responds with a JSON object containing the created smart contract (asset). Here's the response structure:
{
"data": {
"token": {
// Smart contract (asset) details
}
},
"status_code": "integer"
}
data.token
: An object representing the created smart contract (asset) with its details.status_code
: An integer representing the HTTP status code.
200
: OK - The smart contract (asset) was successfully created.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.
Here's a CURL example to create a smart contract (asset) on the Neucron platform:
curl -X 'POST' \
'https://dev.neucron.io/asset/create' \
-H 'accept: application/json' \
-H 'Authorization: <Your_Bearer_Token>' \
-H 'Content-Type: application/json' \
-d '{
"decimals": 0,
"description": "A gifting test token.",
"image": "string",
"name": "Store Bonus Points",
"properties": {
// Smart contract (asset) properties
},
"protocolId": "STAS",
"satsPerToken": 2,
"splitable": true,
"symbol": "SBP",
"totalSupply": 10
}'
Replace
<Your_Bearer_Token>
with your actual Bearer Token and provide the required details for creating the smart contract (asset) in the request body.This CURL request will create a smart contract (asset) on the Neucron platform and return its details in the response.
Oops, something is missing.We could not find the original source to display this content.
The
/asset/status
endpoint allows you to retrieve the status of a specific asset by providing its tokenID
. This endpoint is a GET request and is protected with Bearer Token authentication. Below are the details of this endpoint:- URL:
https://dev.neucron.io/asset/status?tokenID=nikhil
- Replace
nikhil
in the URL with the actualtokenID
of the asset for which you want to retrieve the status.
- Method: GET
- Consumes:
application/json
- Produces:
application/json
- Tags: Asset
- Summary: Asset Status
The request to retrieve the status of an asset 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.
- tokenID: A query parameter specifying the
tokenID
of the asset for which you want to retrieve the status. This parameter is required.
Here's an example CURL request to retrieve the status of an asset based on its
tokenID
:curl -X 'GET' \
'https://dev.neucron.io/asset/status?tokenID=nikhil' \
-H 'accept: application/json' \
-H 'Authorization: <Your_Bearer_Token>'
Replace
<Your_Bearer_Token>
with your actual Bearer Token and provide the correct tokenID
in the URL to retrieve the status of the asset.The API responds with a JSON object containing information about the asset's status. Here's the response structure:
{
"data": {
"app": {
"$ref": "#/definitions/models.Token"
}
},
"status_code": "integer"
}
data.app
: An object representing the asset's status. The structure of this object depends on themodels.Token
definition.status_code
: An integer representing the HTTP status code.
200
: OK - The asset's status was successfully retrieved, and the status information is provided in the response.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.
Please make sure to replace
<Your_Bearer_Token>
with your actual Bearer Token and specify the correct tokenID
in the URL when making the request to retrieve the status of an asset.Oops, something is missing.We could not find the original source to display this content.
Last modified 3mo ago