@iotexproject/kit 0.1.62 → 0.1.64

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +69 -155
  2. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -6592,13 +6592,13 @@ declare class MSP {
6592
6592
  }>;
6593
6593
  dashboard(args: {
6594
6594
  account?: `0x${string}`;
6595
- }, ctx?: ConfigContext): Promise<{
6595
+ }, ctx?: ConfigContext): Promise<never[] | {
6596
6596
  totalAmountUSD: number;
6597
6597
  totalAmount: number;
6598
6598
  } | null>;
6599
6599
  totalMSPRewards(args: {
6600
6600
  account?: `0x${string}`;
6601
- }, ctx?: ConfigContext): Promise<{
6601
+ }, ctx?: ConfigContext): Promise<never[] | {
6602
6602
  totalBucketRewards: {
6603
6603
  rewards: number;
6604
6604
  rewardsUSD: number;
@@ -6608,6 +6608,50 @@ declare class MSP {
6608
6608
  rewardsUSD: number;
6609
6609
  };
6610
6610
  } | null>;
6611
+ myBucketList(args: {
6612
+ account?: `0x${string}`;
6613
+ }, ctx?: ConfigContext): Promise<{
6614
+ bucketId: number;
6615
+ owner: `0x${string}`;
6616
+ address: `0x${string}`;
6617
+ chainId: string;
6618
+ MockBucket: import("@dappworks/kit/aiem").QueryReturnType<MockBucketEntity, {
6619
+ name: true;
6620
+ }>;
6621
+ pendingRewards: {
6622
+ value: string;
6623
+ format: string;
6624
+ originFormat: string;
6625
+ decimals: string;
6626
+ };
6627
+ bucketAmount: {
6628
+ value: string;
6629
+ format: string;
6630
+ originFormat: string;
6631
+ decimals: string;
6632
+ };
6633
+ stakeStatus: any;
6634
+ totalAmount: () => Promise<any>;
6635
+ unstakeTime: any;
6636
+ bucketStaker: (_: string) => Promise<any>;
6637
+ withdrawTime: any;
6638
+ pendingReward: (token: `0x${string}`, staker: `0x${string}`) => Promise<any>;
6639
+ stakerBuckets: (staker: `0x${string}`) => Promise<any>;
6640
+ remainingReward: (_: `0x${string}`) => Promise<any>;
6641
+ strategyManager: () => Promise<any>;
6642
+ underlyingToken: () => Promise<any>;
6643
+ IOTX_REWARD_TOKEN: () => Promise<any>;
6644
+ accTokenPerAmount: (_: `0x${string}`) => Promise<any>;
6645
+ calculateBucketRestakeAmount: (_duration: string, _amount: string) => Promise<any>;
6646
+ poke: (bucketId: string) => Promise<any>;
6647
+ stake: (bucketId: string) => Promise<any>;
6648
+ deposit: (bucketId: string) => Promise<any>;
6649
+ unstake: (bucketIds: any[]) => Promise<any>;
6650
+ withdraw: (bucketIds: any[], recipient: `0x${string}`) => Promise<any>;
6651
+ claimReward: () => Promise<any>;
6652
+ renounceOwnership: () => Promise<any>;
6653
+ transferOwnership: (newOwner: `0x${string}`) => Promise<any>;
6654
+ }[]>;
6611
6655
  myStakedBucketList(args: {
6612
6656
  account?: `0x${string}`;
6613
6657
  }, ctx?: ConfigContext): Promise<{
@@ -6686,6 +6730,20 @@ declare class MSP {
6686
6730
  };
6687
6731
  amountUSD: number;
6688
6732
  };
6733
+ unstakingAmount: {
6734
+ value: string;
6735
+ format: string;
6736
+ originFormat: string;
6737
+ decimals: string;
6738
+ } | {
6739
+ unstakingAmount: {
6740
+ value: string;
6741
+ format: string;
6742
+ originFormat: string;
6743
+ decimals: string;
6744
+ };
6745
+ unstakingAmountUSD: number;
6746
+ };
6689
6747
  totalAmount: {
6690
6748
  totalAmount: {
6691
6749
  value: string;
@@ -6697,11 +6755,10 @@ declare class MSP {
6697
6755
  };
6698
6756
  owner: () => Promise<any>;
6699
6757
  unstakeTime: (_: `0x${string}`) => Promise<any>;
6700
- withdrawTime: (staker: `0x${string}`) => Promise<any>;
6758
+ withdrawTime: any;
6701
6759
  remainingReward: (_: `0x${string}`) => Promise<any>;
6702
6760
  strategyManager: () => Promise<any>;
6703
6761
  underlyingToken: () => Promise<any>;
6704
- unstakingAmount: (_: `0x${string}`) => Promise<any>;
6705
6762
  accTokenPerAmount: (_: `0x${string}`) => Promise<any>;
6706
6763
  stake: (_amount: string) => Promise<any>;
6707
6764
  unstake: (_amount: string) => Promise<any>;
@@ -6714,10 +6771,9 @@ declare class MSP {
6714
6771
  }[]>;
6715
6772
  restakeBucket(args: {
6716
6773
  bucketId: string;
6717
- contractAddress: `0x${string}`;
6718
6774
  }, ctx?: ConfigContext): Promise<{
6719
6775
  data: any;
6720
- address: `0x${string}`;
6776
+ address: string;
6721
6777
  chainId: string;
6722
6778
  type: string;
6723
6779
  }[]>;
@@ -7882,7 +7938,8 @@ declare class MimoV2MiningPool {
7882
7938
  };
7883
7939
  myPoolBalanceUSD: string;
7884
7940
  } | null>;
7885
- apr(): Promise<string | undefined>;
7941
+ rewardPerSecond(): Promise<bigint | undefined>;
7942
+ apr(): Promise<string>;
7886
7943
  myPendingReward(account: `0x${string}`): Promise<{
7887
7944
  pendingReward: {
7888
7945
  value: string;
@@ -7944,16 +8001,6 @@ declare class MimoV2MiningPool {
7944
8001
  type: true;
7945
8002
  token0: true;
7946
8003
  token1: true;
7947
- }> | import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
7948
- decimals: true;
7949
- address: true;
7950
- symbol: true;
7951
- balanceOf: [
7952
- `0x${string}`
7953
- ];
7954
- priceUSD: true;
7955
- tokenUrl: true;
7956
- type: true;
7957
8004
  }> | undefined>;
7958
8005
  getRewardTokenInnter(): Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
7959
8006
  address: true;
@@ -7974,16 +8021,6 @@ declare class MimoV2MiningPool {
7974
8021
  type: true;
7975
8022
  token0: true;
7976
8023
  token1: true;
7977
- }> | import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
7978
- decimals: true;
7979
- address: true;
7980
- symbol: true;
7981
- balanceOf: [
7982
- `0x${string}`
7983
- ];
7984
- priceUSD: true;
7985
- tokenUrl: true;
7986
- type: true;
7987
8024
  }> | undefined>;
7988
8025
  deposit: (_amount: string) => Promise<any>;
7989
8026
  withdraw: (_amount: string) => Promise<any>;
@@ -8945,8 +8982,7 @@ declare class BaseDBModule {
8945
8982
  iopay: ReturnType<typeof postgres>;
8946
8983
  nftmarket: ReturnType<typeof postgres>;
8947
8984
  ch: ClickHouseSDK;
8948
- analysisDev: ClickHouseSDK;
8949
- analysisProd: ClickHouseSDK;
8985
+ analysis: ClickHouseSDK;
8950
8986
  microServiceCenter: ReturnType<typeof postgres>;
8951
8987
  constructor();
8952
8988
  checkAuth(key: string): Promise<{
@@ -8977,130 +9013,7 @@ declare class Account extends BaseDBModule {
8977
9013
  tokens: import("postgres").RowList<import("postgres").Row[]>;
8978
9014
  }>;
8979
9015
  }
8980
- declare class AnalysisDev extends BaseDBModule {
8981
- checkAuth(key: string): Promise<{
8982
- ok: boolean;
8983
- message: string;
8984
- authData: null;
8985
- } | {
8986
- ok: boolean;
8987
- message: string;
8988
- authData: {
8989
- app_id: any;
8990
- api_key: string;
8991
- };
8992
- }>;
8993
- upload_event({ user_id, event_type, event_id, event }: {
8994
- event_type: string;
8995
- user_id: string;
8996
- event_id: string;
8997
- event: Record<string, any>;
8998
- }, ctx?: {
8999
- authData?: {
9000
- app_id: string;
9001
- api_key: string;
9002
- };
9003
- }): Promise<{
9004
- status: number;
9005
- error: string;
9006
- ok?: undefined;
9007
- msg?: undefined;
9008
- } | {
9009
- ok: boolean;
9010
- msg: string;
9011
- status?: undefined;
9012
- error?: undefined;
9013
- }>;
9014
- referral_code({ refer_id, }: {
9015
- refer_id: string;
9016
- }, ctx?: {
9017
- authData?: {
9018
- app_id: string;
9019
- api_key: string;
9020
- };
9021
- }): Promise<{
9022
- status: number;
9023
- error: string;
9024
- ok?: undefined;
9025
- referral_code?: undefined;
9026
- msg?: undefined;
9027
- } | {
9028
- ok: boolean;
9029
- referral_code: any;
9030
- msg: string;
9031
- status?: undefined;
9032
- error?: undefined;
9033
- }>;
9034
- create_refer({ refer_id, refer_id_type, user_id, device_id, data, }: {
9035
- refer_id: string;
9036
- refer_id_type: "referral_code" | "user_id";
9037
- user_id: string;
9038
- device_id: string;
9039
- data: Record<string, any>;
9040
- }, ctx?: {
9041
- authData?: {
9042
- app_id: string;
9043
- api_key: string;
9044
- };
9045
- }): Promise<{
9046
- status: number;
9047
- error: string;
9048
- ok?: undefined;
9049
- msg?: undefined;
9050
- } | {
9051
- ok: boolean;
9052
- msg: string;
9053
- status?: undefined;
9054
- error?: undefined;
9055
- }>;
9056
- fetch_event({ event_id }: {
9057
- event_id: string;
9058
- }): Promise<Record<string, any>>;
9059
- batch_fetch_event({ event_ids }: {
9060
- event_ids: string[];
9061
- }): Promise<any[] | {
9062
- status: number;
9063
- error: string;
9064
- }>;
9065
- fetch_user_point({ user_id, include_referral_point, }: {
9066
- user_id: string;
9067
- include_referral_point?: string;
9068
- }, ctx?: {
9069
- authData?: {
9070
- app_id: string;
9071
- api_key: string;
9072
- };
9073
- }): Promise<{
9074
- status: number;
9075
- error: string;
9076
- ok?: undefined;
9077
- point?: undefined;
9078
- } | {
9079
- ok: boolean;
9080
- point: any;
9081
- status?: undefined;
9082
- error?: undefined;
9083
- }>;
9084
- fetch_invitees_num({ user_id, }: {
9085
- user_id: string;
9086
- }, ctx?: {
9087
- authData?: {
9088
- app_id: string;
9089
- api_key: string;
9090
- };
9091
- }): Promise<{
9092
- status: number;
9093
- error: string;
9094
- ok?: undefined;
9095
- invitees_num?: undefined;
9096
- } | {
9097
- ok: boolean;
9098
- invitees_num: any;
9099
- status?: undefined;
9100
- error?: undefined;
9101
- }>;
9102
- }
9103
- declare class AnalysisProd extends BaseDBModule {
9016
+ declare class Analysis extends BaseDBModule {
9104
9017
  checkAuth(key: string): Promise<{
9105
9018
  ok: boolean;
9106
9019
  message: string;
@@ -9435,6 +9348,7 @@ export type TopicNewsletterRegisterProps = {
9435
9348
  };
9436
9349
  declare class IoPay extends BaseDBModule {
9437
9350
  get_point_task(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9351
+ get_point_task_tg(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9438
9352
  pushRegister(args: PushRegisterProps): Promise<any>;
9439
9353
  topicNewsletterRegister(args: TopicNewsletterRegisterProps): Promise<any>;
9440
9354
  updateNewsletterTopic({ deviceToken, news_push }: any): void;
@@ -9505,13 +9419,12 @@ declare class Galxe extends BaseDBModule {
9505
9419
  }
9506
9420
  declare const modules$1: {
9507
9421
  account: Account;
9422
+ analysis: Analysis;
9508
9423
  analyzer: Analyzer;
9509
9424
  staking: Staking$1;
9510
9425
  transaction: Transaction;
9511
9426
  nft: NFT;
9512
9427
  health: Health;
9513
- "analysis-dev": AnalysisDev;
9514
- "analysis-prod": AnalysisProd;
9515
9428
  "learn-to-earn": LearnToEarn;
9516
9429
  contract: Contract;
9517
9430
  resource: Resource;
@@ -9527,6 +9440,7 @@ export interface ConfigOptions {
9527
9440
  method: "get" | "post" | "put" | "delete" | "all";
9528
9441
  path: string;
9529
9442
  absolutePath?: boolean;
9443
+ isPublicPath?: boolean;
9530
9444
  };
9531
9445
  }
9532
9446
  export type KitModuleFunction<I extends z.AnyZodObject = z.AnyZodObject, O extends z.ZodType | undefined = undefined, R = any> = {
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.1.62",
5
+ "version": "v0.1.64",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -46,6 +46,7 @@
46
46
  "hono-rate-limiter": "^0.4.0",
47
47
  "ioredis": "^5.4.1",
48
48
  "jsonwebtoken": "^9.0.2",
49
+ "kafkajs": "^2.2.4",
49
50
  "lodash": "^4.17.21",
50
51
  "lru-cache": "^11.0.0",
51
52
  "number-to-bn": "^1.7.0",