@maestro-org/typescript-sdk
Advanced tools
Comparing version 1.5.1 to 1.5.2
{ | ||
"name": "@maestro-org/typescript-sdk", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "TypeScript SDK for the Maestro Dapp Platform", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -6,3 +6,4 @@ import globalAxios, { AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
export interface ConfigurationParameters { | ||
readonly apiKey: string; | ||
readonly apiKey?: string; | ||
readonly baseUrl?: string; | ||
readonly network: MaestroSupportedNetworks; | ||
@@ -40,4 +41,8 @@ readonly baseOptions?: AxiosRequestConfig; | ||
constructor(param: ConfigurationParameters) { | ||
this.apiKey = param.apiKey; | ||
this.baseUrl = `https://${param.network}.gomaestro-api.org/v1`; | ||
if (param.baseUrl) { | ||
this.baseUrl = param.baseUrl; | ||
} else { | ||
this.baseUrl = `https://${param.network}.gomaestro-api.org/v1`; | ||
} | ||
this.apiKey = param.apiKey || ''; | ||
this.baseOptions = param.baseOptions; | ||
@@ -44,0 +49,0 @@ this.axiosInstance = param.axiosInstance ?? globalAxios; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
976106
21457