Skip to content

Substates

Substates are the fundamental storage units on the Ootle network — components, vaults, resources, and more. The Provider interface exposes methods to read them.

const substate = await provider.getSubstate("component_0x…");
console.log(substate);

Returns an IndexerGetSubstateResponse with the substate data and version.

const substates = await provider.fetchSubstates([
"component_0x…",
"vault_0x…",
]);

Query recent transactions from the indexer:

const result = await provider.listRecentTransactions({ limit: 5, last_id: null });
for (const tx of result.transactions) {
console.log(tx.transaction_id, tx.created_at);
}

After submitting a transaction, you can poll for its result:

const result = await provider.getTransactionResult(transactionId);

This is used internally by watchTransaction, but you can call it directly for custom polling logic.