Constructs a PullFeed instance.
The Anchor program instance.
The public key of the pull feed account.
Manually set the network for this feed
This method allows you to explicitly set the network type, which will be used by methods that need network-specific configuration.
The network to use (SolanaMainnet or SolanaDevnet)
Get the cached network type
The network (SolanaMainnet, SolanaDevnet, or null if not yet determined)
StaticgenerateOptionaldata: PullFeedAccountDataStaticinitInitializes a pull feed account.
A promise that resolves to the transaction instruction.
Set configurations for the feed.
Optionalname?: stringOptionalauthority?: PublicKeyThe authority of the feed.
OptionalmaxVariance?: numberThe maximum variance allowed for the feed.
OptionalminResponses?: numberThe minimum number of responses required.
OptionalfeedHash?: Buffer<ArrayBufferLike>The hash of the feed as a Uint8Array or hexadecimal string. Only results signed with this hash will be accepted.
Optionaljobs?: IOracleJob[]OptionalminSampleSize?: numberThe minimum number of samples required for setting feed value.
OptionalmaxStaleness?: numberThe maximum number of slots that can pass before a feed value is considered stale.
OptionalpermitWriteByAuthority?: booleanA promise that resolves to the transaction instruction to set feed configs.
Fetches update instructions for this feed
Retrieves fresh oracle data and creates the instructions to update the on-chain feed account. This method handles all the complexity of oracle communication and signature verification.
Update parameters
OptionalnumSignatures?: numberNumber of oracle signatures (defaults to minSampleSize + 33%)
Optionaljobs?: IOracleJob[]Optional job overrides
OptionalcrossbarClient?: CrossbarClientOptional Crossbar client
Optionalretries?: numberNumber of retry attempts
OptionalvariableOverrides?: Record<string, string>Optional variable overrides for task execution
Update transaction components
Loads the feed configurations (if not already cached) for this PullFeed account from on chain.
Optionalforce: booleanA promise that resolves to the feed configurations.
StaticfetchFetches updates for a feed, returning instructions that must be executed in order at the front of the transaction.
The parameters object
Number of signatures to fetch
OptionalcrossbarClient?: CrossbarClientOptional CrossbarClient instance to use
OptionalvariableOverrides?: Record<string, string>Promise resolving to:
StaticfetchFetches updates for multiple feeds at once into a SINGLE tightly packed instruction. Returns instructions that must be executed in order, with the Ed25519 verification instruction placed at the front of the transaction.
The Anchor program instance.
A promise that resolves to a tuple containing:
AddressLookupTableAccount to use.StaticfetchCompiles a transaction instruction to submit oracle signatures for a given feed.
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 data for this PullFeed account from on chain.
A promise that resolves to the feed data.
StaticloadLoads the feed data for multiple feeds at once.
The program instance.
A promise that resolves to an array of feed data (or null if the feed account does not exist)
Loads the feed data for this PullFeed account from on chain.
A promise that resolves to the values currently stored in the feed.
StaticmapReadonlyprogramThe Anchor program instance.
PullFeed account management for persistent price feeds
The PullFeed class manages on-chain feed accounts that store price history and configuration. While the quote approach is more efficient for most use cases, feeds are useful when you need:
Key Features
Example
PullFeed