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