@iotexproject/kit 0.1.66 → 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 +240 -44
  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;
@@ -8283,6 +8284,24 @@ declare class LiquidityMining {
8283
8284
  price0: number;
8284
8285
  price1: number;
8285
8286
  })[];
8287
+ totalReward: {
8288
+ totalRewardUSD: string;
8289
+ totalReward: {
8290
+ value: string;
8291
+ format: string;
8292
+ originFormat: string;
8293
+ decimals: string;
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;
8286
8305
  myStakedTokenBalance: {
8287
8306
  token0Address: any;
8288
8307
  token1Address: any;
@@ -8393,6 +8412,7 @@ declare class LiquidityMiningV3 {
8393
8412
  tokenUrl: any[];
8394
8413
  token0: `0x${string}`;
8395
8414
  token1: `0x${string}`;
8415
+ decimals: number;
8396
8416
  };
8397
8417
  Token0: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8398
8418
  address: true;
@@ -8466,6 +8486,24 @@ declare class LiquidityMiningV3 {
8466
8486
  price0: number;
8467
8487
  price1: number;
8468
8488
  })[];
8489
+ totalReward: {
8490
+ totalRewardUSD: string;
8491
+ totalReward: {
8492
+ value: string;
8493
+ format: string;
8494
+ originFormat: string;
8495
+ decimals: string;
8496
+ };
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;
8469
8507
  myStakedTokenBalance: {
8470
8508
  token0Address: any;
8471
8509
  token1Address: any;
@@ -8617,7 +8655,6 @@ declare class Analysis extends BaseDBModule {
8617
8655
  message: string;
8618
8656
  authData: {
8619
8657
  app_id: any;
8620
- api_key: string;
8621
8658
  };
8622
8659
  }>;
8623
8660
  upload_event({ user_id, event_type, event_id, event }: {
@@ -8628,7 +8665,6 @@ declare class Analysis extends BaseDBModule {
8628
8665
  }, ctx?: {
8629
8666
  authData?: {
8630
8667
  app_id: string;
8631
- api_key: string;
8632
8668
  };
8633
8669
  }): Promise<{
8634
8670
  status: number;
@@ -8646,7 +8682,6 @@ declare class Analysis extends BaseDBModule {
8646
8682
  }, ctx?: {
8647
8683
  authData?: {
8648
8684
  app_id: string;
8649
- api_key: string;
8650
8685
  };
8651
8686
  }): Promise<{
8652
8687
  status: number;
@@ -8670,7 +8705,6 @@ declare class Analysis extends BaseDBModule {
8670
8705
  }, ctx?: {
8671
8706
  authData?: {
8672
8707
  app_id: string;
8673
- api_key: string;
8674
8708
  };
8675
8709
  }): Promise<{
8676
8710
  status: number;
@@ -8703,7 +8737,6 @@ declare class Analysis extends BaseDBModule {
8703
8737
  }, ctx?: {
8704
8738
  authData?: {
8705
8739
  app_id: string;
8706
- api_key: string;
8707
8740
  };
8708
8741
  }): Promise<{
8709
8742
  status: number;
@@ -8721,7 +8754,6 @@ declare class Analysis extends BaseDBModule {
8721
8754
  }, ctx?: {
8722
8755
  authData?: {
8723
8756
  app_id: string;
8724
- api_key: string;
8725
8757
  };
8726
8758
  }): Promise<{
8727
8759
  status: number;
@@ -8735,6 +8767,170 @@ declare class Analysis extends BaseDBModule {
8735
8767
  error?: undefined;
8736
8768
  }>;
8737
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
+ }
8738
8934
  declare class Analyzer extends BaseDBModule {
8739
8935
  tvl(): Promise<any>;
8740
8936
  dailyTvl({ start_date, end_date }?: {
@@ -8789,6 +8985,14 @@ declare class Analyzer extends BaseDBModule {
8789
8985
  }): Promise<{
8790
8986
  date_time: string;
8791
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[]>>;
8792
8996
  }
8793
8997
  export interface ItemNFT {
8794
8998
  collection: string;
@@ -8942,6 +9146,10 @@ export type TopicNewsletterRegisterProps = {
8942
9146
  };
8943
9147
  declare class IoPay extends BaseDBModule {
8944
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[]>>;
8945
9153
  get_point_task_tg(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
8946
9154
  pushRegister(args: PushRegisterProps): Promise<any>;
8947
9155
  topicNewsletterRegister(args: TopicNewsletterRegisterProps): Promise<any>;
@@ -8961,6 +9169,14 @@ declare class Mimo$1 extends BaseDBModule {
8961
9169
  last24hFee: string;
8962
9170
  }>;
8963
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>;
8964
9180
  }
8965
9181
  declare class LearnToEarn extends BaseDBModule {
8966
9182
  checkAuth(key: string): Promise<{
@@ -9013,7 +9229,22 @@ declare class Galxe extends BaseDBModule {
9013
9229
  }>;
9014
9230
  }
9015
9231
  declare class DepinScan extends BaseDBModule {
9016
- explorer(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9232
+ explorer_v1({ is_latest }: {
9233
+ is_latest: boolean;
9234
+ }): Promise<import("postgres").RowList<import("postgres").Row[]> | {
9235
+ date: string;
9236
+ total_projects: any;
9237
+ market_cap: any;
9238
+ total_device: any;
9239
+ }[]>;
9240
+ explorer({ is_latest }: {
9241
+ is_latest: boolean;
9242
+ }): Promise<import("postgres").RowList<import("postgres").Row[]> | {
9243
+ date: string;
9244
+ total_projects: any;
9245
+ market_cap: any;
9246
+ total_device: any;
9247
+ }[]>;
9017
9248
  }
9018
9249
  declare class MicroService extends BaseDBModule {
9019
9250
  checkAuth(key: string): Promise<{
@@ -9046,7 +9277,7 @@ declare class MicroService extends BaseDBModule {
9046
9277
  save_user_data({ user_id, key, value }: {
9047
9278
  user_id: string;
9048
9279
  key: string;
9049
- value: string;
9280
+ value: any;
9050
9281
  }, ctx?: {
9051
9282
  authData?: {
9052
9283
  app_id: string;
@@ -9064,6 +9295,7 @@ declare class MicroService extends BaseDBModule {
9064
9295
  declare const modules$1: {
9065
9296
  account: Account;
9066
9297
  analysis: Analysis;
9298
+ analysisv2: AnalysisV2;
9067
9299
  analyzer: Analyzer;
9068
9300
  staking: Staking$1;
9069
9301
  transaction: Transaction;
@@ -9957,42 +10189,6 @@ declare const modules$2: {
9957
10189
  offset?: string | undefined;
9958
10190
  page?: string | undefined;
9959
10191
  }>, import("zod").ZodAny, any[]>;
9960
- addresstokennftbalance: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9961
- address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9962
- }, {
9963
- page: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
9964
- offset: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
9965
- }>, "strip", import("zod").ZodTypeAny, {
9966
- address: string;
9967
- offset: number;
9968
- page: number;
9969
- }, {
9970
- address: string;
9971
- offset?: string | undefined;
9972
- page?: string | undefined;
9973
- }>, import("zod").ZodAny, {
9974
- TokenAddress: string;
9975
- TokenName: any;
9976
- TokenSymbol: any;
9977
- TokenQuantity: string;
9978
- }[]>;
9979
- addresstokennftinventory: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9980
- address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9981
- contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9982
- }, {
9983
- page: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
9984
- offset: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, number, string>>;
9985
- }>, "strip", import("zod").ZodTypeAny, {
9986
- address: string;
9987
- offset: number;
9988
- page: number;
9989
- contractaddress: string;
9990
- }, {
9991
- address: string;
9992
- contractaddress: string;
9993
- offset?: string | undefined;
9994
- page?: string | undefined;
9995
- }>, import("zod").ZodAny, any>;
9996
10192
  analyzer: ReturnType<typeof import("postgres")>;
9997
10193
  scout: ReturnType<typeof import("postgres")>;
9998
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.66",
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",