@dynamic-labs/sdk-react-core
Version:
A React SDK for implementing wallet web3 authentication and authorization to your website.
28 lines (24 loc) • 703 B
JavaScript
'use client'
;
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
/* eslint-disable no-underscore-dangle */
class ApiEndpoint {
}
ApiEndpoint.getBaseUrl = () => {
if (!ApiEndpoint.__baseUrl__) {
throw new Error('ApiEndpoint Base URL has not been initialized');
}
return ApiEndpoint.__baseUrl__;
};
ApiEndpoint.setBaseUrl = (baseUrlInput) => {
if (!baseUrlInput) {
/**
* If the baseUrl is not provided, use the default baseUrl from the sdk-api package
*/
ApiEndpoint.__baseUrl__ = new sdkApiCore.Configuration().basePath;
}
else {
ApiEndpoint.__baseUrl__ = baseUrlInput;
}
};
module.exports = ApiEndpoint;