@pendle/sdk-boros 0.3.58 → 0.3.59

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.
@@ -1,2 +1,3 @@
1
1
  export declare const MULTI_TOKEN_MERKLE_DISTRIBUTOR_ADDRESS = "0x580bd289c25e7f254634e6ad8a95d631393c7172";
2
2
  export declare const MAKER_INCENTIVE_MERKLE_DISTRIBUTOR_ADDRESS = "0xAe94ccf0Cc9E6A783bc5ec3515f745bFaF68960A";
3
+ export declare const LP_REWARDS_MERKLE_DISTRIBUTOR_ADDRESS = "0x5fa1be763d5eb2cb4df90f557468421bd7f27fbf";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MAKER_INCENTIVE_MERKLE_DISTRIBUTOR_ADDRESS = exports.MULTI_TOKEN_MERKLE_DISTRIBUTOR_ADDRESS = void 0;
3
+ exports.LP_REWARDS_MERKLE_DISTRIBUTOR_ADDRESS = exports.MAKER_INCENTIVE_MERKLE_DISTRIBUTOR_ADDRESS = exports.MULTI_TOKEN_MERKLE_DISTRIBUTOR_ADDRESS = void 0;
4
4
  exports.MULTI_TOKEN_MERKLE_DISTRIBUTOR_ADDRESS = '0x580bd289c25e7f254634e6ad8a95d631393c7172';
5
5
  exports.MAKER_INCENTIVE_MERKLE_DISTRIBUTOR_ADDRESS = '0xAe94ccf0Cc9E6A783bc5ec3515f745bFaF68960A';
6
+ exports.LP_REWARDS_MERKLE_DISTRIBUTOR_ADDRESS = '0x5fa1be763d5eb2cb4df90f557468421bd7f27fbf';
6
7
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/entities/multiTokenMerkleDistributor/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,sCAAsC,GAAG,4CAA4C,CAAC;AACtF,QAAA,0CAA0C,GAAG,4CAA4C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/entities/multiTokenMerkleDistributor/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,sCAAsC,GAAG,4CAA4C,CAAC;AACtF,QAAA,0CAA0C,GAAG,4CAA4C,CAAC;AAC1F,QAAA,qCAAqC,GAAG,4CAA4C,CAAC"}
@@ -2,3 +2,4 @@ export * from './constants';
2
2
  export * from './referralRewardsDistributor';
3
3
  export * from './multiTokenMerkleDistributorContract';
4
4
  export * from './makerIncentiveRewardsDistributor';
5
+ export * from './lpRewardsDistributor';
@@ -18,4 +18,5 @@ __exportStar(require("./constants"), exports);
18
18
  __exportStar(require("./referralRewardsDistributor"), exports);
19
19
  __exportStar(require("./multiTokenMerkleDistributorContract"), exports);
20
20
  __exportStar(require("./makerIncentiveRewardsDistributor"), exports);
21
+ __exportStar(require("./lpRewardsDistributor"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/multiTokenMerkleDistributor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,+DAA6C;AAC7C,wEAAsD;AACtD,qEAAmD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/multiTokenMerkleDistributor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,+DAA6C;AAC7C,wEAAsD;AACtD,qEAAmD;AACnD,yDAAuC"}
@@ -0,0 +1,12 @@
1
+ import { Address } from 'viem';
2
+ import { RewardDistributor } from './RewardDistributor';
3
+ export declare class LpRewardsDistributor extends RewardDistributor {
4
+ private borosCoreSdk;
5
+ constructor();
6
+ getMerkleByUser(user: Address): Promise<{
7
+ tokens: Address[];
8
+ accruedAmounts: bigint[];
9
+ proofs: string[][];
10
+ }>;
11
+ }
12
+ export default LpRewardsDistributor;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LpRewardsDistributor = void 0;
4
+ const backend_1 = require("../../backend");
5
+ const RewardDistributor_1 = require("./RewardDistributor");
6
+ const constants_1 = require("./constants");
7
+ class LpRewardsDistributor extends RewardDistributor_1.RewardDistributor {
8
+ borosCoreSdk;
9
+ constructor() {
10
+ super(constants_1.LP_REWARDS_MERKLE_DISTRIBUTOR_ADDRESS);
11
+ this.borosCoreSdk = backend_1.BorosBackend.getCoreSdk();
12
+ }
13
+ async getMerkleByUser(user) {
14
+ const resp = await this.borosCoreSdk.merkels.merklesControllerGetMerkleByUserAndCampaign('amm_lp_rewards', user);
15
+ const { tokens, accruedAmounts, proofs } = resp.data;
16
+ return {
17
+ tokens: tokens.map((token) => token),
18
+ accruedAmounts: accruedAmounts.map((amount) => BigInt(amount)),
19
+ proofs,
20
+ };
21
+ }
22
+ }
23
+ exports.LpRewardsDistributor = LpRewardsDistributor;
24
+ exports.default = LpRewardsDistributor;
25
+ //# sourceMappingURL=lpRewardsDistributor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lpRewardsDistributor.js","sourceRoot":"","sources":["../../../src/entities/multiTokenMerkleDistributor/lpRewardsDistributor.ts"],"names":[],"mappings":";;;AACA,2CAA6C;AAC7C,2DAAwD;AACxD,2CAAgH;AAEhH,MAAa,oBAAqB,SAAQ,qCAAiB;IACjD,YAAY,CAA4B;IAChD;QACE,KAAK,CAAC,iDAAqC,CAAC,CAAC;QAC7C,IAAI,CAAC,YAAY,GAAG,sBAAY,CAAC,UAAU,EAAE,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,IAAa;QAKjC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,2CAA2C,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;QACjH,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QACrD,OAAO;YACL,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAgB,CAAC;YAC/C,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC9D,MAAM;SACP,CAAC;IACJ,CAAC;CACF;AApBD,oDAoBC;AAED,kBAAe,oBAAoB,CAAC"}
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": "0.3.58",
5
+ "version": "0.3.59",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [