@pendle/sdk-boros 0.3.16 → 0.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,5 +2,6 @@ export * from './BorosBackendSDK';
|
|
|
2
2
|
import { Sdk } from './BorosBackendSDK';
|
|
3
3
|
export interface DefaultSdk extends Sdk<unknown> {
|
|
4
4
|
}
|
|
5
|
+
export declare function setBackendUrl(url: string): void;
|
|
5
6
|
export declare function createSdk(baseURL: string): Sdk<unknown>;
|
|
6
7
|
export declare function getSdk(): DefaultSdk;
|
|
@@ -14,12 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.setBackendUrl = setBackendUrl;
|
|
17
18
|
exports.createSdk = createSdk;
|
|
18
19
|
exports.getSdk = getSdk;
|
|
19
20
|
__exportStar(require("./BorosBackendSDK"), exports);
|
|
20
21
|
const BorosBackendSDK_1 = require("./BorosBackendSDK");
|
|
21
|
-
|
|
22
|
+
let backendUrl = 'https://secrettune.io/core-v2';
|
|
22
23
|
let cachedSdk;
|
|
24
|
+
function setBackendUrl(url) {
|
|
25
|
+
backendUrl = url;
|
|
26
|
+
}
|
|
23
27
|
function createSdk(baseURL) {
|
|
24
28
|
const sdk = new BorosBackendSDK_1.Sdk({
|
|
25
29
|
baseURL,
|
|
@@ -28,6 +32,6 @@ function createSdk(baseURL) {
|
|
|
28
32
|
}
|
|
29
33
|
function getSdk() {
|
|
30
34
|
const x = cachedSdk;
|
|
31
|
-
return x !== undefined ? x : (cachedSdk = createSdk(
|
|
35
|
+
return x !== undefined ? x : (cachedSdk = createSdk(backendUrl));
|
|
32
36
|
}
|
|
33
37
|
//# sourceMappingURL=module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/backend/secrettune/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiBA,8BAOC;AAED,wBAGC;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../src/backend/secrettune/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiBA,sCAEC;AAED,8BAOC;AAED,wBAGC;AA/BD,oDAAkC;AAClC,uDAAwC;AAIxC,IAAI,UAAU,GAAG,+BAA+B,CAAC;AAQjD,IAAI,SAAqB,CAAC;AAE1B,SAAgB,aAAa,CAAC,GAAW;IACvC,UAAU,GAAG,GAAG,CAAC;AACnB,CAAC;AAED,SAAgB,SAAS,CAAC,OAAe;IAEvC,MAAM,GAAG,GAAG,IAAI,qBAAG,CAAU;QAC3B,OAAO;KAER,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,MAAM;IACpB,MAAM,CAAC,GAAG,SAAS,CAAC;IACpB,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AACnE,CAAC"}
|