Constructs a new OracleTask.
Optionalproperties: IOracleTaskProperties to set
OptionalAggregatorOracleTask AggregatorAddress.
OptionalchainlinkMainnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana
OptionalchainlinkOracleTask chainlinkConfigs.
OptionaledgeOracleTask edgeConfigs.
OptionaledgeOracleTask edgeId.
OptionalpythMainnet address for a Pyth feed. A full list can be found here: https://pyth.network/price-feeds/
Value (as a percentage) that the lower bound confidence interval is of the actual value. Confidence intervals that are larger that this treshold are rejected.
The confidence interval should be provided as a raw percentage value. For example, to represent 10%, enter the value as 10, not 0.1.
OptionalpythOracleTask pythConfigs.
OptionalredstoneOracleTask redstoneConfigs.
OptionalredstoneOracleTask redstoneId.
OptionalswitchboardMainnet address of a Switchboard feed. Switchboard is decentralized and allows anyone to build their own feed.
OptionalswitchboardOracleTask switchboardConfigs.
Converts this OracleTask to JSON.
JSON object
StaticcreateCreates a new OracleTask instance using the specified properties.
Optionalproperties: IOracleTaskProperties to set
OracleTask instance
StaticdecodeDecodes an OracleTask message from the specified reader or buffer.
Reader or buffer to decode from
Optionallength: numberMessage length if known beforehand
OracleTask
StaticdecodeDecodes an OracleTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
OracleTask
StaticencodeEncodes the specified OracleTask message. Does not implicitly {@apilink oracle_job.OracleJob.OracleTask.verify|verify} messages.
OracleTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticencodeEncodes the specified OracleTask message, length delimited. Does not implicitly {@apilink oracle_job.OracleJob.OracleTask.verify|verify} messages.
OracleTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticfromCreates an OracleTask message from a plain object. Also converts values to their respective internal types.
Plain object
OracleTask
StaticgetGets the default type url for OracleTask
OptionaltypeUrlPrefix: stringyour custom typeUrlPrefix(default "type.googleapis.com")
The default type url
StatictoCreates a plain object from an OracleTask message. Also converts values to other types if specified.
OracleTask
Optionaloptions: IConversionOptionsConversion options
Plain object
StaticverifyVerifies an OracleTask message.
Plain object to verify
null if valid, otherwise the reason why it is not
Fetch the current price of a Solana oracle protocol.
Input: None
Returns: The current price of an on-chain oracle.
Example: The Switchboard SOL/USD oracle price.
Example: The Pyth SOL/USD oracle price.
Example: The Chainlink SOL/USD oracle price.