@iotexproject/kit 0.1.21 → 0.1.22

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
@@ -1,6 +1,9 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ import { RouteConfig } from '@asteasolutions/zod-to-openapi';
3
4
  import postgres from 'postgres';
5
+ import { PickByValue } from 'utility-types';
6
+ import { z } from 'zod';
4
7
 
5
8
  declare class ERC20Entity {
6
9
  address: `0x${string}`;
@@ -8505,6 +8508,18 @@ declare class Staking {
8505
8508
  receiverAddress: `0x${string}`;
8506
8509
  version: "v1" | "v2";
8507
8510
  }): Promise<any>;
8511
+ delegate_list(args: {
8512
+ isWhole?: boolean;
8513
+ }): Promise<{
8514
+ data: any;
8515
+ error?: undefined;
8516
+ } | {
8517
+ error: unknown;
8518
+ data?: undefined;
8519
+ }>;
8520
+ delegate_detail(args: {
8521
+ onChainName: string;
8522
+ }): Promise<any>;
8508
8523
  }
8509
8524
  declare class utils {
8510
8525
  erc20(args: {
@@ -8778,13 +8793,34 @@ declare class Analysis extends BaseDBModule {
8778
8793
  checkAuth(key: string): Promise<{
8779
8794
  ok: boolean;
8780
8795
  message: string;
8796
+ authData: null;
8797
+ } | {
8798
+ ok: boolean;
8799
+ message: string;
8800
+ authData: {
8801
+ app_id: any;
8802
+ api_key: string;
8803
+ };
8781
8804
  }>;
8782
8805
  create_ref({ device_id, refer_id, user_id }: {
8783
8806
  device_id: string;
8784
8807
  refer_id: string;
8785
8808
  user_id: string;
8809
+ }, authData?: {
8810
+ app_id: string;
8811
+ api_key: string;
8812
+ }): Promise<{
8813
+ ok: boolean;
8814
+ msg: any;
8815
+ }>;
8816
+ upload_event({ event }: {
8817
+ event: Record<string, any>;
8818
+ }, authData?: {
8819
+ app_id: string;
8820
+ api_key: string;
8786
8821
  }): Promise<{
8787
8822
  ok: boolean;
8823
+ msg: any;
8788
8824
  }>;
8789
8825
  }
8790
8826
  declare class Analyzer extends BaseDBModule {
@@ -8930,14 +8966,35 @@ declare const modules$1: {
8930
8966
  resource: Resource;
8931
8967
  };
8932
8968
  export type DBModuleType = typeof modules$1;
8969
+ export interface ConfigOptions {
8970
+ ttl: number;
8971
+ }
8972
+ export type KitModuleFunction<I extends z.AnyZodObject = z.AnyZodObject, O extends z.ZodType | undefined = undefined, R = any> = {
8973
+ input?: I;
8974
+ method?: RouteConfig["method"];
8975
+ output?: O;
8976
+ config?: ConfigOptions;
8977
+ func: (input: z.infer<I>) => Promise<O extends z.ZodType ? z.infer<O> : R>;
8978
+ };
8979
+ export type KitModule<T extends Record<string, Record<string, KitModuleFunction<any, any, any> | any>>> = {
8980
+ [K in keyof T]: PickByValue<T[K], KitModuleFunction<any, any, any>>;
8981
+ };
8933
8982
  declare const modules$2: {
8934
8983
  readonly contract: {
8935
- getabi({ address }: {
8984
+ getabi: KitModuleFunction<import("zod").ZodObject<{
8985
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
8986
+ }, "strip", import("zod").ZodTypeAny, {
8987
+ address: string;
8988
+ }, {
8936
8989
  address: string;
8937
- }): Promise<string>;
8938
- getcontractcreation({ contractaddresses }: {
8990
+ }>, import("zod").ZodString, string>;
8991
+ getcontractcreation: KitModuleFunction<import("zod").ZodObject<{
8992
+ contractaddresses: import("zod").ZodEffects<import("zod").ZodString, string, string>;
8993
+ }, "strip", import("zod").ZodTypeAny, {
8994
+ contractaddresses: string;
8995
+ }, {
8939
8996
  contractaddresses: string;
8940
- }): Promise<(Error | {
8997
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, (Error | {
8941
8998
  contractCreator: string;
8942
8999
  contractCreatorIo: string;
8943
9000
  contractAddress: string;
@@ -8952,9 +9009,13 @@ declare const modules$2: {
8952
9009
  _checkverify({ address }: {
8953
9010
  address: string;
8954
9011
  }): Promise<boolean>;
8955
- getsourcecode({ address }: {
9012
+ getsourcecode: KitModuleFunction<import("zod").ZodObject<{
9013
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9014
+ }, "strip", import("zod").ZodTypeAny, {
8956
9015
  address: string;
8957
- }): Promise<{
9016
+ }, {
9017
+ address: string;
9018
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, {
8958
9019
  SourceCode: any;
8959
9020
  ContractName: any;
8960
9021
  OptimizationUsed: any;
@@ -8964,15 +9025,26 @@ declare const modules$2: {
8964
9025
  Runs: any;
8965
9026
  ABI: string;
8966
9027
  }[]>;
8967
- checkverifystatus({ guid }: {
9028
+ checkverifystatus: KitModuleFunction<import("zod").ZodObject<{
9029
+ guid: import("zod").ZodString;
9030
+ }, "strip", import("zod").ZodTypeAny, {
9031
+ guid: string;
9032
+ }, {
8968
9033
  guid: string;
8969
- }): Promise<string>;
8970
- verifysourcecode({ contractaddress, sourceCode, compilerversion, codeformat }: {
8971
- codeformat: string;
9034
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, string>;
9035
+ verifysourcecode: KitModuleFunction<import("zod").ZodObject<{
9036
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9037
+ sourceCode: import("zod").ZodString;
9038
+ compilerversion: import("zod").ZodString;
9039
+ }, "strip", import("zod").ZodTypeAny, {
9040
+ contractaddress: string;
9041
+ sourceCode: string;
9042
+ compilerversion: string;
9043
+ }, {
8972
9044
  contractaddress: string;
8973
9045
  sourceCode: string;
8974
9046
  compilerversion: string;
8975
- }): Promise<unknown>;
9047
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, unknown>;
8976
9048
  analyzer: ReturnType<typeof import("postgres")>;
8977
9049
  scout: ReturnType<typeof import("postgres")>;
8978
9050
  superbase: ReturnType<typeof import("postgres")>;
@@ -8987,13 +9059,877 @@ declare const modules$2: {
8987
9059
  }>;
8988
9060
  };
8989
9061
  readonly transaction: {
8990
- getstatus({ txhash }: {
9062
+ getstatus: KitModuleFunction<import("zod").ZodObject<{
9063
+ txhash: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
9064
+ }, "strip", import("zod").ZodTypeAny, {
8991
9065
  txhash: string;
8992
- }): Promise<{
9066
+ }, {
9067
+ txhash: string;
9068
+ }>, import("zod").ZodAny, {
8993
9069
  sender: string;
8994
9070
  recipient: string;
8995
9071
  bucket: import("postgres").Row;
8996
9072
  }>;
9073
+ gettxreceiptstatus: KitModuleFunction<import("zod").ZodObject<{
9074
+ txhash: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
9075
+ }, "strip", import("zod").ZodTypeAny, {
9076
+ txhash: string;
9077
+ }, {
9078
+ txhash: string;
9079
+ }>, import("zod").ZodAny, import("postgres").Row>;
9080
+ analyzer: ReturnType<typeof import("postgres")>;
9081
+ scout: ReturnType<typeof import("postgres")>;
9082
+ superbase: ReturnType<typeof import("postgres")>;
9083
+ iotexscan: ReturnType<typeof import("postgres")>;
9084
+ iopay: ReturnType<typeof import("postgres")>;
9085
+ nftmarket: ReturnType<typeof import("postgres")>;
9086
+ ch: ClickHouseSDK;
9087
+ analysis: ReturnType<typeof import("postgres")>;
9088
+ checkAuth(key: string): Promise<{
9089
+ ok: boolean;
9090
+ message: string;
9091
+ }>;
9092
+ };
9093
+ readonly proxy: {
9094
+ eth_blockNumber: KitModuleFunction<import("zod").AnyZodObject, import("zod").ZodAny, any>;
9095
+ eth_getBlockByNumber: KitModuleFunction<import("zod").ZodObject<{
9096
+ tag: import("zod").ZodString;
9097
+ boolean: import("zod").ZodDefault<import("zod").ZodBoolean>;
9098
+ }, "strip", import("zod").ZodTypeAny, {
9099
+ boolean: boolean;
9100
+ tag: string;
9101
+ }, {
9102
+ tag: string;
9103
+ boolean?: boolean | undefined;
9104
+ }>, import("zod").ZodAny, any>;
9105
+ eth_getUncleByBlockNumberAndIndex: KitModuleFunction<import("zod").ZodObject<{
9106
+ tag: import("zod").ZodString;
9107
+ index: import("zod").ZodString;
9108
+ }, "strip", import("zod").ZodTypeAny, {
9109
+ index: string;
9110
+ tag: string;
9111
+ }, {
9112
+ index: string;
9113
+ tag: string;
9114
+ }>, import("zod").ZodAny, any>;
9115
+ eth_getBlockTransactionCountByNumber: KitModuleFunction<import("zod").ZodObject<{
9116
+ tag: import("zod").ZodString;
9117
+ }, "strip", import("zod").ZodTypeAny, {
9118
+ tag: string;
9119
+ }, {
9120
+ tag: string;
9121
+ }>, import("zod").ZodAny, any>;
9122
+ eth_getTransactionByHash: KitModuleFunction<import("zod").ZodObject<{
9123
+ txhash: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
9124
+ }, "strip", import("zod").ZodTypeAny, {
9125
+ txhash: string;
9126
+ }, {
9127
+ txhash: string;
9128
+ }>, import("zod").ZodAny, any>;
9129
+ eth_getTransactionByBlockNumberAndIndex: KitModuleFunction<import("zod").ZodObject<{
9130
+ tag: import("zod").ZodString;
9131
+ index: import("zod").ZodString;
9132
+ }, "strip", import("zod").ZodTypeAny, {
9133
+ index: string;
9134
+ tag: string;
9135
+ }, {
9136
+ index: string;
9137
+ tag: string;
9138
+ }>, import("zod").ZodAny, any>;
9139
+ eth_getTransactionCount: KitModuleFunction<import("zod").ZodObject<{
9140
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9141
+ tag: import("zod").ZodDefault<import("zod").ZodEnum<[
9142
+ "latest",
9143
+ "earliest",
9144
+ "pending",
9145
+ "safe",
9146
+ "finalized"
9147
+ ]>>;
9148
+ }, "strip", import("zod").ZodTypeAny, {
9149
+ address: string;
9150
+ tag: "latest" | "earliest" | "pending" | "safe" | "finalized";
9151
+ }, {
9152
+ address: string;
9153
+ tag?: "latest" | "earliest" | "pending" | "safe" | "finalized" | undefined;
9154
+ }>, import("zod").ZodAny, any>;
9155
+ eth_sendRawTransaction: KitModuleFunction<import("zod").ZodObject<{
9156
+ hex: import("zod").ZodString;
9157
+ }, "strip", import("zod").ZodTypeAny, {
9158
+ hex: string;
9159
+ }, {
9160
+ hex: string;
9161
+ }>, import("zod").ZodAny, any>;
9162
+ eth_getTransactionReceipt: KitModuleFunction<import("zod").ZodObject<{
9163
+ txhash: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
9164
+ }, "strip", import("zod").ZodTypeAny, {
9165
+ txhash: string;
9166
+ }, {
9167
+ txhash: string;
9168
+ }>, import("zod").ZodAny, any>;
9169
+ eth_call: KitModuleFunction<import("zod").ZodObject<{
9170
+ to: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9171
+ data: import("zod").ZodString;
9172
+ tag: import("zod").ZodDefault<import("zod").ZodEnum<[
9173
+ "latest",
9174
+ "earliest",
9175
+ "pending",
9176
+ "safe",
9177
+ "finalized"
9178
+ ]>>;
9179
+ }, "strip", import("zod").ZodTypeAny, {
9180
+ to: string;
9181
+ data: string;
9182
+ tag: "latest" | "earliest" | "pending" | "safe" | "finalized";
9183
+ }, {
9184
+ to: string;
9185
+ data: string;
9186
+ tag?: "latest" | "earliest" | "pending" | "safe" | "finalized" | undefined;
9187
+ }>, import("zod").ZodAny, any>;
9188
+ eth_getCode: KitModuleFunction<import("zod").ZodObject<{
9189
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9190
+ tag: import("zod").ZodDefault<import("zod").ZodEnum<[
9191
+ "latest",
9192
+ "earliest",
9193
+ "pending",
9194
+ "safe",
9195
+ "finalized"
9196
+ ]>>;
9197
+ }, "strip", import("zod").ZodTypeAny, {
9198
+ address: string;
9199
+ tag: "latest" | "earliest" | "pending" | "safe" | "finalized";
9200
+ }, {
9201
+ address: string;
9202
+ tag?: "latest" | "earliest" | "pending" | "safe" | "finalized" | undefined;
9203
+ }>, import("zod").ZodAny, any>;
9204
+ eth_getStorageAt: KitModuleFunction<import("zod").ZodObject<{
9205
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9206
+ position: import("zod").ZodString;
9207
+ tag: import("zod").ZodDefault<import("zod").ZodEnum<[
9208
+ "latest",
9209
+ "earliest",
9210
+ "pending",
9211
+ "safe",
9212
+ "finalized"
9213
+ ]>>;
9214
+ }, "strip", import("zod").ZodTypeAny, {
9215
+ address: string;
9216
+ tag: "latest" | "earliest" | "pending" | "safe" | "finalized";
9217
+ position: string;
9218
+ }, {
9219
+ address: string;
9220
+ position: string;
9221
+ tag?: "latest" | "earliest" | "pending" | "safe" | "finalized" | undefined;
9222
+ }>, import("zod").ZodAny, any>;
9223
+ eth_gasPrice: KitModuleFunction<import("zod").AnyZodObject, import("zod").ZodAny, any>;
9224
+ eth_estimateGas: KitModuleFunction<import("zod").ZodObject<{
9225
+ data: import("zod").ZodString;
9226
+ to: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9227
+ value: import("zod").ZodString;
9228
+ gasPrice: import("zod").ZodString;
9229
+ gas: import("zod").ZodString;
9230
+ }, "strip", import("zod").ZodTypeAny, {
9231
+ value: string;
9232
+ to: string;
9233
+ data: string;
9234
+ gas: string;
9235
+ gasPrice: string;
9236
+ }, {
9237
+ value: string;
9238
+ to: string;
9239
+ data: string;
9240
+ gas: string;
9241
+ gasPrice: string;
9242
+ }>, import("zod").ZodAny, any>;
9243
+ analyzer: ReturnType<typeof import("postgres")>;
9244
+ scout: ReturnType<typeof import("postgres")>;
9245
+ superbase: ReturnType<typeof import("postgres")>;
9246
+ iotexscan: ReturnType<typeof import("postgres")>;
9247
+ iopay: ReturnType<typeof import("postgres")>;
9248
+ nftmarket: ReturnType<typeof import("postgres")>;
9249
+ ch: ClickHouseSDK;
9250
+ analysis: ReturnType<typeof import("postgres")>;
9251
+ checkAuth(key: string): Promise<{
9252
+ ok: boolean;
9253
+ message: string;
9254
+ }>;
9255
+ };
9256
+ readonly account: {
9257
+ balance: KitModuleFunction<import("zod").ZodObject<{
9258
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9259
+ tag: import("zod").ZodDefault<import("zod").ZodEnum<[
9260
+ "latest",
9261
+ "earliest",
9262
+ "pending",
9263
+ "safe",
9264
+ "finalized"
9265
+ ]>>;
9266
+ }, "strip", import("zod").ZodTypeAny, {
9267
+ address: string;
9268
+ tag: "latest" | "earliest" | "pending" | "safe" | "finalized";
9269
+ }, {
9270
+ address: string;
9271
+ tag?: "latest" | "earliest" | "pending" | "safe" | "finalized" | undefined;
9272
+ }>, import("zod").ZodAny, string>;
9273
+ balancemulti: KitModuleFunction<import("zod").ZodObject<{
9274
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9275
+ tag: import("zod").ZodDefault<import("zod").ZodEnum<[
9276
+ "latest",
9277
+ "earliest",
9278
+ "pending",
9279
+ "safe",
9280
+ "finalized"
9281
+ ]>>;
9282
+ }, "strip", import("zod").ZodTypeAny, {
9283
+ address: string;
9284
+ tag: "latest" | "earliest" | "pending" | "safe" | "finalized";
9285
+ }, {
9286
+ address: string;
9287
+ tag?: "latest" | "earliest" | "pending" | "safe" | "finalized" | undefined;
9288
+ }>, import("zod").ZodAny, string[]>;
9289
+ txlist: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9290
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9291
+ }, import("zod").objectUtil.extendShape<{
9292
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9293
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9294
+ }, {
9295
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9296
+ "asc",
9297
+ "desc"
9298
+ ]>>;
9299
+ startblock: import("zod").ZodNumber;
9300
+ endblock: import("zod").ZodNumber;
9301
+ }>>, "strip", import("zod").ZodTypeAny, {
9302
+ address: string;
9303
+ sort: "asc" | "desc";
9304
+ offset: number;
9305
+ page: number;
9306
+ startblock: number;
9307
+ endblock: number;
9308
+ }, {
9309
+ address: string;
9310
+ startblock: number;
9311
+ endblock: number;
9312
+ sort?: "asc" | "desc" | undefined;
9313
+ offset?: number | undefined;
9314
+ page?: number | undefined;
9315
+ }>, import("zod").ZodAny, import("postgres").RowList<{
9316
+ blockNumber: string;
9317
+ timeStamp: string;
9318
+ hash: string;
9319
+ nonce: string;
9320
+ blockHash: string;
9321
+ from: string;
9322
+ to: string;
9323
+ value: string;
9324
+ gas: string;
9325
+ gasPrice: string;
9326
+ isError: string;
9327
+ txreceipt_status: string;
9328
+ input: string;
9329
+ contractAddress: string;
9330
+ gasUsed: string;
9331
+ methodId: string;
9332
+ functionName: string;
9333
+ }[]>>;
9334
+ txlistinternal: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9335
+ address: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
9336
+ txhash: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>>;
9337
+ }, import("zod").objectUtil.extendShape<{
9338
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9339
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9340
+ }, {
9341
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9342
+ "asc",
9343
+ "desc"
9344
+ ]>>;
9345
+ startblock: import("zod").ZodNumber;
9346
+ endblock: import("zod").ZodNumber;
9347
+ }>>, "strip", import("zod").ZodTypeAny, {
9348
+ sort: "asc" | "desc";
9349
+ offset: number;
9350
+ page: number;
9351
+ startblock: number;
9352
+ endblock: number;
9353
+ address?: string | undefined;
9354
+ txhash?: string | undefined;
9355
+ }, {
9356
+ startblock: number;
9357
+ endblock: number;
9358
+ address?: string | undefined;
9359
+ sort?: "asc" | "desc" | undefined;
9360
+ offset?: number | undefined;
9361
+ page?: number | undefined;
9362
+ txhash?: string | undefined;
9363
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, import("postgres").RowList<import("postgres").Row[]>>;
9364
+ tokentx: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9365
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9366
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9367
+ }, import("zod").objectUtil.extendShape<{
9368
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9369
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9370
+ }, {
9371
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9372
+ "asc",
9373
+ "desc"
9374
+ ]>>;
9375
+ startblock: import("zod").ZodNumber;
9376
+ endblock: import("zod").ZodNumber;
9377
+ }>>, "strip", import("zod").ZodTypeAny, {
9378
+ address: string;
9379
+ sort: "asc" | "desc";
9380
+ offset: number;
9381
+ page: number;
9382
+ startblock: number;
9383
+ endblock: number;
9384
+ contractaddress: string;
9385
+ }, {
9386
+ address: string;
9387
+ startblock: number;
9388
+ endblock: number;
9389
+ contractaddress: string;
9390
+ sort?: "asc" | "desc" | undefined;
9391
+ offset?: number | undefined;
9392
+ page?: number | undefined;
9393
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, {
9394
+ tokenName: any;
9395
+ tokenSymbol: any;
9396
+ tokenDecimal: any;
9397
+ }[]>;
9398
+ tokennfttx: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9399
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9400
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9401
+ }, import("zod").objectUtil.extendShape<{
9402
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9403
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9404
+ }, {
9405
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9406
+ "asc",
9407
+ "desc"
9408
+ ]>>;
9409
+ startblock: import("zod").ZodNumber;
9410
+ endblock: import("zod").ZodNumber;
9411
+ }>>, "strip", import("zod").ZodTypeAny, {
9412
+ address: string;
9413
+ sort: "asc" | "desc";
9414
+ offset: number;
9415
+ page: number;
9416
+ startblock: number;
9417
+ endblock: number;
9418
+ contractaddress: string;
9419
+ }, {
9420
+ address: string;
9421
+ startblock: number;
9422
+ endblock: number;
9423
+ contractaddress: string;
9424
+ sort?: "asc" | "desc" | undefined;
9425
+ offset?: number | undefined;
9426
+ page?: number | undefined;
9427
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, {
9428
+ tokenName: any;
9429
+ tokenSymbol: any;
9430
+ tokenDecimal: number;
9431
+ }[]>;
9432
+ token1155tx: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9433
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9434
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9435
+ }, import("zod").objectUtil.extendShape<{
9436
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9437
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9438
+ }, {
9439
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9440
+ "asc",
9441
+ "desc"
9442
+ ]>>;
9443
+ startblock: import("zod").ZodNumber;
9444
+ endblock: import("zod").ZodNumber;
9445
+ }>>, "strip", import("zod").ZodTypeAny, {
9446
+ address: string;
9447
+ sort: "asc" | "desc";
9448
+ offset: number;
9449
+ page: number;
9450
+ startblock: number;
9451
+ endblock: number;
9452
+ contractaddress: string;
9453
+ }, {
9454
+ address: string;
9455
+ startblock: number;
9456
+ endblock: number;
9457
+ contractaddress: string;
9458
+ sort?: "asc" | "desc" | undefined;
9459
+ offset?: number | undefined;
9460
+ page?: number | undefined;
9461
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, {
9462
+ tokenName: any;
9463
+ tokenSymbol: any;
9464
+ tokenDecimal: number;
9465
+ }[]>;
9466
+ tokenbalance: KitModuleFunction<import("zod").ZodObject<{
9467
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9468
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9469
+ }, "strip", import("zod").ZodTypeAny, {
9470
+ address: string;
9471
+ contractaddress: string;
9472
+ }, {
9473
+ address: string;
9474
+ contractaddress: string;
9475
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, string>;
9476
+ tokensupplyhistory: KitModuleFunction<import("zod").ZodObject<{
9477
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9478
+ blockno: import("zod").ZodNumber;
9479
+ }, "strip", import("zod").ZodTypeAny, {
9480
+ contractaddress: string;
9481
+ blockno: number;
9482
+ }, {
9483
+ contractaddress: string;
9484
+ blockno: number;
9485
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, string>;
9486
+ tokenbalancehistory: KitModuleFunction<import("zod").ZodObject<{
9487
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9488
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9489
+ blockno: import("zod").ZodNumber;
9490
+ }, "strip", import("zod").ZodTypeAny, {
9491
+ address: string;
9492
+ contractaddress: string;
9493
+ blockno: number;
9494
+ }, {
9495
+ address: string;
9496
+ contractaddress: string;
9497
+ blockno: number;
9498
+ }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, string>;
9499
+ addresstokennftbalance: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9500
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9501
+ }, {
9502
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9503
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9504
+ }>, "strip", import("zod").ZodTypeAny, {
9505
+ address: string;
9506
+ offset: number;
9507
+ page: number;
9508
+ }, {
9509
+ address: string;
9510
+ offset?: number | undefined;
9511
+ page?: number | undefined;
9512
+ }>, import("zod").ZodAny, void>;
9513
+ addresstokennftinventory: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9514
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9515
+ convertAddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9516
+ }, {
9517
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9518
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9519
+ }>, "strip", import("zod").ZodTypeAny, {
9520
+ address: string;
9521
+ offset: number;
9522
+ page: number;
9523
+ convertAddress: string;
9524
+ }, {
9525
+ address: string;
9526
+ convertAddress: string;
9527
+ offset?: number | undefined;
9528
+ page?: number | undefined;
9529
+ }>, import("zod").ZodAny, void>;
9530
+ analyzer: ReturnType<typeof import("postgres")>;
9531
+ scout: ReturnType<typeof import("postgres")>;
9532
+ superbase: ReturnType<typeof import("postgres")>;
9533
+ iotexscan: ReturnType<typeof import("postgres")>;
9534
+ iopay: ReturnType<typeof import("postgres")>;
9535
+ nftmarket: ReturnType<typeof import("postgres")>;
9536
+ ch: ClickHouseSDK;
9537
+ analysis: ReturnType<typeof import("postgres")>;
9538
+ checkAuth(key: string): Promise<{
9539
+ ok: boolean;
9540
+ message: string;
9541
+ }>;
9542
+ };
9543
+ readonly block: {
9544
+ getblockreward: KitModuleFunction<import("zod").ZodObject<{
9545
+ blockno: import("zod").ZodNumber;
9546
+ }, "strip", import("zod").ZodTypeAny, {
9547
+ blockno: number;
9548
+ }, {
9549
+ blockno: number;
9550
+ }>, import("zod").ZodAny, import("postgres").Row>;
9551
+ getblocknobytime: KitModuleFunction<import("zod").ZodObject<{
9552
+ timestamp: import("zod").ZodNumber;
9553
+ closest: import("zod").ZodDefault<import("zod").ZodEnum<[
9554
+ "before",
9555
+ "after"
9556
+ ]>>;
9557
+ }, "strip", import("zod").ZodTypeAny, {
9558
+ timestamp: number;
9559
+ closest: "before" | "after";
9560
+ }, {
9561
+ timestamp: number;
9562
+ closest?: "before" | "after" | undefined;
9563
+ }>, import("zod").ZodAny, any>;
9564
+ analyzer: ReturnType<typeof import("postgres")>;
9565
+ scout: ReturnType<typeof import("postgres")>;
9566
+ superbase: ReturnType<typeof import("postgres")>;
9567
+ iotexscan: ReturnType<typeof import("postgres")>;
9568
+ iopay: ReturnType<typeof import("postgres")>;
9569
+ nftmarket: ReturnType<typeof import("postgres")>;
9570
+ ch: ClickHouseSDK;
9571
+ analysis: ReturnType<typeof import("postgres")>;
9572
+ checkAuth(key: string): Promise<{
9573
+ ok: boolean;
9574
+ message: string;
9575
+ }>;
9576
+ };
9577
+ readonly log: {
9578
+ getLogs: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9579
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9580
+ fromBlock: import("zod").ZodNumber;
9581
+ toBlock: import("zod").ZodNumber;
9582
+ }, {
9583
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9584
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9585
+ }>, "strip", import("zod").ZodTypeAny, {
9586
+ address: string;
9587
+ offset: number;
9588
+ page: number;
9589
+ fromBlock: number;
9590
+ toBlock: number;
9591
+ }, {
9592
+ address: string;
9593
+ fromBlock: number;
9594
+ toBlock: number;
9595
+ offset?: number | undefined;
9596
+ page?: number | undefined;
9597
+ }>, import("zod").ZodAny, {
9598
+ address: string;
9599
+ topics: any[];
9600
+ data: string;
9601
+ blockNumber: string;
9602
+ timeStamp: string;
9603
+ gasPrice: string;
9604
+ gasUsed: string;
9605
+ logIndex: string;
9606
+ transactionHash: string;
9607
+ }[]>;
9608
+ analyzer: ReturnType<typeof import("postgres")>;
9609
+ scout: ReturnType<typeof import("postgres")>;
9610
+ superbase: ReturnType<typeof import("postgres")>;
9611
+ iotexscan: ReturnType<typeof import("postgres")>;
9612
+ iopay: ReturnType<typeof import("postgres")>;
9613
+ nftmarket: ReturnType<typeof import("postgres")>;
9614
+ ch: ClickHouseSDK;
9615
+ analysis: ReturnType<typeof import("postgres")>;
9616
+ checkAuth(key: string): Promise<{
9617
+ ok: boolean;
9618
+ message: string;
9619
+ }>;
9620
+ };
9621
+ readonly stats: {
9622
+ tokensupply: KitModuleFunction<import("zod").ZodObject<{
9623
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9624
+ }, "strip", import("zod").ZodTypeAny, {
9625
+ contractaddress: string;
9626
+ }, {
9627
+ contractaddress: string;
9628
+ }>, import("zod").ZodAny, string>;
9629
+ dailyblkcount: KitModuleFunction<import("zod").ZodObject<{
9630
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9631
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9632
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9633
+ "asc",
9634
+ "desc"
9635
+ ]>>;
9636
+ }, "strip", import("zod").ZodTypeAny, {
9637
+ sort: "asc" | "desc";
9638
+ startdate: string;
9639
+ enddate: string;
9640
+ }, {
9641
+ startdate: string;
9642
+ enddate: string;
9643
+ sort?: "asc" | "desc" | undefined;
9644
+ }>, import("zod").ZodAny, any>;
9645
+ dailyblockrewards: KitModuleFunction<import("zod").ZodObject<{
9646
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9647
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9648
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9649
+ "asc",
9650
+ "desc"
9651
+ ]>>;
9652
+ }, "strip", import("zod").ZodTypeAny, {
9653
+ sort: "asc" | "desc";
9654
+ startdate: string;
9655
+ enddate: string;
9656
+ }, {
9657
+ startdate: string;
9658
+ enddate: string;
9659
+ sort?: "asc" | "desc" | undefined;
9660
+ }>, import("zod").ZodAny, any>;
9661
+ iotxsupply: any;
9662
+ iotxsupply2: any;
9663
+ iotxprice: KitModuleFunction<import("zod").AnyZodObject, import("zod").ZodAny, {
9664
+ ethusd: any;
9665
+ ethusd_timestamp: number;
9666
+ }>;
9667
+ chainsize: any;
9668
+ nodecount: any;
9669
+ dailytxnfee: KitModuleFunction<import("zod").ZodObject<{
9670
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9671
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9672
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9673
+ "asc",
9674
+ "desc"
9675
+ ]>>;
9676
+ }, "strip", import("zod").ZodTypeAny, {
9677
+ sort: "asc" | "desc";
9678
+ startdate: string;
9679
+ enddate: string;
9680
+ }, {
9681
+ startdate: string;
9682
+ enddate: string;
9683
+ sort?: "asc" | "desc" | undefined;
9684
+ }>, import("zod").ZodAny, any>;
9685
+ dailynewaddress: KitModuleFunction<import("zod").ZodObject<{
9686
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9687
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9688
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9689
+ "asc",
9690
+ "desc"
9691
+ ]>>;
9692
+ }, "strip", import("zod").ZodTypeAny, {
9693
+ sort: "asc" | "desc";
9694
+ startdate: string;
9695
+ enddate: string;
9696
+ }, {
9697
+ startdate: string;
9698
+ enddate: string;
9699
+ sort?: "asc" | "desc" | undefined;
9700
+ }>, import("zod").ZodAny, {
9701
+ UTCDate: any;
9702
+ unixTimeStamp: number;
9703
+ newAddressCount: any;
9704
+ }[]>;
9705
+ dailynetutilization: any;
9706
+ dailyavghashrate: any;
9707
+ dailytx: KitModuleFunction<import("zod").ZodObject<{
9708
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9709
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9710
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9711
+ "asc",
9712
+ "desc"
9713
+ ]>>;
9714
+ }, "strip", import("zod").ZodTypeAny, {
9715
+ sort: "asc" | "desc";
9716
+ startdate: string;
9717
+ enddate: string;
9718
+ }, {
9719
+ startdate: string;
9720
+ enddate: string;
9721
+ sort?: "asc" | "desc" | undefined;
9722
+ }>, import("zod").ZodAny, any>;
9723
+ dailyavgnetdifficulty: any;
9724
+ ethdailymarketcap: any;
9725
+ iotxdailyprice: KitModuleFunction<import("zod").ZodObject<{
9726
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9727
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9728
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9729
+ "asc",
9730
+ "desc"
9731
+ ]>>;
9732
+ }, "strip", import("zod").ZodTypeAny, {
9733
+ sort: "asc" | "desc";
9734
+ startdate: string;
9735
+ enddate: string;
9736
+ }, {
9737
+ startdate: string;
9738
+ enddate: string;
9739
+ sort?: "asc" | "desc" | undefined;
9740
+ }>, import("zod").ZodAny, any>;
9741
+ analyzer: ReturnType<typeof import("postgres")>;
9742
+ scout: ReturnType<typeof import("postgres")>;
9743
+ superbase: ReturnType<typeof import("postgres")>;
9744
+ iotexscan: ReturnType<typeof import("postgres")>;
9745
+ iopay: ReturnType<typeof import("postgres")>;
9746
+ nftmarket: ReturnType<typeof import("postgres")>;
9747
+ ch: ClickHouseSDK;
9748
+ analysis: ReturnType<typeof import("postgres")>;
9749
+ checkAuth(key: string): Promise<{
9750
+ ok: boolean;
9751
+ message: string;
9752
+ }>;
9753
+ };
9754
+ readonly token: {
9755
+ tokenholderlist: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9756
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9757
+ }, {
9758
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9759
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9760
+ }>, "strip", import("zod").ZodTypeAny, {
9761
+ offset: number;
9762
+ page: number;
9763
+ contractaddress: string;
9764
+ }, {
9765
+ contractaddress: string;
9766
+ offset?: number | undefined;
9767
+ page?: number | undefined;
9768
+ }>, import("zod").ZodAny, any>;
9769
+ tokeninfo: KitModuleFunction<import("zod").ZodObject<{
9770
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9771
+ }, "strip", import("zod").ZodTypeAny, {
9772
+ contractaddress: string;
9773
+ }, {
9774
+ contractaddress: string;
9775
+ }>, import("zod").ZodAny, {
9776
+ contractAddress: string;
9777
+ tokenName: any;
9778
+ symbol: any;
9779
+ divisor: any;
9780
+ tokenType: string;
9781
+ totalSupply: any;
9782
+ blueCheckmark: any;
9783
+ description: any;
9784
+ website: any;
9785
+ email: string;
9786
+ blog: string;
9787
+ reddit: string;
9788
+ slack: string;
9789
+ facebook: string;
9790
+ twitter: any;
9791
+ bitcointalk: string;
9792
+ github: any;
9793
+ telegram: any;
9794
+ wechat: string;
9795
+ linkedin: string;
9796
+ discord: any;
9797
+ whitepaper: string;
9798
+ tokenPriceUSD: any;
9799
+ } | {
9800
+ contractAddress: string;
9801
+ tokenName: any;
9802
+ symbol: any;
9803
+ divisor: number;
9804
+ tokenType: any;
9805
+ totalSupply: any;
9806
+ blueCheckmark: boolean;
9807
+ description: any;
9808
+ website: any;
9809
+ email: string;
9810
+ blog: string;
9811
+ reddit: string;
9812
+ slack: string;
9813
+ facebook: string;
9814
+ twitter: any;
9815
+ bitcointalk: string;
9816
+ github: any;
9817
+ telegram: any;
9818
+ wechat: string;
9819
+ linkedin: string;
9820
+ discord: any;
9821
+ whitepaper: string;
9822
+ tokenPriceUSD: string;
9823
+ } | null>;
9824
+ addresstokenbalance: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9825
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9826
+ }, {
9827
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9828
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9829
+ }>, "strip", import("zod").ZodTypeAny, {
9830
+ address: string;
9831
+ offset: number;
9832
+ page: number;
9833
+ }, {
9834
+ address: string;
9835
+ offset?: number | undefined;
9836
+ page?: number | undefined;
9837
+ }>, import("zod").ZodAny, any[]>;
9838
+ addresstokennftbalance: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9839
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9840
+ }, {
9841
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9842
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9843
+ }>, "strip", import("zod").ZodTypeAny, {
9844
+ address: string;
9845
+ offset: number;
9846
+ page: number;
9847
+ }, {
9848
+ address: string;
9849
+ offset?: number | undefined;
9850
+ page?: number | undefined;
9851
+ }>, import("zod").ZodAny, any[]>;
9852
+ addresstokennftinventory: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
9853
+ address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9854
+ contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9855
+ }, {
9856
+ page: import("zod").ZodDefault<import("zod").ZodNumber>;
9857
+ offset: import("zod").ZodDefault<import("zod").ZodNumber>;
9858
+ }>, "strip", import("zod").ZodTypeAny, {
9859
+ address: string;
9860
+ offset: number;
9861
+ page: number;
9862
+ contractaddress: string;
9863
+ }, {
9864
+ address: string;
9865
+ contractaddress: string;
9866
+ offset?: number | undefined;
9867
+ page?: number | undefined;
9868
+ }>, import("zod").ZodAny, any>;
9869
+ analyzer: ReturnType<typeof import("postgres")>;
9870
+ scout: ReturnType<typeof import("postgres")>;
9871
+ superbase: ReturnType<typeof import("postgres")>;
9872
+ iotexscan: ReturnType<typeof import("postgres")>;
9873
+ iopay: ReturnType<typeof import("postgres")>;
9874
+ nftmarket: ReturnType<typeof import("postgres")>;
9875
+ ch: ClickHouseSDK;
9876
+ analysis: ReturnType<typeof import("postgres")>;
9877
+ checkAuth(key: string): Promise<{
9878
+ ok: boolean;
9879
+ message: string;
9880
+ }>;
9881
+ };
9882
+ readonly gastraker: {
9883
+ gasestimate: any;
9884
+ gasoracle: any;
9885
+ dailyavggaslimit: KitModuleFunction<import("zod").ZodObject<{
9886
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9887
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9888
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9889
+ "asc",
9890
+ "desc"
9891
+ ]>>;
9892
+ }, "strip", import("zod").ZodTypeAny, {
9893
+ sort: "asc" | "desc";
9894
+ startdate: string;
9895
+ enddate: string;
9896
+ }, {
9897
+ startdate: string;
9898
+ enddate: string;
9899
+ sort?: "asc" | "desc" | undefined;
9900
+ }>, import("zod").ZodAny, any>;
9901
+ dailygasused: KitModuleFunction<import("zod").ZodObject<{
9902
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9903
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9904
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9905
+ "asc",
9906
+ "desc"
9907
+ ]>>;
9908
+ }, "strip", import("zod").ZodTypeAny, {
9909
+ sort: "asc" | "desc";
9910
+ startdate: string;
9911
+ enddate: string;
9912
+ }, {
9913
+ startdate: string;
9914
+ enddate: string;
9915
+ sort?: "asc" | "desc" | undefined;
9916
+ }>, import("zod").ZodAny, any>;
9917
+ dailyavggasprice: KitModuleFunction<import("zod").ZodObject<{
9918
+ startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9919
+ enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9920
+ sort: import("zod").ZodDefault<import("zod").ZodEnum<[
9921
+ "asc",
9922
+ "desc"
9923
+ ]>>;
9924
+ }, "strip", import("zod").ZodTypeAny, {
9925
+ sort: "asc" | "desc";
9926
+ startdate: string;
9927
+ enddate: string;
9928
+ }, {
9929
+ startdate: string;
9930
+ enddate: string;
9931
+ sort?: "asc" | "desc" | undefined;
9932
+ }>, import("zod").ZodAny, any>;
8997
9933
  analyzer: ReturnType<typeof import("postgres")>;
8998
9934
  scout: ReturnType<typeof import("postgres")>;
8999
9935
  superbase: ReturnType<typeof import("postgres")>;
@@ -9008,7 +9944,7 @@ declare const modules$2: {
9008
9944
  }>;
9009
9945
  };
9010
9946
  };
9011
- export type IotexscanModulesType = typeof modules$2;
9947
+ export type IotexscanModulesType = KitModule<typeof modules$2>;
9012
9948
  declare class Ioid {
9013
9949
  register(args: {
9014
9950
  projectName: string;
@@ -9065,11 +10001,33 @@ declare const modules$3: {
9065
10001
  ioid: Ioid;
9066
10002
  };
9067
10003
  export type IoIDModuleType = typeof modules$3;
10004
+ declare class Point {
10005
+ checkAuth(token: string): Promise<{
10006
+ ok: boolean;
10007
+ message: string;
10008
+ authData: null;
10009
+ } | {
10010
+ ok: boolean;
10011
+ message: string;
10012
+ authData: {
10013
+ sub: string | undefined;
10014
+ data: any;
10015
+ };
10016
+ }>;
10017
+ upload_event(args?: Record<string, any>, authData?: {
10018
+ sub: string;
10019
+ data: Record<string, any>;
10020
+ }): Promise<any>;
10021
+ }
10022
+ declare const modules$4: {
10023
+ point: Point;
10024
+ };
10025
+ export type IoPayModuleType = typeof modules$4;
9068
10026
  export type IotexscanAdapterType<T extends Record<string, Record<string, any>>> = {
9069
10027
  [key in keyof T]: {
9070
10028
  [key1 in keyof T[key]]: (arg: Parameters<T[key][key1]>[0] & {
9071
- module: string;
9072
- action: string;
10029
+ module?: string;
10030
+ action?: string;
9073
10031
  }) => ReturnType<T[key][key1]>;
9074
10032
  };
9075
10033
  };
@@ -9077,13 +10035,14 @@ export declare const createClient: ({ url, ctx }?: {
9077
10035
  url?: string;
9078
10036
  ctx?: ConfigContext;
9079
10037
  }) => ModuleType;
9080
- export declare const createClientWithDBServer: ({ url }?: {
10038
+ export declare const createClientWithDBServer: ({ url, fetchRequestInit }: {
9081
10039
  url?: string;
10040
+ fetchRequestInit?: FetchRequestInit;
9082
10041
  }) => DBModuleType;
9083
- export declare const createClientWithWriteDBServer: ({ url, fetchRequestInit }: {
10042
+ export declare const createClientWithIoPayServer: ({ url, fetchRequestInit }: {
9084
10043
  url?: string;
9085
10044
  fetchRequestInit?: FetchRequestInit;
9086
- }) => DBModuleType;
10045
+ }) => IoPayModuleType;
9087
10046
  export declare const createIotexscanClient: ({ url, fetchRequestInit }: {
9088
10047
  url?: string;
9089
10048
  fetchRequestInit?: FetchRequestInit;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var Q=({url:C="http://localhost:9527",ctx:D}={})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{for(let G in b){if(typeof b[G]==="object")b[G]=JSON.stringify(b[G],(H,J)=>typeof J==="bigint"?J.toString():J);if(b[G]==null)delete b[G]}const B=`${C}/${String(F)}/${String(j)}?${new URLSearchParams(b).toString()}`;let z;if(D)z=await fetch(B,{headers:{...D}});else z=await fetch(B);return z.json()}}})}}),S=({url:C="http://localhost:9527"}={})=>new Proxy({},{get(D,K,F){return new Proxy({},{get(N,L){return async(j)=>{for(let z in j){if(typeof j[z]==="object")j[z]=JSON.stringify(j[z],(G,H)=>typeof H==="bigint"?H.toString():H);if(j[z]==null)delete j[z]}const b=`${C}/${String(K)}/${String(L)}?${new URLSearchParams(j).toString()}`;return(await fetch(b)).json()}}})}}),U=({url:C="http://localhost:9527",fetchRequestInit:D})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{const B=`${C}/${String(F)}/${String(j)}`;return(await fetch(B,{method:"POST",...D,body:JSON.stringify(b)})).json()}}})}}),V=({url:C="http://localhost:9527",fetchRequestInit:D})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{const B=`${C}/${String(F)}/${String(j)}?${new URLSearchParams(b).toString()}`;return(await fetch(B,{method:"GET",...D})).json()}}})}}),W=({url:C="http://localhost:9527",ctx:D}={})=>new Proxy({},{get(K,F,N){return new Proxy({},{get(L,j){return async(b)=>{let B=!1;for(let J in b){if(typeof b[J]==="object")B=!0;if(b[J]==null)delete b[J]}let z,G,H={};if(B)z=`${C}/${String(F)}/${String(j)}`;else z=`${C}/${String(F)}/${String(j)}?${new URLSearchParams(b).toString()}`;if(D)H.headers={...D};if(B)H.method="POST",H.body=JSON.stringify(b);return G=await fetch(z,H),G.json()}}})}});export{V as createIotexscanClient,W as createIoidClient,U as createClientWithWriteDBServer,S as createClientWithDBServer,Q as createClient};
1
+ var K=({url:w="http://localhost:9527",ctx:A}={})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{for(let z in j){if(typeof j[z]==="object")j[z]=JSON.stringify(j[z],(G,D)=>typeof D==="bigint"?D.toString():D);if(j[z]==null)delete j[z]}const $=`${w}/${String(C)}/${String(E)}?${new URLSearchParams(j).toString()}`;let J;if(A)J=await fetch($,{headers:{...A}});else J=await fetch($);return J.json()}}})}}),H=async({args:w={},prop:A,method:B,url:C,fetchRequestInit:T})=>{if(!T?.method||T?.method==="GET"){for(let j in w){if(typeof w[j]==="object")w[j]=JSON.stringify(w[j],($,J)=>typeof J==="bigint"?J.toString():J);if(w[j]==null)delete w[j]}const b=`${C}/${String(A)}/${String(B)}?${new URLSearchParams(w).toString()}`;return(await fetch(b)).json()}if(T?.method==="POST"){const b=`${C}/${String(A)}/${String(B)}`;return(await fetch(b,{...T,body:JSON.stringify(w)})).json()}},L=({url:w="http://localhost:9527",fetchRequestInit:A})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{return H({args:j,prop:C,method:E,url:w,fetchRequestInit:A})}}})}}),N=({url:w="http://localhost:9527",fetchRequestInit:A})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{return H({args:j,prop:C,method:E,url:w,fetchRequestInit:A})}}})}}),Q=({url:w="http://localhost:9527",fetchRequestInit:A})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{const $=`${w}/${String(C)}/${String(E)}?${new URLSearchParams(j).toString()}`;return(await fetch($,{method:"GET",...A})).json()}}})}}),S=({url:w="http://localhost:9527",ctx:A}={})=>new Proxy({},{get(B,C,T){return new Proxy({},{get(b,E){return async(j)=>{let $=!1;for(let D in j){if(typeof j[D]==="object")$=!0;if(j[D]==null)delete j[D]}let J,z,G={};if($)J=`${w}/${String(C)}/${String(E)}`;else J=`${w}/${String(C)}/${String(E)}?${new URLSearchParams(j).toString()}`;if(A)G.headers={...A};if($)G.method="POST",G.body=JSON.stringify(j);return z=await fetch(J,G),z.json()}}})}});export{Q as createIotexscanClient,S as createIoidClient,N as createClientWithIoPayServer,L as createClientWithDBServer,K 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.1.21",
5
+ "version": "v0.1.22",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -19,6 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
+ "@asteasolutions/zod-to-openapi": "^7.1.1",
22
23
  "@clickhouse/client": "^1.4.0",
23
24
  "@grpc/grpc-js": "^1.11.1",
24
25
  "@grpc/proto-loader": "^0.7.13",
@@ -36,17 +37,23 @@
36
37
  "ethers": "^6.13.2",
37
38
  "graphql-request": "^7.1.0",
38
39
  "ioredis": "^5.4.1",
40
+ "jsonwebtoken": "^9.0.2",
41
+ "lodash": "^4.17.21",
39
42
  "lru-cache": "^11.0.0",
40
43
  "postgres": "^3.4.4",
41
44
  "reflect-metadata": "^0.2.2",
42
45
  "strip-ansi-cjs": "^8.0.0",
43
- "viem": "^2.17.5"
46
+ "utility-types": "^3.11.0",
47
+ "viem": "^2.17.5",
48
+ "zod": "^3.23.8",
49
+ "zod-openapi": "^2.19.0"
44
50
  },
45
51
  "devDependencies": {
46
52
  "@dappworks/kit": "^0.4.198",
47
53
  "@types/bun": "latest",
48
54
  "@types/crypto-js": "^4.2.2",
49
55
  "@types/google-protobuf": "^3.15.12",
56
+ "@types/jsonwebtoken": "^9.0.7",
50
57
  "@types/tryghost__content-api": "^1.3.16",
51
58
  "bun-plugin-dts": "^0.2.3",
52
59
  "grpc-tools": "^1.12.4",