connect to any public API with Band Protocol
We are thrilled to release the Open API spec call functionality on Band Protocol — this means that smart contracts connected to Band Protocol will be able to call any API on the open internet.
Blockchains and smart contracts have been limited as they could not access data from outside their network. Imagine building the next Uber without existing location data from Google Map or credential information through Login by Facebook or Gmail, it’s a very difficult task. The ability to use and connect Band Protocol oracles to any web API endpoint through one simple function call opens up limitless possibilities on the blockchain.
Make sure you have a look at the potential use-cases we’ve put together at the bottom of this article!
Our mission at Band Protocol has been to bridge trust off-chain data to the blockchain and solve the data availability problem. In the past two months, we have released the initial version of Band Protocol which serves data through Token-Curated Datasources (TCD). Designed with robust crypto-economics and decentralization at heart, the TCD model is one of the strongest oracle designs to date.
While TCD places a strong emphasis on security to ensure the full decentralization of a protocol, a drawback is that it requires a careful yet time-consuming governance process for introducing a new data point to the oracle.
In the past six months, we have been discussing, collaborating, experimenting and testing with many crypto projects and traditional enterprises. What we found is that many of these enterprises require flexible data structure that fits with their unique use cases.
The best way to allow quick iteration and flexibility while upholding the security and reliability of information is to rely on the vast ocean of information available through Open API on open internet.
By leveraging the strong network of data providers that Band Protocol has already built, we have developed a decentralized solution for smart contracts to access information in Web 2.0 — we call it the “Web Request Oracle.”
The first version of Web Request Oracle has been deployed on the Kovan testnet. Check out the full documentation.
We recommend trying the functionality out by following the sample use case below:
Getting balance from an account on Binance Chain with Ethereum
Band Protocol provides a handy web portal for developers to test the integration for this functionality. Let’s explore how we can add an endpoint to query balance from a Binance account.
1. Go to https://app.kovan.bandprotocol.com.
You’ll see our Data Governance Portal, which helps you navigates through different datasets that’s live on Kovan testnet.
2. Select Explore Data under On-demand Web Requests.
3. You’ll see all the endpoints that are available on Band Protocol. You can always add a new endpoint (API Spec) via + New Endpoint button on the top right.
4. Now, let’s try querying BNB Balance from a Binance Chain address.
Simply click on Binance Chain: BNB Balance by Address to expand. Under the expanded view, you’ll see information about this web request, including a spec hosted on the IPFS and available data.
5. Click NEW REQUEST to make data with a new parameter available on-chain. Under Param , we’ll add an address that we want to query BNB balance on. In this case, we’ll add bnb15qad793km5r3xmntgz4w0qrumtvxctzhx27ppg then hit QUERY.
6. The new request will be sent to providers and Band Protocol will make the data available on-chain.
7. To see the result of your new request, simply go back to the expanded view of Binance Chain: BNB Balance by Address. You’ll notice that the address you just queried shows up along with the address balance under the Result column.
8. To make a query in Solidity, you can copy the key from the right-most column and follow the integration guide accessible via sidebar.
Published at Wed, 20 Nov 2019 11:50:59 +0000
{flickr|100|campaign}
