@iotexproject/kit 0.1.96 → 0.1.97
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 +100 -25
- package/package.json +20 -3
package/dist/index.d.ts
CHANGED
|
@@ -6953,6 +6953,12 @@ declare class Staking {
|
|
|
6953
6953
|
getNFTV2BucketByIndex(args: {
|
|
6954
6954
|
token_id: string;
|
|
6955
6955
|
}, ctx?: ConfigContext): Promise<any>;
|
|
6956
|
+
getNFTV3BucketsByIndexes(args: {
|
|
6957
|
+
token_ids: string[];
|
|
6958
|
+
}, ctx?: ConfigContext): Promise<any[]>;
|
|
6959
|
+
getNFTV3BucketByIndex(args: {
|
|
6960
|
+
token_id: string;
|
|
6961
|
+
}, ctx?: ConfigContext): Promise<any>;
|
|
6956
6962
|
createNativeBucket(args: {
|
|
6957
6963
|
candName: string;
|
|
6958
6964
|
amount: string;
|
|
@@ -8663,6 +8669,16 @@ declare class LiquidityMiningV3 {
|
|
|
8663
8669
|
chainId: string;
|
|
8664
8670
|
}>;
|
|
8665
8671
|
}
|
|
8672
|
+
declare class UseCommon {
|
|
8673
|
+
constructor();
|
|
8674
|
+
emailSubscribe(args: {
|
|
8675
|
+
email: string;
|
|
8676
|
+
audience_Id: string;
|
|
8677
|
+
first_name?: string;
|
|
8678
|
+
last_name?: string;
|
|
8679
|
+
unsubscribed?: boolean;
|
|
8680
|
+
}): Promise<any>;
|
|
8681
|
+
}
|
|
8666
8682
|
declare const modules: {
|
|
8667
8683
|
mimo: Mimo;
|
|
8668
8684
|
staking: Staking;
|
|
@@ -8676,6 +8692,7 @@ declare const modules: {
|
|
|
8676
8692
|
bondingcurve: BondingCurve;
|
|
8677
8693
|
liquidityMining: LiquidityMining;
|
|
8678
8694
|
liquidityMiningV3: LiquidityMiningV3;
|
|
8695
|
+
common: UseCommon;
|
|
8679
8696
|
};
|
|
8680
8697
|
export type ModuleType = typeof modules;
|
|
8681
8698
|
declare class ClickHouseSDK {
|
|
@@ -8731,45 +8748,45 @@ declare class Account extends BaseDBModule {
|
|
|
8731
8748
|
}
|
|
8732
8749
|
declare class Analyzer extends BaseDBModule {
|
|
8733
8750
|
tvl(): Promise<any>;
|
|
8734
|
-
dailyTvl({ start_date, end_date }?: {
|
|
8751
|
+
dailyTvl({ start_date, end_date, }?: {
|
|
8735
8752
|
start_date?: string;
|
|
8736
8753
|
end_date?: string;
|
|
8737
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8754
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8738
8755
|
contractCount(): Promise<any>;
|
|
8739
8756
|
totalStakedIotx(): Promise<any>;
|
|
8740
|
-
activeWalletCount({ start_date, end_date }?: {
|
|
8757
|
+
activeWalletCount({ start_date, end_date, }?: {
|
|
8741
8758
|
start_date?: string;
|
|
8742
8759
|
end_date?: string;
|
|
8743
8760
|
}): Promise<any>;
|
|
8744
|
-
dailyTxCount({ start_date, end_date }?: {
|
|
8761
|
+
dailyTxCount({ start_date, end_date, }?: {
|
|
8745
8762
|
start_date?: string;
|
|
8746
8763
|
end_date?: string;
|
|
8747
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8748
|
-
dailyAvgTps({ start_date, end_date }?: {
|
|
8764
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8765
|
+
dailyAvgTps({ start_date, end_date, }?: {
|
|
8749
8766
|
start_date?: string;
|
|
8750
8767
|
end_date?: string;
|
|
8751
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8752
|
-
dailyPeakTps({ start_date, end_date }?: {
|
|
8768
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8769
|
+
dailyPeakTps({ start_date, end_date, }?: {
|
|
8753
8770
|
start_date?: string;
|
|
8754
8771
|
end_date?: string;
|
|
8755
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8756
|
-
avgDailyTxVolume({ start_date, end_date }?: {
|
|
8772
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8773
|
+
avgDailyTxVolume({ start_date, end_date, }?: {
|
|
8757
8774
|
start_date?: string;
|
|
8758
8775
|
end_date?: string;
|
|
8759
8776
|
}): Promise<any>;
|
|
8760
|
-
sumGasFee({ start_date, end_date }?: {
|
|
8777
|
+
sumGasFee({ start_date, end_date, }?: {
|
|
8761
8778
|
start_date?: string;
|
|
8762
8779
|
end_date?: string;
|
|
8763
8780
|
}): Promise<any>;
|
|
8764
|
-
sumGasFeeIotx({ start_date, end_date }?: {
|
|
8781
|
+
sumGasFeeIotx({ start_date, end_date, }?: {
|
|
8765
8782
|
start_date?: string;
|
|
8766
8783
|
end_date?: string;
|
|
8767
8784
|
}): Promise<any>;
|
|
8768
|
-
avgGasFee({ start_date, end_date }?: {
|
|
8785
|
+
avgGasFee({ start_date, end_date, }?: {
|
|
8769
8786
|
start_date?: string;
|
|
8770
8787
|
end_date?: string;
|
|
8771
8788
|
}): Promise<any>;
|
|
8772
|
-
avgGasFeeIotx({ start_date, end_date }?: {
|
|
8789
|
+
avgGasFeeIotx({ start_date, end_date, }?: {
|
|
8773
8790
|
start_date?: string;
|
|
8774
8791
|
end_date?: string;
|
|
8775
8792
|
}): Promise<any>;
|
|
@@ -8777,20 +8794,20 @@ declare class Analyzer extends BaseDBModule {
|
|
|
8777
8794
|
dappsCount(): Promise<any>;
|
|
8778
8795
|
totalCrossChainTxCount(): Promise<number>;
|
|
8779
8796
|
nftContractCount(): Promise<any>;
|
|
8780
|
-
dailyStakingRatio({ start_date, end_date }?: {
|
|
8797
|
+
dailyStakingRatio({ start_date, end_date, }?: {
|
|
8781
8798
|
start_date?: string;
|
|
8782
8799
|
end_date?: string;
|
|
8783
8800
|
}): Promise<{
|
|
8784
8801
|
date_time: string;
|
|
8785
8802
|
}[]>;
|
|
8786
|
-
dailyIoTexHolder({ start_date, end_date }?: {
|
|
8803
|
+
dailyIoTexHolder({ start_date, end_date, }?: {
|
|
8787
8804
|
start_date?: string;
|
|
8788
8805
|
end_date?: string;
|
|
8789
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8790
|
-
avgStakingDurationHistory({ start_date, end_date }?: {
|
|
8806
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8807
|
+
avgStakingDurationHistory({ start_date, end_date, }?: {
|
|
8791
8808
|
start_date?: string;
|
|
8792
8809
|
end_date?: string;
|
|
8793
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8810
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8794
8811
|
burned_iotx(): Promise<string>;
|
|
8795
8812
|
chain_meta(): Promise<{
|
|
8796
8813
|
height: any;
|
|
@@ -8805,7 +8822,8 @@ declare class Analyzer extends BaseDBModule {
|
|
|
8805
8822
|
block_height?: number | string;
|
|
8806
8823
|
start_block?: number | string;
|
|
8807
8824
|
end_block?: number | string;
|
|
8808
|
-
}): Promise<postgres.Row | postgres.RowList<postgres.Row[]>>;
|
|
8825
|
+
}): Promise<import("postgres").Row | import("postgres").RowList<import("postgres").Row[]>>;
|
|
8826
|
+
worker_metrics(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8809
8827
|
}
|
|
8810
8828
|
export interface ItemNFT {
|
|
8811
8829
|
collection: string;
|
|
@@ -8999,6 +9017,10 @@ declare class Mimo$1 extends BaseDBModule {
|
|
|
8999
9017
|
v2_token_price({ token }: {
|
|
9000
9018
|
token: string;
|
|
9001
9019
|
}): Promise<any>;
|
|
9020
|
+
v3_token_price({ token }: {
|
|
9021
|
+
token: string;
|
|
9022
|
+
}): Promise<any>;
|
|
9023
|
+
v3_pool_trade_rank(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
9002
9024
|
}
|
|
9003
9025
|
declare class Galxe extends BaseDBModule {
|
|
9004
9026
|
nft_holder({ contract, address }: {
|
|
@@ -9145,6 +9167,7 @@ export type Proposal = {
|
|
|
9145
9167
|
votes?: Vote[];
|
|
9146
9168
|
currentUser?: CurrentUser;
|
|
9147
9169
|
slug: string;
|
|
9170
|
+
vote_count?: string | null;
|
|
9148
9171
|
};
|
|
9149
9172
|
export type CurrentUser = {
|
|
9150
9173
|
voter?: string;
|
|
@@ -10268,7 +10291,7 @@ declare const modules$3: {
|
|
|
10268
10291
|
ioid: Ioid;
|
|
10269
10292
|
};
|
|
10270
10293
|
export type IoIDModuleType = typeof modules$3;
|
|
10271
|
-
declare class
|
|
10294
|
+
declare class Auth {
|
|
10272
10295
|
checkAuth(token: string): Promise<{
|
|
10273
10296
|
ok: boolean;
|
|
10274
10297
|
message: string;
|
|
@@ -10280,6 +10303,8 @@ declare class Point {
|
|
|
10280
10303
|
sub: string;
|
|
10281
10304
|
};
|
|
10282
10305
|
}>;
|
|
10306
|
+
}
|
|
10307
|
+
declare class Point extends Auth {
|
|
10283
10308
|
upload_event({ action_id, device_id, }: {
|
|
10284
10309
|
action_id: number;
|
|
10285
10310
|
device_id: string;
|
|
@@ -10378,20 +10403,70 @@ declare class Point {
|
|
|
10378
10403
|
error?: undefined;
|
|
10379
10404
|
}>;
|
|
10380
10405
|
}
|
|
10381
|
-
|
|
10382
|
-
|
|
10406
|
+
export type UserFeedBackParams = {
|
|
10407
|
+
content: string;
|
|
10408
|
+
email: string;
|
|
10409
|
+
address: string;
|
|
10410
|
+
images: string;
|
|
10411
|
+
version: string;
|
|
10412
|
+
platform: string;
|
|
10413
|
+
};
|
|
10414
|
+
declare class IoPay$1 extends Auth {
|
|
10415
|
+
private queryTokenFromDB;
|
|
10383
10416
|
queryKlineData(args: {
|
|
10384
|
-
|
|
10417
|
+
id: string;
|
|
10418
|
+
platform: string;
|
|
10419
|
+
contract?: string;
|
|
10385
10420
|
start: string;
|
|
10386
10421
|
end: string;
|
|
10387
10422
|
}): Promise<any>;
|
|
10388
10423
|
queryTokenPrice(args: {
|
|
10389
|
-
|
|
10424
|
+
id: string;
|
|
10425
|
+
platform: string;
|
|
10426
|
+
contract?: string;
|
|
10390
10427
|
}): Promise<any>;
|
|
10428
|
+
private queryPriceFromBinance;
|
|
10429
|
+
private queryPriceFromCoinGecko;
|
|
10391
10430
|
queryQuestions({ symbol, lang }: {
|
|
10392
10431
|
symbol: string;
|
|
10393
10432
|
lang?: string;
|
|
10394
10433
|
}): Promise<string[]>;
|
|
10434
|
+
queryTokenList({ platform }: {
|
|
10435
|
+
platform?: string;
|
|
10436
|
+
}): Promise<never[] | postgres.RowList<postgres.Row[]>>;
|
|
10437
|
+
userFeedBack(params: UserFeedBackParams, ctx?: {
|
|
10438
|
+
authData?: {
|
|
10439
|
+
sub: string;
|
|
10440
|
+
};
|
|
10441
|
+
}): Promise<{
|
|
10442
|
+
status: number;
|
|
10443
|
+
error: string;
|
|
10444
|
+
content?: undefined;
|
|
10445
|
+
email?: undefined;
|
|
10446
|
+
address?: undefined;
|
|
10447
|
+
images?: undefined;
|
|
10448
|
+
version?: undefined;
|
|
10449
|
+
platform?: undefined;
|
|
10450
|
+
} | {
|
|
10451
|
+
error: string;
|
|
10452
|
+
status?: undefined;
|
|
10453
|
+
content?: undefined;
|
|
10454
|
+
email?: undefined;
|
|
10455
|
+
address?: undefined;
|
|
10456
|
+
images?: undefined;
|
|
10457
|
+
version?: undefined;
|
|
10458
|
+
platform?: undefined;
|
|
10459
|
+
} | {
|
|
10460
|
+
content: string;
|
|
10461
|
+
email: string;
|
|
10462
|
+
address: string;
|
|
10463
|
+
images: string;
|
|
10464
|
+
version: string;
|
|
10465
|
+
platform: string;
|
|
10466
|
+
status?: undefined;
|
|
10467
|
+
error?: undefined;
|
|
10468
|
+
}>;
|
|
10469
|
+
sendLarkBotMessage(content: string): Promise<void>;
|
|
10395
10470
|
}
|
|
10396
10471
|
declare const modules$4: {
|
|
10397
10472
|
point: Point;
|
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.97",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -11,23 +11,34 @@
|
|
|
11
11
|
"dev-iopay": "bun run build && bun run --watch server-iopay.ts",
|
|
12
12
|
"dev-iotexscan": "bun server-iotexscan.ts",
|
|
13
13
|
"dev-ioid": "bun run build && bun run --watch server-ioid.ts",
|
|
14
|
+
"dev-goat": "bun run --watch server-goat.ts",
|
|
15
|
+
"dev-goat-gc": "bun --expose-gc run --watch server-goat.ts",
|
|
16
|
+
"dev-tube": "bun run build && bun run --watch server-tube.ts",
|
|
14
17
|
"test": "bun --hot run tests/test-marshalldao.ts",
|
|
15
18
|
"build": "bun run build.mjs",
|
|
16
19
|
"prepublishOnly": "bun run build",
|
|
17
|
-
"gen:grpc": "protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./lib/grpc/generated -I ./lib/grpc/protos ./lib/grpc/protos/*.proto"
|
|
20
|
+
"gen:grpc": "protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./lib/grpc/generated -I ./lib/grpc/protos ./lib/grpc/protos/*.proto",
|
|
21
|
+
"profile:doctor": "./scripts/profile-doctor.sh",
|
|
22
|
+
"profile:memory": "./scripts/profile-memory.sh",
|
|
23
|
+
"profile:cpu": "./scripts/profile-cpu.sh",
|
|
24
|
+
"monitor:metrics": "curl http://localhost:8000/metrics",
|
|
25
|
+
"monitor:health": "curl http://localhost:8000/health/performance",
|
|
26
|
+
"admin:gc": "curl -X POST http://localhost:8000/admin/gc",
|
|
27
|
+
"admin:memory-report": "curl http://localhost:8000/admin/memory-report"
|
|
18
28
|
},
|
|
19
29
|
"files": [
|
|
20
30
|
"dist"
|
|
21
31
|
],
|
|
22
32
|
"dependencies": {
|
|
23
33
|
"@asteasolutions/zod-to-openapi": "^7.1.1",
|
|
24
|
-
"@clickhouse/client": "^1.
|
|
34
|
+
"@clickhouse/client": "^1.11.2",
|
|
25
35
|
"@faker-js/faker": "^9.3.0",
|
|
26
36
|
"@grpc/grpc-js": "^1.11.1",
|
|
27
37
|
"@grpc/proto-loader": "^0.7.13",
|
|
28
38
|
"@hyperdx/node-opentelemetry": "^0.8.1",
|
|
29
39
|
"@iotexproject/iotex-address-ts": "^1.0.4",
|
|
30
40
|
"@noble/curves": "^1.6.0",
|
|
41
|
+
"@scalar/hono-api-reference": "^0.9.9",
|
|
31
42
|
"@tokenbound/sdk": "^0.5.5",
|
|
32
43
|
"@tryghost/content-api": "^1.11.21",
|
|
33
44
|
"@types/bn.js": "^5.1.6",
|
|
@@ -40,7 +51,9 @@
|
|
|
40
51
|
"bech32": "^2.0.0",
|
|
41
52
|
"bentocache": "^1.0.0-beta.9",
|
|
42
53
|
"bignumber.js": "^9.1.2",
|
|
54
|
+
"bs58": "^6.0.0",
|
|
43
55
|
"clickhouse": "^2.6.0",
|
|
56
|
+
"clinic": "^13.0.0",
|
|
44
57
|
"crypto-js": "^4.2.0",
|
|
45
58
|
"dataloader": "^2.2.2",
|
|
46
59
|
"dayjs": "^1.11.12",
|
|
@@ -59,12 +72,14 @@
|
|
|
59
72
|
"kafkajs": "^2.2.4",
|
|
60
73
|
"lodash": "^4.17.21",
|
|
61
74
|
"lru-cache": "^11.0.0",
|
|
75
|
+
"memwatch-next": "^0.3.0",
|
|
62
76
|
"number-to-bn": "^1.7.0",
|
|
63
77
|
"p-retry": "^6.2.1",
|
|
64
78
|
"p-timeout": "^6.1.3",
|
|
65
79
|
"pg": "^8.13.1",
|
|
66
80
|
"pg-format": "^1.0.4",
|
|
67
81
|
"postgres": "^3.4.4",
|
|
82
|
+
"prom-client": "^15.1.3",
|
|
68
83
|
"reflect-metadata": "^0.2.2",
|
|
69
84
|
"siwe": "^3.0.0",
|
|
70
85
|
"strip-ansi-cjs": "^8.0.0",
|
|
@@ -82,10 +97,12 @@
|
|
|
82
97
|
"@types/crypto-js": "^4.2.2",
|
|
83
98
|
"@types/google-protobuf": "^3.15.12",
|
|
84
99
|
"@types/jsonwebtoken": "^9.0.7",
|
|
100
|
+
"@types/memwatch-next": "^0.3.6",
|
|
85
101
|
"@types/pg": "^8.11.10",
|
|
86
102
|
"@types/pg-format": "^1.0.5",
|
|
87
103
|
"@types/tryghost__content-api": "^1.3.16",
|
|
88
104
|
"@types/underscore": "^1.11.15",
|
|
105
|
+
"autocannon": "^8.0.0",
|
|
89
106
|
"bun-plugin-dts": "^0.2.3",
|
|
90
107
|
"drizzle-kit": "^0.30.1",
|
|
91
108
|
"grpc-tools": "^1.12.4",
|