@iotexproject/kit 0.1.81 → 0.1.83

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 +45 -63
  2. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -756,6 +756,7 @@ declare abstract class BaseGauge {
756
756
  abstract address: `0x${string}`;
757
757
  abstract chainId: string;
758
758
  abstract Incentive: IncentivesEntity;
759
+ abstract metadata(): Promise<Record<string, any>>;
759
760
  abstract gaugeType(): Promise<"LPToken" | "ERC20" | "ERC721">;
760
761
  abstract projectInfo(): Promise<{
761
762
  metadata: ProjectMetadata | null;
@@ -826,6 +827,7 @@ declare abstract class BaseGauge {
826
827
  rewardsUSD: string;
827
828
  }>;
828
829
  abstract deposit: (_amount: string) => Promise<any>;
830
+ abstract depositWithBucketId: (bucketId: string, tokenId: string, receipent: `0x${string}`) => Promise<any>;
829
831
  abstract withdraw: (_amount: string) => Promise<any>;
830
832
  abstract claimReward(_account: `0x${string}`): Promise<any>;
831
833
  abstract withdrawTax: (_taxer: `0x${string}`) => Promise<any>;
@@ -854,6 +856,7 @@ declare abstract class BaseGauge {
854
856
  percent: string;
855
857
  }>;
856
858
  abstract isTaxGauge(): Promise<boolean>;
859
+ abstract withStaking(): Promise<boolean>;
857
860
  abstract taxer(): Promise<boolean | `0x${string}`>;
858
861
  abstract taxAmount(): Promise<{
859
862
  value: string;
@@ -2695,6 +2698,7 @@ declare class GaugeEntity implements BaseGauge {
2695
2698
  address: `0x${string}`;
2696
2699
  chainId: string;
2697
2700
  Incentive: IncentivesEntity;
2701
+ withStaking(): Promise<boolean>;
2698
2702
  /**
2699
2703
  * @important : This property is distinguished from the other gauge and is the gauge that owns tax
2700
2704
  */
@@ -2845,6 +2849,7 @@ declare class GaugeEntity implements BaseGauge {
2845
2849
  }>;
2846
2850
  stakingToken(): Promise<`0x${string}`>;
2847
2851
  deposit: (_amount: string) => Promise<any>;
2852
+ depositWithBucketId: (bucketId: string, tokenId: string, receipent: `0x${string}`) => Promise<any>;
2848
2853
  withdraw: (_amount: string) => Promise<any>;
2849
2854
  claimReward: (_account: `0x${string}`) => Promise<any>;
2850
2855
  withdrawTax: (_taxer: `0x${string}`) => Promise<any>;
@@ -4733,40 +4738,8 @@ declare class VoterEntity {
4733
4738
  declare class MarshallDao {
4734
4739
  gaugeList(args: {
4735
4740
  account?: `0x${string}`;
4736
- }, ctx?: ConfigContext): Promise<import("@dappworks/kit/aiem").QueryReturnType<GaugeEntity, {
4737
- address: true;
4738
- chainId: true;
4739
- gaugeType: true;
4740
- apr: true;
4741
- projectInfo: true;
4742
- rewards: false | [
4743
- `0x${string}`
4744
- ];
4745
- userDailyRewards: false | [
4746
- `0x${string}`
4747
- ];
4748
- gaugeDailyRewards: true;
4749
- gaugeCurrentRewards: true;
4750
- balanceOf: false | [
4751
- `0x${string}`
4752
- ];
4753
- totalSupply: true;
4754
- votes: false | [
4755
- `0x${string}`
4756
- ];
4757
- totalVote: true;
4758
- votingApr: true;
4759
- stakingTokenInfo: true | [
4760
- `0x${string}`
4761
- ];
4762
- isTaxGauge: true;
4763
- Incentive: {
4764
- allRewards: false | [
4765
- `0x${string}`
4766
- ];
4767
- rewardAllTokens: true;
4768
- };
4769
- }>[] | null>;
4741
+ gauge?: `0x${string}`;
4742
+ }, ctx?: ConfigContext): Promise<import("@dappworks/kit/aiem").QueryReturnType<GaugeEntity, any>[] | null>;
4770
4743
  totalGaugeRewards(args: {
4771
4744
  account?: `0x${string}`;
4772
4745
  }, ctx?: ConfigContext): Promise<{
@@ -4807,6 +4780,7 @@ declare class MarshallDao {
4807
4780
  gagueAddress: `0x${string}`;
4808
4781
  amountOrTokenId: string;
4809
4782
  account: `0x${string}`;
4783
+ bucketId?: string;
4810
4784
  }, ctx?: ConfigContext): Promise<{
4811
4785
  data: any;
4812
4786
  approve: `0x${string}` | null | undefined;
@@ -6890,52 +6864,52 @@ declare class Staking {
6890
6864
  compositeBucketsByVoter(args: {
6891
6865
  address: `0x${string}`;
6892
6866
  count?: string;
6893
- }): Promise<Bucket[] | {
6867
+ }, ctx?: ConfigContext): Promise<Bucket[] | {
6894
6868
  error: any;
6895
6869
  }>;
6896
6870
  changeCandidate(args: {
6897
6871
  candName: string;
6898
6872
  bucketIndex: string;
6899
- }): Promise<any>;
6873
+ }, ctx?: ConfigContext): Promise<any>;
6900
6874
  depositToStake(args: {
6901
6875
  bucketIndex: string;
6902
6876
  amount: string;
6903
- }): Promise<any>;
6877
+ }, ctx?: ConfigContext): Promise<any>;
6904
6878
  restake(args: {
6905
6879
  bucketIndex: string;
6906
6880
  duration: string;
6907
6881
  autoStake: boolean;
6908
- }): Promise<any>;
6882
+ }, ctx?: ConfigContext): Promise<any>;
6909
6883
  unstake(args: {
6910
6884
  bucketIndex: string;
6911
- }): Promise<any>;
6885
+ }, ctx?: ConfigContext): Promise<any>;
6912
6886
  withdrawStake(args: {
6913
6887
  bucketIndex: string;
6914
- }): Promise<any>;
6888
+ }, ctx?: ConfigContext): Promise<any>;
6915
6889
  transferStake(args: {
6916
6890
  voterAddress: `0x${string}`;
6917
6891
  bucketIndex: string;
6918
- }): Promise<any>;
6892
+ }, ctx?: ConfigContext): Promise<any>;
6919
6893
  migrateStake(args: {
6920
6894
  bucketIndex: string;
6921
- }): Promise<any>;
6895
+ }, ctx?: ConfigContext): Promise<any>;
6922
6896
  getNFTV2BucketsByIndexes(args: {
6923
6897
  token_ids: string[];
6924
- }): Promise<any[]>;
6898
+ }, ctx?: ConfigContext): Promise<any[]>;
6925
6899
  getNFTV2BucketByIndex(args: {
6926
6900
  token_id: string;
6927
- }): Promise<any>;
6901
+ }, ctx?: ConfigContext): Promise<any>;
6928
6902
  createNativeBucket(args: {
6929
6903
  candName: string;
6930
6904
  amount: string;
6931
6905
  duration: string;
6932
6906
  autoStake: boolean;
6933
- }): Promise<any>;
6907
+ }, ctx?: ConfigContext): Promise<any>;
6934
6908
  candidateEndorsement(args: {
6935
6909
  bucketIndex: string;
6936
6910
  endorse: boolean;
6937
- }): Promise<any>;
6938
- nftV2StakingConfig(): Promise<{
6911
+ }, ctx?: ConfigContext): Promise<any>;
6912
+ nftV2StakingConfig(args?: any, ctx?: ConfigContext): Promise<{
6939
6913
  min_amount: any;
6940
6914
  max_duration: any;
6941
6915
  one_day: any;
@@ -6949,34 +6923,36 @@ declare class Staking {
6949
6923
  createNFTV2Bucket(args: {
6950
6924
  duration: string;
6951
6925
  delegate: `0x${string}`;
6952
- }): Promise<any>;
6926
+ }, ctx?: ConfigContext): Promise<any>;
6953
6927
  NFTBucketChangeDelegate(args: {
6954
6928
  bucketIndex: string;
6955
6929
  delegate: `0x${string}`;
6956
6930
  version: "v1" | "v2";
6957
- }): Promise<any>;
6931
+ }, ctx?: ConfigContext): Promise<any>;
6958
6932
  NFTBucketRestake(args: {
6959
6933
  bucketIndex: string;
6960
6934
  duration: string;
6961
6935
  version: "v1" | "v2";
6962
6936
  newAmount?: string;
6963
- }): Promise<any>;
6937
+ }, ctx?: ConfigContext): Promise<any>;
6964
6938
  NFTBucketStakeLock(args: {
6965
6939
  bucketIndex: string;
6966
6940
  autoStake: boolean;
6967
6941
  version: "v1" | "v2";
6968
6942
  duration?: string;
6969
- }): Promise<any>;
6943
+ }, ctx?: ConfigContext): Promise<any>;
6970
6944
  NFTBucketUnstake(args: {
6971
6945
  bucketIndex: string;
6972
6946
  version: "v1" | "v2";
6973
- }): Promise<any>;
6947
+ }, ctx?: ConfigContext): Promise<any>;
6974
6948
  NFTBucketWithdrawStake(args: {
6975
6949
  bucketIndex: string;
6976
6950
  receiverAddress: `0x${string}`;
6977
6951
  version: "v1" | "v2";
6978
- }): Promise<any>;
6979
- delegate_list(isWhole?: boolean): Promise<{
6952
+ }, ctx?: ConfigContext): Promise<any>;
6953
+ delegate_list(args?: {
6954
+ isWhole?: boolean;
6955
+ }, ctx?: ConfigContext): Promise<{
6980
6956
  data: any;
6981
6957
  error?: undefined;
6982
6958
  } | {
@@ -6994,15 +6970,15 @@ declare class Staking {
6994
6970
  }>;
6995
6971
  getDelegateByAddress(args: {
6996
6972
  ownerAddress: `0x${string}` | `io${string}`;
6997
- }): Promise<CandidateV3>;
6973
+ }, ctx?: ConfigContext): Promise<CandidateV3>;
6998
6974
  upsertRewardDistribution(args: {
6999
6975
  foundationRewardPortion: number;
7000
6976
  epochRewardPortion: number;
7001
6977
  blockRewardPortion: number;
7002
- }): Promise<any>;
6978
+ }, ctx?: ConfigContext): Promise<any>;
7003
6979
  getRewardDistribution(args: {
7004
6980
  ownerAddress: `0x${string}` | `io${string}`;
7005
- }): Promise<{
6981
+ }, ctx?: ConfigContext): Promise<{
7006
6982
  foundationRewardPortion: any;
7007
6983
  epochRewardPortion: any;
7008
6984
  blockRewardPortion: any;
@@ -7011,19 +6987,19 @@ declare class Staking {
7011
6987
  name: string;
7012
6988
  operatorAddress: `0x${string}`;
7013
6989
  rewardAddress: `0x${string}`;
7014
- }): Promise<any>;
6990
+ }, ctx?: ConfigContext): Promise<any>;
7015
6991
  getEndorseBucketsByDelegate(args: {
7016
6992
  ownerAddress: `0x${string}` | `io${string}`;
7017
- }): Promise<CompositeBucket[]>;
6993
+ }, ctx?: ConfigContext): Promise<CompositeBucket[]>;
7018
6994
  candidateTransferOwnership({ newOwner }: {
7019
6995
  newOwner: `0x${string}`;
7020
- }): Promise<any>;
6996
+ }, ctx?: ConfigContext): Promise<any>;
7021
6997
  candidateActivate({ bucketIndex }: {
7022
6998
  bucketIndex: string;
7023
- }): Promise<any>;
6999
+ }, ctx?: ConfigContext): Promise<any>;
7024
7000
  getSelfStakeBucketByDelegate(args: {
7025
7001
  ownerAddress: `0x${string}` | `io${string}`;
7026
- }): Promise<CompositeBucket | null>;
7002
+ }, ctx?: ConfigContext): Promise<CompositeBucket | null>;
7027
7003
  }
7028
7004
  declare class utils {
7029
7005
  erc20(args: {
@@ -9969,7 +9945,13 @@ declare const modules$2: {
9969
9945
  }>;
9970
9946
  };
9971
9947
  readonly gastracker: {
9972
- gasestimate: any;
9948
+ gasestimate: KitModuleFunction<import("zod").ZodObject<{
9949
+ gasprice: import("zod").ZodEffects<import("zod").ZodString, number, string>;
9950
+ }, "strip", import("zod").ZodTypeAny, {
9951
+ gasprice: number;
9952
+ }, {
9953
+ gasprice: string;
9954
+ }>, import("zod").ZodAny, number>;
9973
9955
  dailyavggaslimit: KitModuleFunction<import("zod").ZodObject<{
9974
9956
  startdate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
9975
9957
  enddate: import("zod").ZodEffects<import("zod").ZodString, string, string>;
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.1.81",
5
+ "version": "0.1.83",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -27,6 +27,7 @@
27
27
  "@hyperdx/node-opentelemetry": "^0.8.1",
28
28
  "@iotexproject/iotex-address-ts": "^1.0.4",
29
29
  "@noble/curves": "^1.6.0",
30
+ "@tokenbound/sdk": "^0.5.5",
30
31
  "@tryghost/content-api": "^1.11.21",
31
32
  "@types/bn.js": "^5.1.6",
32
33
  "@types/utf8": "^3.0.3",