Operations

Use the blockchain as your trusted database.

Saves data to selected blockchain network

POST https://api.bws.ninja/v1/call

Use this operation to save data you can change to the blockchain.

Request Body

{
    "statusCode": 200,
    "statusMessage": "",
    "info": {
        "jobId": "59d0f46b-0b58-4972-8aca-51d06f69f25e"
    }
}

Method Parameters

Curl Example

This operation is asynchronous. Once executed, check the results using fetch API and the providedjobId.

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.Blockchain.Hash",
    "version": 1,
    "network": "sepolia",
    "operation": "insertString",
    "parameters": {
        "key": "1689256807966",
        "value": "Hello!"
    }
}'

Retrieve previously saved data using insertString operation.

POST https://api.bws.ninja/v1/call

Use this operation to retrieve data previously saved using insertString.

Request Body

{
    "statusCode": 200,
    "statusMessage": "",
    "info": {
        "jobId": "59d0f46b-0b58-4972-8aca-51d06f69f25e"
    }
}

Method Parameters

Curl Example

This operation is asynchronous. Once executed, check the results using fetch API and the providedjobId.

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "contract": "Ethereum.Database.Mutable",
    "version": 1,
    "network": "sepolia",
    "operation": "selectString",
    "parameters": {
        "key": "1689256807966"
    }
}'

Saves up to 32 characters in selected blockchain network.

POST https://api.bws.ninja/v1/call

Use this operation to save data you can change to the blockchain.

Request Body

{
    "statusCode": 200,
    "statusMessage": "",
    "info": {
        "jobId": "59d0f46b-0b58-4972-8aca-51d06f69f25e"
    }
}

Method Parameters

Curl Example

This operation is asynchronous. Once executed, check the results using fetch API and the providedjobId.

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.Blockchain.Hash",
    "version": 1,
    "network": "sepolia",
    "operation": "insertBytes32",
    "parameters": {
        "key": "1689256807966",
        "value": "Hello!"
    }
}'

Retrieve previously saved data using insertBytes32 operation.

POST https://api.bws.ninja/v1/call

Use this operation to retrieve data previously saved using insertBytes32.

Request Body

{
    "statusCode": 200,
    "statusMessage": "",
    "info": {
        "jobId": "59d0f46b-0b58-4972-8aca-51d06f69f25e"
    }
}

Method Parameters

Curl Example

This operation is asynchronous. Once executed, check the results using fetch API and the providedjobId.

curl --location 'https://api.bws.ninja/v1/call' \
--header 'X-Api-Key: API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "solution": "BWS.Blockchain.Hash",
    "version": 1,
    "network": "sepolia",
    "operation": "selectBytes32",
    "parameters": {
        "key": "1689256807966"
    }
}'

Last updated