fetchStatementDetailsfromChain
fetchStatementDetailsfromChain(
stmtUri
):Promise
<IStatementStatus
|null
>
Fetches the state of a statement element from the CORD blockchain.
Parameters
• stmtUri: stmt:cord:${string}
The URI of the statement whose status is being fetched.
Returns
Promise
<IStatementStatus
| null
>
A promise that resolves to an IStatementStatus
object containing the statement’s details,
or null
if the statement is not found.
Remarks
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 URI, schema URI (if applicable), and revocation status.
Throws
- Thrown when the statement or its entry is not found on the blockchain.
Example
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); });