@iotexproject/kit 0.1.0 → 0.1.2

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 +24 -36
  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,32 +3485,26 @@ 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
- } | {
3515
- rewards: string;
3516
- rewardsUSD: string;
3517
3508
  }>;
3518
3509
  gaugeDailyRewards(): Promise<{
3519
3510
  rewards: {
@@ -3521,12 +3512,8 @@ declare class GaugeEntity {
3521
3512
  format: string;
3522
3513
  originFormat: string;
3523
3514
  decimals: string;
3524
- isZero: boolean;
3525
3515
  };
3526
3516
  rewardsUSD: string;
3527
- } | {
3528
- rewards: string;
3529
- rewardsUSD: string;
3530
3517
  }>;
3531
3518
  votes(account: `0x${string}`): Promise<{
3532
3519
  votes: string;
@@ -3538,18 +3525,16 @@ declare class GaugeEntity {
3538
3525
  format: string;
3539
3526
  originFormat: string;
3540
3527
  decimals: string;
3541
- isZero: boolean;
3542
3528
  };
3543
3529
  totalWeight: {
3544
3530
  value: string;
3545
3531
  format: string;
3546
3532
  originFormat: string;
3547
3533
  decimals: string;
3548
- isZero: boolean;
3549
3534
  };
3550
3535
  percent: string;
3551
3536
  }>;
3552
- votingApr(): Promise<string>;
3537
+ votingApr(): Promise<string | undefined>;
3553
3538
  someAddress(): Promise<{
3554
3539
  voterAddress: string;
3555
3540
  vaultAddress: string;
@@ -5399,14 +5384,12 @@ declare class VoterEntity {
5399
5384
  format: string;
5400
5385
  originFormat: string;
5401
5386
  decimals: string;
5402
- isZero: boolean;
5403
5387
  }>;
5404
5388
  usedWeights(account: `0x${string}`): Promise<{
5405
5389
  value: string;
5406
5390
  format: string;
5407
5391
  originFormat: string;
5408
5392
  decimals: string;
5409
- isZero: boolean;
5410
5393
  }>;
5411
5394
  weeklyVoteEmissions(): Promise<string | 0>;
5412
5395
  apr(): Promise<string>;
@@ -7207,7 +7190,6 @@ declare class MockLSTEntity {
7207
7190
  format: string;
7208
7191
  originFormat: string;
7209
7192
  decimals: string;
7210
- isZero: boolean;
7211
7193
  }>;
7212
7194
  approve(spender: `0x${string}`, amount: string, owner: `0x${string}`): Promise<`0x${string}` | null>;
7213
7195
  totalSupply: () => Promise<any>;
@@ -7769,14 +7751,12 @@ declare class LSTStrategyEntity {
7769
7751
  format: string;
7770
7752
  originFormat: string;
7771
7753
  decimals: string;
7772
- isZero: boolean;
7773
7754
  }>;
7774
7755
  amount(account?: `0x${string}`): Promise<{
7775
7756
  value: string;
7776
7757
  format: string;
7777
7758
  originFormat: string;
7778
7759
  decimals: string;
7779
- isZero: boolean;
7780
7760
  }>;
7781
7761
  owner: () => Promise<any>;
7782
7762
  unstakeTime: (_: `0x${string}`) => Promise<any>;
@@ -7840,14 +7820,12 @@ declare class MSP {
7840
7820
  format: string;
7841
7821
  originFormat: string;
7842
7822
  decimals: string;
7843
- isZero: boolean;
7844
7823
  };
7845
7824
  bucketAmount: {
7846
7825
  value: string;
7847
7826
  format: string;
7848
7827
  originFormat: string;
7849
7828
  decimals: string;
7850
- isZero: boolean;
7851
7829
  };
7852
7830
  stakeStatus: any;
7853
7831
  totalAmount: () => Promise<any>;
@@ -7884,7 +7862,6 @@ declare class MSP {
7884
7862
  format: string;
7885
7863
  originFormat: string;
7886
7864
  decimals: string;
7887
- isZero: boolean;
7888
7865
  };
7889
7866
  approve: (spender: `0x${string}`, amount: string, owner: `0x${string}`) => Promise<`0x${string}` | null>;
7890
7867
  totalSupply: () => Promise<any>;
@@ -7915,14 +7892,12 @@ declare class MSP {
7915
7892
  format: string;
7916
7893
  originFormat: string;
7917
7894
  decimals: string;
7918
- isZero: boolean;
7919
7895
  };
7920
7896
  bucketAmount: {
7921
7897
  value: string;
7922
7898
  format: string;
7923
7899
  originFormat: string;
7924
7900
  decimals: string;
7925
- isZero: boolean;
7926
7901
  };
7927
7902
  owner: () => Promise<any>;
7928
7903
  stakeStatus: any;
@@ -8297,7 +8272,6 @@ declare class UseHub {
8297
8272
  format: string;
8298
8273
  originFormat: string;
8299
8274
  decimals: string;
8300
- isZero: boolean;
8301
8275
  } | {
8302
8276
  error: unknown;
8303
8277
  }>;
@@ -8424,12 +8398,26 @@ declare class Analyzer extends BaseDBModule {
8424
8398
  totalCrossChainTxCount(): Promise<number>;
8425
8399
  nftContractCount(): Promise<any>;
8426
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
+ image: string;
8410
+ image_detail: string;
8411
+ }
8427
8412
  declare class NFT extends BaseDBModule {
8428
8413
  getNFTsByAccount({ address, page, pageSize }: {
8429
8414
  address: string;
8430
8415
  pageSize?: number;
8431
8416
  page?: number;
8432
- }): Promise<import("postgres").RowList<import("postgres").Row[]>>;
8417
+ }): Promise<{
8418
+ data: ItemNFT[];
8419
+ count: number;
8420
+ }>;
8433
8421
  getNFTsCountByAccount({ address }: {
8434
8422
  address: string;
8435
8423
  }): 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.0",
5
+ "version": "v0.1.2",
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",