Readonly
programThe Anchor program instance.
Fetch updates for the feed.
Optional
params_: { The parameters object.
Optional
crossbarOptionally specify the CrossbarClient to use.
Optional
gateway?: stringOptionally specify the gateway to use. If not specified, the gateway is automatically fetched.
Optional
jobs?: IOracleJob[]An array of IOracleJob
representing the jobs to be executed.
Optional
numNumber of signatures to fetch.
Optional
retries?: numberOptional
recentSlothashes: [BN, string][]An optional array of recent slothashes as [anchor.BN, string]
tuples.
Optional
priceSignatures: FeedEvalResponse[]An optional array of FeedEvalResponse
representing the price signatures.
Optional
debug: boolean = falseA boolean flag to enable or disable debug mode. Defaults to false
.
Optional
payer: PublicKeyA promise that resolves to a tuple containing:
undefined
if not applicable.OracleResponse
objects.Private
getCompiles a transaction instruction to submit oracle signatures for a given feed.
Optional
payer?: PublicKeyA promise that resolves to the transaction instruction.
Initializes a pull feed account.
A promise that resolves to a tuple containing the pull feed instance and the transaction signature.
Loads the feed configurations for this PullFeed
account from on chain.
A promise that resolves to the feed configurations.
if the feed account does not exist.
Loads the feed data for this PullFeed
account from on chain.
A promise that resolves to the feed data.
if the feed account does not exist.
Optional
data_: PullFeedAccountDataLoads the feed data for this PullFeed
account from on chain.
Call will ignore data signed before this slot.
A promise that resolves to the observed value as it would be seen on-chain.
Loads the feed data for this PullFeed
account from on chain.
A promise that resolves to the values currently stored in the feed.
if the feed account does not exist.
Set configurations for the feed.
Optional
authority?: PublicKeyThe authority of the feed.
Optional
feedThe hash of the feed as a Uint8Array
or hexadecimal string
. Only results signed with this hash will be accepted.
Optional
jobs?: IOracleJob[]Optional
maxThe maximum number of slots that can pass before a feed value is considered stale.
Optional
maxThe maximum variance allowed for the feed.
Optional
minThe minimum number of responses required.
Optional
minThe minimum number of samples required for setting feed value.
Optional
name?: stringA promise that resolves to the transaction instruction to set feed configs.
Static
Private
feedCalls to initialize a pull feed account and to update the configuration account need to compute the feed hash for the account (if one is not specified).
Optional
feedOptional
jobs?: IOracleJob[]Static
fetchFetch updates for the feed.
The parameters object.
Optional
crossbarOptionally specify the CrossbarClient to use.
Optional
gateway?: stringOptionally specify the gateway to use. If not specified, the gateway is automatically fetched.
An array of IOracleJob
representing the jobs to be executed.
Number of signatures to fetch.
Optional
recentSlothashes: [BN, string][]An optional array of recent slothashes as [anchor.BN, string]
tuples.
Optional
priceSignatures: FeedEvalResponse[]An optional array of FeedEvalResponse
representing the price signatures.
A boolean flag to enable or disable debug mode. Defaults to false
.
Optional
payer: PublicKeyOptionally specify the payer public key.
A promise that resolves to a tuple containing:
undefined
if not applicable.OracleResponse
objects.Static
fetchFetches updates for multiple feeds at once into a SINGLE tightly packed intruction
The Anchor program instance.
The parameters object.
Optional
crossbarOptionally specify the CrossbarClient to use.
An array of feed account public keys.
Optional
gateway?: stringThe gateway URL to use. If not provided, the gateway is automatically fetched.
The number of signatures to fetch.
Optional
payer?: PublicKeyOptional
recentSlothashes: [BN, string][]An optional array of recent slothashes as [anchor.BN, string]
tuples.
A boolean flag to enable or disable debug mode. Defaults to false
.
A promise that resolves to a tuple containing:
AddressLookupTableAccount
to use.Static
fetchFetches updates for multiple feeds at once into SEPARATE intructions (one for each)
The Anchor program instance.
The parameters object.
Optional
crossbarOptionally specify the CrossbarClient to use.
An array of feed account public keys.
Optional
gateway?: stringThe gateway URL to use. If not provided, the gateway is automatically fetched.
The number of signatures to fetch.
Optional
payer?: PublicKeyOptional
recentSlothashes: [BN, string][]An optional array of recent slothashes as [anchor.BN, string]
tuples.
A boolean flag to enable or disable debug mode. Defaults to false
.
Optional
payer: PublicKeyOptionally specify the payer public key.
A promise that resolves to a tuple containing:
AddressLookupTableAccount
to use.Static
generateStatic
initStatic
subscribeWatches for any on-chain updates to any data feed.
The Anchor program instance.
The callback to call when the feed data is updated.
A promise that resolves to a subscription ID.
Abstraction around the Switchboard-On-Demand Feed account
This account is used to store the feed data and the oracle responses for a given feed.