Skip to main content

indexerPublicDataProvider

For the complete documentation index, see llms.txt

Midnight.js API Reference v4.0.4


Midnight.js API Reference / @midnight-ntwrk/midnight-js-indexer-public-data-provider / indexerPublicDataProvider

Function: indexerPublicDataProvider()

indexerPublicDataProvider(queryURL, subscriptionURL, webSocketImpl?): PublicDataProvider

Constructs a PublicDataProvider based on an ApolloClient.

Parameters​

queryURL​

string

The URL of a GraphQL server query endpoint.

subscriptionURL​

string

The URL of a GraphQL server subscription (websocket) endpoint.

webSocketImpl?​

typeof WebSocket = ws.WebSocket

An optional websocket implementation for the Apollo client to use.

TODO: Re-examine caching when 'ContractCall' and 'ContractDeploy' have transaction identifiers included.

Returns​

PublicDataProvider