Added isPublicEndpoint Function Export

This commit is contained in:
CryptoCompiler
2021-01-29 14:32:32 +00:00
committed by GitHub
parent 5e4369d385
commit b3b327004b

View File

@@ -56,4 +56,14 @@ export function getBaseRESTInverseUrl(useLivenet?: boolean, restInverseOptions?:
return baseUrlsInverse.livenet; return baseUrlsInverse.livenet;
} }
return baseUrlsInverse.testnet; return baseUrlsInverse.testnet;
} }
export function isPublicEndpoint = (endpoint: string): boolean => {
if (endpoint.startsWith('v2/public')) {
return true;
}
if (endpoint.startsWith('public/linear')) {
return true;
}
return false;
}