Constructs a OnDemandQueue
instance.
The Anchor program instance.
The public key of the queue account.
Readonly
programThe Anchor program instance.
Readonly
pubkeyThe public key of the queue account.
Adds a new MR enclave to the queue. This will allow the queue to accept signatures from the given MR enclave.
A promise that resolves to the transaction instruction.
Loads the queue data from on chain and returns the listed gateways.
A promise that resolves to an array of gateway URIs.
Fetches a gateway interface for interacting with oracle nodes.
Optional
gatewayUrl: stringOptional URL of a specific gateway to use. If not provided, a random gateway will be selected from the queue's available gateways.
Gateway - A Gateway instance for making oracle requests
Loads the queue data from on chain and returns the listed oracle keys.
A promise that resolves to an array of oracle public keys.
Fetches signatures from a random gateway on the queue.
REST API endpoint: /api/v1/fetch_signatures
A promise that resolves to the feed evaluation responses.
Loads the queue data for this Queue
account from on chain.
A promise that resolves to the queue data.
Add an Oracle to a queue and set permissions
Get the PDA for the queue (SVM chains that are not solana)
Queue PDA Pubkey
Removes an MR enclave from the queue. This will prevent the queue from accepting signatures from the given MR enclave.
A promise that resolves to the transaction instruction.
Sets the queue configurations.
Optional
authority?: PublicKeyThe new authority for the queue.
Optional
nodeTimeout?: numberThe new node timeout for the queue.
Optional
reward?: numberThe new reward for the queue.
A promise that resolves to the transaction instruction.
Sets the oracle permission on the queue.
The oracle to set the permission for.
The permission to set.
A promise that resolves to the transaction instruction
Static
createStatic
createCreates a new instance of the Queue
account with a PDA for SVM (non-solana) chains.
The anchor program instance.
The initialization parameters for the queue.
Static
fetchStatic
fetchFetches signatures from a random gateway on the queue.
REST API endpoint: /api/v1/fetch_signatures
A promise that resolves to the feed evaluation responses.
Static
fetchStatic
fetchStatic
fetchStatic
loadLoads the queue data for this Queue
account from on chain.
A promise that resolves to the queue data.
Static
queuePDAGet the PDA for the queue (SVM chains that are not solana)
Anchor program
Queue pubkey
Queue PDA Pubkey
Abstraction around the Switchboard-On-Demand Queue account
This account is used to store the queue data for a given feed.