diff --git a/src/lib/utils/sofClient.js b/src/lib/utils/sofClient.js index 6ff292c..32a0162 100644 --- a/src/lib/utils/sofClient.js +++ b/src/lib/utils/sofClient.js @@ -107,13 +107,3 @@ async function getResourcesWithReferences(depth=1) { } return allResources; } - -// Utility function to validate a URL -function isValidUrl(url) { - try { - new URL(url); - return true; - } catch (e) { - return false; - } -} \ No newline at end of file diff --git a/src/lib/utils/util.ts b/src/lib/utils/util.ts index 0fb9520..497614f 100644 --- a/src/lib/utils/util.ts +++ b/src/lib/utils/util.ts @@ -134,3 +134,13 @@ export async function packageSHC(content:SHCFile | Bundle | undefined): Promise< return { verifiableCredential: [shc] }; } + +// Utility function to validate a URL +export function isValidUrl(url: string) { + try { + new URL(url); + return true; + } catch (e) { + return false; + } +}