@iotexproject/kit 0.2.16 → 0.2.17

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +66 -17
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
3
  import { RouteConfig } from '@asteasolutions/zod-to-openapi';
4
- import { BentoCache, bentostore } from 'bentocache';
5
4
  import DataLoader from 'dataloader';
6
5
  import { Dayjs } from 'dayjs';
7
6
  import postgres from 'postgres';
@@ -6000,8 +5999,62 @@ declare class Mimo {
6000
5999
  address: string;
6001
6000
  }): Promise<{
6002
6001
  address: any;
6003
- token0: any;
6004
- token1: any;
6002
+ token0: {
6003
+ id: `0x${string}`;
6004
+ price: any;
6005
+ address: `0x${string}`;
6006
+ chainId: string;
6007
+ isEther: boolean;
6008
+ type: () => Promise<string>;
6009
+ totalSupply: number;
6010
+ name: string;
6011
+ symbol: string;
6012
+ decimals: number | undefined;
6013
+ balanceOf: (account?: `0x${string}`) => Promise<{
6014
+ value: string;
6015
+ format: string;
6016
+ originFormat: string;
6017
+ decimals: string;
6018
+ }>;
6019
+ balanceUSD: (account?: `0x${string}`) => Promise<string | {
6020
+ value: string;
6021
+ format: string;
6022
+ originFormat: string;
6023
+ decimals: string;
6024
+ }>;
6025
+ allowance: (owner: string, spender: string) => Promise<any>;
6026
+ approve: (spender: `0x${string}`, amount: string, owner: `0x${string}`) => Promise<`0x${string}` | null>;
6027
+ priceUSD: any;
6028
+ tokenUrl: () => Promise<any>;
6029
+ };
6030
+ token1: {
6031
+ id: `0x${string}`;
6032
+ price: any;
6033
+ address: `0x${string}`;
6034
+ chainId: string;
6035
+ isEther: boolean;
6036
+ type: () => Promise<string>;
6037
+ totalSupply: number;
6038
+ name: string;
6039
+ symbol: string;
6040
+ decimals: number | undefined;
6041
+ balanceOf: (account?: `0x${string}`) => Promise<{
6042
+ value: string;
6043
+ format: string;
6044
+ originFormat: string;
6045
+ decimals: string;
6046
+ }>;
6047
+ balanceUSD: (account?: `0x${string}`) => Promise<string | {
6048
+ value: string;
6049
+ format: string;
6050
+ originFormat: string;
6051
+ decimals: string;
6052
+ }>;
6053
+ allowance: (owner: string, spender: string) => Promise<any>;
6054
+ approve: (spender: `0x${string}`, amount: string, owner: `0x${string}`) => Promise<`0x${string}` | null>;
6055
+ priceUSD: any;
6056
+ tokenUrl: () => Promise<any>;
6057
+ };
6005
6058
  reserve_0: string;
6006
6059
  reserve_1: string;
6007
6060
  total_supply: string;
@@ -7076,6 +7129,14 @@ declare class Staking {
7076
7129
  candidateActivate({ bucketIndex }: {
7077
7130
  bucketIndex: string;
7078
7131
  }, ctx?: ConfigContext): Promise<any>;
7132
+ candidateRequestDeactivation(_args?: {}, _ctx?: ConfigContext): Promise<`0x${string}`>;
7133
+ candidateConfirmDeactivation(_args?: {}, _ctx?: ConfigContext): Promise<`0x${string}`>;
7134
+ getCandidateDeactivation(args: {
7135
+ ownerAddress: `0x${string}` | `io${string}`;
7136
+ }, ctx?: ConfigContext): Promise<{
7137
+ requested: boolean;
7138
+ scheduledAtBlock: bigint;
7139
+ } | null>;
7079
7140
  getSelfStakeBucketByDelegate(args: {
7080
7141
  ownerAddress: `0x${string}` | `io${string}`;
7081
7142
  }, ctx?: ConfigContext): Promise<CompositeBucket | null>;
@@ -8624,14 +8685,10 @@ declare class ClickHouseSDK {
8624
8685
  constructor(dbUrl: string);
8625
8686
  query(sql: string): Promise<any>;
8626
8687
  }
8627
- declare const bento: BentoCache<{
8628
- appCache: ReturnType<typeof bentostore>;
8629
- }>;
8630
8688
  declare class BaseDBModule {
8631
8689
  ch: ClickHouseSDK;
8632
8690
  analyzer: ReturnType<typeof postgres>;
8633
8691
  scout: ReturnType<typeof postgres>;
8634
- superbase: ReturnType<typeof postgres>;
8635
8692
  iotexscan: ReturnType<typeof postgres>;
8636
8693
  iopay: ReturnType<typeof postgres>;
8637
8694
  nftmarket: ReturnType<typeof postgres>;
@@ -8643,8 +8700,8 @@ declare class BaseDBModule {
8643
8700
  dao: ReturnType<typeof postgres>;
8644
8701
  nsv3db: ReturnType<typeof postgres>;
8645
8702
  nsv3dbTest: ReturnType<typeof postgres>;
8646
- cache: ReturnType<typeof bento.namespace>;
8647
8703
  constructor();
8704
+ private getPostgresClient;
8648
8705
  checkAuth(key: string): Promise<{
8649
8706
  ok: boolean;
8650
8707
  message: string;
@@ -9182,6 +9239,7 @@ export type CurrentUser = {
9182
9239
  vote_weight: number;
9183
9240
  };
9184
9241
  declare class Dao extends BaseDBModule {
9242
+ private readonly cache;
9185
9243
  checkAuth(key: string): Promise<{
9186
9244
  ok: boolean;
9187
9245
  message: string;
@@ -9874,7 +9932,6 @@ declare const modules$2: {
9874
9932
  }>, import("zod").ZodType<any, import("zod").ZodTypeDef, any> | undefined, unknown>;
9875
9933
  analyzer: ReturnType<typeof import("postgres")>;
9876
9934
  scout: ReturnType<typeof import("postgres")>;
9877
- superbase: ReturnType<typeof import("postgres")>;
9878
9935
  iotexscan: ReturnType<typeof import("postgres")>;
9879
9936
  iopay: ReturnType<typeof import("postgres")>;
9880
9937
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -9906,7 +9963,6 @@ declare const modules$2: {
9906
9963
  }>, import("zod").ZodAny, import("postgres").Row>;
9907
9964
  analyzer: ReturnType<typeof import("postgres")>;
9908
9965
  scout: ReturnType<typeof import("postgres")>;
9909
- superbase: ReturnType<typeof import("postgres")>;
9910
9966
  iotexscan: ReturnType<typeof import("postgres")>;
9911
9967
  iopay: ReturnType<typeof import("postgres")>;
9912
9968
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -10069,7 +10125,6 @@ declare const modules$2: {
10069
10125
  }>, import("zod").ZodAny, any>;
10070
10126
  analyzer: ReturnType<typeof import("postgres")>;
10071
10127
  scout: ReturnType<typeof import("postgres")>;
10072
- superbase: ReturnType<typeof import("postgres")>;
10073
10128
  iotexscan: ReturnType<typeof import("postgres")>;
10074
10129
  iopay: ReturnType<typeof import("postgres")>;
10075
10130
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -10365,7 +10420,6 @@ declare const modules$2: {
10365
10420
  }>, import("zod").ZodAny, void>;
10366
10421
  analyzer: ReturnType<typeof import("postgres")>;
10367
10422
  scout: ReturnType<typeof import("postgres")>;
10368
- superbase: ReturnType<typeof import("postgres")>;
10369
10423
  iotexscan: ReturnType<typeof import("postgres")>;
10370
10424
  iopay: ReturnType<typeof import("postgres")>;
10371
10425
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -10399,7 +10453,6 @@ declare const modules$2: {
10399
10453
  }>, import("zod").ZodAny, any>;
10400
10454
  analyzer: ReturnType<typeof import("postgres")>;
10401
10455
  scout: ReturnType<typeof import("postgres")>;
10402
- superbase: ReturnType<typeof import("postgres")>;
10403
10456
  iotexscan: ReturnType<typeof import("postgres")>;
10404
10457
  iopay: ReturnType<typeof import("postgres")>;
10405
10458
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -10443,7 +10496,6 @@ declare const modules$2: {
10443
10496
  }[]>;
10444
10497
  analyzer: ReturnType<typeof import("postgres")>;
10445
10498
  scout: ReturnType<typeof import("postgres")>;
10446
- superbase: ReturnType<typeof import("postgres")>;
10447
10499
  iotexscan: ReturnType<typeof import("postgres")>;
10448
10500
  iopay: ReturnType<typeof import("postgres")>;
10449
10501
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -10576,7 +10628,6 @@ declare const modules$2: {
10576
10628
  }>, import("zod").ZodAny, any>;
10577
10629
  analyzer: ReturnType<typeof import("postgres")>;
10578
10630
  scout: ReturnType<typeof import("postgres")>;
10579
- superbase: ReturnType<typeof import("postgres")>;
10580
10631
  iotexscan: ReturnType<typeof import("postgres")>;
10581
10632
  iopay: ReturnType<typeof import("postgres")>;
10582
10633
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -10673,7 +10724,6 @@ declare const modules$2: {
10673
10724
  }>, import("zod").ZodAny, any[]>;
10674
10725
  analyzer: ReturnType<typeof import("postgres")>;
10675
10726
  scout: ReturnType<typeof import("postgres")>;
10676
- superbase: ReturnType<typeof import("postgres")>;
10677
10727
  iotexscan: ReturnType<typeof import("postgres")>;
10678
10728
  iopay: ReturnType<typeof import("postgres")>;
10679
10729
  nftmarket: ReturnType<typeof import("postgres")>;
@@ -10771,7 +10821,6 @@ declare const modules$2: {
10771
10821
  }>;
10772
10822
  analyzer: ReturnType<typeof import("postgres")>;
10773
10823
  scout: ReturnType<typeof import("postgres")>;
10774
- superbase: ReturnType<typeof import("postgres")>;
10775
10824
  iotexscan: ReturnType<typeof import("postgres")>;
10776
10825
  iopay: ReturnType<typeof import("postgres")>;
10777
10826
  nftmarket: ReturnType<typeof import("postgres")>;
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.2.16",
5
+ "version": "0.2.17",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {