Skip to content

IndexerProvider

Defined in: ootle-indexer/src/indexer-provider.ts:34

  • Provider

readonly defaultTransactionTimeoutMs: number

Defined in: ootle-indexer/src/indexer-provider.ts:39

fetchSubstates(requests): Promise<GetSubstatesResponse>

Defined in: ootle-indexer/src/indexer-provider.ts:112

Fetches multiple substates by ID in a single request.

string[]

Promise<GetSubstatesResponse>

Provider.fetchSubstates


getClient(): IndexerClient

Defined in: ootle-indexer/src/indexer-provider.ts:58

Exposes the underlying IndexerClient for advanced use (e.g. resolveWantInputs).

IndexerClient


getStealthUtxo(resourceAddress, commitment): Promise<IndexerGetSubstateResponse | null>

Defined in: ootle-indexer/src/indexer-provider.ts:97

Fetches a stealth UTXO substate by resource address + 32-byte commitment.

The provider owns the utxo_{resourceHex}_{commitmentHex} id format; callers pass the resource and commitment and never string the id themselves. Returns null when the UTXO does not exist (already spent / never created), instead of throwing.

string

Uint8Array

Promise<IndexerGetSubstateResponse | null>

Provider.getStealthUtxo


getSubstate(substateId, version?): Promise<IndexerGetSubstateResponse>

Defined in: ootle-indexer/src/indexer-provider.ts:90

Fetches a single substate by ID and optional version.

string

number | null

Promise<IndexerGetSubstateResponse>

Provider.getSubstate


getTemplateDefinition(templateAddress): Promise<GetTemplateDefinitionResponse>

Defined in: ootle-indexer/src/indexer-provider.ts:116

Returns the ABI definition for a published template.

string

Promise<GetTemplateDefinitionResponse>

Provider.getTemplateDefinition


getTransactionResult(transactionId): Promise<IndexerGetTransactionResultResponse>

Defined in: ootle-indexer/src/indexer-provider.ts:132

Polls for the result of a previously submitted transaction.

string

Promise<IndexerGetTransactionResultResponse>

Provider.getTransactionResult


listRecentTransactions(params): Promise<ListRecentTransactionsResponse>

Defined in: ootle-indexer/src/indexer-provider.ts:173

Lists recent transactions.

ListRecentTransactionsRequest

Promise<ListRecentTransactionsResponse>

Provider.listRecentTransactions


network(): Network

Defined in: ootle-indexer/src/indexer-provider.ts:86

Returns the network this provider is connected to.

Network

Provider.network


resolveInputs(inputs): Promise<SubstateRequirement[]>

Defined in: ootle-indexer/src/indexer-provider.ts:136

Resolves unversioned inputs by fetching their current version from the indexer. Returns the same list with version filled in for any entry that had version: null.

SubstateRequirement[]

Promise<SubstateRequirement[]>

Provider.resolveInputs


stopWatcher(): void

Defined in: ootle-indexer/src/indexer-provider.ts:81

Stops the SSE TransactionWatcher if one is running. Call this when the provider is no longer needed to release the connection.

void


submitTransaction(envelope): Promise<IndexerSubmitTransactionResponse>

Defined in: ootle-indexer/src/indexer-provider.ts:122

Submits a BOR+base64-encoded transaction envelope to the network. Encoding is performed by sealTransaction in transaction.ts.

string

Promise<IndexerSubmitTransactionResponse>

Provider.submitTransaction


watchTransactionSSE(txId, timeoutMs?): PendingTransaction

Defined in: ootle-indexer/src/indexer-provider.ts:69

Returns a PendingTransaction that resolves via SSE when the network finalises the transaction, falling back to REST polling on timeout.

The TransactionWatcher SSE loop is created lazily on the first call and reused for all subsequent calls on this provider instance.

string

number

PendingTransaction


static connect(options): Promise<IndexerProvider>

Defined in: ootle-indexer/src/indexer-provider.ts:51

Creates an IndexerProvider and verifies connectivity by fetching the indexer identity.

IndexerProviderOptions

Promise<IndexerProvider>