Skip to main content

Start building

Now that you have your API Key and Application ID, you can start making authenticated requests to the Blockchain API.

Setting Up Headers​

To make authorized requests, you need to include the API Key and Application ID in the request headers.

  • Authorization Header (Bearer Token): Include your API Key in the Authorization header as a bearer token. The header should look like this:

  • x-application-vkn (Header): Include your Application ID in the x-application-vkn header. The header should look like this:

Making a Sample Request​

Here's a sample code snippet that demonstrates how to make an authenticated request to the APIs:

curl --location 'https://api.vottun.tech/core/v1/evm/info/chains' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'x-application-vkn: <YOUR_APPLICATION_ID>'

Remember to replace YOUR_API_KEY and YOUR_APPLICATION_ID with your actual API Key and Application ID.

First steps​

Once you have all the required stuff to start developing your first blockchain application and you learn how to build Vottun Blockchain API requests need to decide three key variables in this new world you will start exploring.

1. Network​

The selection of the network is something crucial in your future application. To select in which network you will work you have to take into consideration several parameters such us the performance, the transactional cost, the popularity of commnity, how much documentation exist or the usability. Fortunately, the Vottun Blockchain API is intended to make all easyer but is not compatible with all the existing networks, but it is with a fair number of them. To know which one are and some interesting parameters of them you can use the following API call.

curl --location 'https://api.vottun.tech/core/v1/evm/info/chains' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'x-application-vkn: <YOUR_APPLICATION_ID>'

Response Example​

{
"mainnetNetworks": [
{
"id": 1,
"name": "Ethereum Mainnet",
"symbol": "ETH",
"isMainnet": true,
"explorer": "https://etherscan.io",
"testnetFaucet": null,
"typeId": 1,
"typeName": "EVM"
},...
],
"testnetNetworks": [
{
"id": 43113,
"name": "Avalanche Fuji",
"symbol": "AVAX",
"isMainnet": false,
"explorer": "https://testnet.snowtrace.io/",
"testnetFaucet": "https://faucet.avax-test.network/",
"typeId": 1,
"typeName": "EVM"
}, ...

]
}

2. Funds​

Once we have selected our working network we need funds to work on it. Every transaction in a blockchain network has a cost that you need to assum. For this reason you need to fund the account that has been created in the sign up process and you have accesible in the accounts section of the application. At the beginning you will probably work in testnets, so the testing funds are "free" and you can obtain in the faucets of each network. The previusly explained API call has a field in where is informed or you can check here how to do it or you can simply google it.

3. Contract​

The smart contract of your application is the most important part to consider when developing decentralized solutions. It is where the rules to interact with the network you have selected are written. Some of these contracts are Ethereum standards, such ERC-721 or ERC-1155 for NFTs or ERC-20 for cryptocurrencies. But in the case you are an advanced developer it is possible to develop and deploy your own contract. Currently using the Vottun Blockchain API it is only possible to deploy standard contracts but in the future it will be possible to deploy any type of contract. You can check here the different contracts you can deploy.

curl --location 'https://api.vottun.tech/core/v1/evm/contract/deploy' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'x-application-vkn: <YOUR_APPLICATION_ID>'\
--data-raw '{
"contractSpecsId":8,
"walletAddress":"0x0e60B83F83c5d2684acE779dea8A957e91D02475",
"blockchainNetwork": 56,
"gasLimit": 700000,
"alias": "VAULT_USDT_PROD_API",
"params": []
}'

Conclusion​

Congratulations! You've set up an enviroment to start developing blockchain applications. You have everything you need to start interacting with any supported network.