Related articles
![](/images/7Qj5QKGqfWN1WcysD0LMO8jBj2Zgy2VnADNQYpgU-370x180.jpg)
BitcoinOS Verifies First ZK-Proof on Bitcoin Mainnet, Opening New Doors for Decentralized Apps
Blockchain Bitcoin![](/images/fKKOrMhNOuHwzd9oXhaCZslvNgMbOjrnVTxrhfyG-370x180.jpg)
Introducing Crypto APIs' Best-in-Class Dedicated Nodes Service
Updates Announcements Nodes![](/images/q2LtA4yi9VOceAse4TdFtT70myRwxvsZsQekRPQ0-370x180.jpg)
Shared node infrastructure for top blockchains using JSON-RPC.
Dedicated nodes infrastructure for leading blockchains using JSON-RPC
Unified data from a single point using REST APIs. Execution time of 25ms.
Real-time notifications for events on top blockchains. Response under 100ms.
A set of prepared cryptographic APIs with unified endpoints which save time and effort.
Get access to unified market data using REST APIs from top crypto exchanges.
In case you have encountered our Bitcoin endpoints, you’ll feel comfortable right away with our Ethereum API as they are both part of distributed public blockchain networks. However, there are a couple of contrasts to be noted between Bitcoin and Ethereum, driven by their usage purposes. While Bitcoin enables online Bitcoin payments through its electronic cash system, Ethereum leads to the building and deployment of dApps.
Whereas the Bitcoin blockchain was purely a list of transactions, Ethereum’s basic unit is the account. The Ethereum blockchain tracks the state of every account, and all state transitions on the Ethereum blockchain are transfers of value and information between accounts. There are two types of accounts:
Crypto APIs Address API allows you to look up information about public Ethereum addresses/accounts and generate your own low-value Ethereum addresses/public-private key pairs. The users doesn’t need to put any information with this POST request for generating addresses.
Our tips on this endpoint:
In addition, the returned object will contain a private key in hex-encoded, a public key, and a public address.
Unlike Bitcoin, Ethereum has no concept of UTXOs (check more on our glossary if unfamiliar). Instead, addresses have a running balance, and use an ever-increasing sequence/nonce for every transaction to maintain proper address state. In order to create a transaction, you should have an account(keystore file) stored on our servers, and then provide the from address, to address, value to transfer (in Ether), gas price and gas limit (at least 21,000 wei), nonce(optional) and data(optional). The user should also specify the password associated with the keyfile, in order to unlock the account.
This query will use the addresses within your wallet as the inputs, as if all of them had been placed within the addresses array. Then, the user receives a transaction hash, such as:
{ “payload”: { “hex”: “0xfebf0691cc92f67ace032897a83587c44c5b2ef437341c6cfd5dbf1f8f4c288d” } }
It signs the raw transaction with the given parameters and pushes to the Ethereum Blockchain.
Moreover, we provide other endpoints that help provide information if you are not sure whether your gasLimit is enough to make a transaction or what is the average gasPrice,.
Firstly, the concept of contracts represents one of Ethereum’s essential values. The main programming language for building such application is Solidity, which is a decent starting point if you haven’t been creating smart contracts before.
Secondly, The Deploy Smart Contract Endpoint allows you to push your smart contract to the Ethereum Blockchain. You can validate and compile your smart contract to bytecode at the Ethereum official website – Solidity IDE following these steps:
A private key (associated with a funded Ethereum external account), fromAddress, byteCode, gasPrice and gasLimit, to publish, Crypto APIs will embed the contract into the blockchain and return the transaction hash that created the contract.
Finally, The response will be date and hash of the transaction:
{ “payload”: { “hex”: “0xf24889df3b88f8bfe2898a41ecab8ec62b60839a22eec606afe3dff9025b86f6” }
It is very important to provide enough gas in order the transaction to be successful!
These are a few examples of how endpoints help in integrating the Ethereum API into your website. They provide the backbone into the complete process of building, deploying dApps and much more.