Type Alias: ResolutionResult ​
ResolutionResult = {
document:Btcr2DidDocument;metadata:DidResolutionResult["didDocumentMetadata"];ok:true;raw:DidResolutionResult; } | {error:string;errorMessage?:string;ok:false;raw:DidResolutionResult; }
Defined in: packages/api/src/types.ts:67
Result of a DID resolution attempt. Wraps the standard DidResolutionResult with a discriminated ok flag for ergonomic pattern matching without exception handling.
Example ​
ts
const result = await api.tryResolveDid(did);
if (result.ok) {
console.log(result.document);
} else {
console.log(result.error, result.errorMessage);
}