isAuthorizationStored
isAuthorizationStored(
authorizationUri
):Promise
<boolean
>
Checks if a given authorization exists on the CORD blockchain.
Parameters
• authorizationUri: auth:cord:${string}
The URI of the authorization to check.
Returns
Promise
<boolean
>
A promise resolving to true
if the authorization exists, false
otherwise.
Remarks
Queries the blockchain to verify the presence of an authorization, identified by the given URI.
Example
const authorizationUri = 'auth:example_uri';isAuthorizationStored(authorizationUri).then(exists => { console.log(`Authorization ${exists ? 'exists' : 'does not exist'} on the blockchain.`);}).catch(error => { console.error('Error querying authorization existence:', error);});
Throws
- Thrown on error during the blockchain query.