A quick introduction to smart contracts and decentralized API ποΈ
π§΅ππ»
Before diving into Decentralized API or dAPI, we need to understand Smart Contracts. ππ»
Consider Smart contracts like typical contracts but they are programmatically generated and completely digital. Smart contracts are stored on a blockchain (a system of recording information in a way that makes it difficult or impossible to change, hack, or cheat the system).
Any two unknown parties can transfer assets without any trust issues.
Consider an automatic vending machine (AVM) inside which you put the coin and get the desired product. There's no third-party intervention and hence no trust issues.
Smart contracts are almost impossible to hack as they are immutable and distributed.
Ethereum is one of the blockchains that supports smart contracts.
Solidity programming language is specifically designed to create smart contracts.
Smart contracts are unable to obtain data that is not already available on the blockchain.
Here Decentralized APIs come into play. ππ»
Decentralized APIs unlock the full potential of smart contracts. Decentralized API or dAPI is typically an API that solves API connectivity issues without introducing any security risks.
However, decentralized oracles also solve this problem by allowing data integration from various sources. But it does not consider the data source API to be within the scope of their solution.
Decentralized APIs are full blockchain native made up of multiple data provider-operated nodes.
dAPIs include the APIs that support the data feed in the context of the solution.
β’ β’ β’
Missing some Tweet in this thread? You can try to
force a refresh
Let's talk about widely used HTTP request methods and how to test them.
In this thread, we will cover:
- GET
- POST
- PUT
- DELETE
π§΅ππ»
π GET
The GET method is the widely used request method. It is used to get the desired resources from the server.
For example, making a request to the /posts endpoint will return all the available posts.
One thing to note here is that we have used plural noun (/posts) for URL naming.
Using plural nouns for naming URLs is the best practice. It simply reduces the confusion about whether there are one or more posts in the resource collection.