From b3b327004bf9bdb93eadd4b73d50a44ad473e0d8 Mon Sep 17 00:00:00 2001 From: CryptoCompiler <72892531+peepopoggers@users.noreply.github.com> Date: Fri, 29 Jan 2021 14:32:32 +0000 Subject: [PATCH] Added isPublicEndpoint Function Export --- src/util/requestUtils.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/util/requestUtils.ts b/src/util/requestUtils.ts index b5f5761..3596c57 100644 --- a/src/util/requestUtils.ts +++ b/src/util/requestUtils.ts @@ -56,4 +56,14 @@ export function getBaseRESTInverseUrl(useLivenet?: boolean, restInverseOptions?: return baseUrlsInverse.livenet; } return baseUrlsInverse.testnet; -} \ No newline at end of file +} + +export function isPublicEndpoint = (endpoint: string): boolean => { + if (endpoint.startsWith('v2/public')) { + return true; + } + if (endpoint.startsWith('public/linear')) { + return true; + } + return false; +}