@pendle/sdk-boros 0.2.19 → 0.2.20

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.
@@ -8,7 +8,39 @@ export declare class Distributor {
8
8
  data: `0x${string}`;
9
9
  gas: bigint;
10
10
  }>;
11
- getAccruedAmount(userAddress: Address): Promise<bigint>;
12
- getClaimedAmount(userAddress: Address): Promise<bigint>;
11
+ getAccruedAmount(userAddress: Address): Promise<{
12
+ amount: bigint;
13
+ token: {
14
+ address: string;
15
+ symbol: string;
16
+ name: string;
17
+ decimals: number;
18
+ metadata: {
19
+ proSymbol: string;
20
+ icon: string;
21
+ monoIcon: string;
22
+ avatar: string;
23
+ accentColor: null;
24
+ isWhitelisted: boolean;
25
+ };
26
+ };
27
+ }>;
28
+ getClaimedAmount(userAddress: Address): Promise<{
29
+ amount: bigint;
30
+ token: {
31
+ address: string;
32
+ symbol: string;
33
+ name: string;
34
+ decimals: number;
35
+ metadata: {
36
+ proSymbol: string;
37
+ icon: string;
38
+ monoIcon: string;
39
+ avatar: string;
40
+ accentColor: null;
41
+ isWhitelisted: boolean;
42
+ };
43
+ };
44
+ }>;
13
45
  }
14
46
  export default Distributor;
@@ -6,6 +6,7 @@ const contracts_1 = require("../../contracts");
6
6
  const constants_1 = require("./constants");
7
7
  const chains_1 = require("viem/chains");
8
8
  const common_1 = require("../../common");
9
+ const metadata_1 = require("./metadata");
9
10
  class Distributor {
10
11
  distributorContract;
11
12
  constructor() {
@@ -36,11 +37,17 @@ class Distributor {
36
37
  }
37
38
  async getAccruedAmount(userAddress) {
38
39
  const amount = await this.distributorContract.read.accrued([userAddress]);
39
- return amount;
40
+ return {
41
+ amount,
42
+ token: metadata_1.PENDLE_TOKEN,
43
+ };
40
44
  }
41
45
  async getClaimedAmount(userAddress) {
42
46
  const amount = await this.distributorContract.read.claimed([userAddress]);
43
- return amount;
47
+ return {
48
+ amount,
49
+ token: metadata_1.PENDLE_TOKEN,
50
+ };
44
51
  }
45
52
  }
46
53
  exports.Distributor = Distributor;
@@ -1 +1 @@
1
- {"version":3,"file":"distributor.js","sourceRoot":"","sources":["../../../src/entities/Distributor/distributor.ts"],"names":[],"mappings":";;;AAAA,+BAAwG;AACxG,+CAAsD;AACtD,2CAAkD;AAClD,wCAAuC;AACvC,yCAAuC;AAEvC,MAAa,WAAW;IACZ,mBAAmB,CAAC;IAC5B;QACI,IAAI,CAAC,mBAAmB,GAAG,IAAA,kBAAW,EAAC;YACnC,OAAO,EAAE,+BAAmB;YAC5B,GAAG,EAAE,+BAAmB;YACxB,MAAM,EAAE,IAAA,yBAAkB,EAAC;gBACvB,KAAK,EAAE,iBAAQ;gBACf,SAAS,EAAE,IAAA,WAAI,EAAC,gBAAO,CAAC;aAC3B,CAAC;SACL,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,WAAoB;QAC5B,MAAM,IAAI,GAAG,IAAA,yBAAkB,EAAC;YAC5B,GAAG,EAAE,+BAAmB;YACxB,YAAY,EAAE,OAAO;YACrB,IAAI,EAAE,CAAC,WAAW,CAAC;SACtB,CAAC,CAAA;QACF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,EAAE;YACxE,OAAO,EAAE,WAAW;SACvB,CAAC,CAAA;QACF,OAAO;YACH,IAAI,EAAE,WAAW;YACjB,EAAE,EAAE,+BAAmB;YACvB,IAAI;YACJ,GAAG;SACN,CAAC;IACN,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,WAAoB;QACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1E,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,WAAoB;QACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1E,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAvCD,kCAuCC;AAED,kBAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"distributor.js","sourceRoot":"","sources":["../../../src/entities/Distributor/distributor.ts"],"names":[],"mappings":";;;AAAA,+BAAwG;AACxG,+CAAsD;AACtD,2CAAkD;AAClD,wCAAuC;AACvC,yCAAuC;AACvC,yCAA0C;AAE1C,MAAa,WAAW;IACZ,mBAAmB,CAAC;IAC5B;QACI,IAAI,CAAC,mBAAmB,GAAG,IAAA,kBAAW,EAAC;YACnC,OAAO,EAAE,+BAAmB;YAC5B,GAAG,EAAE,+BAAmB;YACxB,MAAM,EAAE,IAAA,yBAAkB,EAAC;gBACvB,KAAK,EAAE,iBAAQ;gBACf,SAAS,EAAE,IAAA,WAAI,EAAC,gBAAO,CAAC;aAC3B,CAAC;SACL,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,WAAoB;QAC5B,MAAM,IAAI,GAAG,IAAA,yBAAkB,EAAC;YAC5B,GAAG,EAAE,+BAAmB;YACxB,YAAY,EAAE,OAAO;YACrB,IAAI,EAAE,CAAC,WAAW,CAAC;SACtB,CAAC,CAAA;QACF,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,EAAE;YACxE,OAAO,EAAE,WAAW;SACvB,CAAC,CAAA;QACF,OAAO;YACH,IAAI,EAAE,WAAW;YACjB,EAAE,EAAE,+BAAmB;YACvB,IAAI;YACJ,GAAG;SACN,CAAC;IACN,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,WAAoB;QACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1E,OAAO;YACH,MAAM;YACN,KAAK,EAAE,uBAAY;SACtB,CAAC;IACN,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,WAAoB;QACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1E,OAAO;YACH,MAAM;YACN,KAAK,EAAE,uBAAY;SACtB,CAAC;IACN,CAAC;CACJ;AA7CD,kCA6CC;AAED,kBAAe,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const PENDLE_TOKEN: {
2
+ address: string;
3
+ symbol: string;
4
+ name: string;
5
+ decimals: number;
6
+ metadata: {
7
+ proSymbol: string;
8
+ icon: string;
9
+ monoIcon: string;
10
+ avatar: string;
11
+ accentColor: null;
12
+ isWhitelisted: boolean;
13
+ };
14
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PENDLE_TOKEN = void 0;
4
+ exports.PENDLE_TOKEN = {
5
+ address: '0x0c880f6761f1af8d9aa9c466984b80dab9a8c9e8',
6
+ symbol: 'PENDLE',
7
+ name: 'Pendle',
8
+ decimals: 18,
9
+ metadata: {
10
+ "proSymbol": "PENDLE",
11
+ "icon": "https://storage.googleapis.com/prod-pendle-bucket-a/images/assets/pro/ea33e392-1876-46a5-b7ce-c8434b5a7e71.svg",
12
+ "monoIcon": "https://storage.googleapis.com/prod-pendle-bucket-a/images/assets/pro/ea33e392-1876-46a5-b7ce-c8434b5a7e71.svg",
13
+ "avatar": "https://storage.googleapis.com/prod-pendle-bucket-a/images/assets/pro/ea33e392-1876-46a5-b7ce-c8434b5a7e71.svg",
14
+ "accentColor": null,
15
+ "isWhitelisted": true
16
+ }
17
+ };
18
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/entities/Distributor/metadata.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IACxB,OAAO,EAAE,4CAA4C;IACrD,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE;QACN,WAAW,EAAE,QAAQ;QACrB,MAAM,EAAE,gHAAgH;QACxH,UAAU,EAAE,gHAAgH;QAC5H,QAAQ,EAAE,gHAAgH;QAC1H,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE,IAAI;KACxB;CACJ,CAAA"}
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.2.19",
5
+ "version": "0.2.20",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [