@iotexproject/kit 0.0.61 → 0.0.63

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
@@ -1,5 +1,7 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ import postgres from 'postgres';
4
+
3
5
  declare class IoID {
4
6
  create(args: {
5
7
  _type: string;
@@ -7071,6 +7073,12 @@ declare class Staking {
7071
7073
  version: "v1" | "v2";
7072
7074
  newAmount?: string;
7073
7075
  }): Promise<any>;
7076
+ NFTBucketStakeLock(args: {
7077
+ bucketIndex: string;
7078
+ autoStake: boolean;
7079
+ version: "v1" | "v2";
7080
+ duration?: string;
7081
+ }): Promise<any>;
7074
7082
  }
7075
7083
  declare class utils {
7076
7084
  erc20(args: {
@@ -7198,7 +7206,9 @@ declare class UseHub {
7198
7206
  stakingRewardHistory?: undefined;
7199
7207
  stakingRewardSum?: undefined;
7200
7208
  }>;
7201
- userDashboard(): Promise<{
7209
+ userDashboard({ limit }: {
7210
+ limit: number;
7211
+ }): Promise<{
7202
7212
  blogs: import("@tryghost/content-api").PostsOrPages;
7203
7213
  marketData: IoTexMarketData;
7204
7214
  }>;
@@ -7234,10 +7244,20 @@ declare const modules: {
7234
7244
  hub: UseHub;
7235
7245
  };
7236
7246
  export type ModuleType = typeof modules;
7237
- declare class Account {
7238
- private readonly ch;
7239
- private readonly analyser;
7247
+ declare class ClickHouseSDK {
7248
+ private client;
7249
+ constructor(dbUrl: string);
7250
+ query(sql: string): Promise<any>;
7251
+ }
7252
+ declare class BaseModule {
7253
+ analyzer: ReturnType<typeof postgres>;
7254
+ superbase: ReturnType<typeof postgres>;
7255
+ iotexscan: ReturnType<typeof postgres>;
7256
+ iopay: ReturnType<typeof postgres>;
7257
+ ch: ClickHouseSDK;
7240
7258
  constructor();
7259
+ }
7260
+ declare class Account extends BaseModule {
7241
7261
  balanceChart({ address, mode }: {
7242
7262
  address: string;
7243
7263
  mode: "24hr" | "7day";
@@ -7247,11 +7267,40 @@ declare class Account {
7247
7267
  getXrc20Tokens({ address }: {
7248
7268
  address: string;
7249
7269
  }): Promise<{
7250
- tokens: any;
7270
+ tokens: postgres.RowList<postgres.Row[]>;
7251
7271
  }>;
7252
7272
  }
7273
+ declare class Analyzer extends BaseModule {
7274
+ tvl(): Promise<any>;
7275
+ contractCount(): Promise<any>;
7276
+ totalStakedIotx(): Promise<any>;
7277
+ activeWalletCount({ start_date, end_date }?: {
7278
+ start_date?: string;
7279
+ end_date?: string;
7280
+ }): Promise<any>;
7281
+ dailyTxCount({ start_date, end_date }?: {
7282
+ start_date?: string;
7283
+ end_date?: string;
7284
+ }): Promise<postgres.RowList<postgres.Row[]>>;
7285
+ avgDailyTxVolume({ start_date, end_date }?: {
7286
+ start_date?: string;
7287
+ end_date?: string;
7288
+ }): Promise<any>;
7289
+ sumGasFee({ start_date, end_date }?: {
7290
+ start_date?: string;
7291
+ end_date?: string;
7292
+ }): Promise<any>;
7293
+ avgGasFee({ start_date, end_date }?: {
7294
+ start_date?: string;
7295
+ end_date?: string;
7296
+ }): Promise<any>;
7297
+ nodesCount(): Promise<any>;
7298
+ dappsCount(): Promise<any>;
7299
+ totalCrossChainTxCount(): Promise<number>;
7300
+ }
7253
7301
  declare const modules$1: {
7254
7302
  account: Account;
7303
+ analyzer: Analyzer;
7255
7304
  };
7256
7305
  export declare const createClient: ({ url }?: {
7257
7306
  url?: string;
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 z=({url:c="http://localhost:9527"}={})=>new Proxy({},{get(j,x,q){return new Proxy({},{get(t,R){return async(f)=>{for(let n in f)if(Array.isArray(f[n]))f[n]=JSON.stringify(f[n]);const $=`${c}/${String(x)}/${String(R)}?${new URLSearchParams(f).toString()}`;return(await fetch($)).json()}}})}}),A=({url:c="http://localhost:9527"}={})=>new Proxy({},{get(j,x,q){return new Proxy({},{get(t,R){return async(f)=>{for(let n in f)if(Array.isArray(f[n]))f[n]=JSON.stringify(f[n]);const $=`${c}/${String(x)}/${String(R)}?${new URLSearchParams(f).toString()}`;return(await fetch($)).json()}}})}});export{A as createClientWithDBServer,z 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.61",
5
+ "version": "v0.0.63",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {