Expand description
HTTP oracle interface for external data access.
This module provides functions for making HTTP requests from smart contracts via the TruthLinked oracle system.
§Example
ⓘ
use truthlinked_sdk::oracle::{http_get, OracleStatus};
let response = http_get("https://api.example.com/data")?;
match response.status {
OracleStatus::Ready => {
// Process response.body
}
OracleStatus::Pending => {
// Retry later
}
OracleStatus::Expired => {
// Request expired
}
}Structs§
- Oracle
Response - Response from an oracle HTTP call.
Enums§
- Oracle
Status - Status of an oracle request.