@iotexproject/kit 0.0.76 → 0.0.77
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 +69 -20
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -4043,6 +4043,7 @@ declare class VerifyingProxyEntity {
|
|
|
4043
4043
|
verifier: () => Promise<any>;
|
|
4044
4044
|
deviceNFT: () => Promise<any>;
|
|
4045
4045
|
deviceGauge: GaugeEntity;
|
|
4046
|
+
isValidAddress(): Promise<boolean>;
|
|
4046
4047
|
projectAppliedAmount(): Promise<string>;
|
|
4047
4048
|
projectActivedAmount(): Promise<string>;
|
|
4048
4049
|
ioIDStore(): Promise<"" | `0x${string}`>;
|
|
@@ -5431,7 +5432,7 @@ declare class MarshallDao {
|
|
|
5431
5432
|
}
|
|
5432
5433
|
declare class UniswapV2LPEntity {
|
|
5433
5434
|
address: `0x${string}`;
|
|
5434
|
-
chainId:
|
|
5435
|
+
chainId: string;
|
|
5435
5436
|
abi: readonly [
|
|
5436
5437
|
{
|
|
5437
5438
|
readonly type: "constructor";
|
|
@@ -6169,6 +6170,13 @@ declare class UniswapV2LPEntity {
|
|
|
6169
6170
|
totalSupply: number;
|
|
6170
6171
|
token0: string;
|
|
6171
6172
|
Token0: ERC20Entity;
|
|
6173
|
+
Token1: ERC20Entity;
|
|
6174
|
+
getReserves: [
|
|
6175
|
+
string,
|
|
6176
|
+
string,
|
|
6177
|
+
number
|
|
6178
|
+
];
|
|
6179
|
+
balanceOf(address: string): Promise<bigint>;
|
|
6172
6180
|
totalSupplyUSD(): Promise<number>;
|
|
6173
6181
|
}
|
|
6174
6182
|
declare class Mimo {
|
|
@@ -6182,6 +6190,23 @@ declare class Mimo {
|
|
|
6182
6190
|
totalSupply: true;
|
|
6183
6191
|
};
|
|
6184
6192
|
}>>;
|
|
6193
|
+
getLpListByAddress(args: {
|
|
6194
|
+
address: string;
|
|
6195
|
+
}): Promise<{
|
|
6196
|
+
address: any;
|
|
6197
|
+
token0: any;
|
|
6198
|
+
token1: any;
|
|
6199
|
+
reserve_0: string;
|
|
6200
|
+
reserve_1: string;
|
|
6201
|
+
total_supply: string;
|
|
6202
|
+
percent: string;
|
|
6203
|
+
lpBalance: string;
|
|
6204
|
+
token0Lp: string;
|
|
6205
|
+
token1Lp: string;
|
|
6206
|
+
token0LpUSD: string;
|
|
6207
|
+
token1LpUSD: string;
|
|
6208
|
+
lpBalanceUSD: string;
|
|
6209
|
+
}[]>;
|
|
6185
6210
|
}
|
|
6186
6211
|
declare class MockBucketEntity {
|
|
6187
6212
|
address: `0x${string}`;
|
|
@@ -8137,6 +8162,12 @@ declare class UseHub {
|
|
|
8137
8162
|
error: any;
|
|
8138
8163
|
}>;
|
|
8139
8164
|
}
|
|
8165
|
+
declare class Health {
|
|
8166
|
+
check(): {
|
|
8167
|
+
status: boolean;
|
|
8168
|
+
message: string;
|
|
8169
|
+
};
|
|
8170
|
+
}
|
|
8140
8171
|
declare const modules: {
|
|
8141
8172
|
mimo: Mimo;
|
|
8142
8173
|
staking: Staking;
|
|
@@ -8145,6 +8176,7 @@ declare const modules: {
|
|
|
8145
8176
|
msp: MSP;
|
|
8146
8177
|
utils: utils;
|
|
8147
8178
|
hub: UseHub;
|
|
8179
|
+
health: Health;
|
|
8148
8180
|
};
|
|
8149
8181
|
export type ModuleType = typeof modules;
|
|
8150
8182
|
declare class ClickHouseSDK {
|
|
@@ -8159,7 +8191,12 @@ declare class BaseDBModule {
|
|
|
8159
8191
|
iopay: ReturnType<typeof postgres>;
|
|
8160
8192
|
nftmarket: ReturnType<typeof postgres>;
|
|
8161
8193
|
ch: ClickHouseSDK;
|
|
8194
|
+
analysis: ReturnType<typeof postgres>;
|
|
8162
8195
|
constructor();
|
|
8196
|
+
checkAuth(key: string): Promise<{
|
|
8197
|
+
ok: boolean;
|
|
8198
|
+
message: string;
|
|
8199
|
+
}>;
|
|
8163
8200
|
}
|
|
8164
8201
|
declare class Account extends BaseDBModule {
|
|
8165
8202
|
balanceChart({ address, mode }: {
|
|
@@ -8174,6 +8211,19 @@ declare class Account extends BaseDBModule {
|
|
|
8174
8211
|
tokens: postgres.RowList<postgres.Row[]>;
|
|
8175
8212
|
}>;
|
|
8176
8213
|
}
|
|
8214
|
+
declare class Analysis extends BaseDBModule {
|
|
8215
|
+
checkAuth(key: string): Promise<{
|
|
8216
|
+
ok: boolean;
|
|
8217
|
+
message: string;
|
|
8218
|
+
}>;
|
|
8219
|
+
createRef({ device_id, refer_id, user_id }: {
|
|
8220
|
+
device_id: string;
|
|
8221
|
+
refer_id: string;
|
|
8222
|
+
user_id: string;
|
|
8223
|
+
}): Promise<{
|
|
8224
|
+
ok: boolean;
|
|
8225
|
+
}>;
|
|
8226
|
+
}
|
|
8177
8227
|
declare class Analyzer extends BaseDBModule {
|
|
8178
8228
|
tvl(): Promise<any>;
|
|
8179
8229
|
contractCount(): Promise<any>;
|
|
@@ -8203,13 +8253,15 @@ declare class Analyzer extends BaseDBModule {
|
|
|
8203
8253
|
totalCrossChainTxCount(): Promise<number>;
|
|
8204
8254
|
nftContractCount(): Promise<any>;
|
|
8205
8255
|
}
|
|
8206
|
-
declare class
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
}
|
|
8256
|
+
declare class NFT extends BaseDBModule {
|
|
8257
|
+
getNFTsByAccount({ address, page, pageSize }: {
|
|
8258
|
+
address: string;
|
|
8259
|
+
pageSize?: number;
|
|
8260
|
+
page?: number;
|
|
8261
|
+
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8262
|
+
getNFTsCountByAccount({ address }: {
|
|
8263
|
+
address: string;
|
|
8264
|
+
}): Promise<any>;
|
|
8213
8265
|
}
|
|
8214
8266
|
declare class Transaction extends BaseDBModule {
|
|
8215
8267
|
getTransactionsCountByAccount({ address }: {
|
|
@@ -8226,28 +8278,25 @@ declare class Transaction extends BaseDBModule {
|
|
|
8226
8278
|
endCursor: any;
|
|
8227
8279
|
}>;
|
|
8228
8280
|
}
|
|
8229
|
-
declare class NFT extends BaseDBModule {
|
|
8230
|
-
getNFTsByAccount({ address, page, pageSize }: {
|
|
8231
|
-
address: string;
|
|
8232
|
-
pageSize?: number;
|
|
8233
|
-
page?: number;
|
|
8234
|
-
}): Promise<import("postgres").RowList<import("postgres").Row[]>>;
|
|
8235
|
-
getNFTsCountByAccount({ address }: {
|
|
8236
|
-
address: string;
|
|
8237
|
-
}): Promise<any>;
|
|
8238
|
-
}
|
|
8239
8281
|
declare const modules$1: {
|
|
8240
8282
|
account: Account;
|
|
8241
8283
|
analyzer: Analyzer;
|
|
8242
|
-
staking: Staking
|
|
8284
|
+
staking: Staking;
|
|
8243
8285
|
transaction: Transaction;
|
|
8244
8286
|
nft: NFT;
|
|
8287
|
+
health: Health;
|
|
8288
|
+
analysis: Analysis;
|
|
8245
8289
|
};
|
|
8290
|
+
export type DBModuleType = typeof modules$1;
|
|
8246
8291
|
export declare const createClient: ({ url }?: {
|
|
8247
8292
|
url?: string;
|
|
8248
8293
|
}) => ModuleType;
|
|
8249
8294
|
export declare const createClientWithDBServer: ({ url }?: {
|
|
8250
8295
|
url?: string;
|
|
8251
|
-
}) =>
|
|
8296
|
+
}) => DBModuleType;
|
|
8297
|
+
export declare const createClientWithWriteDBServer: ({ url, fetchRequestInit }: {
|
|
8298
|
+
url?: string;
|
|
8299
|
+
fetchRequestInit?: FetchRequestInit;
|
|
8300
|
+
}) => DBModuleType;
|
|
8252
8301
|
|
|
8253
8302
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var L=({url:z="http://localhost:9527"}={})=>new Proxy({},{get(F,C,G){return new Proxy({},{get(J,D){return async(x)=>{for(let b in x){if(typeof x[b]==="object")x[b]=JSON.stringify(x[b],(K,j)=>typeof j==="bigint"?j.toString():j);if(x[b]==null)delete x[b]}const B=`${z}/${String(C)}/${String(D)}?${new URLSearchParams(x).toString()}`;return(await fetch(B)).json()}}})}}),M=({url:z="http://localhost:9527"}={})=>new Proxy({},{get(F,C,G){return new Proxy({},{get(J,D){return async(x)=>{for(let b in x){if(typeof x[b]==="object")x[b]=JSON.stringify(x[b],(K,j)=>typeof j==="bigint"?j.toString():j);if(x[b]==null)delete x[b]}const B=`${z}/${String(C)}/${String(D)}?${new URLSearchParams(x).toString()}`;return(await fetch(B)).json()}}})}}),N=({url:z="http://localhost:9527",fetchRequestInit:F})=>new Proxy({},{get(C,G,J){return new Proxy({},{get(D,x){return async(B)=>{const H=`${z}/${String(G)}/${String(x)}`;return(await fetch(H,{method:"POST",...F,body:JSON.stringify(B)})).json()}}})}});export{N as createClientWithWriteDBServer,M as createClientWithDBServer,L 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": "v0.0.
|
|
5
|
+
"version": "v0.0.77",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"viem": "^2.17.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@dappworks/kit": "0.4.
|
|
37
|
+
"@dappworks/kit": "0.4.159",
|
|
38
38
|
"@types/bun": "latest",
|
|
39
39
|
"@types/tryghost__content-api": "^1.3.16",
|
|
40
40
|
"bun-plugin-dts": "^0.2.3",
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
"access": "public",
|
|
46
46
|
"registry": "https://registry.npmjs.org/"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|