@iotexproject/kit 0.0.34 → 0.0.36

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
@@ -1047,7 +1047,13 @@ declare class IncentivesEntity {
1047
1047
  voter: () => Promise<any>;
1048
1048
  earned: (_account: `0x${string}`, _token: `0x${string}`) => Promise<any>;
1049
1049
  allRewards(account: `0x${string}`): Promise<any[]>;
1050
- rewards: (_: `0x${string}`, __: `0x${string}`) => Promise<any>;
1050
+ rewards(token: `0x${string}`, account: `0x${string}`): Promise<{
1051
+ value: string;
1052
+ format: string;
1053
+ originFormat: string;
1054
+ decimals: string;
1055
+ isZero: boolean;
1056
+ }>;
1051
1057
  isReward: (_: `0x${string}`) => Promise<any>;
1052
1058
  balanceOf: (_: `0x${string}`) => Promise<any>;
1053
1059
  rewardRate: (_: `0x${string}`) => Promise<any>;
@@ -3142,16 +3148,16 @@ declare class GaugeEntity {
3142
3148
  name: true;
3143
3149
  symbol: true;
3144
3150
  tokenUrl: true;
3145
- balanceOf: [
3146
- `0x${string}` | undefined
3151
+ balanceOf: true | [
3152
+ `0x${string}`
3147
3153
  ];
3148
3154
  }> | import("@dappworks/kit/aiem").QueryReturnType<LPTokenEntity, {
3149
3155
  name: true;
3150
3156
  symbol: true;
3151
3157
  tokenUrl: true;
3152
3158
  type: true;
3153
- balanceOf: [
3154
- `0x${string}` | undefined
3159
+ balanceOf: true | [
3160
+ `0x${string}`
3155
3161
  ];
3156
3162
  }> | null | undefined>;
3157
3163
  apr(): Promise<string | 0>;
@@ -4456,6 +4462,15 @@ declare class MarshallDao {
4456
4462
  rewardAllTokens: true;
4457
4463
  };
4458
4464
  }>[] | undefined>;
4465
+ totalGaugeRewards(args: {
4466
+ account?: `0x${string}`;
4467
+ }): Promise<{
4468
+ rewards: number | undefined;
4469
+ rewardsUSD: number | undefined;
4470
+ } | {
4471
+ rewards?: undefined;
4472
+ rewardsUSD?: undefined;
4473
+ } | null | undefined>;
4459
4474
  voterInfo(args: {
4460
4475
  account?: `0x${string}`;
4461
4476
  }): Promise<import("@dappworks/kit/aiem").QueryReturnType<VoterEntity, {
@@ -6736,6 +6751,18 @@ declare class MSP {
6736
6751
  data: any;
6737
6752
  address: string;
6738
6753
  }>;
6754
+ totalMSPRewards(args: {
6755
+ account?: `0x${string}`;
6756
+ }): Promise<{
6757
+ totalBucketRewards: {
6758
+ rewards: number | undefined;
6759
+ rewardsUSD: number;
6760
+ };
6761
+ totalLstRewards: {
6762
+ rewards: number | undefined;
6763
+ rewardsUSD: number;
6764
+ };
6765
+ } | null>;
6739
6766
  myBucketsAndLSTs(args: {
6740
6767
  account?: `0x${string}`;
6741
6768
  }): Promise<{
@@ -6985,6 +7012,34 @@ declare class utils {
6985
7012
  ];
6986
7013
  }>>;
6987
7014
  }
7015
+ export interface IoTexMarketData {
7016
+ id: string;
7017
+ symbol: string;
7018
+ name: string;
7019
+ image: string;
7020
+ current_price: number;
7021
+ market_cap: number;
7022
+ market_cap_rank: number;
7023
+ fully_diluted_valuation: number;
7024
+ total_volume: number;
7025
+ high_24h: number;
7026
+ low_24h: number;
7027
+ price_change_24h: number;
7028
+ price_change_percentage_24h: number;
7029
+ market_cap_change_24h: number;
7030
+ market_cap_change_percentage_24h: number;
7031
+ circulating_supply: number;
7032
+ total_supply: number;
7033
+ max_supply: number;
7034
+ ath: number;
7035
+ ath_change_percentage: number;
7036
+ ath_date: string;
7037
+ atl: number;
7038
+ atl_change_percentage: number;
7039
+ atl_date: string;
7040
+ roi?: any;
7041
+ last_updated: string;
7042
+ }
6988
7043
  export interface DappCategory {
6989
7044
  id: number;
6990
7045
  name: string;
@@ -7021,7 +7076,9 @@ declare class UseHub {
7021
7076
  stakingRewardHistory?: undefined;
7022
7077
  stakingRewardSum?: undefined;
7023
7078
  }>;
7024
- userDashboard(): Promise<void>;
7079
+ userDashboard(): Promise<{
7080
+ blogs: import("@tryghost/content-api").PostsOrPages;
7081
+ }>;
7025
7082
  assets(): Promise<any[] | {
7026
7083
  error: unknown;
7027
7084
  }>;
@@ -7040,6 +7097,7 @@ declare class UseHub {
7040
7097
  explore(): Promise<{
7041
7098
  dappList: Dapp[];
7042
7099
  dappCategory: DappCategory[];
7100
+ marketData: IoTexMarketData;
7043
7101
  } | {
7044
7102
  error: any;
7045
7103
  }>;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var D=({url:b="http://localhost:9527"}={})=>new Proxy({},{get(v,c,z){return new Proxy({},{get(B,j){return async(f)=>{for(let x in f)if(Array.isArray(f[x]))f[x]=JSON.stringify(f[x]);const q=`${b}/${String(c)}/${String(j)}?${new URLSearchParams(f).toString()}`;return(await fetch(q)).json()}}})}});export{D as createClient};
1
+ var q=({url:j="http://localhost:9527"}={})=>new Proxy({},{get(R,o,T){return new Proxy({},{get(b,x){return async(i)=>{for(let f in i)if(Array.isArray(i[f]))i[f]=JSON.stringify(i[f]);const M=`${j}/${String(o)}/${String(x)}?${new URLSearchParams(i).toString()}`;return(await fetch(M)).json()}}})}});export{q as createClient};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@iotexproject/kit",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "v0.0.34",
5
+ "version": "v0.0.36",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -16,6 +16,7 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@iotexproject/iotex-address-ts": "^1.0.4",
19
+ "@tryghost/content-api": "^1.11.21",
19
20
  "axios": "^1.7.2",
20
21
  "bech32": "^2.0.0",
21
22
  "bentocache": "^1.0.0-beta.9",
@@ -29,8 +30,9 @@
29
30
  "viem": "^2.17.5"
30
31
  },
31
32
  "devDependencies": {
32
- "@dappworks/kit": "0.4.138",
33
+ "@dappworks/kit": "0.4.144",
33
34
  "@types/bun": "latest",
35
+ "@types/tryghost__content-api": "^1.3.16",
34
36
  "bun-plugin-dts": "^0.2.3",
35
37
  "hono": "^4.4.11",
36
38
  "typescript": "^5.5.4"