isChainSpaceStored
isChainSpaceStored(
spaceUri
):Promise
<boolean
>
Checks the existence of a Chain Space on the CORD blockchain.
Parameters
• spaceUri: space:cord:${string}
The URI of the Chain Space to be checked.
Returns
Promise
<boolean
>
A promise resolving to true
if the Chain Space exists, or false
otherwise.
Remarks
Queries the blockchain to determine if a Chain Space with the given URI exists, returning true
if it does, and false
otherwise.
Example
const spaceUri = 'space:example_uri';isChainSpaceStored(spaceUri).then(exists => { console.log(`Chain Space ${exists ? 'exists' : 'does not exist'} on the blockchain.`);}).catch(error => { console.error('Error querying Chain Space existence:', error);});
Throws
- Thrown on error during the blockchain query.