Skip to content

fetchStatementDetailsfromChain

fetchStatementDetailsfromChain(stmtUri): Promise<IStatementStatusAccountType | null>

Fetches the state of a statement element from the CORD blockchain.

stmtUri: `stmt:cord:${string}`

The URI of the statement whose status is being fetched.

Promise<IStatementStatusAccountType | null>

A promise that resolves to an IStatementStatus object containing the statement’s details, or null if the statement is not found.

This function queries the blockchain to retrieve the current state of a statement, identified by its URI. It returns comprehensive details about the statement, including its digest, space URI, creator account address, schema URI (if applicable), and revocation status.

  • Thrown when the statement or its entry is not found on the blockchain.
const statementUri = 'stmt:cord:example_uri';
fetchStatementStatusfromChain(statementUri)
.then(statementStatus => {
console.log('Statement Status:', statementStatus);
})
.catch(error => {
console.error('Error fetching statement status from chain:', error);
});

statement/src/Statement.chain.ts:696