@iotexproject/kit 0.1.95 → 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 +109 -25
- package/package.json +20 -3
package/dist/index.d.ts
CHANGED
|
@@ -6935,6 +6935,15 @@ declare class Staking {
|
|
|
6935
6935
|
migrateStake(args: {
|
|
6936
6936
|
bucketIndex: string;
|
|
6937
6937
|
}, ctx?: ConfigContext): Promise<any>;
|
|
6938
|
+
/**
|
|
6939
|
+
* Approve the nftV3StakingContractAddress to transfer the bucket
|
|
6940
|
+
* @param args
|
|
6941
|
+
* @param ctx
|
|
6942
|
+
* @returns approve
|
|
6943
|
+
*/
|
|
6944
|
+
migrateLegacyBucketApprove(args: {
|
|
6945
|
+
bucketIndex: string;
|
|
6946
|
+
}, ctx?: ConfigContext): Promise<any>;
|
|
6938
6947
|
migrateLegacyBucket(args: {
|
|
6939
6948
|
bucketIndex: string;
|
|
6940
6949
|
}, ctx?: ConfigContext): Promise<any>;
|
|
@@ -6944,6 +6953,12 @@ declare class Staking {
|
|
|
6944
6953
|
getNFTV2BucketByIndex(args: {
|
|
6945
6954
|
token_id: string;
|
|
6946
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>;
|
|
6947
6962
|
createNativeBucket(args: {
|
|
6948
6963
|
candName: string;
|
|
6949
6964
|
amount: string;
|
|
@@ -8654,6 +8669,16 @@ declare class LiquidityMiningV3 {
|
|
|
8654
8669
|
chainId: string;
|
|
8655
8670
|
}>;
|
|
8656
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
|
+
}
|
|
8657
8682
|
declare const modules: {
|
|
8658
8683
|
mimo: Mimo;
|
|
8659
8684
|
staking: Staking;
|
|
@@ -8667,6 +8692,7 @@ declare const modules: {
|
|
|
8667
8692
|
bondingcurve: BondingCurve;
|
|
8668
8693
|
liquidityMining: LiquidityMining;
|
|
8669
8694
|
liquidityMiningV3: LiquidityMiningV3;
|
|
8695
|
+
common: UseCommon;
|
|
8670
8696
|
};
|
|
8671
8697
|
export type ModuleType = typeof modules;
|
|
8672
8698
|
declare class ClickHouseSDK {
|
|
@@ -8722,45 +8748,45 @@ declare class Account extends BaseDBModule {
|
|
|
8722
8748
|
}
|
|
8723
8749
|
declare class Analyzer extends BaseDBModule {
|
|
8724
8750
|
tvl(): Promise<any>;
|
|
8725
|
-
dailyTvl({ start_date, end_date }?: {
|
|
8751
|
+
dailyTvl({ start_date, end_date, }?: {
|
|
8726
8752
|
start_date?: string;
|
|
8727
8753
|
end_date?: string;
|
|
8728
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8754
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8729
8755
|
contractCount(): Promise<any>;
|
|
8730
8756
|
totalStakedIotx(): Promise<any>;
|
|
8731
|
-
activeWalletCount({ start_date, end_date }?: {
|
|
8757
|
+
activeWalletCount({ start_date, end_date, }?: {
|
|
8732
8758
|
start_date?: string;
|
|
8733
8759
|
end_date?: string;
|
|
8734
8760
|
}): Promise<any>;
|
|
8735
|
-
dailyTxCount({ start_date, end_date }?: {
|
|
8761
|
+
dailyTxCount({ start_date, end_date, }?: {
|
|
8736
8762
|
start_date?: string;
|
|
8737
8763
|
end_date?: string;
|
|
8738
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8739
|
-
dailyAvgTps({ start_date, end_date }?: {
|
|
8764
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8765
|
+
dailyAvgTps({ start_date, end_date, }?: {
|
|
8740
8766
|
start_date?: string;
|
|
8741
8767
|
end_date?: string;
|
|
8742
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8743
|
-
dailyPeakTps({ start_date, end_date }?: {
|
|
8768
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8769
|
+
dailyPeakTps({ start_date, end_date, }?: {
|
|
8744
8770
|
start_date?: string;
|
|
8745
8771
|
end_date?: string;
|
|
8746
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8747
|
-
avgDailyTxVolume({ start_date, end_date }?: {
|
|
8772
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8773
|
+
avgDailyTxVolume({ start_date, end_date, }?: {
|
|
8748
8774
|
start_date?: string;
|
|
8749
8775
|
end_date?: string;
|
|
8750
8776
|
}): Promise<any>;
|
|
8751
|
-
sumGasFee({ start_date, end_date }?: {
|
|
8777
|
+
sumGasFee({ start_date, end_date, }?: {
|
|
8752
8778
|
start_date?: string;
|
|
8753
8779
|
end_date?: string;
|
|
8754
8780
|
}): Promise<any>;
|
|
8755
|
-
sumGasFeeIotx({ start_date, end_date }?: {
|
|
8781
|
+
sumGasFeeIotx({ start_date, end_date, }?: {
|
|
8756
8782
|
start_date?: string;
|
|
8757
8783
|
end_date?: string;
|
|
8758
8784
|
}): Promise<any>;
|
|
8759
|
-
avgGasFee({ start_date, end_date }?: {
|
|
8785
|
+
avgGasFee({ start_date, end_date, }?: {
|
|
8760
8786
|
start_date?: string;
|
|
8761
8787
|
end_date?: string;
|
|
8762
8788
|
}): Promise<any>;
|
|
8763
|
-
avgGasFeeIotx({ start_date, end_date }?: {
|
|
8789
|
+
avgGasFeeIotx({ start_date, end_date, }?: {
|
|
8764
8790
|
start_date?: string;
|
|
8765
8791
|
end_date?: string;
|
|
8766
8792
|
}): Promise<any>;
|
|
@@ -8768,20 +8794,20 @@ declare class Analyzer extends BaseDBModule {
|
|
|
8768
8794
|
dappsCount(): Promise<any>;
|
|
8769
8795
|
totalCrossChainTxCount(): Promise<number>;
|
|
8770
8796
|
nftContractCount(): Promise<any>;
|
|
8771
|
-
dailyStakingRatio({ start_date, end_date }?: {
|
|
8797
|
+
dailyStakingRatio({ start_date, end_date, }?: {
|
|
8772
8798
|
start_date?: string;
|
|
8773
8799
|
end_date?: string;
|
|
8774
8800
|
}): Promise<{
|
|
8775
8801
|
date_time: string;
|
|
8776
8802
|
}[]>;
|
|
8777
|
-
dailyIoTexHolder({ start_date, end_date }?: {
|
|
8803
|
+
dailyIoTexHolder({ start_date, end_date, }?: {
|
|
8778
8804
|
start_date?: string;
|
|
8779
8805
|
end_date?: string;
|
|
8780
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8781
|
-
avgStakingDurationHistory({ start_date, end_date }?: {
|
|
8806
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8807
|
+
avgStakingDurationHistory({ start_date, end_date, }?: {
|
|
8782
8808
|
start_date?: string;
|
|
8783
8809
|
end_date?: string;
|
|
8784
|
-
}): Promise<postgres.RowList<postgres.Row[]>>;
|
|
8810
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8785
8811
|
burned_iotx(): Promise<string>;
|
|
8786
8812
|
chain_meta(): Promise<{
|
|
8787
8813
|
height: any;
|
|
@@ -8796,7 +8822,8 @@ declare class Analyzer extends BaseDBModule {
|
|
|
8796
8822
|
block_height?: number | string;
|
|
8797
8823
|
start_block?: number | string;
|
|
8798
8824
|
end_block?: number | string;
|
|
8799
|
-
}): 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[]>>;
|
|
8800
8827
|
}
|
|
8801
8828
|
export interface ItemNFT {
|
|
8802
8829
|
collection: string;
|
|
@@ -8990,6 +9017,10 @@ declare class Mimo$1 extends BaseDBModule {
|
|
|
8990
9017
|
v2_token_price({ token }: {
|
|
8991
9018
|
token: string;
|
|
8992
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[]>>;
|
|
8993
9024
|
}
|
|
8994
9025
|
declare class Galxe extends BaseDBModule {
|
|
8995
9026
|
nft_holder({ contract, address }: {
|
|
@@ -9136,6 +9167,7 @@ export type Proposal = {
|
|
|
9136
9167
|
votes?: Vote[];
|
|
9137
9168
|
currentUser?: CurrentUser;
|
|
9138
9169
|
slug: string;
|
|
9170
|
+
vote_count?: string | null;
|
|
9139
9171
|
};
|
|
9140
9172
|
export type CurrentUser = {
|
|
9141
9173
|
voter?: string;
|
|
@@ -10259,7 +10291,7 @@ declare const modules$3: {
|
|
|
10259
10291
|
ioid: Ioid;
|
|
10260
10292
|
};
|
|
10261
10293
|
export type IoIDModuleType = typeof modules$3;
|
|
10262
|
-
declare class
|
|
10294
|
+
declare class Auth {
|
|
10263
10295
|
checkAuth(token: string): Promise<{
|
|
10264
10296
|
ok: boolean;
|
|
10265
10297
|
message: string;
|
|
@@ -10271,6 +10303,8 @@ declare class Point {
|
|
|
10271
10303
|
sub: string;
|
|
10272
10304
|
};
|
|
10273
10305
|
}>;
|
|
10306
|
+
}
|
|
10307
|
+
declare class Point extends Auth {
|
|
10274
10308
|
upload_event({ action_id, device_id, }: {
|
|
10275
10309
|
action_id: number;
|
|
10276
10310
|
device_id: string;
|
|
@@ -10369,20 +10403,70 @@ declare class Point {
|
|
|
10369
10403
|
error?: undefined;
|
|
10370
10404
|
}>;
|
|
10371
10405
|
}
|
|
10372
|
-
|
|
10373
|
-
|
|
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;
|
|
10374
10416
|
queryKlineData(args: {
|
|
10375
|
-
|
|
10417
|
+
id: string;
|
|
10418
|
+
platform: string;
|
|
10419
|
+
contract?: string;
|
|
10376
10420
|
start: string;
|
|
10377
10421
|
end: string;
|
|
10378
10422
|
}): Promise<any>;
|
|
10379
10423
|
queryTokenPrice(args: {
|
|
10380
|
-
|
|
10424
|
+
id: string;
|
|
10425
|
+
platform: string;
|
|
10426
|
+
contract?: string;
|
|
10381
10427
|
}): Promise<any>;
|
|
10428
|
+
private queryPriceFromBinance;
|
|
10429
|
+
private queryPriceFromCoinGecko;
|
|
10382
10430
|
queryQuestions({ symbol, lang }: {
|
|
10383
10431
|
symbol: string;
|
|
10384
10432
|
lang?: string;
|
|
10385
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>;
|
|
10386
10470
|
}
|
|
10387
10471
|
declare const modules$4: {
|
|
10388
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",
|