Constructs a Gateway instance
The Anchor program instance
The URL of the switchboard gateway
Optional
oracleKey: PublicKeyOptional specific oracle key
Readonly
gatewayThe URL of the switchboard gateway
Optional
Readonly
oracleOptional specific oracle key
Readonly
programThe Anchor program instance
Fetches signatures from the gateway. REST API endpoint: /api/v1/gateway_attest_enclave
A promise that resolves to the attestation response.
Sends a request to the gateway bridge enclave.
REST API endpoint: /api/v1/gateway_bridge_enclave
A promise that resolves to the response.
Fetches a quote from the gateway.
REST API endpoint: /api/v1/gateway_fetch_quote
A promise that resolves to the quote response.
Fetches the randomness reveal from the gateway.
The parameters for the randomness reveal.
The randomness reveal response.
Fetches signatures from the gateway.
REST API endpoint: /api/v1/fetch_signatures
A promise that resolves to the feed evaluation responses.
Fetches signatures from the gateway without pre-encoded jobs REST API endpoint: /api/v1/fetch_signatures_batch
A promise that resolves to the feed evaluation responses.
Fetches signatures from the gateway.
REST API endpoint: /api/v1/fetch_signatures
A promise that resolves to the feed evaluation responses.
Fetches signatures from the gateway. REST API endpoint: /api/v1/fetch_signatures_batch
A promise that resolves to the feed evaluation responses.
Gateway interface for oracle communication
The Gateway class provides the connection between your application and Switchboard oracle operators. It handles:
Gateways are geo-distributed endpoints that route requests to available oracle operators for optimal performance.
Example
Gateway