Constructs a new OracleTask.
Optional
properties: IOracleTaskProperties to set
Optional
AggregatorOracleTask AggregatorAddress.
Optional
chainlinkMainnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana
Optional
chainlinkOracleTask chainlinkConfigs.
Optional
edgeOracleTask edgeConfigs.
Optional
edgeOracleTask edgeId.
Optional
pythMainnet 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.
Optional
pythOracleTask pythConfigs.
Optional
redstoneOracleTask redstoneConfigs.
Optional
redstoneOracleTask redstoneId.
Optional
switchboardMainnet address of a Switchboard feed. Switchboard is decentralized and allows anyone to build their own feed.
Optional
switchboardOracleTask switchboardConfigs.
Static
createCreates a new OracleTask instance using the specified properties.
Optional
properties: IOracleTaskProperties to set
OracleTask instance
Static
decodeDecodes an OracleTask message from the specified reader or buffer.
Reader or buffer to decode from
Optional
length: numberMessage length if known beforehand
OracleTask
If the payload is not a reader or valid buffer
If required fields are missing
Static
decodeDecodes an OracleTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
OracleTask
If the payload is not a reader or valid buffer
If required fields are missing
Static
encodeEncodes the specified OracleTask message. Does not implicitly verify messages.
OracleTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
encodeEncodes the specified OracleTask message, length delimited. Does not implicitly verify messages.
OracleTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
fromCreates an OracleTask message from a plain object. Also converts values to their respective internal types.
Plain object
OracleTask
Static
getStatic
toCreates a plain object from an OracleTask message. Also converts values to other types if specified.
OracleTask
Optional
options: IConversionOptionsConversion options
Plain object
Static
verify
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.