Constructs a PullFeed
instance.
The Anchor program instance.
The public key of the pull feed account.
Readonly
programFetch updates for the feed.
Optional
debug: booleanA 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.Compiles a transaction instruction to submit oracle signatures for a given feed.
A promise that resolves to the transaction instruction.
Initializes a pull feed account.
A promise that resolves to the transaction instruction.
Checks if the pull feed account has been initialized.
A promise that resolves to a boolean indicating if the account has been initialized.
Loads the feed configurations (if not already cached) for this PullFeed
account from on chain.
Optional
force: booleanA promise that resolves to the feed configurations.
Loads the feed data for this PullFeed
account from on chain.
A promise that resolves to the feed data.
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.
Set configurations for the feed.
Optional
authority?: PublicKeyThe authority of the feed.
Optional
feedHash?: BufferThe hash of the feed as a Uint8Array
or hexadecimal string
. Only results signed with this hash will be accepted.
Optional
jobs?: IOracleJob[]Optional
maxStaleness?: numberThe maximum number of slots that can pass before a feed value is considered stale.
Optional
maxVariance?: numberThe maximum variance allowed for the feed.
Optional
minResponses?: numberThe minimum number of responses required.
Optional
minSampleSize?: numberThe minimum number of samples required for setting feed value.
Optional
name?: stringOptional
permitWriteByAuthority?: booleanA promise that resolves to the transaction instruction to set feed configs.
Watches for any on-chain updates to the feed data.
The callback to call when the feed data is updated.
A promise that resolves to a subscription ID.
Static
fetchFetches updates for a feed, returning instructions that must be executed in order at the front of the transaction.
The parameters object
Optional
chain?: stringOptional chain identifier (defaults to "solana")
Optional
crossbarClient?: CrossbarClientOptional CrossbarClient instance to use
Optional
gateway?: stringOptional gateway URL to use for fetching updates
Optional
network?: "mainnet" | "mainnet-beta" | "testnet" | "devnet"Optional network identifier ("mainnet", "mainnet-beta", "testnet", "devnet")
Number of signatures to fetch
Optional
recentSlothashes?: [BN, string][]Optional
debug: booleanEnable debug logging (default: false)
Optional
payer: PublicKeyOptional transaction payer public key
Promise resolving to:
Static
fetchOptional
debug: booleanOptional
payer: PublicKeyStatic
fetchFetches updates for multiple feeds at once into a SINGLE tightly packed instruction. Returns instructions that must be executed in order, with the secp256k1 verification instruction placed at the front of the transaction.
The Anchor program instance.
Optional
debug: booleanA boolean flag to enable or disable debug mode. Defaults to false
.
A promise that resolves to a tuple containing:
AddressLookupTableAccount
to use.Static
generateStatic
initStatic
loadLoads the feed data for multiple feeds at once.
The program instance.
The public keys of the feeds to load.
A promise that resolves to an array of feed data (or null if the feed account does not exist)
Static
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.