Constructs a PullFeed instance.
The Anchor program instance.
The public key of the pull feed account.
ReadonlyprogramFetch updates for the feed.
Optionaldebug: booleanA boolean flag to enable or disable debug mode. Defaults to false.
Optionalpayer: 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.
Optionalforce: 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.
Optionaldata_: 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.
Optionalauthority?: PublicKeyThe authority of the feed.
OptionalfeedHash?: BufferThe hash of the feed as a Uint8Array or hexadecimal string. Only results signed with this hash will be accepted.
Optionaljobs?: IOracleJob[]OptionalmaxStaleness?: numberThe maximum number of slots that can pass before a feed value is considered stale.
OptionalmaxVariance?: numberThe maximum variance allowed for the feed.
OptionalminResponses?: numberThe minimum number of responses required.
OptionalminSampleSize?: numberThe minimum number of samples required for setting feed value.
Optionalname?: stringOptionalpermitWriteByAuthority?: 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.
StaticfetchFetches updates for a feed, returning instructions that must be executed in order at the front of the transaction.
The parameters object
Optionalchain?: stringOptional chain identifier (defaults to "solana")
OptionalcrossbarClient?: CrossbarClientOptional CrossbarClient instance to use
Optionalgateway?: stringOptional gateway URL to use for fetching updates
Optionalnetwork?: "mainnet" | "mainnet-beta" | "testnet" | "devnet"Optional network identifier ("mainnet", "mainnet-beta", "testnet", "devnet")
Number of signatures to fetch
OptionalrecentSlothashes?: [BN, string][]Optionaldebug: booleanEnable debug logging (default: false)
Optionalpayer: PublicKeyOptional transaction payer public key
Promise resolving to:
StaticfetchOptionaldebug: booleanOptionalpayer: PublicKeyStaticfetchFetches 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.
Optionaldebug: booleanA boolean flag to enable or disable debug mode. Defaults to false.
A promise that resolves to a tuple containing:
AddressLookupTableAccount to use.StaticgenerateStaticinitStaticloadLoads 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)
StaticsubscribeWatches 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.