@iotexproject/kit 0.1.67 → 0.1.68

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 +206 -43
  2. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -8210,6 +8210,7 @@ declare class LiquidityMining {
8210
8210
  tokenUrl: any[];
8211
8211
  token0: `0x${string}`;
8212
8212
  token1: `0x${string}`;
8213
+ decimals: number;
8213
8214
  };
8214
8215
  Token0: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8215
8216
  address: true;
@@ -8292,6 +8293,15 @@ declare class LiquidityMining {
8292
8293
  decimals: string;
8293
8294
  };
8294
8295
  } | undefined;
8296
+ dailyRewards: {
8297
+ dailyRewardUSD: string;
8298
+ dailyReward: {
8299
+ value: string;
8300
+ format: string;
8301
+ originFormat: string;
8302
+ decimals: string;
8303
+ };
8304
+ } | null | undefined;
8295
8305
  myStakedTokenBalance: {
8296
8306
  token0Address: any;
8297
8307
  token1Address: any;
@@ -8402,6 +8412,7 @@ declare class LiquidityMiningV3 {
8402
8412
  tokenUrl: any[];
8403
8413
  token0: `0x${string}`;
8404
8414
  token1: `0x${string}`;
8415
+ decimals: number;
8405
8416
  };
8406
8417
  Token0: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8407
8418
  address: true;
@@ -8484,6 +8495,15 @@ declare class LiquidityMiningV3 {
8484
8495
  decimals: string;
8485
8496
  };
8486
8497
  } | undefined;
8498
+ dailyRewards: {
8499
+ dailyRewardUSD: string;
8500
+ dailyReward: {
8501
+ value: string;
8502
+ format: string;
8503
+ originFormat: string;
8504
+ decimals: string;
8505
+ };
8506
+ } | null | undefined;
8487
8507
  myStakedTokenBalance: {
8488
8508
  token0Address: any;
8489
8509
  token1Address: any;
@@ -8635,7 +8655,6 @@ declare class Analysis extends BaseDBModule {
8635
8655
  message: string;
8636
8656
  authData: {
8637
8657
  app_id: any;
8638
- api_key: string;
8639
8658
  };
8640
8659
  }>;
8641
8660
  upload_event({ user_id, event_type, event_id, event }: {
@@ -8646,7 +8665,6 @@ declare class Analysis extends BaseDBModule {
8646
8665
  }, ctx?: {
8647
8666
  authData?: {
8648
8667
  app_id: string;
8649
- api_key: string;
8650
8668
  };
8651
8669
  }): Promise<{
8652
8670
  status: number;
@@ -8664,7 +8682,6 @@ declare class Analysis extends BaseDBModule {
8664
8682
  }, ctx?: {
8665
8683
  authData?: {
8666
8684
  app_id: string;
8667
- api_key: string;
8668
8685
  };
8669
8686
  }): Promise<{
8670
8687
  status: number;
@@ -8688,7 +8705,6 @@ declare class Analysis extends BaseDBModule {
8688
8705
  }, ctx?: {
8689
8706
  authData?: {
8690
8707
  app_id: string;
8691
- api_key: string;
8692
8708
  };
8693
8709
  }): Promise<{
8694
8710
  status: number;
@@ -8721,7 +8737,6 @@ declare class Analysis extends BaseDBModule {
8721
8737
  }, ctx?: {
8722
8738
  authData?: {
8723
8739
  app_id: string;
8724
- api_key: string;
8725
8740
  };
8726
8741
  }): Promise<{
8727
8742
  status: number;
@@ -8739,7 +8754,6 @@ declare class Analysis extends BaseDBModule {
8739
8754
  }, ctx?: {
8740
8755
  authData?: {
8741
8756
  app_id: string;
8742
- api_key: string;
8743
8757
  };
8744
8758
  }): Promise<{
8745
8759
  status: number;
@@ -8753,6 +8767,170 @@ declare class Analysis extends BaseDBModule {
8753
8767
  error?: undefined;
8754
8768
  }>;
8755
8769
  }
8770
+ declare class AnalysisV2 extends BaseDBModule {
8771
+ checkAuth(key: string): Promise<{
8772
+ ok: boolean;
8773
+ message: string;
8774
+ authData: null;
8775
+ } | {
8776
+ ok: boolean;
8777
+ message: string;
8778
+ authData: {
8779
+ app_id: any;
8780
+ };
8781
+ }>;
8782
+ upload_event({ user_id, event_id, event, campaign }: {
8783
+ user_id: string;
8784
+ event_id: string;
8785
+ event: any;
8786
+ campaign: any;
8787
+ }, ctx?: {
8788
+ authData?: {
8789
+ app_id: string;
8790
+ };
8791
+ }): Promise<{
8792
+ ok: boolean;
8793
+ msg: string;
8794
+ status?: undefined;
8795
+ error?: undefined;
8796
+ } | {
8797
+ status: number;
8798
+ error: any;
8799
+ ok?: undefined;
8800
+ msg?: undefined;
8801
+ }>;
8802
+ referral_code({ refer_id, }: {
8803
+ refer_id: string;
8804
+ }, ctx?: {
8805
+ authData?: {
8806
+ app_id: string;
8807
+ };
8808
+ }): Promise<{
8809
+ status: number;
8810
+ error: string;
8811
+ ok?: undefined;
8812
+ referral_code?: undefined;
8813
+ msg?: undefined;
8814
+ } | {
8815
+ ok: boolean;
8816
+ referral_code: any;
8817
+ msg: string;
8818
+ status?: undefined;
8819
+ error?: undefined;
8820
+ }>;
8821
+ create_refer({ refer_id, refer_id_type, user_id, event_id, event, }: {
8822
+ refer_id: string;
8823
+ refer_id_type: "referral_code" | "user_id";
8824
+ user_id: string;
8825
+ event_id: string;
8826
+ event: any;
8827
+ }, ctx?: {
8828
+ authData?: {
8829
+ app_id: string;
8830
+ };
8831
+ }): Promise<{
8832
+ status: number;
8833
+ error: string;
8834
+ ok?: undefined;
8835
+ msg?: undefined;
8836
+ } | {
8837
+ ok: boolean;
8838
+ msg: string;
8839
+ status?: undefined;
8840
+ error?: undefined;
8841
+ }>;
8842
+ fetch_event({ event_id }: {
8843
+ event_id: string;
8844
+ }): Promise<Record<string, any>>;
8845
+ batch_fetch_event({ event_ids }: {
8846
+ event_ids: string[];
8847
+ }): Promise<any[] | {
8848
+ status: number;
8849
+ error: string;
8850
+ }>;
8851
+ fetch_user_point({ user_id, }: {
8852
+ user_id: string;
8853
+ }, ctx?: {
8854
+ authData?: {
8855
+ app_id: string;
8856
+ };
8857
+ }): Promise<{
8858
+ status: number;
8859
+ error: string;
8860
+ ok?: undefined;
8861
+ totalPoints?: undefined;
8862
+ } | {
8863
+ ok: boolean;
8864
+ totalPoints: any;
8865
+ status?: undefined;
8866
+ error?: undefined;
8867
+ }>;
8868
+ binobits({ user_id, }: {
8869
+ user_id: string;
8870
+ }, ctx?: {
8871
+ authData?: {
8872
+ app_id: string;
8873
+ };
8874
+ }): Promise<{
8875
+ status: number;
8876
+ error: string;
8877
+ ok?: undefined;
8878
+ amount?: undefined;
8879
+ } | {
8880
+ ok: boolean;
8881
+ amount: any;
8882
+ status?: undefined;
8883
+ error?: undefined;
8884
+ }>;
8885
+ fetch_invitees_num({ user_id, }: {
8886
+ user_id: string;
8887
+ }, ctx?: {
8888
+ authData?: {
8889
+ app_id: string;
8890
+ };
8891
+ }): Promise<{
8892
+ status: number;
8893
+ error: string;
8894
+ ok?: undefined;
8895
+ invitees_num?: undefined;
8896
+ } | {
8897
+ ok: boolean;
8898
+ invitees_num: any;
8899
+ status?: undefined;
8900
+ error?: undefined;
8901
+ }>;
8902
+ user_count({ project_id, action_id, }: {
8903
+ project_id: number;
8904
+ action_id?: number;
8905
+ }, ctx?: {
8906
+ authData?: {
8907
+ app_id: string;
8908
+ };
8909
+ }): Promise<{
8910
+ status: number;
8911
+ error: string;
8912
+ count?: undefined;
8913
+ } | {
8914
+ status: number;
8915
+ count: any;
8916
+ error?: undefined;
8917
+ }>;
8918
+ query_refer_code({ refer_code }: {
8919
+ refer_code: string;
8920
+ }, ctx?: {
8921
+ authData?: {
8922
+ app_id: string;
8923
+ };
8924
+ }): Promise<{
8925
+ status: number;
8926
+ error: string;
8927
+ result?: undefined;
8928
+ } | {
8929
+ status: number;
8930
+ result: any;
8931
+ error?: undefined;
8932
+ }>;
8933
+ }
8756
8934
  declare class Analyzer extends BaseDBModule {
8757
8935
  tvl(): Promise<any>;
8758
8936
  dailyTvl({ start_date, end_date }?: {
@@ -8807,6 +8985,14 @@ declare class Analyzer extends BaseDBModule {
8807
8985
  }): Promise<{
8808
8986
  date_time: string;
8809
8987
  }[]>;
8988
+ dailyIoTexHolder({ start_date, end_date }?: {
8989
+ start_date?: string;
8990
+ end_date?: string;
8991
+ }): Promise<postgres.RowList<postgres.Row[]>>;
8992
+ avgStakingDurationHistory({ start_date, end_date }?: {
8993
+ start_date?: string;
8994
+ end_date?: string;
8995
+ }): Promise<postgres.RowList<postgres.Row[]>>;
8810
8996
  }
8811
8997
  export interface ItemNFT {
8812
8998
  collection: string;
@@ -8960,6 +9146,10 @@ export type TopicNewsletterRegisterProps = {
8960
9146
  };
8961
9147
  declare class IoPay extends BaseDBModule {
8962
9148
  get_point_task(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9149
+ get_single_point_task_tg({ project_id, action_id }: {
9150
+ project_id: number;
9151
+ action_id: number;
9152
+ }): Promise<never[] | import("postgres").RowList<import("postgres").Row[]>>;
8963
9153
  get_point_task_tg(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
8964
9154
  pushRegister(args: PushRegisterProps): Promise<any>;
8965
9155
  topicNewsletterRegister(args: TopicNewsletterRegisterProps): Promise<any>;
@@ -8979,6 +9169,14 @@ declare class Mimo$1 extends BaseDBModule {
8979
9169
  last24hFee: string;
8980
9170
  }>;
8981
9171
  metrics_history(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9172
+ pool_tx_v2({ pair, type }: {
9173
+ pair: string;
9174
+ type: string;
9175
+ }): Promise<never[] | import("postgres").RowList<import("postgres").Row[]> | undefined>;
9176
+ token_tx_v2({ token, type }: {
9177
+ token: string;
9178
+ type: string;
9179
+ }): Promise<never[] | import("postgres").RowList<import("postgres").Row[]> | undefined>;
8982
9180
  }
8983
9181
  declare class LearnToEarn extends BaseDBModule {
8984
9182
  checkAuth(key: string): Promise<{
@@ -9079,7 +9277,7 @@ declare class MicroService extends BaseDBModule {
9079
9277
  save_user_data({ user_id, key, value }: {
9080
9278
  user_id: string;
9081
9279
  key: string;
9082
- value: string;
9280
+ value: any;
9083
9281
  }, ctx?: {
9084
9282
  authData?: {
9085
9283
  app_id: string;
@@ -9097,6 +9295,7 @@ declare class MicroService extends BaseDBModule {
9097
9295
  declare const modules$1: {
9098
9296
  account: Account;
9099
9297
  analysis: Analysis;
9298
+ analysisv2: AnalysisV2;
9100
9299
  analyzer: Analyzer;
9101
9300
  staking: Staking$1;
9102
9301
  transaction: Transaction;
@@ -9990,42 +10189,6 @@ declare const modules$2: {
9990
10189
  offset?: string | undefined;
9991
10190
  page?: string | undefined;
9992
10191
  }>, import("zod").ZodAny, any[]>;
9993
- addresstokennftbalance: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9994
- address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9995
- }, {
9996
- page: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
9997
- offset: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
9998
- }>, "strip", import("zod").ZodTypeAny, {
9999
- address: string;
10000
- offset: number;
10001
- page: number;
10002
- }, {
10003
- address: string;
10004
- offset?: string | undefined;
10005
- page?: string | undefined;
10006
- }>, import("zod").ZodAny, {
10007
- TokenAddress: string;
10008
- TokenName: any;
10009
- TokenSymbol: any;
10010
- TokenQuantity: string;
10011
- }[]>;
10012
- addresstokennftinventory: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
10013
- address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
10014
- contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
10015
- }, {
10016
- page: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
10017
- offset: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
10018
- }>, "strip", import("zod").ZodTypeAny, {
10019
- address: string;
10020
- offset: number;
10021
- page: number;
10022
- contractaddress: string;
10023
- }, {
10024
- address: string;
10025
- contractaddress: string;
10026
- offset?: string | undefined;
10027
- page?: string | undefined;
10028
- }>, import("zod").ZodAny, any>;
10029
10192
  analyzer: ReturnType<typeof import("postgres")>;
10030
10193
  scout: ReturnType<typeof import("postgres")>;
10031
10194
  superbase: ReturnType<typeof import("postgres")>;
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.67",
5
+ "version": "v0.1.68",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -51,6 +51,7 @@
51
51
  "lodash": "^4.17.21",
52
52
  "lru-cache": "^11.0.0",
53
53
  "number-to-bn": "^1.7.0",
54
+ "p-timeout": "^6.1.3",
54
55
  "postgres": "^3.4.4",
55
56
  "reflect-metadata": "^0.2.2",
56
57
  "strip-ansi-cjs": "^8.0.0",