Quick Start
"Hello World!"
Let's use BWS.Blockchain.Save solution to write "Hello World!" to Sepolia blockchain.
You will learn how easy it is to interact with Blockchain[s] by using BWS!
Get your API key
Your API requests should be authenticated using your API key (any request that doesn't include an API key will return an error).
Learn how to Get your API Key.
Make your first request
We're going to use the BWS.Blockchain.Save solution and use the insertString operation to save "Hello Wolrd!" message to the blockchain.
Using BWS.Blockchain.Save to write "Hello World!" to Sepolia blockchain.
POST
https://api.bws.ninja/v1/smart-contracts/call
Let's write "Hello World!" to the Sepolia blockchain network without having to manage network fees or accounts. Just by calling a regular Web2 API.
Request Body
solution*
string
BWS.Blockchain.Save
version*
number
2
network*
string
sepolia
operation*
string
insertString
parameters*
JSON
{ key: "mykey",
value: "Hello World!"
}
Copy & Paste one of the following code snippets and run it (remember to use your own API Key).
If executed correctly, check for the jobId
in the response body part. We will use it to verify that the blockchain operation has been correctly finished and get the blockchain transaction receipt.
Check for Results
To check for job completion and results, use the jobId
you got from the previous call.
Please note interacting with blockchain(s) is asynchronous, so it may take some time for the operation to finish and get the blockchain receipt.
Fetch for the blockchain job status and results.
POST
https://api.bws.ninja/v1/smart-contracts/fetch
Using the previous call response jobId
we fetch blockchain job completion and the transaction details.
Request Body
jobId*
String
(use previously returned jobId, as for example 59d0f46b-0b58-4972-8aca-51d06f69f25e)
Copy & Paste one of the following code snippets and run it (remember to use your own API Key).
You should get a response indicating the job has been completed and the related blockchain receipt.
Congratulations! You used BWS to save data into the Web3 blockchain ecosystem.
Last updated