@iotexproject/kit 0.1.34 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +71 -52
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -8596,6 +8596,13 @@ declare class Staking {
8596
8596
  epochRewardPortion: number;
8597
8597
  blockRewardPortion: number;
8598
8598
  }): Promise<any>;
8599
+ getRewardDistribution(args: {
8600
+ ownerAddress: `0x${string}` | `io${string}`;
8601
+ }): Promise<{
8602
+ foundationRewardPortion: any;
8603
+ epochRewardPortion: any;
8604
+ blockRewardPortion: any;
8605
+ } | null>;
8599
8606
  candidateUpdate({ name, operatorAddress, rewardAddress }: {
8600
8607
  name: string;
8601
8608
  operatorAddress: `0x${string}`;
@@ -8826,6 +8833,27 @@ declare class PointsPlatform {
8826
8833
  error: unknown;
8827
8834
  data?: undefined;
8828
8835
  }>;
8836
+ points_range(args: {
8837
+ user: string;
8838
+ start: number;
8839
+ end: number;
8840
+ }): Promise<{
8841
+ data: any;
8842
+ error?: undefined;
8843
+ } | {
8844
+ error: unknown;
8845
+ data?: undefined;
8846
+ }>;
8847
+ daily_points_detail(args: {
8848
+ user: string;
8849
+ dayTimestamp: number;
8850
+ }): Promise<{
8851
+ data: any;
8852
+ error?: undefined;
8853
+ } | {
8854
+ error: unknown;
8855
+ data?: undefined;
8856
+ }>;
8829
8857
  }
8830
8858
  declare const modules: {
8831
8859
  mimo: Mimo;
@@ -8852,7 +8880,7 @@ declare class BaseDBModule {
8852
8880
  iopay: ReturnType<typeof postgres>;
8853
8881
  nftmarket: ReturnType<typeof postgres>;
8854
8882
  ch: ClickHouseSDK;
8855
- analysis: ReturnType<typeof postgres>;
8883
+ analysis: ClickHouseSDK;
8856
8884
  constructor();
8857
8885
  checkAuth(key: string): Promise<{
8858
8886
  ok: boolean;
@@ -8909,7 +8937,7 @@ declare class Analysis extends BaseDBModule {
8909
8937
  ok: boolean;
8910
8938
  msg: any;
8911
8939
  }>;
8912
- generate_referral_code({ refer_id, }: {
8940
+ referral_code({ refer_id, }: {
8913
8941
  refer_id: string;
8914
8942
  }, ctx?: {
8915
8943
  authData?: {
@@ -8925,22 +8953,6 @@ declare class Analysis extends BaseDBModule {
8925
8953
  msg: any;
8926
8954
  referral_code?: undefined;
8927
8955
  }>;
8928
- fetch_referral_code({ user_id, }: {
8929
- user_id: string;
8930
- }, ctx?: {
8931
- authData?: {
8932
- app_id: string;
8933
- api_key: string;
8934
- };
8935
- }): Promise<{
8936
- ok: boolean;
8937
- referral_code: any;
8938
- msg?: undefined;
8939
- } | {
8940
- ok: boolean;
8941
- msg: any;
8942
- referral_code?: undefined;
8943
- }>;
8944
8956
  create_refer({ refer_id, refer_id_type, user_id, device_id, data, }: {
8945
8957
  refer_id: string;
8946
8958
  refer_id_type: "referral_code" | "user_id";
@@ -8956,15 +8968,32 @@ declare class Analysis extends BaseDBModule {
8956
8968
  ok: boolean;
8957
8969
  msg: any;
8958
8970
  }>;
8959
- fetch_event({ event_id, }: {
8971
+ fetch_event({ event_id }: {
8960
8972
  event_id: string;
8973
+ }): Promise<Record<string, any>>;
8974
+ batch_fetch_event({ event_ids }: {
8975
+ event_ids: string[];
8976
+ }): Promise<any[] | {
8977
+ ok: boolean;
8978
+ msg: string;
8979
+ }>;
8980
+ fetch_user_point({ user_id, }: {
8981
+ user_id: string;
8961
8982
  }, ctx?: {
8962
8983
  authData?: {
8963
8984
  app_id: string;
8964
8985
  api_key: string;
8965
8986
  };
8966
- }): Promise<Record<string, any>>;
8967
- fetch_user_point({ user_id, }: {
8987
+ }): Promise<{
8988
+ ok: boolean;
8989
+ point: any;
8990
+ msg?: undefined;
8991
+ } | {
8992
+ ok: boolean;
8993
+ msg: any;
8994
+ point?: undefined;
8995
+ }>;
8996
+ fetch_invitees_num({ user_id, }: {
8968
8997
  user_id: string;
8969
8998
  }, ctx?: {
8970
8999
  authData?: {
@@ -8973,12 +9002,12 @@ declare class Analysis extends BaseDBModule {
8973
9002
  };
8974
9003
  }): Promise<{
8975
9004
  ok: boolean;
8976
- point: number;
9005
+ invitees_num: any;
8977
9006
  msg?: undefined;
8978
9007
  } | {
8979
9008
  ok: boolean;
8980
9009
  msg: any;
8981
- point?: undefined;
9010
+ invitees_num?: undefined;
8982
9011
  }>;
8983
9012
  }
8984
9013
  declare class Analyzer extends BaseDBModule {
@@ -9180,7 +9209,7 @@ declare const modules$1: {
9180
9209
  };
9181
9210
  export type DBModuleType = typeof modules$1;
9182
9211
  export interface ConfigOptions {
9183
- ttl: number;
9212
+ ttl?: number;
9184
9213
  checkAuth?: boolean;
9185
9214
  }
9186
9215
  export type KitModuleFunction<I extends z.AnyZodObject = z.AnyZodObject, O extends z.ZodType | undefined = undefined, R = any> = {
@@ -9266,7 +9295,6 @@ declare const modules$2: {
9266
9295
  iopay: ReturnType<typeof import("postgres")>;
9267
9296
  nftmarket: ReturnType<typeof import("postgres")>;
9268
9297
  ch: ClickHouseSDK;
9269
- analysis: ReturnType<typeof import("postgres")>;
9270
9298
  checkAuth(key: string): Promise<{
9271
9299
  ok: boolean;
9272
9300
  message: string;
@@ -9298,7 +9326,6 @@ declare const modules$2: {
9298
9326
  iopay: ReturnType<typeof import("postgres")>;
9299
9327
  nftmarket: ReturnType<typeof import("postgres")>;
9300
9328
  ch: ClickHouseSDK;
9301
- analysis: ReturnType<typeof import("postgres")>;
9302
9329
  checkAuth(key: string): Promise<{
9303
9330
  ok: boolean;
9304
9331
  message: string;
@@ -9461,7 +9488,6 @@ declare const modules$2: {
9461
9488
  iopay: ReturnType<typeof import("postgres")>;
9462
9489
  nftmarket: ReturnType<typeof import("postgres")>;
9463
9490
  ch: ClickHouseSDK;
9464
- analysis: ReturnType<typeof import("postgres")>;
9465
9491
  checkAuth(key: string): Promise<{
9466
9492
  ok: boolean;
9467
9493
  message: string;
@@ -9748,7 +9774,6 @@ declare const modules$2: {
9748
9774
  iopay: ReturnType<typeof import("postgres")>;
9749
9775
  nftmarket: ReturnType<typeof import("postgres")>;
9750
9776
  ch: ClickHouseSDK;
9751
- analysis: ReturnType<typeof import("postgres")>;
9752
9777
  checkAuth(key: string): Promise<{
9753
9778
  ok: boolean;
9754
9779
  message: string;
@@ -9782,7 +9807,6 @@ declare const modules$2: {
9782
9807
  iopay: ReturnType<typeof import("postgres")>;
9783
9808
  nftmarket: ReturnType<typeof import("postgres")>;
9784
9809
  ch: ClickHouseSDK;
9785
- analysis: ReturnType<typeof import("postgres")>;
9786
9810
  checkAuth(key: string): Promise<{
9787
9811
  ok: boolean;
9788
9812
  message: string;
@@ -9826,7 +9850,6 @@ declare const modules$2: {
9826
9850
  iopay: ReturnType<typeof import("postgres")>;
9827
9851
  nftmarket: ReturnType<typeof import("postgres")>;
9828
9852
  ch: ClickHouseSDK;
9829
- analysis: ReturnType<typeof import("postgres")>;
9830
9853
  checkAuth(key: string): Promise<{
9831
9854
  ok: boolean;
9832
9855
  message: string;
@@ -9959,7 +9982,6 @@ declare const modules$2: {
9959
9982
  iopay: ReturnType<typeof import("postgres")>;
9960
9983
  nftmarket: ReturnType<typeof import("postgres")>;
9961
9984
  ch: ClickHouseSDK;
9962
- analysis: ReturnType<typeof import("postgres")>;
9963
9985
  checkAuth(key: string): Promise<{
9964
9986
  ok: boolean;
9965
9987
  message: string;
@@ -10062,7 +10084,12 @@ declare const modules$2: {
10062
10084
  address: string;
10063
10085
  offset?: number | undefined;
10064
10086
  page?: number | undefined;
10065
- }>, import("zod").ZodAny, any[]>;
10087
+ }>, import("zod").ZodAny, {
10088
+ TokenAddress: string;
10089
+ TokenName: any;
10090
+ TokenSymbol: any;
10091
+ TokenQuantity: string;
10092
+ }[]>;
10066
10093
  addresstokennftinventory: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
10067
10094
  address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
10068
10095
  contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
@@ -10087,7 +10114,6 @@ declare const modules$2: {
10087
10114
  iopay: ReturnType<typeof import("postgres")>;
10088
10115
  nftmarket: ReturnType<typeof import("postgres")>;
10089
10116
  ch: ClickHouseSDK;
10090
- analysis: ReturnType<typeof import("postgres")>;
10091
10117
  checkAuth(key: string): Promise<{
10092
10118
  ok: boolean;
10093
10119
  message: string;
@@ -10151,7 +10177,6 @@ declare const modules$2: {
10151
10177
  iopay: ReturnType<typeof import("postgres")>;
10152
10178
  nftmarket: ReturnType<typeof import("postgres")>;
10153
10179
  ch: ClickHouseSDK;
10154
- analysis: ReturnType<typeof import("postgres")>;
10155
10180
  checkAuth(key: string): Promise<{
10156
10181
  ok: boolean;
10157
10182
  message: string;
@@ -10227,18 +10252,14 @@ declare class Point {
10227
10252
  sub: string | undefined;
10228
10253
  };
10229
10254
  }>;
10230
- upload_event({ action_id, }: {
10255
+ upload_event({ action_id, device_id, }: {
10231
10256
  action_id: number;
10257
+ device_id: string;
10232
10258
  }, ctx?: {
10233
10259
  authData?: {
10234
10260
  sub: string;
10235
10261
  };
10236
10262
  }): Promise<any>;
10237
- generate_referral_code(args?: any, ctx?: {
10238
- authData?: {
10239
- sub: string;
10240
- };
10241
- }): Promise<any>;
10242
10263
  fetch_referral_code(args?: any, ctx?: {
10243
10264
  authData?: {
10244
10265
  sub: string;
@@ -10254,20 +10275,18 @@ declare class Point {
10254
10275
  }): Promise<any>;
10255
10276
  fetch_event({ event_id }: {
10256
10277
  event_id: string;
10257
- }, ctx?: {
10258
- authData?: {
10259
- sub: string;
10260
- };
10261
10278
  }): Promise<any>;
10262
- my_point_tasks(args?: any, ctx?: {
10263
- authData?: {
10264
- sub: string;
10265
- };
10279
+ batch_fetch_event({ event_ids }: {
10280
+ event_ids: string[];
10266
10281
  }): Promise<any>;
10267
- my_point(args?: any, ctx?: {
10268
- authData?: {
10269
- sub: string;
10270
- };
10282
+ fetch_tasks({ user_id }: {
10283
+ user_id: string;
10284
+ }): Promise<any>;
10285
+ fetch_point({ user_id }: {
10286
+ user_id: string;
10287
+ }): Promise<any>;
10288
+ fetch_invitees_num({ user_id }: {
10289
+ user_id: string;
10271
10290
  }): Promise<any>;
10272
10291
  }
10273
10292
  declare const modules$4: {
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.34",
5
+ "version": "v0.1.36",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {