Weitere ähnliche Inhalte Ähnlich wie What is a blockchain api how can you integrate in your website (20) Mehr von Blockchain Council (20) Kürzlich hochgeladen (20) What is a blockchain api how can you integrate in your website 2. Copyright © Blockchain Council www.blockchain-council.org
What is a blockchain API? How can you integrate
In your website?
Since Bitcoin first broke into the world wide web, it has made several upgrades to
its original code making it easier for the average user to get started with Bitcoin.
As you may already know, an API refers to an Application Programming Interface
which is designed to simplify interacting with a piece of software. It typically
contains a host of subroutine definitions, communication protocols, and tools that
can be used to build applications on top of the existing functionality. In this article,
we take a look at the various kind of APIs available for blockchains and also learn
the methods of invoking these functions in a website.
2
3. Copyright © Blockchain Council www.blockchain-council.org
Benefits of Using Blockchain APIs
Before jumping into blockchain APIs, we must first have a basic understanding of
how blockchains work. A typical blockchain consists of the following three basic
steps:
3
4. Copyright © Blockchain Council www.blockchain-council.org
(a) A transaction is generated by a bitcoin client and broadcast it to the network
where it sits in the memory pool waiting to be processed.
(b) The transaction is picked up by miners and added to a block.
(c) The miners solve the block, and the transaction is finally added to the
blockchain.
4
5. Copyright © Blockchain Council www.blockchain-council.org
It is evident from the process above that; it is too complicated for every person
who wants to use blockchains to set up their network. That is precisely why
Blockchain API’s exist. Blockchain API’s can consequently be used for many
applications which wouldn’t be possible with just blockchains. For instance, using
the decentralized security offered by blockchains to verify cryptographic key
exchanges requires some form of an API.
5
6. Copyright © Blockchain Council www.blockchain-council.org
Also since blockchains are somewhat expensive to be used for performing
computing tasks, they can instead be used to exchange tokens that can be used
to rent computing power. Etheroll is one such example of a decentralized
application that relies on the blockchain for ensuring fairness of the betting game.
The bulk of the user interface and other features for the website are similar to that
of a traditional website.
6
7. Copyright © Blockchain Council www.blockchain-council.org
However, the essential component, that is computing the dice roll fairly for all
players is done using a transaction on the Ethereum Blockchain. Another
application of blockchain APIs for security is for the management of supply chain
logistics. VeChain is one of the biggest players in the blockchain based logistics
sector, and it uses blockchain APIs to make sure that the product is authentic and
trackable in real time.
7
8. Copyright © Blockchain Council www.blockchain-council.org
How to integrate blockchain APIs in a Website
There is a wide variety of different blockchain APIs each of which caters to unique
needs such as Neuroware, Factom Alpha, Blockchain (for blockchain.com),
ChromaWay, Coinbase, Gem, Tierion and many others. For this guide, we shall
consider one of the simplest applications of setting up a Blockchain API for
accepting Bitcoin payments on a website.
Learn more about Blockchain
8
9. Copyright © Blockchain Council www.blockchain-council.org
. The process depends on Receive Payments API V2 of Blockchain to generate
new unused addresses to receive payments for a specific extended public key
(xPub):
· Request for an API key users must set up a wallet at www.blockchain.info
and request for an API key at
https://api.blockchain.info/v2/apikey/request/
·
9
10. Copyright © Blockchain Council www.blockchain-council.org
Generation an extended public key (xPub): After generating a wallet at the
address specified above, the xPub can be found in:
Settings -> Addresses -> Manage -> More Options -> Show xPub
· Generating a unique address for every customer: The basic URL for
creating a new request for every customer is:
https://api.blockchain.info/v2/receive?xpub=$xpub&callback=$callback_url&key=$
key
10
11. Copyright © Blockchain Council www.blockchain-council.org
The three main parameters for this request
are as follows:
1. xpub – Your xPub.
2. callback_url – The callback URL to be notified when a payment is received.
3. key – Your blockchain.info receive payments v2 API key (created in step 1).
Every call to the server will increment the index by one to avoid showing the same
address to different customers.
11
12. Copyright © Blockchain Council www.blockchain-council.org
Adoption by big Names-
Amazon, Walmart, IM, Infosys is some of the big names that are working towards
exploring the use of this technology. Chinese company Alibaba is exploring the
use of Blockchain. Alibaba’s Ant Financial Service Group, a part of Alibaba group,
collaborated with Globe Telecom, a Philippine telecommunication giant to provide
real-time cross-border payment services. This service will be useful for both SME
industries and individuals. With the help of this technology, the user can send and
receive the money quickly and easily.
12
13. Copyright © Blockchain Council www.blockchain-council.org
Healthcare-
It might sound a bit unconventional, but Blockchain Technology can be
revolutionary even in the healthcare sector. The latest information in this zone
came when Ali Health or Alibaba Health Information Technology Ltd. will
collaborate with Chinese City government to establish a connection between the
current medical. The objective behind this is to bring all the information on
Blockchain platform thus, making the entire information easily accessible.
13
14. Copyright © Blockchain Council www.blockchain-council.org
Blockchain Council Certifications
You can check out our certifications, and kick start your career in the Blockchain
space today.
● Certified Blockchain Expert
● Certified Blockchain Expertv2
● Certified Blockchain Developer
● Certified Smart Contract Developer
● Certified Solidity Developer
● Certified Ethereum Developer
14