@iotexproject/kit 0.1.35 → 0.1.37
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 +162 -46
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -8596,6 +8596,13 @@ declare class Staking {
|
|
|
8596
8596
|
epochRewardPortion: number;
|
|
8597
8597
|
blockRewardPortion: number;
|
|
8598
8598
|
}): Promise<any>;
|
|
8599
|
+
getRewardDistribution(args: {
|
|
8600
|
+
ownerAddress: `0x${string}` | `io${string}`;
|
|
8601
|
+
}): Promise<{
|
|
8602
|
+
foundationRewardPortion: any;
|
|
8603
|
+
epochRewardPortion: any;
|
|
8604
|
+
blockRewardPortion: any;
|
|
8605
|
+
} | null>;
|
|
8599
8606
|
candidateUpdate({ name, operatorAddress, rewardAddress }: {
|
|
8600
8607
|
name: string;
|
|
8601
8608
|
operatorAddress: `0x${string}`;
|
|
@@ -8826,6 +8833,128 @@ declare class PointsPlatform {
|
|
|
8826
8833
|
error: unknown;
|
|
8827
8834
|
data?: undefined;
|
|
8828
8835
|
}>;
|
|
8836
|
+
points_range(args: {
|
|
8837
|
+
user: string;
|
|
8838
|
+
start: number;
|
|
8839
|
+
end: number;
|
|
8840
|
+
}): Promise<{
|
|
8841
|
+
data: any;
|
|
8842
|
+
error?: undefined;
|
|
8843
|
+
} | {
|
|
8844
|
+
error: unknown;
|
|
8845
|
+
data?: undefined;
|
|
8846
|
+
}>;
|
|
8847
|
+
daily_points_detail(args: {
|
|
8848
|
+
user: string;
|
|
8849
|
+
dayTimestamp: number;
|
|
8850
|
+
}): Promise<{
|
|
8851
|
+
data: any;
|
|
8852
|
+
error?: undefined;
|
|
8853
|
+
} | {
|
|
8854
|
+
error: unknown;
|
|
8855
|
+
data?: undefined;
|
|
8856
|
+
}>;
|
|
8857
|
+
}
|
|
8858
|
+
export type LaunchPadParam = {
|
|
8859
|
+
recipient: `0x${string}`;
|
|
8860
|
+
name: string;
|
|
8861
|
+
symbol: string;
|
|
8862
|
+
initialBuyAmount: string;
|
|
8863
|
+
};
|
|
8864
|
+
export type CreateProjectParams = {
|
|
8865
|
+
recipient: `0x${string}`;
|
|
8866
|
+
projectName: string;
|
|
8867
|
+
tokenAddress: string;
|
|
8868
|
+
owner: string;
|
|
8869
|
+
image?: string;
|
|
8870
|
+
description?: string;
|
|
8871
|
+
twitter?: string;
|
|
8872
|
+
telegram?: string;
|
|
8873
|
+
website?: string;
|
|
8874
|
+
};
|
|
8875
|
+
export type SwapParams = {
|
|
8876
|
+
amount: string;
|
|
8877
|
+
slippage?: {
|
|
8878
|
+
denominator?: number;
|
|
8879
|
+
numerator?: number;
|
|
8880
|
+
};
|
|
8881
|
+
recipient: `0x${string}`;
|
|
8882
|
+
token: `0x${string}`;
|
|
8883
|
+
tradeType: "BUY" | "SELL";
|
|
8884
|
+
};
|
|
8885
|
+
declare class BondingCurve {
|
|
8886
|
+
db: ReturnType<typeof postgres>;
|
|
8887
|
+
constructor();
|
|
8888
|
+
launchToken(args: LaunchPadParam, ctx?: ConfigContext): Promise<{
|
|
8889
|
+
address: `0x${string}`;
|
|
8890
|
+
data: any;
|
|
8891
|
+
chainId: string;
|
|
8892
|
+
value: string;
|
|
8893
|
+
error?: undefined;
|
|
8894
|
+
} | {
|
|
8895
|
+
error: unknown;
|
|
8896
|
+
address?: undefined;
|
|
8897
|
+
data?: undefined;
|
|
8898
|
+
chainId?: undefined;
|
|
8899
|
+
value?: undefined;
|
|
8900
|
+
}>;
|
|
8901
|
+
upsertProject(args: CreateProjectParams, ctx?: ConfigContext): Promise<{
|
|
8902
|
+
ok: boolean;
|
|
8903
|
+
error?: undefined;
|
|
8904
|
+
} | {
|
|
8905
|
+
error: unknown;
|
|
8906
|
+
ok?: undefined;
|
|
8907
|
+
}>;
|
|
8908
|
+
projectTokenList(args: {
|
|
8909
|
+
account: `0x${string}`;
|
|
8910
|
+
}, ctx?: ConfigContext): Promise<{
|
|
8911
|
+
address: `0x${string}`;
|
|
8912
|
+
chainId: string;
|
|
8913
|
+
isEther: boolean;
|
|
8914
|
+
type: () => Promise<string>;
|
|
8915
|
+
totalSupply: number;
|
|
8916
|
+
name: string;
|
|
8917
|
+
symbol: string;
|
|
8918
|
+
decimals: () => Promise<number | undefined>;
|
|
8919
|
+
balanceOf: {
|
|
8920
|
+
value: string;
|
|
8921
|
+
format: string;
|
|
8922
|
+
originFormat: string;
|
|
8923
|
+
decimals: string;
|
|
8924
|
+
};
|
|
8925
|
+
balanceUSD: (account?: `0x${string}`) => Promise<string | {
|
|
8926
|
+
value: string;
|
|
8927
|
+
format: string;
|
|
8928
|
+
originFormat: string;
|
|
8929
|
+
decimals: string;
|
|
8930
|
+
}>;
|
|
8931
|
+
allowance: (owner: string, spender: string) => Promise<any>;
|
|
8932
|
+
approve: (spender: `0x${string}`, amount: string, owner: `0x${string}`) => Promise<`0x${string}` | null>;
|
|
8933
|
+
priceUSD: () => Promise<any>;
|
|
8934
|
+
tokenUrl: () => Promise<any>;
|
|
8935
|
+
}[]>;
|
|
8936
|
+
swap(args: SwapParams, ctx?: ConfigContext): Promise<{
|
|
8937
|
+
data: {
|
|
8938
|
+
address: `0x${string}`;
|
|
8939
|
+
data: any;
|
|
8940
|
+
chainId: string;
|
|
8941
|
+
value: string;
|
|
8942
|
+
}[];
|
|
8943
|
+
quote: string;
|
|
8944
|
+
error?: undefined;
|
|
8945
|
+
} | {
|
|
8946
|
+
data: {
|
|
8947
|
+
address: `0x${string}`;
|
|
8948
|
+
data: any;
|
|
8949
|
+
chainId: string;
|
|
8950
|
+
}[];
|
|
8951
|
+
quote: string;
|
|
8952
|
+
error?: undefined;
|
|
8953
|
+
} | {
|
|
8954
|
+
error: unknown;
|
|
8955
|
+
data?: undefined;
|
|
8956
|
+
quote?: undefined;
|
|
8957
|
+
}>;
|
|
8829
8958
|
}
|
|
8830
8959
|
declare const modules: {
|
|
8831
8960
|
mimo: Mimo;
|
|
@@ -8837,6 +8966,7 @@ declare const modules: {
|
|
|
8837
8966
|
hub: UseHub;
|
|
8838
8967
|
health: Health;
|
|
8839
8968
|
points: PointsPlatform;
|
|
8969
|
+
bondingcurve: BondingCurve;
|
|
8840
8970
|
};
|
|
8841
8971
|
export type ModuleType = typeof modules;
|
|
8842
8972
|
declare class ClickHouseSDK {
|
|
@@ -8852,7 +8982,7 @@ declare class BaseDBModule {
|
|
|
8852
8982
|
iopay: ReturnType<typeof postgres>;
|
|
8853
8983
|
nftmarket: ReturnType<typeof postgres>;
|
|
8854
8984
|
ch: ClickHouseSDK;
|
|
8855
|
-
analysis:
|
|
8985
|
+
analysis: ClickHouseSDK;
|
|
8856
8986
|
constructor();
|
|
8857
8987
|
checkAuth(key: string): Promise<{
|
|
8858
8988
|
ok: boolean;
|
|
@@ -8940,21 +9070,11 @@ declare class Analysis extends BaseDBModule {
|
|
|
8940
9070
|
ok: boolean;
|
|
8941
9071
|
msg: any;
|
|
8942
9072
|
}>;
|
|
8943
|
-
fetch_event({ event_id
|
|
9073
|
+
fetch_event({ event_id }: {
|
|
8944
9074
|
event_id: string;
|
|
8945
|
-
}, ctx?: {
|
|
8946
|
-
authData?: {
|
|
8947
|
-
app_id: string;
|
|
8948
|
-
api_key: string;
|
|
8949
|
-
};
|
|
8950
9075
|
}): Promise<Record<string, any>>;
|
|
8951
|
-
batch_fetch_event({ event_ids
|
|
9076
|
+
batch_fetch_event({ event_ids }: {
|
|
8952
9077
|
event_ids: string[];
|
|
8953
|
-
}, ctx?: {
|
|
8954
|
-
authData?: {
|
|
8955
|
-
app_id: string;
|
|
8956
|
-
api_key: string;
|
|
8957
|
-
};
|
|
8958
9078
|
}): Promise<any[] | {
|
|
8959
9079
|
ok: boolean;
|
|
8960
9080
|
msg: string;
|
|
@@ -8968,7 +9088,7 @@ declare class Analysis extends BaseDBModule {
|
|
|
8968
9088
|
};
|
|
8969
9089
|
}): Promise<{
|
|
8970
9090
|
ok: boolean;
|
|
8971
|
-
point:
|
|
9091
|
+
point: any;
|
|
8972
9092
|
msg?: undefined;
|
|
8973
9093
|
} | {
|
|
8974
9094
|
ok: boolean;
|
|
@@ -9177,6 +9297,18 @@ declare class Resource {
|
|
|
9177
9297
|
declare class IoPay extends BaseDBModule {
|
|
9178
9298
|
get_point_task(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
9179
9299
|
}
|
|
9300
|
+
declare class Mimo$1 extends BaseDBModule {
|
|
9301
|
+
metrics(): Promise<{
|
|
9302
|
+
totalVolumeUSD: any;
|
|
9303
|
+
totalLiquidityUSD: any;
|
|
9304
|
+
txCount: any;
|
|
9305
|
+
pairCount: any;
|
|
9306
|
+
last24hVolumeUSD: string;
|
|
9307
|
+
depinTokenCount: any;
|
|
9308
|
+
last24hTxCount: string;
|
|
9309
|
+
last24hFee: string;
|
|
9310
|
+
}>;
|
|
9311
|
+
}
|
|
9180
9312
|
declare const modules$1: {
|
|
9181
9313
|
account: Account;
|
|
9182
9314
|
analyzer: Analyzer;
|
|
@@ -9188,6 +9320,7 @@ declare const modules$1: {
|
|
|
9188
9320
|
contract: Contract;
|
|
9189
9321
|
resource: Resource;
|
|
9190
9322
|
iopay: IoPay;
|
|
9323
|
+
mimo: Mimo$1;
|
|
9191
9324
|
};
|
|
9192
9325
|
export type DBModuleType = typeof modules$1;
|
|
9193
9326
|
export interface ConfigOptions {
|
|
@@ -9277,7 +9410,6 @@ declare const modules$2: {
|
|
|
9277
9410
|
iopay: ReturnType<typeof import("postgres")>;
|
|
9278
9411
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
9279
9412
|
ch: ClickHouseSDK;
|
|
9280
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
9281
9413
|
checkAuth(key: string): Promise<{
|
|
9282
9414
|
ok: boolean;
|
|
9283
9415
|
message: string;
|
|
@@ -9309,7 +9441,6 @@ declare const modules$2: {
|
|
|
9309
9441
|
iopay: ReturnType<typeof import("postgres")>;
|
|
9310
9442
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
9311
9443
|
ch: ClickHouseSDK;
|
|
9312
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
9313
9444
|
checkAuth(key: string): Promise<{
|
|
9314
9445
|
ok: boolean;
|
|
9315
9446
|
message: string;
|
|
@@ -9472,7 +9603,6 @@ declare const modules$2: {
|
|
|
9472
9603
|
iopay: ReturnType<typeof import("postgres")>;
|
|
9473
9604
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
9474
9605
|
ch: ClickHouseSDK;
|
|
9475
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
9476
9606
|
checkAuth(key: string): Promise<{
|
|
9477
9607
|
ok: boolean;
|
|
9478
9608
|
message: string;
|
|
@@ -9759,7 +9889,6 @@ declare const modules$2: {
|
|
|
9759
9889
|
iopay: ReturnType<typeof import("postgres")>;
|
|
9760
9890
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
9761
9891
|
ch: ClickHouseSDK;
|
|
9762
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
9763
9892
|
checkAuth(key: string): Promise<{
|
|
9764
9893
|
ok: boolean;
|
|
9765
9894
|
message: string;
|
|
@@ -9793,7 +9922,6 @@ declare const modules$2: {
|
|
|
9793
9922
|
iopay: ReturnType<typeof import("postgres")>;
|
|
9794
9923
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
9795
9924
|
ch: ClickHouseSDK;
|
|
9796
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
9797
9925
|
checkAuth(key: string): Promise<{
|
|
9798
9926
|
ok: boolean;
|
|
9799
9927
|
message: string;
|
|
@@ -9837,7 +9965,6 @@ declare const modules$2: {
|
|
|
9837
9965
|
iopay: ReturnType<typeof import("postgres")>;
|
|
9838
9966
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
9839
9967
|
ch: ClickHouseSDK;
|
|
9840
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
9841
9968
|
checkAuth(key: string): Promise<{
|
|
9842
9969
|
ok: boolean;
|
|
9843
9970
|
message: string;
|
|
@@ -9970,7 +10097,6 @@ declare const modules$2: {
|
|
|
9970
10097
|
iopay: ReturnType<typeof import("postgres")>;
|
|
9971
10098
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
9972
10099
|
ch: ClickHouseSDK;
|
|
9973
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
9974
10100
|
checkAuth(key: string): Promise<{
|
|
9975
10101
|
ok: boolean;
|
|
9976
10102
|
message: string;
|
|
@@ -10073,7 +10199,12 @@ declare const modules$2: {
|
|
|
10073
10199
|
address: string;
|
|
10074
10200
|
offset?: number | undefined;
|
|
10075
10201
|
page?: number | undefined;
|
|
10076
|
-
}>, import("zod").ZodAny,
|
|
10202
|
+
}>, import("zod").ZodAny, {
|
|
10203
|
+
TokenAddress: string;
|
|
10204
|
+
TokenName: any;
|
|
10205
|
+
TokenSymbol: any;
|
|
10206
|
+
TokenQuantity: string;
|
|
10207
|
+
}[]>;
|
|
10077
10208
|
addresstokennftinventory: KitModuleFunction<import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
10078
10209
|
address: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
10079
10210
|
contractaddress: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
@@ -10098,7 +10229,6 @@ declare const modules$2: {
|
|
|
10098
10229
|
iopay: ReturnType<typeof import("postgres")>;
|
|
10099
10230
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
10100
10231
|
ch: ClickHouseSDK;
|
|
10101
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
10102
10232
|
checkAuth(key: string): Promise<{
|
|
10103
10233
|
ok: boolean;
|
|
10104
10234
|
message: string;
|
|
@@ -10162,7 +10292,6 @@ declare const modules$2: {
|
|
|
10162
10292
|
iopay: ReturnType<typeof import("postgres")>;
|
|
10163
10293
|
nftmarket: ReturnType<typeof import("postgres")>;
|
|
10164
10294
|
ch: ClickHouseSDK;
|
|
10165
|
-
analysis: ReturnType<typeof import("postgres")>;
|
|
10166
10295
|
checkAuth(key: string): Promise<{
|
|
10167
10296
|
ok: boolean;
|
|
10168
10297
|
message: string;
|
|
@@ -10238,8 +10367,9 @@ declare class Point {
|
|
|
10238
10367
|
sub: string | undefined;
|
|
10239
10368
|
};
|
|
10240
10369
|
}>;
|
|
10241
|
-
upload_event({ action_id, }: {
|
|
10370
|
+
upload_event({ action_id, device_id, }: {
|
|
10242
10371
|
action_id: number;
|
|
10372
|
+
device_id: string;
|
|
10243
10373
|
}, ctx?: {
|
|
10244
10374
|
authData?: {
|
|
10245
10375
|
sub: string;
|
|
@@ -10260,32 +10390,18 @@ declare class Point {
|
|
|
10260
10390
|
}): Promise<any>;
|
|
10261
10391
|
fetch_event({ event_id }: {
|
|
10262
10392
|
event_id: string;
|
|
10263
|
-
}, ctx?: {
|
|
10264
|
-
authData?: {
|
|
10265
|
-
sub: string;
|
|
10266
|
-
};
|
|
10267
10393
|
}): Promise<any>;
|
|
10268
|
-
batch_fetch_event({ event_ids
|
|
10394
|
+
batch_fetch_event({ event_ids }: {
|
|
10269
10395
|
event_ids: string[];
|
|
10270
|
-
}, ctx?: {
|
|
10271
|
-
authData?: {
|
|
10272
|
-
sub: string;
|
|
10273
|
-
};
|
|
10274
10396
|
}): Promise<any>;
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
sub: string;
|
|
10278
|
-
};
|
|
10397
|
+
fetch_tasks({ user_id }: {
|
|
10398
|
+
user_id: string;
|
|
10279
10399
|
}): Promise<any>;
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
sub: string;
|
|
10283
|
-
};
|
|
10400
|
+
fetch_point({ user_id }: {
|
|
10401
|
+
user_id: string;
|
|
10284
10402
|
}): Promise<any>;
|
|
10285
|
-
fetch_invitees_num(
|
|
10286
|
-
|
|
10287
|
-
sub: string;
|
|
10288
|
-
};
|
|
10403
|
+
fetch_invitees_num({ user_id }: {
|
|
10404
|
+
user_id: string;
|
|
10289
10405
|
}): Promise<any>;
|
|
10290
10406
|
}
|
|
10291
10407
|
declare const modules$4: {
|
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.
|
|
5
|
+
"version": "v0.1.37",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
"@tryghost/content-api": "^1.11.21",
|
|
29
29
|
"@types/bn.js": "^5.1.6",
|
|
30
30
|
"@types/utf8": "^3.0.3",
|
|
31
|
+
"apollo-cache-inmemory": "^1.6.6",
|
|
32
|
+
"apollo-client": "^2.6.10",
|
|
33
|
+
"apollo-link-http": "^1.5.17",
|
|
31
34
|
"axios": "^1.7.2",
|
|
32
35
|
"bech32": "^2.0.0",
|
|
33
36
|
"bentocache": "^1.0.0-beta.9",
|
|
@@ -38,6 +41,7 @@
|
|
|
38
41
|
"dayjs": "^1.11.12",
|
|
39
42
|
"ethers": "^6.13.2",
|
|
40
43
|
"graphql-request": "^7.1.0",
|
|
44
|
+
"graphql-tag": "^2.12.6",
|
|
41
45
|
"ioredis": "^5.4.1",
|
|
42
46
|
"jsonwebtoken": "^9.0.2",
|
|
43
47
|
"lodash": "^4.17.21",
|