@iotexproject/kit 0.0.76 → 0.0.78

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 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: "1";
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 }: {
@@ -8168,10 +8205,33 @@ declare class Account extends BaseDBModule {
8168
8205
  }): Promise<{
8169
8206
  list: any;
8170
8207
  }>;
8208
+ balanceChartV2({ address, mode }: {
8209
+ address: string;
8210
+ mode: "24hr" | "7day" | "30day" | "365day";
8211
+ }): Promise<{
8212
+ list: [
8213
+ number,
8214
+ number
8215
+ ][];
8216
+ } | undefined>;
8217
+ private convertBalanceChartData;
8171
8218
  getXrc20Tokens({ address }: {
8172
8219
  address: string;
8173
8220
  }): Promise<{
8174
- tokens: postgres.RowList<postgres.Row[]>;
8221
+ tokens: import("postgres").RowList<import("postgres").Row[]>;
8222
+ }>;
8223
+ }
8224
+ declare class Analysis extends BaseDBModule {
8225
+ checkAuth(key: string): Promise<{
8226
+ ok: boolean;
8227
+ message: string;
8228
+ }>;
8229
+ createRef({ device_id, refer_id, user_id }: {
8230
+ device_id: string;
8231
+ refer_id: string;
8232
+ user_id: string;
8233
+ }): Promise<{
8234
+ ok: boolean;
8175
8235
  }>;
8176
8236
  }
8177
8237
  declare class Analyzer extends BaseDBModule {
@@ -8203,13 +8263,15 @@ declare class Analyzer extends BaseDBModule {
8203
8263
  totalCrossChainTxCount(): Promise<number>;
8204
8264
  nftContractCount(): Promise<any>;
8205
8265
  }
8206
- declare class Staking$1 extends BaseDBModule {
8207
- delegatesByHeight({ height }?: {
8208
- height?: number;
8209
- }): Promise<never[] | import("postgres").RowList<import("postgres").Row[]>>;
8210
- bucketByHash({ hash }: {
8211
- hash: string;
8212
- }): Promise<import("postgres").Row | null>;
8266
+ declare class NFT extends BaseDBModule {
8267
+ getNFTsByAccount({ address, page, pageSize }: {
8268
+ address: string;
8269
+ pageSize?: number;
8270
+ page?: number;
8271
+ }): Promise<import("postgres").RowList<import("postgres").Row[]>>;
8272
+ getNFTsCountByAccount({ address }: {
8273
+ address: string;
8274
+ }): Promise<any>;
8213
8275
  }
8214
8276
  declare class Transaction extends BaseDBModule {
8215
8277
  getTransactionsCountByAccount({ address }: {
@@ -8221,33 +8283,30 @@ declare class Transaction extends BaseDBModule {
8221
8283
  startCursor?: number;
8222
8284
  endCursor?: number;
8223
8285
  }): Promise<{
8224
- data: import("postgres").RowList<import("postgres").Row[]>;
8286
+ data: import("postgres").Row[];
8225
8287
  startCursor: any;
8226
8288
  endCursor: any;
8227
8289
  }>;
8228
8290
  }
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
8291
  declare const modules$1: {
8240
8292
  account: Account;
8241
8293
  analyzer: Analyzer;
8242
- staking: Staking$1;
8294
+ staking: Staking;
8243
8295
  transaction: Transaction;
8244
8296
  nft: NFT;
8297
+ health: Health;
8298
+ analysis: Analysis;
8245
8299
  };
8300
+ export type DBModuleType = typeof modules$1;
8246
8301
  export declare const createClient: ({ url }?: {
8247
8302
  url?: string;
8248
8303
  }) => ModuleType;
8249
8304
  export declare const createClientWithDBServer: ({ url }?: {
8250
8305
  url?: string;
8251
- }) => typeof modules$1;
8306
+ }) => DBModuleType;
8307
+ export declare const createClientWithWriteDBServer: ({ url, fetchRequestInit }: {
8308
+ url?: string;
8309
+ fetchRequestInit?: FetchRequestInit;
8310
+ }) => DBModuleType;
8252
8311
 
8253
8312
  export {};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var G=({url:c="http://localhost:9527"}={})=>new Proxy({},{get(B,j,C){return new Proxy({},{get(D,q){return async(f)=>{for(let x in f)if(Array.isArray(f[x]))f[x]=JSON.stringify(f[x]);const z=`${c}/${String(j)}/${String(q)}?${new URLSearchParams(f).toString()}`;return(await fetch(z)).json()}}})}}),H=({url:c="http://localhost:9527"}={})=>new Proxy({},{get(B,j,C){return new Proxy({},{get(D,q){return async(f)=>{for(let x in f)if(Array.isArray(f[x]))f[x]=JSON.stringify(f[x]);const z=`${c}/${String(j)}/${String(q)}?${new URLSearchParams(f).toString()}`;return(await fetch(z)).json()}}})}});export{H as createClientWithDBServer,G as createClient};
1
+ var C=({url:$="http://localhost:9527"}={})=>new Proxy({},{get(j,c,w){return new Proxy({},{get(A,f){return async(x)=>{for(let T in x){if(typeof x[T]==="object")x[T]=JSON.stringify(x[T],(B,W)=>typeof W==="bigint"?W.toString():W);if(x[T]==null)delete x[T]}const b=`${$}/${String(c)}/${String(f)}?${new URLSearchParams(x).toString()}`;return(await fetch(b)).json()}}})}}),D=({url:$="http://localhost:9527"}={})=>new Proxy({},{get(j,c,w){return new Proxy({},{get(A,f){return async(x)=>{for(let T in x){if(typeof x[T]==="object")x[T]=JSON.stringify(x[T],(B,W)=>typeof W==="bigint"?W.toString():W);if(x[T]==null)delete x[T]}const b=`${$}/${String(c)}/${String(f)}?${new URLSearchParams(x).toString()}`;return(await fetch(b)).json()}}})}}),E=({url:$="http://localhost:9527",fetchRequestInit:j})=>new Proxy({},{get(c,w,A){return new Proxy({},{get(f,x){return async(b)=>{const z=`${$}/${String(w)}/${String(x)}`;return(await fetch(z,{method:"POST",...j,body:JSON.stringify(b)})).json()}}})}});export{E as createClientWithWriteDBServer,D as createClientWithDBServer,C 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.76",
5
+ "version": "v0.0.78",
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.144",
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
+ }