@pendle/sdk-boros 1.1.12 → 1.1.13

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.
package/dist/index.d.ts CHANGED
@@ -6,4 +6,5 @@ export * from './constants';
6
6
  export * from './addresses';
7
7
  export * from './errors';
8
8
  export * from './backend';
9
+ export * from './ui-support';
9
10
  export { setDisableKeepAlive, isKeepAliveDisabled } from './config/http';
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ __exportStar(require("./constants"), exports);
23
23
  __exportStar(require("./addresses"), exports);
24
24
  __exportStar(require("./errors"), exports);
25
25
  __exportStar(require("./backend"), exports);
26
+ __exportStar(require("./ui-support"), exports);
26
27
  var http_1 = require("./config/http");
27
28
  Object.defineProperty(exports, "setDisableKeepAlive", { enumerable: true, get: function () { return http_1.setDisableKeepAlive; } });
28
29
  Object.defineProperty(exports, "isKeepAliveDisabled", { enumerable: true, get: function () { return http_1.isKeepAliveDisabled; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,8CAA4B;AAC5B,8CAA4B;AAC5B,2CAAyB;AACzB,4CAA0B;AAC1B,sCAAyE;AAAhE,2GAAA,mBAAmB,OAAA;AAAE,2GAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,8CAA4B;AAC5B,8CAA4B;AAC5B,2CAAyB;AACzB,4CAA0B;AAC1B,+CAA6B;AAC7B,sCAAyE;AAAhE,2GAAA,mBAAmB,OAAA;AAAE,2GAAA,mBAAmB,OAAA"}
@@ -0,0 +1,8 @@
1
+ export declare function calculateIncentiveRange(params: {
2
+ midApr: number;
3
+ tickStep: number;
4
+ incentiveRange: number;
5
+ }): {
6
+ lower: number;
7
+ upper: number;
8
+ };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateIncentiveRange = calculateIncentiveRange;
4
+ const boros_offchain_math_1 = require("@pendle/boros-offchain-math");
5
+ function calculateIncentiveRange(params) {
6
+ const { midApr, tickStep, incentiveRange } = params;
7
+ const lower = midApr - incentiveRange;
8
+ const upper = midApr + incentiveRange;
9
+ const biTickStep = BigInt(tickStep);
10
+ const lowerTick = (0, boros_offchain_math_1.estimateTickForRate)(boros_offchain_math_1.FixedX18.fromNumber(lower), biTickStep, false);
11
+ const upperTick = (0, boros_offchain_math_1.estimateTickForRate)(boros_offchain_math_1.FixedX18.fromNumber(upper), biTickStep, true);
12
+ const lowerRange = (0, boros_offchain_math_1.getRateAtTick)(lowerTick, BigInt(tickStep)).round(-4);
13
+ const upperRange = (0, boros_offchain_math_1.getRateAtTick)(upperTick, BigInt(tickStep)).round(-4);
14
+ return { lower: lowerRange.toNumber(), upper: upperRange.toNumber() };
15
+ }
16
+ //# sourceMappingURL=incentive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incentive.js","sourceRoot":"","sources":["../../src/ui-support/incentive.ts"],"names":[],"mappings":";;AAEA,0DAaC;AAfD,qEAA2F;AAE3F,SAAgB,uBAAuB,CAAC,MAAoE;IAC1G,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;IACpD,MAAM,KAAK,GAAG,MAAM,GAAG,cAAc,CAAC;IACtC,MAAM,KAAK,GAAG,MAAM,GAAG,cAAc,CAAC;IACtC,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEpC,MAAM,SAAS,GAAG,IAAA,yCAAmB,EAAC,8BAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACrF,MAAM,SAAS,GAAG,IAAA,yCAAmB,EAAC,8BAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IAEpF,MAAM,UAAU,GAAG,IAAA,mCAAa,EAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,MAAM,UAAU,GAAG,IAAA,mCAAa,EAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAExE,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC;AACxE,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './incentive';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./incentive"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui-support/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pendle/sdk-boros",
3
3
  "description": "Pendle SDK for Boros",
4
4
  "license": "MIT",
5
- "version": "1.1.12",
5
+ "version": "1.1.13",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [