A validated OracleJob instance
// From JSON string with comments
const job1 = normalizeOracleJob(`{
// Fetch BTC price
"tasks": [
{"httpTask": {"url": "https://api.coinbase.com/v2/prices/BTC-USD/spot"}}
]
}`);
// From plain object
const job2 = normalizeOracleJob({
tasks: [
{httpTask: {url: "https://api.coinbase.com/v2/prices/BTC-USD/spot"}}
]
});
Normalizes and validates an OracleJob definition