@iotexproject/kit 0.1.76 → 0.1.78
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 +66 -9
- package/dist/index.js +1 -1
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
|
@@ -6598,7 +6598,7 @@ declare class MSP {
|
|
|
6598
6598
|
} | null>;
|
|
6599
6599
|
totalMSPRewards(args: {
|
|
6600
6600
|
account?: `0x${string}`;
|
|
6601
|
-
}, ctx?: ConfigContext): Promise<
|
|
6601
|
+
}, ctx?: ConfigContext): Promise<{
|
|
6602
6602
|
totalBucketRewards: {
|
|
6603
6603
|
rewards: number;
|
|
6604
6604
|
rewardsUSD: number;
|
|
@@ -8738,6 +8738,16 @@ declare class Analyzer extends BaseDBModule {
|
|
|
8738
8738
|
start_date?: string;
|
|
8739
8739
|
end_date?: string;
|
|
8740
8740
|
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8741
|
+
burned_iotx(): Promise<string>;
|
|
8742
|
+
chain_meta(): Promise<{
|
|
8743
|
+
height: any;
|
|
8744
|
+
numberActions: any;
|
|
8745
|
+
tps: any;
|
|
8746
|
+
epoch: {
|
|
8747
|
+
num: any;
|
|
8748
|
+
height: any;
|
|
8749
|
+
};
|
|
8750
|
+
}>;
|
|
8741
8751
|
}
|
|
8742
8752
|
export interface ItemNFT {
|
|
8743
8753
|
collection: string;
|
|
@@ -8887,10 +8897,6 @@ export type TopicNewsletterRegisterProps = {
|
|
|
8887
8897
|
};
|
|
8888
8898
|
declare class IoPay extends BaseDBModule {
|
|
8889
8899
|
get_point_task(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8890
|
-
get_single_point_task_tg({ project_id, action_id }: {
|
|
8891
|
-
project_id: number;
|
|
8892
|
-
action_id: number;
|
|
8893
|
-
}): Promise<never[] | import("postgres").RowList<import("postgres").Row[]>>;
|
|
8894
8900
|
get_point_task_tg(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8895
8901
|
pushRegister(args: PushRegisterProps): Promise<any>;
|
|
8896
8902
|
topicNewsletterRegister(args: TopicNewsletterRegisterProps): Promise<any>;
|
|
@@ -8932,6 +8938,9 @@ declare class Mimo$1 extends BaseDBModule {
|
|
|
8932
8938
|
usdAmount: string;
|
|
8933
8939
|
exceed: boolean;
|
|
8934
8940
|
}>;
|
|
8941
|
+
v2_token_price({ token }: {
|
|
8942
|
+
token: string;
|
|
8943
|
+
}): Promise<any>;
|
|
8935
8944
|
}
|
|
8936
8945
|
declare class Galxe extends BaseDBModule {
|
|
8937
8946
|
nft_holder({ contract, address }: {
|
|
@@ -8958,6 +8967,13 @@ declare class DepinScan extends BaseDBModule {
|
|
|
8958
8967
|
market_cap: any;
|
|
8959
8968
|
total_device: any;
|
|
8960
8969
|
}[]>;
|
|
8970
|
+
explorer_v2(): Promise<{
|
|
8971
|
+
date: string;
|
|
8972
|
+
volume: string;
|
|
8973
|
+
market_cap: string;
|
|
8974
|
+
total_device: string;
|
|
8975
|
+
total_projects: string;
|
|
8976
|
+
}>;
|
|
8961
8977
|
}
|
|
8962
8978
|
declare class Verification {
|
|
8963
8979
|
checkVerification({ type, text }: {
|
|
@@ -8976,6 +8992,18 @@ declare class Verification {
|
|
|
8976
8992
|
message: string;
|
|
8977
8993
|
}>;
|
|
8978
8994
|
}
|
|
8995
|
+
declare class Apis extends BaseDBModule {
|
|
8996
|
+
apisList(): Promise<{
|
|
8997
|
+
id: string;
|
|
8998
|
+
name: string;
|
|
8999
|
+
}[]>;
|
|
9000
|
+
createApi({ apiId }: {
|
|
9001
|
+
apiId: string;
|
|
9002
|
+
}): Promise<{
|
|
9003
|
+
keyId: string;
|
|
9004
|
+
key: string;
|
|
9005
|
+
}>;
|
|
9006
|
+
}
|
|
8979
9007
|
declare const modules$1: {
|
|
8980
9008
|
account: Account;
|
|
8981
9009
|
analyzer: Analyzer;
|
|
@@ -8990,6 +9018,7 @@ declare const modules$1: {
|
|
|
8990
9018
|
galxe: Galxe;
|
|
8991
9019
|
depinscan: DepinScan;
|
|
8992
9020
|
verification: Verification;
|
|
9021
|
+
apis: Apis;
|
|
8993
9022
|
};
|
|
8994
9023
|
export type DBModuleType = typeof modules$1;
|
|
8995
9024
|
export interface ConfigOptions {
|
|
@@ -9882,9 +9911,8 @@ declare const modules$2: {
|
|
|
9882
9911
|
message: string;
|
|
9883
9912
|
}>;
|
|
9884
9913
|
};
|
|
9885
|
-
readonly
|
|
9914
|
+
readonly gastracker: {
|
|
9886
9915
|
gasestimate: any;
|
|
9887
|
-
gasoracle: any;
|
|
9888
9916
|
dailyavggaslimit: KitModuleFunction<import("zod").ZodObject<{
|
|
9889
9917
|
startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
9890
9918
|
enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
@@ -9933,6 +9961,35 @@ declare const modules$2: {
|
|
|
9933
9961
|
enddate: string;
|
|
9934
9962
|
sort?: "asc" | "desc" | undefined;
|
|
9935
9963
|
}>, import("zod").ZodAny, any>;
|
|
9964
|
+
gasoracle: KitModuleFunction<import("zod").AnyZodObject, import("zod").ZodObject<{
|
|
9965
|
+
LastBlock: import("zod").ZodString;
|
|
9966
|
+
SafeGasPrice: import("zod").ZodString;
|
|
9967
|
+
ProposeGasPrice: import("zod").ZodString;
|
|
9968
|
+
FastGasPrice: import("zod").ZodString;
|
|
9969
|
+
suggestBaseFee: import("zod").ZodString;
|
|
9970
|
+
gasUsedRatio: import("zod").ZodString;
|
|
9971
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
9972
|
+
LastBlock: string;
|
|
9973
|
+
SafeGasPrice: string;
|
|
9974
|
+
ProposeGasPrice: string;
|
|
9975
|
+
FastGasPrice: string;
|
|
9976
|
+
suggestBaseFee: string;
|
|
9977
|
+
gasUsedRatio: string;
|
|
9978
|
+
}, {
|
|
9979
|
+
LastBlock: string;
|
|
9980
|
+
SafeGasPrice: string;
|
|
9981
|
+
ProposeGasPrice: string;
|
|
9982
|
+
FastGasPrice: string;
|
|
9983
|
+
suggestBaseFee: string;
|
|
9984
|
+
gasUsedRatio: string;
|
|
9985
|
+
}>, {
|
|
9986
|
+
LastBlock: string;
|
|
9987
|
+
SafeGasPrice: string;
|
|
9988
|
+
ProposeGasPrice: string;
|
|
9989
|
+
FastGasPrice: string;
|
|
9990
|
+
suggestBaseFee: string;
|
|
9991
|
+
gasUsedRatio: any;
|
|
9992
|
+
}>;
|
|
9936
9993
|
analyzer: ReturnType<typeof import("postgres")>;
|
|
9937
9994
|
scout: ReturnType<typeof import("postgres")>;
|
|
9938
9995
|
superbase: ReturnType<typeof import("postgres")>;
|
|
@@ -10084,7 +10141,7 @@ declare class Point {
|
|
|
10084
10141
|
}>;
|
|
10085
10142
|
fetch_tasks({ user_id }: {
|
|
10086
10143
|
user_id: string;
|
|
10087
|
-
}): Promise<
|
|
10144
|
+
}): Promise<postgres.Row[] | {
|
|
10088
10145
|
status: number;
|
|
10089
10146
|
error: string;
|
|
10090
10147
|
}>;
|
|
@@ -10094,7 +10151,7 @@ declare class Point {
|
|
|
10094
10151
|
}): Promise<{
|
|
10095
10152
|
ok: boolean;
|
|
10096
10153
|
error: string;
|
|
10097
|
-
points:
|
|
10154
|
+
points: number;
|
|
10098
10155
|
} | {
|
|
10099
10156
|
status: number;
|
|
10100
10157
|
error: string;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var U=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{for(let K in b){if(typeof b[K]==="object")b[K]=JSON.stringify(b[K],(Q,N)=>typeof N==="bigint"?N.toString():N);if(b[K]==null)delete b[K]}
|
|
1
|
+
var U=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{for(let K in b){if(typeof b[K]==="object")b[K]=JSON.stringify(b[K],(Q,N)=>typeof N==="bigint"?N.toString():N);if(b[K]==null)delete b[K]}let H=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`,D;if(z)D=await fetch(H,{headers:{...z}});else D=await fetch(H);return D.json()}}})}}),S=async({args:j={},prop:z,method:L,url:B,fetchRequestInit:G})=>{if(!G?.method||G?.method==="GET"){for(let b in j){if(typeof j[b]==="object")j[b]=JSON.stringify(j[b],(H,D)=>typeof D==="bigint"?D.toString():D);if(j[b]==null)delete j[b]}let J=`${B}/${String(z)}/${String(L)}?${new URLSearchParams(j).toString()}`;return(await fetch(J,{...G})).json()}if(G?.method==="POST"){let J=`${B}/${String(z)}/${String(L)}`;return(await fetch(J,{...G,body:JSON.stringify(j)})).json()}},V=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{return S({args:b,prop:B,method:C,url:j,fetchRequestInit:z})}}})}}),W=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{return S({args:b,prop:B,method:C,url:j,fetchRequestInit:z})}}})}}),X=({url:j="http://localhost:9527",fetchRequestInit:z})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{let H=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;return(await fetch(H,{method:"GET",...z})).json()}}})}}),Y=({url:j="http://localhost:9527",ctx:z}={})=>new Proxy({},{get(L,B,G){return new Proxy({},{get(J,C){return async(b)=>{let H=!1;for(let N in b){if(typeof b[N]==="object")H=!0;if(b[N]==null)delete b[N]}let D,K,Q={};if(H)D=`${j}/${String(B)}/${String(C)}`;else D=`${j}/${String(B)}/${String(C)}?${new URLSearchParams(b).toString()}`;if(z)Q.headers={...z};if(H)Q.method="POST",Q.body=JSON.stringify(b);return K=await fetch(D,Q),K.json()}}})}});export{X as createIotexscanClient,Y as createIoidClient,W as createClientWithIoPayServer,V as createClientWithDBServer,U 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": "0.1.
|
|
5
|
+
"version": "0.1.78",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@asteasolutions/zod-to-openapi": "^7.1.1",
|
|
23
23
|
"@clickhouse/client": "^1.4.0",
|
|
24
|
+
"@faker-js/faker": "^9.3.0",
|
|
24
25
|
"@grpc/grpc-js": "^1.11.1",
|
|
25
26
|
"@grpc/proto-loader": "^0.7.13",
|
|
26
27
|
"@hyperdx/node-opentelemetry": "^0.8.1",
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
"dayjs": "^1.11.12",
|
|
43
44
|
"dotenv": "^16.4.7",
|
|
44
45
|
"drizzle-orm": "^0.38.2",
|
|
46
|
+
"ethereumjs-util": "^7.1.5",
|
|
45
47
|
"ethers": "^6.13.2",
|
|
46
48
|
"firebase-admin": "^12.6.0",
|
|
47
49
|
"graphql-request": "^7.1.0",
|
|
@@ -56,13 +58,15 @@
|
|
|
56
58
|
"number-to-bn": "^1.7.0",
|
|
57
59
|
"p-timeout": "^6.1.3",
|
|
58
60
|
"pg": "^8.13.1",
|
|
61
|
+
"pg-format": "^1.0.4",
|
|
59
62
|
"postgres": "^3.4.4",
|
|
60
63
|
"reflect-metadata": "^0.2.2",
|
|
61
64
|
"strip-ansi-cjs": "^8.0.0",
|
|
62
65
|
"underscore": "^1.13.7",
|
|
63
66
|
"utf8": "^3.0.0",
|
|
64
67
|
"utility-types": "^3.11.0",
|
|
65
|
-
"viem": "^2.
|
|
68
|
+
"viem": "^2.21.60",
|
|
69
|
+
"web3": "^4.16.0",
|
|
66
70
|
"zod": "^3.23.8",
|
|
67
71
|
"zod-openapi": "^2.19.0"
|
|
68
72
|
},
|
|
@@ -73,6 +77,7 @@
|
|
|
73
77
|
"@types/google-protobuf": "^3.15.12",
|
|
74
78
|
"@types/jsonwebtoken": "^9.0.7",
|
|
75
79
|
"@types/pg": "^8.11.10",
|
|
80
|
+
"@types/pg-format": "^1.0.5",
|
|
76
81
|
"@types/tryghost__content-api": "^1.3.16",
|
|
77
82
|
"@types/underscore": "^1.11.15",
|
|
78
83
|
"bun-plugin-dts": "^0.2.3",
|