@iotexproject/kit 0.1.77 → 0.1.79
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 +109 -8
- package/dist/index.js +1 -1
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
|
@@ -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,62 @@ 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, message, signature }: {
|
|
9001
|
+
apiId: string;
|
|
9002
|
+
message: string;
|
|
9003
|
+
signature: string;
|
|
9004
|
+
}): Promise<{
|
|
9005
|
+
keyId: string;
|
|
9006
|
+
key: string;
|
|
9007
|
+
}>;
|
|
9008
|
+
getApiKeysByExternalId({ apiId, externalId }: {
|
|
9009
|
+
apiId: string;
|
|
9010
|
+
externalId: string;
|
|
9011
|
+
}): Promise<{
|
|
9012
|
+
keys: {
|
|
9013
|
+
"id": string;
|
|
9014
|
+
"start": string;
|
|
9015
|
+
"workspaceId": string;
|
|
9016
|
+
"apiId": string;
|
|
9017
|
+
"name": string;
|
|
9018
|
+
"ownerId": string;
|
|
9019
|
+
"meta": {
|
|
9020
|
+
"roles": string[];
|
|
9021
|
+
"stripeCustomerId": string;
|
|
9022
|
+
};
|
|
9023
|
+
"createdAt": number;
|
|
9024
|
+
"updatedAt": number;
|
|
9025
|
+
"expires": number;
|
|
9026
|
+
"remaining": 1000;
|
|
9027
|
+
"refill": {
|
|
9028
|
+
"interval": string;
|
|
9029
|
+
"amount": number;
|
|
9030
|
+
"refillDay": number;
|
|
9031
|
+
};
|
|
9032
|
+
"ratelimit": {
|
|
9033
|
+
"async": boolean;
|
|
9034
|
+
"limit": number;
|
|
9035
|
+
"duration": number;
|
|
9036
|
+
};
|
|
9037
|
+
"roles": string[];
|
|
9038
|
+
"permissions": string[];
|
|
9039
|
+
"enabled": boolean;
|
|
9040
|
+
"plaintext": string;
|
|
9041
|
+
"identity": {
|
|
9042
|
+
"id": string;
|
|
9043
|
+
"externalId": string;
|
|
9044
|
+
"meta": {};
|
|
9045
|
+
};
|
|
9046
|
+
}[];
|
|
9047
|
+
cursor: string;
|
|
9048
|
+
total: number;
|
|
9049
|
+
}>;
|
|
9050
|
+
}
|
|
8979
9051
|
declare const modules$1: {
|
|
8980
9052
|
account: Account;
|
|
8981
9053
|
analyzer: Analyzer;
|
|
@@ -8990,6 +9062,7 @@ declare const modules$1: {
|
|
|
8990
9062
|
galxe: Galxe;
|
|
8991
9063
|
depinscan: DepinScan;
|
|
8992
9064
|
verification: Verification;
|
|
9065
|
+
apis: Apis;
|
|
8993
9066
|
};
|
|
8994
9067
|
export type DBModuleType = typeof modules$1;
|
|
8995
9068
|
export interface ConfigOptions {
|
|
@@ -9882,9 +9955,8 @@ declare const modules$2: {
|
|
|
9882
9955
|
message: string;
|
|
9883
9956
|
}>;
|
|
9884
9957
|
};
|
|
9885
|
-
readonly
|
|
9958
|
+
readonly gastracker: {
|
|
9886
9959
|
gasestimate: any;
|
|
9887
|
-
gasoracle: any;
|
|
9888
9960
|
dailyavggaslimit: KitModuleFunction<import("zod").ZodObject<{
|
|
9889
9961
|
startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
9890
9962
|
enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
@@ -9933,6 +10005,35 @@ declare const modules$2: {
|
|
|
9933
10005
|
enddate: string;
|
|
9934
10006
|
sort?: "asc" | "desc" | undefined;
|
|
9935
10007
|
}>, import("zod").ZodAny, any>;
|
|
10008
|
+
gasoracle: KitModuleFunction<import("zod").AnyZodObject, import("zod").ZodObject<{
|
|
10009
|
+
LastBlock: import("zod").ZodString;
|
|
10010
|
+
SafeGasPrice: import("zod").ZodString;
|
|
10011
|
+
ProposeGasPrice: import("zod").ZodString;
|
|
10012
|
+
FastGasPrice: import("zod").ZodString;
|
|
10013
|
+
suggestBaseFee: import("zod").ZodString;
|
|
10014
|
+
gasUsedRatio: import("zod").ZodString;
|
|
10015
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
10016
|
+
LastBlock: string;
|
|
10017
|
+
SafeGasPrice: string;
|
|
10018
|
+
ProposeGasPrice: string;
|
|
10019
|
+
FastGasPrice: string;
|
|
10020
|
+
suggestBaseFee: string;
|
|
10021
|
+
gasUsedRatio: string;
|
|
10022
|
+
}, {
|
|
10023
|
+
LastBlock: string;
|
|
10024
|
+
SafeGasPrice: string;
|
|
10025
|
+
ProposeGasPrice: string;
|
|
10026
|
+
FastGasPrice: string;
|
|
10027
|
+
suggestBaseFee: string;
|
|
10028
|
+
gasUsedRatio: string;
|
|
10029
|
+
}>, {
|
|
10030
|
+
LastBlock: string;
|
|
10031
|
+
SafeGasPrice: string;
|
|
10032
|
+
ProposeGasPrice: string;
|
|
10033
|
+
FastGasPrice: string;
|
|
10034
|
+
suggestBaseFee: string;
|
|
10035
|
+
gasUsedRatio: any;
|
|
10036
|
+
}>;
|
|
9936
10037
|
analyzer: ReturnType<typeof import("postgres")>;
|
|
9937
10038
|
scout: ReturnType<typeof import("postgres")>;
|
|
9938
10039
|
superbase: ReturnType<typeof import("postgres")>;
|
|
@@ -10084,7 +10185,7 @@ declare class Point {
|
|
|
10084
10185
|
}>;
|
|
10085
10186
|
fetch_tasks({ user_id }: {
|
|
10086
10187
|
user_id: string;
|
|
10087
|
-
}): Promise<
|
|
10188
|
+
}): Promise<postgres.Row[] | {
|
|
10088
10189
|
status: number;
|
|
10089
10190
|
error: string;
|
|
10090
10191
|
}>;
|
|
@@ -10094,7 +10195,7 @@ declare class Point {
|
|
|
10094
10195
|
}): Promise<{
|
|
10095
10196
|
ok: boolean;
|
|
10096
10197
|
error: string;
|
|
10097
|
-
points:
|
|
10198
|
+
points: number;
|
|
10098
10199
|
} | {
|
|
10099
10200
|
status: number;
|
|
10100
10201
|
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.79",
|
|
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",
|
|
@@ -57,13 +58,16 @@
|
|
|
57
58
|
"number-to-bn": "^1.7.0",
|
|
58
59
|
"p-timeout": "^6.1.3",
|
|
59
60
|
"pg": "^8.13.1",
|
|
61
|
+
"pg-format": "^1.0.4",
|
|
60
62
|
"postgres": "^3.4.4",
|
|
61
63
|
"reflect-metadata": "^0.2.2",
|
|
64
|
+
"siwe": "^3.0.0",
|
|
62
65
|
"strip-ansi-cjs": "^8.0.0",
|
|
63
66
|
"underscore": "^1.13.7",
|
|
64
67
|
"utf8": "^3.0.0",
|
|
65
68
|
"utility-types": "^3.11.0",
|
|
66
|
-
"viem": "^2.
|
|
69
|
+
"viem": "^2.21.60",
|
|
70
|
+
"web3": "^4.16.0",
|
|
67
71
|
"zod": "^3.23.8",
|
|
68
72
|
"zod-openapi": "^2.19.0"
|
|
69
73
|
},
|
|
@@ -74,6 +78,7 @@
|
|
|
74
78
|
"@types/google-protobuf": "^3.15.12",
|
|
75
79
|
"@types/jsonwebtoken": "^9.0.7",
|
|
76
80
|
"@types/pg": "^8.11.10",
|
|
81
|
+
"@types/pg-format": "^1.0.5",
|
|
77
82
|
"@types/tryghost__content-api": "^1.3.16",
|
|
78
83
|
"@types/underscore": "^1.11.15",
|
|
79
84
|
"bun-plugin-dts": "^0.2.3",
|