IndexerProvider
Defined in: ootle-indexer/src/indexer-provider.ts:34
Implements
Section titled “Implements”Provider
Properties
Section titled “Properties”defaultTransactionTimeoutMs
Section titled “defaultTransactionTimeoutMs”
readonlydefaultTransactionTimeoutMs:number
Defined in: ootle-indexer/src/indexer-provider.ts:39
Methods
Section titled “Methods”fetchSubstates()
Section titled “fetchSubstates()”fetchSubstates(
requests):Promise<GetSubstatesResponse>
Defined in: ootle-indexer/src/indexer-provider.ts:112
Fetches multiple substates by ID in a single request.
Parameters
Section titled “Parameters”requests
Section titled “requests”string[]
Returns
Section titled “Returns”Promise<GetSubstatesResponse>
Implementation of
Section titled “Implementation of”Provider.fetchSubstates
getClient()
Section titled “getClient()”getClient():
IndexerClient
Defined in: ootle-indexer/src/indexer-provider.ts:58
Exposes the underlying IndexerClient for advanced use (e.g. resolveWantInputs).
Returns
Section titled “Returns”IndexerClient
getStealthUtxo()
Section titled “getStealthUtxo()”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.
Parameters
Section titled “Parameters”resourceAddress
Section titled “resourceAddress”string
commitment
Section titled “commitment”Uint8Array
Returns
Section titled “Returns”Promise<IndexerGetSubstateResponse | null>
Implementation of
Section titled “Implementation of”Provider.getStealthUtxo
getSubstate()
Section titled “getSubstate()”getSubstate(
substateId,version?):Promise<IndexerGetSubstateResponse>
Defined in: ootle-indexer/src/indexer-provider.ts:90
Fetches a single substate by ID and optional version.
Parameters
Section titled “Parameters”substateId
Section titled “substateId”string
version?
Section titled “version?”number | null
Returns
Section titled “Returns”Promise<IndexerGetSubstateResponse>
Implementation of
Section titled “Implementation of”Provider.getSubstate
getTemplateDefinition()
Section titled “getTemplateDefinition()”getTemplateDefinition(
templateAddress):Promise<GetTemplateDefinitionResponse>
Defined in: ootle-indexer/src/indexer-provider.ts:116
Returns the ABI definition for a published template.
Parameters
Section titled “Parameters”templateAddress
Section titled “templateAddress”string
Returns
Section titled “Returns”Promise<GetTemplateDefinitionResponse>
Implementation of
Section titled “Implementation of”Provider.getTemplateDefinition
getTransactionResult()
Section titled “getTransactionResult()”getTransactionResult(
transactionId):Promise<IndexerGetTransactionResultResponse>
Defined in: ootle-indexer/src/indexer-provider.ts:132
Polls for the result of a previously submitted transaction.
Parameters
Section titled “Parameters”transactionId
Section titled “transactionId”string
Returns
Section titled “Returns”Promise<IndexerGetTransactionResultResponse>
Implementation of
Section titled “Implementation of”Provider.getTransactionResult
listRecentTransactions()
Section titled “listRecentTransactions()”listRecentTransactions(
params):Promise<ListRecentTransactionsResponse>
Defined in: ootle-indexer/src/indexer-provider.ts:173
Lists recent transactions.
Parameters
Section titled “Parameters”params
Section titled “params”ListRecentTransactionsRequest
Returns
Section titled “Returns”Promise<ListRecentTransactionsResponse>
Implementation of
Section titled “Implementation of”Provider.listRecentTransactions
network()
Section titled “network()”network():
Network
Defined in: ootle-indexer/src/indexer-provider.ts:86
Returns the network this provider is connected to.
Returns
Section titled “Returns”Network
Implementation of
Section titled “Implementation of”Provider.network
resolveInputs()
Section titled “resolveInputs()”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.
Parameters
Section titled “Parameters”inputs
Section titled “inputs”SubstateRequirement[]
Returns
Section titled “Returns”Promise<SubstateRequirement[]>
Implementation of
Section titled “Implementation of”Provider.resolveInputs
stopWatcher()
Section titled “stopWatcher()”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.
Returns
Section titled “Returns”void
submitTransaction()
Section titled “submitTransaction()”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.
Parameters
Section titled “Parameters”envelope
Section titled “envelope”string
Returns
Section titled “Returns”Promise<IndexerSubmitTransactionResponse>
Implementation of
Section titled “Implementation of”Provider.submitTransaction
watchTransactionSSE()
Section titled “watchTransactionSSE()”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.
Parameters
Section titled “Parameters”string
timeoutMs?
Section titled “timeoutMs?”number
Returns
Section titled “Returns”connect()
Section titled “connect()”
staticconnect(options):Promise<IndexerProvider>
Defined in: ootle-indexer/src/indexer-provider.ts:51
Creates an IndexerProvider and verifies connectivity by fetching the indexer identity.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<IndexerProvider>