I'm very excited to announce my personal WyoHackathon project—Oracles, a platform for launching Oracles on #BitcoinCash. The code is 100% Open Source under the MIT License.
Oracles consists of a backend REST api for serving up data, signed by a PriceOracle, to be consumed by cash contracts. It also includes the HodlVault CashScript contract and .ts file needed to transpile and run HodlVault.
The REST API calls our BCH price index, encodes the blockHeight and bchUsdPrice into a byte sequence of 8 bytes (4 bytes per value), signs it w/ a pubkey and returns it all as json. HodlVault contract forces HODLing until a certain price target and blockheight have been reached.
Oracles are very powerful and can be used for prediction markets, trust-less wagers and much more. The intention of Oracles is to provide the tools needed to quickly bootstrap Oracle data and contracts in Bitcoin Cash.
Sample GET request
``` curl -X GET "https://www.oracles.cash/v1/price/details" -H "accept: application/json"
{ "price": 30719, "height": 601419, "message": "4b2d0900ff770000", "signature": "3045022100a09141241633487692762efc330adc541a0a620412e556d7740da60260f34c6f02207dc0cafbc81c19129d0ec7cbe7028aa05fc1332a833995560a40522ab436af77" } ```
[link] [comments]
source https://www.reddit.com/r/btc/comments/d7y7fo/announcing_oraclesa_platform_for_launching/
No comments:
Post a Comment