Skip to content

Binx742742/TrackingOracle_Cardano

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrackingOracle_Cardano

Project Overview This project involves creating a Python-based oracle that fetches package tracking information from the United States Postal Service (USPS) API and then sends this data to the Cardano blockchain using the Blockfrost API. The primary goal is to bridge real-world data (package tracking information) with the blockchain, allowing for decentralized verification and storage of this data.

Components USPS API Integration: Fetches tracking information based on tracking numbers. This part of the oracle interacts with the USPS API to retrieve the status and details of packages.

Blockfrost API Integration: Sends the fetched tracking information to the Cardano blockchain. Utilizes Blockfrost, a service providing simplified access to the Cardano blockchain, to record data.

Python Flask Application: Acts as the backend server, hosting the oracle functionality. It provides an endpoint to trigger the data fetching and blockchain recording process.

Cardano Blockchain: Records the tracking information in a decentralized and immutable manner. The implementation details on the blockchain side depend on the specifics of the smart contract used.

Functionality The Python application fetches tracking data from the USPS API using a tracking number. After fetching the data, the application formats it as required by the Cardano blockchain (typically as transaction metadata). The application then uses Blockfrost to send this data to the Cardano blockchain, effectively recording the tracking information in a transaction. The application handles authentication with the USPS API and Blockfrost API, error handling, and transaction submission to the Cardano blockchain. How to Use Setup: Install the required Python packages, including Flask and Blockfrost SDK. Set up API keys for both USPS and Blockfrost.

Running the Application: Start the Flask application. It listens for requests to fetch tracking data and send it to the blockchain.

Interacting with the Application: Use the provided endpoint to submit tracking number queries. The application will handle the rest, from fetching data to recording it on the blockchain.

Viewing Blockchain Transactions: Once the data is sent to the Cardano blockchain, it can be viewed and verified using a Cardano blockchain explorer.

Security and Compliance Ensure API keys and sensitive data are securely stored and not exposed. Comply with all relevant regulations regarding data sharing and blockchain transactions. Testing and Deployment Thoroughly test the application in a development environment, especially the blockchain interactions. Use Cardano testnet for initial testing before moving to the mainnet. Future Enhancements Improve error handling and logging for robustness. Explore the potential for more complex interactions with Cardano smart contracts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages