@iotexproject/kit 0.1.65 → 0.1.66

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 +478 -825
  2. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -8009,6 +8009,15 @@ declare class MimoV2MiningPool {
8009
8009
  deposit: (_amount: string) => Promise<any>;
8010
8010
  withdraw: (_amount: string) => Promise<any>;
8011
8011
  }
8012
+ export type MimoV3MiningPoolKey = {
8013
+ rewardToken: `0x${string}`;
8014
+ pool: `0x${string}`;
8015
+ tickLower: number;
8016
+ tickUpper: number;
8017
+ startTime: bigint;
8018
+ endTime: bigint;
8019
+ refundee: `0x${string}`;
8020
+ };
8012
8021
  declare class LiquidityMining {
8013
8022
  poolsList(args: {
8014
8023
  account?: `0x${string}`;
@@ -8048,849 +8057,202 @@ declare class LiquidityMining {
8048
8057
  totalStakedBalance: true;
8049
8058
  dailyRewards: true;
8050
8059
  }>[]>;
8051
- deposit({ address, amount, account }: {
8052
- address: `0x${string}`;
8053
- amount: string;
8054
- account: `0x${string}`;
8055
- }, ctx?: ConfigContext): Promise<{
8056
- data: any;
8057
- address: `0x${string}`;
8058
- chainId: string;
8060
+ allPoolsList(args: {
8061
+ account?: `0x${string}`;
8062
+ }, ctx?: ConfigContext): Promise<({
8059
8063
  type: string;
8060
- }[]>;
8061
- harvest({ address }: {
8062
- address: `0x${string}`;
8063
- }, ctx?: ConfigContext): Promise<{
8064
- data: `0x${string}`;
8065
- address: `0x${string}`;
8066
- chainId: string;
8067
- }>;
8068
- withdraw({ address, amount }: {
8069
- address: `0x${string}`;
8070
- amount: string;
8071
- }, ctx?: ConfigContext): Promise<{
8072
- data: any;
8073
8064
  address: `0x${string}`;
8074
8065
  chainId: string;
8075
- }>;
8076
- }
8077
- export type MimoV3MiningPoolKey = {
8078
- rewardToken: `0x${string}`;
8079
- pool: `0x${string}`;
8080
- tickLower: number;
8081
- tickUpper: number;
8082
- startTime: bigint;
8083
- endTime: bigint;
8084
- refundee: `0x${string}`;
8085
- };
8086
- declare class MimoV3MiningManager {
8087
- address: `0x${string}`;
8088
- chainId: string;
8089
- static abi: readonly [
8090
- {
8091
- readonly type: "function";
8092
- readonly name: "claimReward";
8093
- readonly inputs: readonly [
8094
- {
8095
- readonly name: "rewardToken";
8096
- readonly type: "address";
8097
- readonly internalType: "contract IERC20Minimal";
8098
- },
8099
- {
8100
- readonly name: "to";
8101
- readonly type: "address";
8102
- readonly internalType: "address";
8103
- },
8104
- {
8105
- readonly name: "amountRequested";
8106
- readonly type: "uint256";
8107
- readonly internalType: "uint256";
8108
- }
8109
- ];
8110
- readonly outputs: readonly [
8111
- {
8112
- readonly name: "reward";
8113
- readonly type: "uint256";
8114
- readonly internalType: "uint256";
8115
- }
8116
- ];
8117
- readonly stateMutability: "nonpayable";
8118
- },
8119
- {
8120
- readonly type: "function";
8121
- readonly name: "createIncentive";
8122
- readonly inputs: readonly [
8123
- {
8124
- readonly name: "key";
8125
- readonly type: "tuple";
8126
- readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
8127
- readonly components: readonly [
8128
- {
8129
- readonly name: "rewardToken";
8130
- readonly type: "address";
8131
- readonly internalType: "contract IERC20Minimal";
8132
- },
8133
- {
8134
- readonly name: "pool";
8135
- readonly type: "address";
8136
- readonly internalType: "contract IUniswapV3Pool";
8137
- },
8138
- {
8139
- readonly name: "tickLower";
8140
- readonly type: "int24";
8141
- readonly internalType: "int24";
8142
- },
8143
- {
8144
- readonly name: "tickUpper";
8145
- readonly type: "int24";
8146
- readonly internalType: "int24";
8147
- },
8148
- {
8149
- readonly name: "startTime";
8150
- readonly type: "uint256";
8151
- readonly internalType: "uint256";
8152
- },
8153
- {
8154
- readonly name: "endTime";
8155
- readonly type: "uint256";
8156
- readonly internalType: "uint256";
8157
- },
8158
- {
8159
- readonly name: "refundee";
8160
- readonly type: "address";
8161
- readonly internalType: "address";
8162
- }
8163
- ];
8164
- },
8165
- {
8166
- readonly name: "reward";
8167
- readonly type: "uint256";
8168
- readonly internalType: "uint256";
8169
- }
8170
- ];
8171
- readonly outputs: readonly [
8172
- ];
8173
- readonly stateMutability: "nonpayable";
8174
- },
8175
- {
8176
- readonly type: "function";
8177
- readonly name: "deposits";
8178
- readonly inputs: readonly [
8179
- {
8180
- readonly name: "tokenId";
8181
- readonly type: "uint256";
8182
- readonly internalType: "uint256";
8183
- }
8184
- ];
8185
- readonly outputs: readonly [
8186
- {
8187
- readonly name: "owner";
8188
- readonly type: "address";
8189
- readonly internalType: "address";
8190
- },
8191
- {
8192
- readonly name: "numberOfStakes";
8193
- readonly type: "uint48";
8194
- readonly internalType: "uint48";
8195
- },
8196
- {
8197
- readonly name: "tickLower";
8198
- readonly type: "int24";
8199
- readonly internalType: "int24";
8200
- },
8201
- {
8202
- readonly name: "tickUpper";
8203
- readonly type: "int24";
8204
- readonly internalType: "int24";
8205
- }
8206
- ];
8207
- readonly stateMutability: "view";
8208
- },
8209
- {
8210
- readonly type: "function";
8211
- readonly name: "endIncentive";
8212
- readonly inputs: readonly [
8213
- {
8214
- readonly name: "key";
8215
- readonly type: "tuple";
8216
- readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
8217
- readonly components: readonly [
8218
- {
8219
- readonly name: "rewardToken";
8220
- readonly type: "address";
8221
- readonly internalType: "contract IERC20Minimal";
8222
- },
8223
- {
8224
- readonly name: "pool";
8225
- readonly type: "address";
8226
- readonly internalType: "contract IUniswapV3Pool";
8227
- },
8228
- {
8229
- readonly name: "tickLower";
8230
- readonly type: "int24";
8231
- readonly internalType: "int24";
8232
- },
8233
- {
8234
- readonly name: "tickUpper";
8235
- readonly type: "int24";
8236
- readonly internalType: "int24";
8237
- },
8238
- {
8239
- readonly name: "startTime";
8240
- readonly type: "uint256";
8241
- readonly internalType: "uint256";
8242
- },
8243
- {
8244
- readonly name: "endTime";
8245
- readonly type: "uint256";
8246
- readonly internalType: "uint256";
8247
- },
8248
- {
8249
- readonly name: "refundee";
8250
- readonly type: "address";
8251
- readonly internalType: "address";
8252
- }
8253
- ];
8254
- }
8255
- ];
8256
- readonly outputs: readonly [
8257
- {
8258
- readonly name: "refund";
8259
- readonly type: "uint256";
8260
- readonly internalType: "uint256";
8261
- }
8262
- ];
8263
- readonly stateMutability: "nonpayable";
8264
- },
8265
- {
8266
- readonly type: "function";
8267
- readonly name: "factory";
8268
- readonly inputs: readonly [
8269
- ];
8270
- readonly outputs: readonly [
8271
- {
8272
- readonly name: "";
8273
- readonly type: "address";
8274
- readonly internalType: "contract IUniswapV3Factory";
8275
- }
8066
+ endTime: number | undefined;
8067
+ startTime: number | undefined;
8068
+ isNew: boolean;
8069
+ isExpired: boolean;
8070
+ myPoolBalance: {
8071
+ myPoolBalance: {
8072
+ value: string;
8073
+ format: string;
8074
+ originFormat: string;
8075
+ decimals: string;
8076
+ };
8077
+ myPoolBalanceUSD: string;
8078
+ } | null;
8079
+ rewardPerSecond: () => Promise<bigint | undefined>;
8080
+ apr: string;
8081
+ myPendingReward: {
8082
+ pendingReward: {
8083
+ value: string;
8084
+ format: string;
8085
+ originFormat: string;
8086
+ decimals: string;
8087
+ };
8088
+ pendingRewardUSD: string;
8089
+ };
8090
+ totalReward: {
8091
+ totalRewardUSD: string;
8092
+ totalReward: {
8093
+ value: string;
8094
+ format: string;
8095
+ originFormat: string;
8096
+ decimals: string;
8097
+ };
8098
+ } | null | undefined;
8099
+ dailyRewards: {
8100
+ dailyRewardUSD: string;
8101
+ dailyReward: {
8102
+ value: string;
8103
+ format: string;
8104
+ originFormat: string;
8105
+ decimals: string;
8106
+ };
8107
+ } | null | undefined;
8108
+ totalStakedBalance: {
8109
+ totalStakedBalance: {
8110
+ value: string;
8111
+ format: string;
8112
+ originFormat: string;
8113
+ decimals: string;
8114
+ };
8115
+ totalStakedBalanceUSD: string;
8116
+ } | undefined;
8117
+ myStakedTokenBalance: {
8118
+ value: string;
8119
+ format: string;
8120
+ originFormat: string;
8121
+ decimals: string;
8122
+ } | undefined;
8123
+ getStakeTokenInner: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<LPTokenEntity, {
8124
+ address: true;
8125
+ symbol: true;
8126
+ priceUSD: true;
8127
+ decimals: true;
8128
+ tokenUrl: true;
8129
+ balanceOf: [
8130
+ `0x${string}`
8276
8131
  ];
8277
- readonly stateMutability: "view";
8278
- },
8279
- {
8280
- readonly type: "function";
8281
- readonly name: "getRewardInfo";
8282
- readonly inputs: readonly [
8283
- {
8284
- readonly name: "key";
8285
- readonly type: "tuple";
8286
- readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
8287
- readonly components: readonly [
8288
- {
8289
- readonly name: "rewardToken";
8290
- readonly type: "address";
8291
- readonly internalType: "contract IERC20Minimal";
8292
- },
8293
- {
8294
- readonly name: "pool";
8295
- readonly type: "address";
8296
- readonly internalType: "contract IUniswapV3Pool";
8297
- },
8298
- {
8299
- readonly name: "tickLower";
8300
- readonly type: "int24";
8301
- readonly internalType: "int24";
8302
- },
8303
- {
8304
- readonly name: "tickUpper";
8305
- readonly type: "int24";
8306
- readonly internalType: "int24";
8307
- },
8308
- {
8309
- readonly name: "startTime";
8310
- readonly type: "uint256";
8311
- readonly internalType: "uint256";
8312
- },
8313
- {
8314
- readonly name: "endTime";
8315
- readonly type: "uint256";
8316
- readonly internalType: "uint256";
8317
- },
8318
- {
8319
- readonly name: "refundee";
8320
- readonly type: "address";
8321
- readonly internalType: "address";
8322
- }
8323
- ];
8324
- },
8325
- {
8326
- readonly name: "tokenId";
8327
- readonly type: "uint256";
8328
- readonly internalType: "uint256";
8329
- }
8330
- ];
8331
- readonly outputs: readonly [
8332
- {
8333
- readonly name: "reward";
8334
- readonly type: "uint256";
8335
- readonly internalType: "uint256";
8336
- },
8337
- {
8338
- readonly name: "secondsInsideX128";
8339
- readonly type: "uint160";
8340
- readonly internalType: "uint160";
8341
- }
8342
- ];
8343
- readonly stateMutability: "nonpayable";
8344
- },
8345
- {
8346
- readonly type: "function";
8347
- readonly name: "incentives";
8348
- readonly inputs: readonly [
8349
- {
8350
- readonly name: "incentiveId";
8351
- readonly type: "bytes32";
8352
- readonly internalType: "bytes32";
8353
- }
8354
- ];
8355
- readonly outputs: readonly [
8356
- {
8357
- readonly name: "totalRewardUnclaimed";
8358
- readonly type: "uint256";
8359
- readonly internalType: "uint256";
8360
- },
8361
- {
8362
- readonly name: "totalSecondsClaimedX128";
8363
- readonly type: "uint160";
8364
- readonly internalType: "uint160";
8365
- },
8366
- {
8367
- readonly name: "numberOfStakes";
8368
- readonly type: "uint96";
8369
- readonly internalType: "uint96";
8370
- }
8371
- ];
8372
- readonly stateMutability: "view";
8373
- },
8374
- {
8375
- readonly type: "function";
8376
- readonly name: "maxIncentiveDuration";
8377
- readonly inputs: readonly [
8378
- ];
8379
- readonly outputs: readonly [
8380
- {
8381
- readonly name: "";
8382
- readonly type: "uint256";
8383
- readonly internalType: "uint256";
8384
- }
8385
- ];
8386
- readonly stateMutability: "view";
8387
- },
8388
- {
8389
- readonly type: "function";
8390
- readonly name: "maxIncentiveStartLeadTime";
8391
- readonly inputs: readonly [
8392
- ];
8393
- readonly outputs: readonly [
8394
- {
8395
- readonly name: "";
8396
- readonly type: "uint256";
8397
- readonly internalType: "uint256";
8398
- }
8399
- ];
8400
- readonly stateMutability: "view";
8401
- },
8402
- {
8403
- readonly type: "function";
8404
- readonly name: "multicall";
8405
- readonly inputs: readonly [
8406
- {
8407
- readonly name: "data";
8408
- readonly type: "bytes[]";
8409
- readonly internalType: "bytes[]";
8410
- }
8411
- ];
8412
- readonly outputs: readonly [
8413
- {
8414
- readonly name: "results";
8415
- readonly type: "bytes[]";
8416
- readonly internalType: "bytes[]";
8417
- }
8418
- ];
8419
- readonly stateMutability: "payable";
8420
- },
8421
- {
8422
- readonly type: "function";
8423
- readonly name: "nonfungiblePositionManager";
8424
- readonly inputs: readonly [
8425
- ];
8426
- readonly outputs: readonly [
8427
- {
8428
- readonly name: "";
8429
- readonly type: "address";
8430
- readonly internalType: "contract INonfungiblePositionManager";
8431
- }
8432
- ];
8433
- readonly stateMutability: "view";
8434
- },
8435
- {
8436
- readonly type: "function";
8437
- readonly name: "onERC721Received";
8438
- readonly inputs: readonly [
8439
- {
8440
- readonly name: "operator";
8441
- readonly type: "address";
8442
- readonly internalType: "address";
8443
- },
8444
- {
8445
- readonly name: "from";
8446
- readonly type: "address";
8447
- readonly internalType: "address";
8448
- },
8449
- {
8450
- readonly name: "tokenId";
8451
- readonly type: "uint256";
8452
- readonly internalType: "uint256";
8453
- },
8454
- {
8455
- readonly name: "data";
8456
- readonly type: "bytes";
8457
- readonly internalType: "bytes";
8458
- }
8459
- ];
8460
- readonly outputs: readonly [
8461
- {
8462
- readonly name: "";
8463
- readonly type: "bytes4";
8464
- readonly internalType: "bytes4";
8465
- }
8466
- ];
8467
- readonly stateMutability: "nonpayable";
8468
- },
8469
- {
8470
- readonly type: "function";
8471
- readonly name: "rewards";
8472
- readonly inputs: readonly [
8473
- {
8474
- readonly name: "rewardToken";
8475
- readonly type: "address";
8476
- readonly internalType: "contract IERC20Minimal";
8477
- },
8478
- {
8479
- readonly name: "owner";
8480
- readonly type: "address";
8481
- readonly internalType: "address";
8482
- }
8483
- ];
8484
- readonly outputs: readonly [
8485
- {
8486
- readonly name: "rewardsOwed";
8487
- readonly type: "uint256";
8488
- readonly internalType: "uint256";
8489
- }
8490
- ];
8491
- readonly stateMutability: "view";
8492
- },
8493
- {
8494
- readonly type: "function";
8495
- readonly name: "stakeToken";
8496
- readonly inputs: readonly [
8497
- {
8498
- readonly name: "key";
8499
- readonly type: "tuple";
8500
- readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
8501
- readonly components: readonly [
8502
- {
8503
- readonly name: "rewardToken";
8504
- readonly type: "address";
8505
- readonly internalType: "contract IERC20Minimal";
8506
- },
8507
- {
8508
- readonly name: "pool";
8509
- readonly type: "address";
8510
- readonly internalType: "contract IUniswapV3Pool";
8511
- },
8512
- {
8513
- readonly name: "tickLower";
8514
- readonly type: "int24";
8515
- readonly internalType: "int24";
8516
- },
8517
- {
8518
- readonly name: "tickUpper";
8519
- readonly type: "int24";
8520
- readonly internalType: "int24";
8521
- },
8522
- {
8523
- readonly name: "startTime";
8524
- readonly type: "uint256";
8525
- readonly internalType: "uint256";
8526
- },
8527
- {
8528
- readonly name: "endTime";
8529
- readonly type: "uint256";
8530
- readonly internalType: "uint256";
8531
- },
8532
- {
8533
- readonly name: "refundee";
8534
- readonly type: "address";
8535
- readonly internalType: "address";
8536
- }
8537
- ];
8538
- },
8539
- {
8540
- readonly name: "tokenId";
8541
- readonly type: "uint256";
8542
- readonly internalType: "uint256";
8543
- }
8544
- ];
8545
- readonly outputs: readonly [
8546
- ];
8547
- readonly stateMutability: "nonpayable";
8548
- },
8549
- {
8550
- readonly type: "function";
8551
- readonly name: "stakes";
8552
- readonly inputs: readonly [
8553
- {
8554
- readonly name: "tokenId";
8555
- readonly type: "uint256";
8556
- readonly internalType: "uint256";
8557
- },
8558
- {
8559
- readonly name: "incentiveId";
8560
- readonly type: "bytes32";
8561
- readonly internalType: "bytes32";
8562
- }
8563
- ];
8564
- readonly outputs: readonly [
8565
- {
8566
- readonly name: "secondsPerLiquidityInsideInitialX128";
8567
- readonly type: "uint160";
8568
- readonly internalType: "uint160";
8569
- },
8570
- {
8571
- readonly name: "liquidity";
8572
- readonly type: "uint128";
8573
- readonly internalType: "uint128";
8574
- }
8575
- ];
8576
- readonly stateMutability: "view";
8577
- },
8578
- {
8579
- readonly type: "function";
8580
- readonly name: "transferDeposit";
8581
- readonly inputs: readonly [
8582
- {
8583
- readonly name: "tokenId";
8584
- readonly type: "uint256";
8585
- readonly internalType: "uint256";
8586
- },
8587
- {
8588
- readonly name: "to";
8589
- readonly type: "address";
8590
- readonly internalType: "address";
8591
- }
8592
- ];
8593
- readonly outputs: readonly [
8594
- ];
8595
- readonly stateMutability: "nonpayable";
8596
- },
8597
- {
8598
- readonly type: "function";
8599
- readonly name: "unstakeToken";
8600
- readonly inputs: readonly [
8601
- {
8602
- readonly name: "key";
8603
- readonly type: "tuple";
8604
- readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
8605
- readonly components: readonly [
8606
- {
8607
- readonly name: "rewardToken";
8608
- readonly type: "address";
8609
- readonly internalType: "contract IERC20Minimal";
8610
- },
8611
- {
8612
- readonly name: "pool";
8613
- readonly type: "address";
8614
- readonly internalType: "contract IUniswapV3Pool";
8615
- },
8616
- {
8617
- readonly name: "tickLower";
8618
- readonly type: "int24";
8619
- readonly internalType: "int24";
8620
- },
8621
- {
8622
- readonly name: "tickUpper";
8623
- readonly type: "int24";
8624
- readonly internalType: "int24";
8625
- },
8626
- {
8627
- readonly name: "startTime";
8628
- readonly type: "uint256";
8629
- readonly internalType: "uint256";
8630
- },
8631
- {
8632
- readonly name: "endTime";
8633
- readonly type: "uint256";
8634
- readonly internalType: "uint256";
8635
- },
8636
- {
8637
- readonly name: "refundee";
8638
- readonly type: "address";
8639
- readonly internalType: "address";
8640
- }
8641
- ];
8642
- },
8643
- {
8644
- readonly name: "tokenId";
8645
- readonly type: "uint256";
8646
- readonly internalType: "uint256";
8647
- }
8648
- ];
8649
- readonly outputs: readonly [
8650
- ];
8651
- readonly stateMutability: "nonpayable";
8652
- },
8653
- {
8654
- readonly type: "function";
8655
- readonly name: "withdrawToken";
8656
- readonly inputs: readonly [
8657
- {
8658
- readonly name: "tokenId";
8659
- readonly type: "uint256";
8660
- readonly internalType: "uint256";
8661
- },
8662
- {
8663
- readonly name: "to";
8664
- readonly type: "address";
8665
- readonly internalType: "address";
8666
- },
8667
- {
8668
- readonly name: "data";
8669
- readonly type: "bytes";
8670
- readonly internalType: "bytes";
8671
- }
8672
- ];
8673
- readonly outputs: readonly [
8674
- ];
8675
- readonly stateMutability: "nonpayable";
8676
- },
8677
- {
8678
- readonly type: "event";
8679
- readonly name: "DepositTransferred";
8680
- readonly inputs: readonly [
8681
- {
8682
- readonly name: "tokenId";
8683
- readonly type: "uint256";
8684
- readonly indexed: true;
8685
- readonly internalType: "uint256";
8686
- },
8687
- {
8688
- readonly name: "oldOwner";
8689
- readonly type: "address";
8690
- readonly indexed: true;
8691
- readonly internalType: "address";
8692
- },
8693
- {
8694
- readonly name: "newOwner";
8695
- readonly type: "address";
8696
- readonly indexed: true;
8697
- readonly internalType: "address";
8698
- }
8699
- ];
8700
- readonly anonymous: false;
8701
- },
8702
- {
8703
- readonly type: "event";
8704
- readonly name: "IncentiveCreated";
8705
- readonly inputs: readonly [
8706
- {
8707
- readonly name: "rewardToken";
8708
- readonly type: "address";
8709
- readonly indexed: true;
8710
- readonly internalType: "contract IERC20Minimal";
8711
- },
8712
- {
8713
- readonly name: "pool";
8714
- readonly type: "address";
8715
- readonly indexed: true;
8716
- readonly internalType: "contract IUniswapV3Pool";
8717
- },
8718
- {
8719
- readonly name: "tickLower";
8720
- readonly type: "int24";
8721
- readonly indexed: false;
8722
- readonly internalType: "int24";
8723
- },
8724
- {
8725
- readonly name: "tickUpper";
8726
- readonly type: "int24";
8727
- readonly indexed: false;
8728
- readonly internalType: "int24";
8729
- },
8730
- {
8731
- readonly name: "startTime";
8732
- readonly type: "uint256";
8733
- readonly indexed: false;
8734
- readonly internalType: "uint256";
8735
- },
8736
- {
8737
- readonly name: "endTime";
8738
- readonly type: "uint256";
8739
- readonly indexed: false;
8740
- readonly internalType: "uint256";
8741
- },
8742
- {
8743
- readonly name: "refundee";
8744
- readonly type: "address";
8745
- readonly indexed: false;
8746
- readonly internalType: "address";
8747
- },
8748
- {
8749
- readonly name: "reward";
8750
- readonly type: "uint256";
8751
- readonly indexed: false;
8752
- readonly internalType: "uint256";
8753
- }
8754
- ];
8755
- readonly anonymous: false;
8756
- },
8757
- {
8758
- readonly type: "event";
8759
- readonly name: "IncentiveEnded";
8760
- readonly inputs: readonly [
8761
- {
8762
- readonly name: "incentiveId";
8763
- readonly type: "bytes32";
8764
- readonly indexed: true;
8765
- readonly internalType: "bytes32";
8766
- },
8767
- {
8768
- readonly name: "refund";
8769
- readonly type: "uint256";
8770
- readonly indexed: false;
8771
- readonly internalType: "uint256";
8772
- }
8773
- ];
8774
- readonly anonymous: false;
8775
- },
8776
- {
8777
- readonly type: "event";
8778
- readonly name: "RewardClaimed";
8779
- readonly inputs: readonly [
8780
- {
8781
- readonly name: "to";
8782
- readonly type: "address";
8783
- readonly indexed: true;
8784
- readonly internalType: "address";
8785
- },
8786
- {
8787
- readonly name: "reward";
8788
- readonly type: "uint256";
8789
- readonly indexed: false;
8790
- readonly internalType: "uint256";
8791
- }
8792
- ];
8793
- readonly anonymous: false;
8794
- },
8795
- {
8796
- readonly type: "event";
8797
- readonly name: "TokenStaked";
8798
- readonly inputs: readonly [
8799
- {
8800
- readonly name: "tokenId";
8801
- readonly type: "uint256";
8802
- readonly indexed: true;
8803
- readonly internalType: "uint256";
8804
- },
8805
- {
8806
- readonly name: "incentiveId";
8807
- readonly type: "bytes32";
8808
- readonly indexed: true;
8809
- readonly internalType: "bytes32";
8810
- },
8811
- {
8812
- readonly name: "liquidity";
8813
- readonly type: "uint128";
8814
- readonly indexed: false;
8815
- readonly internalType: "uint128";
8816
- }
8817
- ];
8818
- readonly anonymous: false;
8819
- },
8820
- {
8821
- readonly type: "event";
8822
- readonly name: "TokenUnstaked";
8823
- readonly inputs: readonly [
8824
- {
8825
- readonly name: "tokenId";
8826
- readonly type: "uint256";
8827
- readonly indexed: true;
8828
- readonly internalType: "uint256";
8829
- },
8830
- {
8831
- readonly name: "incentiveId";
8832
- readonly type: "bytes32";
8833
- readonly indexed: true;
8834
- readonly internalType: "bytes32";
8835
- }
8836
- ];
8837
- readonly anonymous: false;
8838
- }
8839
- ];
8840
- safeTransferFrom(account: `0x${string}`, to: `0x${string}`, tokenId: number): Promise<`0x${string}`>;
8841
- rewards: (rewardToken: `0x${string}`, account: `0x${string}`) => Promise<any>;
8842
- multicall: (data: `0x${string}`[]) => Promise<any>;
8843
- stakeToken: (key: MimoV3MiningPoolKey, v3PositionId: number) => Promise<any>;
8844
- claimReward: (rewardToken: `0x${string}`, to: `0x${string}`, amountRequested: bigint) => Promise<any>;
8845
- unstakeToken: (key: MimoV3MiningPoolKey, v3PositionId: number) => Promise<any>;
8846
- withdrawToken: (tokenId: number, to: `0x${string}`, data: `0x${string}`) => Promise<any>;
8847
- usersPositions(account: `0x${string}`): Promise<{
8848
- token0Address: `0x${string}`;
8849
- token1Address: `0x${string}`;
8850
- fee: number;
8851
- tickLower: number;
8852
- tickUpper: number;
8853
- tokenId: number;
8854
- isTransferred: boolean;
8855
- }[] | undefined>;
8856
- }
8857
- declare class LiquidityMiningV3 {
8858
- poolsList(args: {
8859
- account?: `0x${string}`;
8860
- }, ctx?: ConfigContext): Promise<{
8861
- tickLower: number;
8862
- tickUpper: number;
8863
- startTime: bigint;
8864
- endTime: bigint;
8132
+ token0: true;
8133
+ token1: true;
8134
+ }>>;
8135
+ getRewardTokenInnter: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8136
+ address: true;
8137
+ symbol: true;
8138
+ priceUSD: true;
8139
+ decimals: true;
8140
+ tokenUrl: true;
8141
+ }>>;
8142
+ stakedToken: () => Promise<any>;
8143
+ rewardToken: () => Promise<any>;
8144
+ StakedToken: import("@dappworks/kit/aiem").QueryReturnType<LPTokenEntity, {
8145
+ address: true;
8146
+ symbol: true;
8147
+ priceUSD: true;
8148
+ decimals: true;
8149
+ tokenUrl: true;
8150
+ token0: true;
8151
+ token1: true;
8152
+ }>;
8153
+ RewardToken: import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8154
+ address: true;
8155
+ symbol: true;
8156
+ priceUSD: true;
8157
+ decimals: true;
8158
+ tokenUrl: true;
8159
+ }>;
8160
+ deposit: (_amount: string) => Promise<any>;
8161
+ withdraw: (_amount: string) => Promise<any>;
8162
+ } | {
8163
+ type: string;
8164
+ startTime: number;
8165
+ endTime: number;
8865
8166
  key: MimoV3MiningPoolKey;
8866
8167
  address: `0x${string}`;
8867
8168
  chainId: string;
8868
- Token0: import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8169
+ getTokenAmounts: (liquidity: number, tickLower: number, tickUpper: number) => Promise<{
8170
+ amount0: {
8171
+ value: string;
8172
+ format: string;
8173
+ originFormat: string;
8174
+ decimals: string;
8175
+ };
8176
+ amount1: {
8177
+ value: string;
8178
+ format: string;
8179
+ originFormat: string;
8180
+ decimals: string;
8181
+ };
8182
+ price0: number;
8183
+ price1: number;
8184
+ }>;
8185
+ getPositionsInfo: (positions: any[], tokenIds: any[]) => Promise<{
8186
+ token0Address: any;
8187
+ token1Address: any;
8188
+ fee: any;
8189
+ tickLower: any;
8190
+ tickUpper: any;
8191
+ tokenId: number;
8192
+ isTransferred: boolean;
8193
+ amount0: {
8194
+ value: string;
8195
+ format: string;
8196
+ originFormat: string;
8197
+ decimals: string;
8198
+ };
8199
+ amount1: {
8200
+ value: string;
8201
+ format: string;
8202
+ originFormat: string;
8203
+ decimals: string;
8204
+ };
8205
+ price0: number;
8206
+ price1: number;
8207
+ }[]>;
8208
+ StakedToken: {
8209
+ symbol: string;
8210
+ tokenUrl: any[];
8211
+ token0: `0x${string}`;
8212
+ token1: `0x${string}`;
8213
+ };
8214
+ Token0: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8869
8215
  address: true;
8870
8216
  symbol: true;
8871
8217
  name: true;
8872
8218
  decimals: true;
8873
8219
  tokenUrl: true;
8874
- }>;
8875
- Token1: import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8220
+ priceUSD: true;
8221
+ }>>;
8222
+ Token1: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8876
8223
  address: true;
8877
8224
  symbol: true;
8878
8225
  name: true;
8879
8226
  decimals: true;
8880
8227
  tokenUrl: true;
8881
- }>;
8228
+ priceUSD: true;
8229
+ }>>;
8882
8230
  token0: () => Promise<any>;
8883
8231
  token1: () => Promise<any>;
8884
- fee: any;
8885
- rewards: import("@dappworks/kit/aiem").QueryReturnType<MimoV3MiningManager, {
8886
- rewards: [
8887
- `0x${string}`,
8888
- `0x${string}`
8889
- ];
8890
- }>;
8232
+ fee: () => Promise<any>;
8233
+ myPendingReward: {
8234
+ pendingReward: {
8235
+ value: string;
8236
+ format: string;
8237
+ originFormat: string;
8238
+ decimals: string;
8239
+ };
8240
+ pendingRewardUSD: string;
8241
+ };
8242
+ apr: string | 0 | undefined;
8243
+ totalStakedBalance: {
8244
+ totalStakedBalance: {
8245
+ value: string;
8246
+ format: string;
8247
+ originFormat: string;
8248
+ decimals: string;
8249
+ };
8250
+ totalStakedBalanceUSD: string;
8251
+ totalStakedBalanceUSDOrigin: string;
8252
+ };
8891
8253
  isNew: boolean;
8892
8254
  isExpired: boolean;
8893
- balanceOfPosition: {
8255
+ myPoolBalance: ({
8894
8256
  token0Address: `0x${string}`;
8895
8257
  token1Address: `0x${string}`;
8896
8258
  fee: number;
@@ -8898,8 +8260,182 @@ declare class LiquidityMiningV3 {
8898
8260
  tickUpper: number;
8899
8261
  tokenId: number;
8900
8262
  isTransferred: boolean;
8263
+ } | {
8264
+ token0Address: any;
8265
+ token1Address: any;
8266
+ fee: any;
8267
+ tickLower: any;
8268
+ tickUpper: any;
8269
+ tokenId: number;
8270
+ isTransferred: boolean;
8271
+ amount0: {
8272
+ value: string;
8273
+ format: string;
8274
+ originFormat: string;
8275
+ decimals: string;
8276
+ };
8277
+ amount1: {
8278
+ value: string;
8279
+ format: string;
8280
+ originFormat: string;
8281
+ decimals: string;
8282
+ };
8283
+ price0: number;
8284
+ price1: number;
8285
+ })[];
8286
+ myStakedTokenBalance: {
8287
+ token0Address: any;
8288
+ token1Address: any;
8289
+ fee: any;
8290
+ tickLower: any;
8291
+ tickUpper: any;
8292
+ tokenId: number;
8293
+ isTransferred: boolean;
8294
+ amount0: {
8295
+ value: string;
8296
+ format: string;
8297
+ originFormat: string;
8298
+ decimals: string;
8299
+ };
8300
+ amount1: {
8301
+ value: string;
8302
+ format: string;
8303
+ originFormat: string;
8304
+ decimals: string;
8305
+ };
8306
+ price0: number;
8307
+ price1: number;
8901
8308
  }[];
8902
- stakedPositions: {
8309
+ RewardToken: import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8310
+ symbol: true;
8311
+ name: true;
8312
+ decimals: true;
8313
+ tokenUrl: true;
8314
+ priceUSD: true;
8315
+ }>;
8316
+ })[]>;
8317
+ deposit({ address, amount, account }: {
8318
+ address: `0x${string}`;
8319
+ amount: string;
8320
+ account: `0x${string}`;
8321
+ }, ctx?: ConfigContext): Promise<{
8322
+ data: any;
8323
+ address: `0x${string}`;
8324
+ chainId: string;
8325
+ type: string;
8326
+ }[]>;
8327
+ harvest({ address }: {
8328
+ address: `0x${string}`;
8329
+ }, ctx?: ConfigContext): Promise<{
8330
+ data: `0x${string}`;
8331
+ address: `0x${string}`;
8332
+ chainId: string;
8333
+ }>;
8334
+ withdraw({ address, amount }: {
8335
+ address: `0x${string}`;
8336
+ amount: string;
8337
+ }, ctx?: ConfigContext): Promise<{
8338
+ data: any;
8339
+ address: `0x${string}`;
8340
+ chainId: string;
8341
+ }>;
8342
+ }
8343
+ declare class LiquidityMiningV3 {
8344
+ poolsList(args: {
8345
+ account?: `0x${string}`;
8346
+ }, ctx?: ConfigContext): Promise<{
8347
+ startTime: number;
8348
+ endTime: number;
8349
+ key: MimoV3MiningPoolKey;
8350
+ address: `0x${string}`;
8351
+ chainId: string;
8352
+ getTokenAmounts: (liquidity: number, tickLower: number, tickUpper: number) => Promise<{
8353
+ amount0: {
8354
+ value: string;
8355
+ format: string;
8356
+ originFormat: string;
8357
+ decimals: string;
8358
+ };
8359
+ amount1: {
8360
+ value: string;
8361
+ format: string;
8362
+ originFormat: string;
8363
+ decimals: string;
8364
+ };
8365
+ price0: number;
8366
+ price1: number;
8367
+ }>;
8368
+ getPositionsInfo: (positions: any[], tokenIds: any[]) => Promise<{
8369
+ token0Address: any;
8370
+ token1Address: any;
8371
+ fee: any;
8372
+ tickLower: any;
8373
+ tickUpper: any;
8374
+ tokenId: number;
8375
+ isTransferred: boolean;
8376
+ amount0: {
8377
+ value: string;
8378
+ format: string;
8379
+ originFormat: string;
8380
+ decimals: string;
8381
+ };
8382
+ amount1: {
8383
+ value: string;
8384
+ format: string;
8385
+ originFormat: string;
8386
+ decimals: string;
8387
+ };
8388
+ price0: number;
8389
+ price1: number;
8390
+ }[]>;
8391
+ StakedToken: {
8392
+ symbol: string;
8393
+ tokenUrl: any[];
8394
+ token0: `0x${string}`;
8395
+ token1: `0x${string}`;
8396
+ };
8397
+ Token0: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8398
+ address: true;
8399
+ symbol: true;
8400
+ name: true;
8401
+ decimals: true;
8402
+ tokenUrl: true;
8403
+ priceUSD: true;
8404
+ }>>;
8405
+ Token1: () => Promise<import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8406
+ address: true;
8407
+ symbol: true;
8408
+ name: true;
8409
+ decimals: true;
8410
+ tokenUrl: true;
8411
+ priceUSD: true;
8412
+ }>>;
8413
+ token0: () => Promise<any>;
8414
+ token1: () => Promise<any>;
8415
+ fee: () => Promise<any>;
8416
+ myPendingReward: {
8417
+ pendingReward: {
8418
+ value: string;
8419
+ format: string;
8420
+ originFormat: string;
8421
+ decimals: string;
8422
+ };
8423
+ pendingRewardUSD: string;
8424
+ };
8425
+ apr: string | 0 | undefined;
8426
+ totalStakedBalance: {
8427
+ totalStakedBalance: {
8428
+ value: string;
8429
+ format: string;
8430
+ originFormat: string;
8431
+ decimals: string;
8432
+ };
8433
+ totalStakedBalanceUSD: string;
8434
+ totalStakedBalanceUSDOrigin: string;
8435
+ };
8436
+ isNew: boolean;
8437
+ isExpired: boolean;
8438
+ myPoolBalance: ({
8903
8439
  token0Address: `0x${string}`;
8904
8440
  token1Address: `0x${string}`;
8905
8441
  fee: number;
@@ -8907,19 +8443,65 @@ declare class LiquidityMiningV3 {
8907
8443
  tickUpper: number;
8908
8444
  tokenId: number;
8909
8445
  isTransferred: boolean;
8446
+ } | {
8447
+ token0Address: any;
8448
+ token1Address: any;
8449
+ fee: any;
8450
+ tickLower: any;
8451
+ tickUpper: any;
8452
+ tokenId: number;
8453
+ isTransferred: boolean;
8454
+ amount0: {
8455
+ value: string;
8456
+ format: string;
8457
+ originFormat: string;
8458
+ decimals: string;
8459
+ };
8460
+ amount1: {
8461
+ value: string;
8462
+ format: string;
8463
+ originFormat: string;
8464
+ decimals: string;
8465
+ };
8466
+ price0: number;
8467
+ price1: number;
8468
+ })[];
8469
+ myStakedTokenBalance: {
8470
+ token0Address: any;
8471
+ token1Address: any;
8472
+ fee: any;
8473
+ tickLower: any;
8474
+ tickUpper: any;
8475
+ tokenId: number;
8476
+ isTransferred: boolean;
8477
+ amount0: {
8478
+ value: string;
8479
+ format: string;
8480
+ originFormat: string;
8481
+ decimals: string;
8482
+ };
8483
+ amount1: {
8484
+ value: string;
8485
+ format: string;
8486
+ originFormat: string;
8487
+ decimals: string;
8488
+ };
8489
+ price0: number;
8490
+ price1: number;
8910
8491
  }[];
8911
8492
  RewardToken: import("@dappworks/kit/aiem").QueryReturnType<ERC20Entity, {
8912
8493
  symbol: true;
8913
8494
  name: true;
8914
8495
  decimals: true;
8915
8496
  tokenUrl: true;
8497
+ priceUSD: true;
8916
8498
  }>;
8917
8499
  }[]>;
8918
8500
  deposit(args: {
8919
8501
  key: MimoV3MiningPoolKey;
8920
8502
  v3PositionId: number;
8921
8503
  account: `0x${string}`;
8922
- isTransferred: boolean;
8504
+ isTransferred: string;
8923
8505
  }, ctx?: ConfigContext): Promise<{
8924
8506
  data: any;
8925
8507
  address: string;
@@ -8936,7 +8518,7 @@ declare class LiquidityMiningV3 {
8936
8518
  chainId: string;
8937
8519
  type: string;
8938
8520
  }>;
8939
- withdraw(args: {
8521
+ unstakeAndWithdraw(args: {
8940
8522
  key: MimoV3MiningPoolKey;
8941
8523
  v3PositionId: number;
8942
8524
  account: `0x${string}`;
@@ -8946,6 +8528,23 @@ declare class LiquidityMiningV3 {
8946
8528
  chainId: string;
8947
8529
  type: string;
8948
8530
  }[]>;
8531
+ withdraw(args: {
8532
+ v3PositionId: number;
8533
+ account: `0x${string}`;
8534
+ }, ctx?: ConfigContext): Promise<{
8535
+ data: any;
8536
+ address: string;
8537
+ chainId: string;
8538
+ type: string;
8539
+ }>;
8540
+ poke(args: {
8541
+ key: MimoV3MiningPoolKey;
8542
+ v3PositionId: number;
8543
+ }, ctx?: ConfigContext): Promise<{
8544
+ data: any;
8545
+ address: string;
8546
+ chainId: string;
8547
+ }>;
8949
8548
  }
8950
8549
  declare const modules: {
8951
8550
  mimo: Mimo;
@@ -8974,6 +8573,8 @@ declare class BaseDBModule {
8974
8573
  iotexscan: ReturnType<typeof postgres>;
8975
8574
  iopay: ReturnType<typeof postgres>;
8976
8575
  nftmarket: ReturnType<typeof postgres>;
8576
+ mimo: ReturnType<typeof postgres>;
8577
+ depinscan: ReturnType<typeof postgres>;
8977
8578
  ch: ClickHouseSDK;
8978
8579
  analysis: ClickHouseSDK;
8979
8580
  microServiceCenter: ReturnType<typeof postgres>;
@@ -9359,6 +8960,7 @@ declare class Mimo$1 extends BaseDBModule {
9359
8960
  last24hTxCount: string;
9360
8961
  last24hFee: string;
9361
8962
  }>;
8963
+ metrics_history(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9362
8964
  }
9363
8965
  declare class LearnToEarn extends BaseDBModule {
9364
8966
  checkAuth(key: string): Promise<{
@@ -9410,6 +9012,55 @@ declare class Galxe extends BaseDBModule {
9410
9012
  is_ok: boolean;
9411
9013
  }>;
9412
9014
  }
9015
+ declare class DepinScan extends BaseDBModule {
9016
+ explorer(): Promise<import("postgres").RowList<import("postgres").Row[]>>;
9017
+ }
9018
+ declare class MicroService extends BaseDBModule {
9019
+ checkAuth(key: string): Promise<{
9020
+ ok: boolean;
9021
+ message: string;
9022
+ authData: null;
9023
+ } | {
9024
+ ok: boolean;
9025
+ message: string;
9026
+ authData: {
9027
+ app_id: any;
9028
+ };
9029
+ }>;
9030
+ user_data({ user_id, key }: {
9031
+ user_id: string;
9032
+ key?: string;
9033
+ }, ctx?: {
9034
+ authData?: {
9035
+ app_id: string;
9036
+ };
9037
+ }): Promise<{
9038
+ status: number;
9039
+ error: string;
9040
+ user?: undefined;
9041
+ } | {
9042
+ user: import("postgres").Row;
9043
+ status?: undefined;
9044
+ error?: undefined;
9045
+ }>;
9046
+ save_user_data({ user_id, key, value }: {
9047
+ user_id: string;
9048
+ key: string;
9049
+ value: string;
9050
+ }, ctx?: {
9051
+ authData?: {
9052
+ app_id: string;
9053
+ };
9054
+ }): Promise<{
9055
+ status: number;
9056
+ error: string;
9057
+ ok?: undefined;
9058
+ } | {
9059
+ ok: boolean;
9060
+ status?: undefined;
9061
+ error?: undefined;
9062
+ }>;
9063
+ }
9413
9064
  declare const modules$1: {
9414
9065
  account: Account;
9415
9066
  analysis: Analysis;
@@ -9424,6 +9075,8 @@ declare const modules$1: {
9424
9075
  iopay: IoPay;
9425
9076
  mimo: Mimo$1;
9426
9077
  galxe: Galxe;
9078
+ depinscan: DepinScan;
9079
+ microservice: MicroService;
9427
9080
  };
9428
9081
  export type DBModuleType = typeof modules$1;
9429
9082
  export interface ConfigOptions {
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.65",
5
+ "version": "v0.1.66",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -45,6 +45,7 @@
45
45
  "graphql-tag": "^2.12.6",
46
46
  "hono-rate-limiter": "^0.4.0",
47
47
  "ioredis": "^5.4.1",
48
+ "jsbi": "^4.3.0",
48
49
  "jsonwebtoken": "^9.0.2",
49
50
  "kafkajs": "^2.2.4",
50
51
  "lodash": "^4.17.21",