@iotexproject/kit 0.1.1 → 0.1.3

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 +26 -30
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -351,7 +351,6 @@ declare class ERC20Entity {
351
351
  format: string;
352
352
  originFormat: string;
353
353
  decimals: string;
354
- isZero: boolean;
355
354
  }>;
356
355
  allowance: (owner: string, spender: string) => Promise<any>;
357
356
  approve(spender: `0x${string}`, amount: string, owner: `0x${string}`): Promise<`0x${string}` | null>;
@@ -1046,7 +1045,6 @@ declare class IncentivesEntity {
1046
1045
  format: string;
1047
1046
  originFormat: string;
1048
1047
  decimals: string;
1049
- isZero: boolean;
1050
1048
  }>;
1051
1049
  isReward: (_: `0x${string}`) => Promise<any>;
1052
1050
  balanceOf: (_: `0x${string}`) => Promise<any>;
@@ -1846,7 +1844,6 @@ declare class ERC721Entity {
1846
1844
  format: string;
1847
1845
  originFormat: string;
1848
1846
  decimals: string;
1849
- isZero: boolean;
1850
1847
  }>;
1851
1848
  balanceOfTokenIds(account?: `0x${string}`): Promise<any>;
1852
1849
  MINTER_ROLE: () => Promise<any>;
@@ -2513,7 +2510,6 @@ declare class LPTokenEntity {
2513
2510
  format: string;
2514
2511
  originFormat: string;
2515
2512
  decimals: string;
2516
- isZero: boolean;
2517
2513
  }>;
2518
2514
  approve(spender: `0x${string}`, amount: string, owner: `0x${string}`): Promise<`0x${string}` | null>;
2519
2515
  kLast: () => Promise<any>;
@@ -3411,7 +3407,6 @@ declare class GaugeEntity {
3411
3407
  format: string;
3412
3408
  originFormat: string;
3413
3409
  decimals: string;
3414
- isZero: boolean;
3415
3410
  } | undefined>;
3416
3411
  gaugeType(): Promise<"ERC20" | "ERC721" | "LPToken">;
3417
3412
  projectInfo(): Promise<{
@@ -3450,14 +3445,18 @@ declare class GaugeEntity {
3450
3445
  token0: true;
3451
3446
  token1: true;
3452
3447
  }> | null | undefined>;
3453
- apr(): Promise<string | 0>;
3448
+ apr(): Promise<string | {
3449
+ value: string;
3450
+ format: string;
3451
+ originFormat: string;
3452
+ decimals: string;
3453
+ } | 0 | undefined>;
3454
3454
  rewards(account: `0x${string}`): Promise<{
3455
3455
  rewards: {
3456
3456
  value: string;
3457
3457
  format: string;
3458
3458
  originFormat: string;
3459
3459
  decimals: string;
3460
- isZero: boolean;
3461
3460
  };
3462
3461
  rewardsUSD: string;
3463
3462
  }>;
@@ -3467,7 +3466,6 @@ declare class GaugeEntity {
3467
3466
  format: string;
3468
3467
  originFormat: string;
3469
3468
  decimals: string;
3470
- isZero: boolean;
3471
3469
  };
3472
3470
  balanceOfUSD: string;
3473
3471
  balanceOfTokenIds?: undefined;
@@ -3477,7 +3475,6 @@ declare class GaugeEntity {
3477
3475
  format: string;
3478
3476
  originFormat: string;
3479
3477
  decimals: string;
3480
- isZero: boolean;
3481
3478
  };
3482
3479
  balanceOfTokenIds: number[];
3483
3480
  balanceOfUSD: string;
@@ -3488,27 +3485,24 @@ declare class GaugeEntity {
3488
3485
  format: string;
3489
3486
  originFormat: string;
3490
3487
  decimals: string;
3491
- isZero: boolean;
3492
3488
  };
3493
3489
  totalSupplyUSD: string;
3494
- }>;
3490
+ } | undefined>;
3495
3491
  gaugeCurrentRewards(): Promise<{
3496
3492
  rewards: {
3497
3493
  value: string;
3498
3494
  format: string;
3499
3495
  originFormat: string;
3500
3496
  decimals: string;
3501
- isZero: boolean;
3502
3497
  };
3503
3498
  rewardsUSD: string;
3504
- }>;
3499
+ } | undefined>;
3505
3500
  userDailyRewards(account: `0x${string}`): Promise<{
3506
3501
  rewards: {
3507
3502
  value: string;
3508
3503
  format: string;
3509
3504
  originFormat: string;
3510
3505
  decimals: string;
3511
- isZero: boolean;
3512
3506
  };
3513
3507
  rewardsUSD: string;
3514
3508
  }>;
@@ -3518,7 +3512,6 @@ declare class GaugeEntity {
3518
3512
  format: string;
3519
3513
  originFormat: string;
3520
3514
  decimals: string;
3521
- isZero: boolean;
3522
3515
  };
3523
3516
  rewardsUSD: string;
3524
3517
  }>;
@@ -3532,18 +3525,16 @@ declare class GaugeEntity {
3532
3525
  format: string;
3533
3526
  originFormat: string;
3534
3527
  decimals: string;
3535
- isZero: boolean;
3536
3528
  };
3537
3529
  totalWeight: {
3538
3530
  value: string;
3539
3531
  format: string;
3540
3532
  originFormat: string;
3541
3533
  decimals: string;
3542
- isZero: boolean;
3543
3534
  };
3544
3535
  percent: string;
3545
3536
  }>;
3546
- votingApr(): Promise<string>;
3537
+ votingApr(): Promise<string | undefined>;
3547
3538
  someAddress(): Promise<{
3548
3539
  voterAddress: string;
3549
3540
  vaultAddress: string;
@@ -5393,14 +5384,12 @@ declare class VoterEntity {
5393
5384
  format: string;
5394
5385
  originFormat: string;
5395
5386
  decimals: string;
5396
- isZero: boolean;
5397
5387
  }>;
5398
5388
  usedWeights(account: `0x${string}`): Promise<{
5399
5389
  value: string;
5400
5390
  format: string;
5401
5391
  originFormat: string;
5402
5392
  decimals: string;
5403
- isZero: boolean;
5404
5393
  }>;
5405
5394
  weeklyVoteEmissions(): Promise<string | 0>;
5406
5395
  apr(): Promise<string>;
@@ -7201,7 +7190,6 @@ declare class MockLSTEntity {
7201
7190
  format: string;
7202
7191
  originFormat: string;
7203
7192
  decimals: string;
7204
- isZero: boolean;
7205
7193
  }>;
7206
7194
  approve(spender: `0x${string}`, amount: string, owner: `0x${string}`): Promise<`0x${string}` | null>;
7207
7195
  totalSupply: () => Promise<any>;
@@ -7763,14 +7751,12 @@ declare class LSTStrategyEntity {
7763
7751
  format: string;
7764
7752
  originFormat: string;
7765
7753
  decimals: string;
7766
- isZero: boolean;
7767
7754
  }>;
7768
7755
  amount(account?: `0x${string}`): Promise<{
7769
7756
  value: string;
7770
7757
  format: string;
7771
7758
  originFormat: string;
7772
7759
  decimals: string;
7773
- isZero: boolean;
7774
7760
  }>;
7775
7761
  owner: () => Promise<any>;
7776
7762
  unstakeTime: (_: `0x${string}`) => Promise<any>;
@@ -7834,14 +7820,12 @@ declare class MSP {
7834
7820
  format: string;
7835
7821
  originFormat: string;
7836
7822
  decimals: string;
7837
- isZero: boolean;
7838
7823
  };
7839
7824
  bucketAmount: {
7840
7825
  value: string;
7841
7826
  format: string;
7842
7827
  originFormat: string;
7843
7828
  decimals: string;
7844
- isZero: boolean;
7845
7829
  };
7846
7830
  stakeStatus: any;
7847
7831
  totalAmount: () => Promise<any>;
@@ -7878,7 +7862,6 @@ declare class MSP {
7878
7862
  format: string;
7879
7863
  originFormat: string;
7880
7864
  decimals: string;
7881
- isZero: boolean;
7882
7865
  };
7883
7866
  approve: (spender: `0x${string}`, amount: string, owner: `0x${string}`) => Promise<`0x${string}` | null>;
7884
7867
  totalSupply: () => Promise<any>;
@@ -7909,14 +7892,12 @@ declare class MSP {
7909
7892
  format: string;
7910
7893
  originFormat: string;
7911
7894
  decimals: string;
7912
- isZero: boolean;
7913
7895
  };
7914
7896
  bucketAmount: {
7915
7897
  value: string;
7916
7898
  format: string;
7917
7899
  originFormat: string;
7918
7900
  decimals: string;
7919
- isZero: boolean;
7920
7901
  };
7921
7902
  owner: () => Promise<any>;
7922
7903
  stakeStatus: any;
@@ -8291,7 +8272,6 @@ declare class UseHub {
8291
8272
  format: string;
8292
8273
  originFormat: string;
8293
8274
  decimals: string;
8294
- isZero: boolean;
8295
8275
  } | {
8296
8276
  error: unknown;
8297
8277
  }>;
@@ -8418,12 +8398,28 @@ declare class Analyzer extends BaseDBModule {
8418
8398
  totalCrossChainTxCount(): Promise<number>;
8419
8399
  nftContractCount(): Promise<any>;
8420
8400
  }
8401
+ export interface ItemNFT {
8402
+ collection: string;
8403
+ token_id: string;
8404
+ token_uri: string;
8405
+ owner: string;
8406
+ type: string;
8407
+ custom_image: string;
8408
+ custom_metadata: any;
8409
+ name: string;
8410
+ symbol: string;
8411
+ image: string;
8412
+ image_detail: string;
8413
+ }
8421
8414
  declare class NFT extends BaseDBModule {
8422
8415
  getNFTsByAccount({ address, page, pageSize }: {
8423
8416
  address: string;
8424
8417
  pageSize?: number;
8425
8418
  page?: number;
8426
- }): Promise<import("postgres").RowList<import("postgres").Row[]>>;
8419
+ }): Promise<{
8420
+ data: ItemNFT[];
8421
+ count: number;
8422
+ }>;
8427
8423
  getNFTsCountByAccount({ address }: {
8428
8424
  address: string;
8429
8425
  }): Promise<any>;
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.1",
5
+ "version": "v0.1.3",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -35,7 +35,7 @@
35
35
  "viem": "^2.17.5"
36
36
  },
37
37
  "devDependencies": {
38
- "@dappworks/kit": "0.4.197",
38
+ "@dappworks/kit": "^0.4.198",
39
39
  "@types/bun": "latest",
40
40
  "@types/tryghost__content-api": "^1.3.16",
41
41
  "bun-plugin-dts": "^0.2.3",