@scallop-io/sui-scallop-sdk 2.3.0-lst-x-oracle-alpha.5 → 2.3.0-lst-x-oracle-alpha.7

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.
package/dist/index.d.mts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as _mysten_sui_dist_cjs_client from '@mysten/sui/dist/cjs/client';
2
- import { SuiObjectDataOptions, GetOwnedObjectsParams, GetDynamicFieldsParams, GetDynamicFieldObjectParams, SuiObjectData, SuiObjectRef } from '@mysten/sui/dist/cjs/client';
2
+ import { SuiObjectDataOptions, GetOwnedObjectsParams, GetDynamicFieldsParams, GetDynamicFieldObjectParams, SuiObjectData, SuiObjectRef as SuiObjectRef$1 } from '@mysten/sui/dist/cjs/client';
3
3
  import * as _scallop_io_sui_kit from '@scallop-io/sui-kit';
4
4
  import { SuiObjectArg, SuiTxArg, NetworkType, SuiKit, SuiKitParams, Transaction, SuiTxBlock, DerivePathParams, SuiAddressArg, TransactionResult as TransactionResult$1, SuiVecTxArg, SuiAmountsArg } from '@scallop-io/sui-kit';
5
5
  import * as _tanstack_query_core from '@tanstack/query-core';
6
6
  import { QueryClient, QueryClientConfig, QueryKey } from '@tanstack/query-core';
7
7
  import { AxiosInstance, AxiosResponse, AxiosRequestConfig } from 'axios';
8
- import { SuiObjectDataOptions as SuiObjectDataOptions$1, SuiObjectResponse, SuiObjectData as SuiObjectData$1, GetOwnedObjectsParams as GetOwnedObjectsParams$1, GetDynamicFieldsParams as GetDynamicFieldsParams$1, DynamicFieldPage, GetDynamicFieldObjectParams as GetDynamicFieldObjectParams$1, CoinBalance, GetBalanceParams, DevInspectResults, SuiTransactionBlockResponse } from '@mysten/sui/client';
8
+ import { SuiObjectRef, SuiObjectDataOptions as SuiObjectDataOptions$1, SuiObjectResponse, SuiObjectData as SuiObjectData$1, GetOwnedObjectsParams as GetOwnedObjectsParams$1, GetDynamicFieldsParams as GetDynamicFieldsParams$1, DynamicFieldPage, GetDynamicFieldObjectParams as GetDynamicFieldObjectParams$1, CoinBalance, GetBalanceParams, DevInspectResults, SuiTransactionBlockResponse } from '@mysten/sui/client';
9
9
  import { Argument, TransactionResult, Transaction as Transaction$1, TransactionObjectArgument } from '@mysten/sui/transactions';
10
10
 
11
11
  declare const API_BASE_URL: "https://sui.apis.scallop.io";
@@ -119,6 +119,9 @@ declare const X_ORACLE_LIST: Record<string, Record<(typeof X_ORACLE_RULES)[numbe
119
119
  type SupportOracleType = (typeof SUPPORT_ORACLES)[number];
120
120
  type xOracleRuleType = (typeof X_ORACLE_RULES)[number];
121
121
  type xOracleRules = Record<xOracleRuleType, SupportOracleType[]>;
122
+ type xOracleListType = {
123
+ [key in string]: xOracleRules;
124
+ };
122
125
  type SupportedOracleSuiLst = (typeof SUPPORT_SUI_LST)[number];
123
126
 
124
127
  declare const _PACKAGE_NAMES: readonly ["coinDecimalsRegistry", "math", "whitelist", "x", "protocol", "protocolWhitelist", "query", "supra", "pyth", "switchboard", "xOracle", "testCoin"];
@@ -462,7 +465,7 @@ declare const MAX_LOCK_DURATION: number;
462
465
  declare const MIN_INITIAL_LOCK_AMOUNT: 10000000000;
463
466
  declare const MIN_TOP_UP_AMOUNT: 1000000000;
464
467
 
465
- type PoolAddress$1 = {
468
+ type PoolAddress = {
466
469
  coinName: string;
467
470
  symbol: string;
468
471
  coinType: string;
@@ -722,10 +725,10 @@ type ScallopConstantsParams = {
722
725
  poolAddresses?: string[];
723
726
  whitelist?: string[];
724
727
  };
725
- forcePoolAddressInterface?: Record<string, PoolAddress$1>;
728
+ forcePoolAddressInterface?: Record<string, PoolAddress>;
726
729
  forceWhitelistInterface?: Whitelist | Record<string, any>;
727
730
  defaultValues?: {
728
- poolAddresses?: Record<string, PoolAddress$1>;
731
+ poolAddresses?: Record<string, PoolAddress>;
729
732
  whitelist?: Whitelist | Record<string, any>;
730
733
  };
731
734
  } & ScallopAddressParams;
@@ -760,9 +763,9 @@ declare class ScallopConstants extends ScallopAddress {
760
763
  get protocolObjectId(): string;
761
764
  get isInitialized(): boolean;
762
765
  get whitelist(): Whitelist;
763
- get poolAddresses(): Record<string, PoolAddress$1 | undefined>;
766
+ get poolAddresses(): Record<string, PoolAddress | undefined>;
764
767
  get defaultValues(): ({
765
- poolAddresses?: Record<string, PoolAddress$1>;
768
+ poolAddresses?: Record<string, PoolAddress>;
766
769
  whitelist?: Whitelist | Record<string, any>;
767
770
  } & {
768
771
  addresses?: Partial<Record<NetworkType, AddressesInterface>>;
@@ -777,13 +780,17 @@ declare class ScallopConstants extends ScallopAddress {
777
780
  }): Promise<void>;
778
781
  private initConstants;
779
782
  readWhiteList(): Promise<Whitelist>;
780
- readPoolAddresses(): Promise<Record<string, PoolAddress$1>>;
783
+ readPoolAddresses(): Promise<Record<string, PoolAddress>>;
781
784
  }
782
785
 
783
- type OptionalKeys$5<T> = {
786
+ interface BorrowIncentiveAccountKey {
787
+ id: string;
788
+ onwerId: string;
789
+ }
790
+ type OptionalKeys$4<T> = {
784
791
  [K in keyof T]?: T[K];
785
792
  };
786
- type BorrowIncentivePools = OptionalKeys$5<Record<string, BorrowIncentivePool>>;
793
+ type BorrowIncentivePools = OptionalKeys$4<Record<string, BorrowIncentivePool>>;
787
794
  type BorrowIncentivePoolPoints = {
788
795
  symbol: string;
789
796
  coinName: string;
@@ -800,7 +807,31 @@ type BorrowIncentivePool = {
800
807
  stakedAmount: number;
801
808
  stakedCoin: number;
802
809
  stakedValue: number;
803
- points: OptionalKeys$5<Record<string, BorrowIncentivePoolPoints>>;
810
+ points: OptionalKeys$4<Record<string, BorrowIncentivePoolPoints>>;
811
+ };
812
+ type OriginBorrowIncentivePoolPointData = {
813
+ point_type: {
814
+ name: string;
815
+ };
816
+ distributed_point_per_period: string;
817
+ point_distribution_time: string;
818
+ distributed_point: string;
819
+ points: string;
820
+ index: string;
821
+ base_weight: string;
822
+ weighted_amount: string;
823
+ last_update: string;
824
+ created_at: string;
825
+ };
826
+ type OriginBorrowIncentivePoolData = {
827
+ pool_type: {
828
+ name: string;
829
+ };
830
+ points: OriginBorrowIncentivePoolPointData[];
831
+ min_stakes: string;
832
+ max_stakes: string;
833
+ stakes: string;
834
+ created_at: string;
804
835
  };
805
836
  type ParsedBorrowIncentivePoolPointData = {
806
837
  pointType: string;
@@ -814,6 +845,13 @@ type ParsedBorrowIncentivePoolPointData = {
814
845
  lastUpdate: number;
815
846
  createdAt: number;
816
847
  };
848
+ type ParsedBorrowIncentivePoolData = {
849
+ poolType: string;
850
+ poolPoints: OptionalKeys$4<Record<string, ParsedBorrowIncentivePoolPointData>>;
851
+ minStakes: number;
852
+ maxStakes: number;
853
+ staked: number;
854
+ };
817
855
  type CalculatedBorrowIncentivePoolPointData = {
818
856
  baseWeight: number;
819
857
  weightedStakedAmount: number;
@@ -826,6 +864,23 @@ type CalculatedBorrowIncentivePoolPointData = {
826
864
  rewardApr: number;
827
865
  rewardPerSec: number;
828
866
  };
867
+ type BorrowIncentiveAccounts = OptionalKeys$4<Record<string, ParsedBorrowIncentiveAccountData>>;
868
+ type OriginBorrowIncentiveAccountPoolData = {
869
+ point_type: {
870
+ name: string;
871
+ };
872
+ weighted_amount: string;
873
+ points: string;
874
+ total_points: string;
875
+ index: string;
876
+ };
877
+ type OriginBorrowIncentiveAccountData = {
878
+ points_list: OriginBorrowIncentiveAccountPoolData[];
879
+ pool_type: {
880
+ name: string;
881
+ };
882
+ debt_amount: string;
883
+ };
829
884
  type ParsedBorrowIncentiveAccountPoolData = {
830
885
  pointType: string;
831
886
  weightedAmount: number;
@@ -834,16 +889,140 @@ type ParsedBorrowIncentiveAccountPoolData = {
834
889
  index: number;
835
890
  };
836
891
  type ParsedBorrowIncentiveAccountData = {
837
- pointList: OptionalKeys$5<Record<string, ParsedBorrowIncentiveAccountPoolData>>;
892
+ pointList: OptionalKeys$4<Record<string, ParsedBorrowIncentiveAccountPoolData>>;
838
893
  poolType: string;
839
894
  debtAmount: number;
840
895
  };
896
+ /**
897
+ * The query interface for `incentive_pools_query::incentive_pools_data` inspectTxn.
898
+ */
899
+ interface BorrowIncentivePoolsQueryInterface {
900
+ incentive_pools: OriginBorrowIncentivePoolData[];
901
+ }
902
+ /**
903
+ * The query interface for `incentive_account_query::incentive_account_data` inspectTxn.
904
+ */
905
+ interface BorrowIncentiveAccountsQueryInterface {
906
+ pool_records: OriginBorrowIncentiveAccountData[];
907
+ }
841
908
 
842
- type OptionalKeys$4<T> = {
909
+ type OptionalKeys$3<T> = {
843
910
  [K in keyof T]?: T[K];
844
911
  };
845
- type MarketPools = OptionalKeys$4<Record<string, MarketPool>>;
846
- type MarketCollaterals = OptionalKeys$4<Record<string, MarketCollateral>>;
912
+ type MarketPools = OptionalKeys$3<Record<string, MarketPool>>;
913
+ type MarketCollaterals = OptionalKeys$3<Record<string, MarketCollateral>>;
914
+ type CoinAmounts = OptionalKeys$3<Record<string, number>>;
915
+ type MarketCoinAmounts = OptionalKeys$3<Record<string, number>>;
916
+ type SCoinAmounts = OptionalKeys$3<Record<string, number>>;
917
+ type BalanceSheet = {
918
+ cash: string;
919
+ debt: string;
920
+ market_coin_supply: string;
921
+ revenue: string;
922
+ };
923
+ type BorrowDynamic = {
924
+ borrow_index: string;
925
+ interest_rate: {
926
+ fields: {
927
+ value: string;
928
+ };
929
+ };
930
+ interest_rate_scale: string;
931
+ last_updated: string;
932
+ };
933
+ type BorrowFee = {
934
+ value: string;
935
+ };
936
+ type InterestModel = {
937
+ base_borrow_rate_per_sec: {
938
+ fields: {
939
+ value: string;
940
+ };
941
+ };
942
+ borrow_rate_on_high_kink: {
943
+ fields: {
944
+ value: string;
945
+ };
946
+ };
947
+ borrow_rate_on_mid_kink: {
948
+ fields: {
949
+ value: string;
950
+ };
951
+ };
952
+ borrow_weight: {
953
+ fields: {
954
+ value: string;
955
+ };
956
+ };
957
+ borrow_fee_rate: {
958
+ fields: {
959
+ value: string;
960
+ };
961
+ };
962
+ high_kink: {
963
+ fields: {
964
+ value: string;
965
+ };
966
+ };
967
+ interest_rate_scale: string;
968
+ max_borrow_rate: {
969
+ fields: {
970
+ value: string;
971
+ };
972
+ };
973
+ mid_kink: {
974
+ fields: {
975
+ value: string;
976
+ };
977
+ };
978
+ min_borrow_amount: string;
979
+ revenue_factor: {
980
+ fields: {
981
+ value: string;
982
+ };
983
+ };
984
+ type: {
985
+ fields: {
986
+ name: string;
987
+ };
988
+ };
989
+ };
990
+ type RiskModel = {
991
+ collateral_factor: {
992
+ fields: {
993
+ value: string;
994
+ };
995
+ };
996
+ liquidation_discount: {
997
+ fields: {
998
+ value: string;
999
+ };
1000
+ };
1001
+ liquidation_factor: {
1002
+ fields: {
1003
+ value: string;
1004
+ };
1005
+ };
1006
+ liquidation_penalty: {
1007
+ fields: {
1008
+ value: string;
1009
+ };
1010
+ };
1011
+ liquidation_revenue_factor: {
1012
+ fields: {
1013
+ value: string;
1014
+ };
1015
+ };
1016
+ max_collateral_amount: string;
1017
+ type: {
1018
+ fields: {
1019
+ name: string;
1020
+ };
1021
+ };
1022
+ };
1023
+ type CollateralStat = {
1024
+ amount: string;
1025
+ };
847
1026
  type MarketPool = {
848
1027
  coinName: string;
849
1028
  symbol: string;
@@ -867,6 +1046,52 @@ type MarketCollateral = {
867
1046
  coinPrice: number;
868
1047
  isIsolated: boolean;
869
1048
  } & Required<Pick<ParsedMarketCollateralData, 'collateralFactor' | 'liquidationFactor' | 'liquidationDiscount' | 'liquidationPenalty' | 'liquidationReserveFactor'>> & CalculatedMarketCollateralData;
1049
+ type OriginMarketPoolData = {
1050
+ type: {
1051
+ name: string;
1052
+ };
1053
+ maxBorrowRate: {
1054
+ value: string;
1055
+ };
1056
+ interestRate: {
1057
+ value: string;
1058
+ };
1059
+ interestRateScale: string;
1060
+ borrowIndex: string;
1061
+ lastUpdated: string;
1062
+ cash: string;
1063
+ debt: string;
1064
+ marketCoinSupply: string;
1065
+ reserve: string;
1066
+ reserveFactor: {
1067
+ value: string;
1068
+ };
1069
+ borrowWeight: {
1070
+ value: string;
1071
+ };
1072
+ borrowFeeRate: {
1073
+ value: string;
1074
+ };
1075
+ baseBorrowRatePerSec: {
1076
+ value: string;
1077
+ };
1078
+ borrowRateOnHighKink: {
1079
+ value: string;
1080
+ };
1081
+ borrowRateOnMidKink: {
1082
+ value: string;
1083
+ };
1084
+ highKink: {
1085
+ value: string;
1086
+ };
1087
+ midKink: {
1088
+ value: string;
1089
+ };
1090
+ minBorrowAmount: string;
1091
+ isIsolated: boolean;
1092
+ supplyLimit: string;
1093
+ borrowLimit: string;
1094
+ };
870
1095
  type ParsedMarketPoolData = {
871
1096
  coinType: string;
872
1097
  maxBorrowRate: number;
@@ -919,6 +1144,29 @@ type CalculatedMarketPoolData = {
919
1144
  maxSupplyCoin: number;
920
1145
  maxBorrowCoin: number;
921
1146
  };
1147
+ type OriginMarketCollateralData = {
1148
+ type: {
1149
+ name: string;
1150
+ };
1151
+ isIsolated: boolean;
1152
+ collateralFactor: {
1153
+ value: string;
1154
+ };
1155
+ liquidationFactor: {
1156
+ value: string;
1157
+ };
1158
+ liquidationDiscount: {
1159
+ value: string;
1160
+ };
1161
+ liquidationPenalty: {
1162
+ value: string;
1163
+ };
1164
+ liquidationReserveFactor: {
1165
+ value: string;
1166
+ };
1167
+ maxCollateralAmount: string;
1168
+ totalCollateralAmount: string;
1169
+ };
922
1170
  type ParsedMarketCollateralData = {
923
1171
  coinType: string;
924
1172
  collateralFactor: number;
@@ -943,7 +1191,7 @@ type Market = {
943
1191
  collaterals: MarketCollaterals;
944
1192
  data?: MarketQueryInterface;
945
1193
  };
946
- type Obligation$1 = {
1194
+ type Obligation = {
947
1195
  id: string;
948
1196
  keyId: string;
949
1197
  locked: boolean;
@@ -1037,10 +1285,22 @@ interface ObligationQueryInterface {
1037
1285
  }[];
1038
1286
  }
1039
1287
 
1040
- type OptionalKeys$3<T> = {
1288
+ type LoyaltyProgramInfo = {
1289
+ pendingReward: number;
1290
+ totalPoolReward: number;
1291
+ isClaimEnabled: boolean;
1292
+ };
1293
+ type VeScaLoyaltyProgramInfo = {
1294
+ pendingVeScaReward: number;
1295
+ pendingScaReward: number;
1296
+ totalPoolReward: number;
1297
+ isClaimEnabled: boolean;
1298
+ };
1299
+
1300
+ type OptionalKeys$2<T> = {
1041
1301
  [K in keyof T]?: T[K];
1042
1302
  };
1043
- type Spools = OptionalKeys$3<Record<string, Spool>>;
1303
+ type Spools = OptionalKeys$2<Record<string, Spool>>;
1044
1304
  type Spool = {
1045
1305
  marketCoinName: string;
1046
1306
  symbol: string;
@@ -1054,6 +1314,42 @@ type Spool = {
1054
1314
  marketCoinPrice: number;
1055
1315
  rewardCoinPrice: number;
1056
1316
  } & Required<Pick<ParsedSpoolData, 'maxPoint' | 'distributedPoint' | 'maxStake'>> & CalculatedSpoolData & SpoolRewardPool;
1317
+ type OriginSpoolData = {
1318
+ stakeType: {
1319
+ fields: {
1320
+ name: string;
1321
+ };
1322
+ };
1323
+ maxDistributedPoint: string;
1324
+ distributedPoint: string;
1325
+ distributedPointPerPeriod: string;
1326
+ pointDistributionTime: string;
1327
+ maxStake: string;
1328
+ stakes: string;
1329
+ index: string;
1330
+ createdAt: string;
1331
+ lastUpdate: string;
1332
+ };
1333
+ type SpoolData = {
1334
+ created_at: string;
1335
+ distributed_point: string;
1336
+ distributed_point_per_period: string;
1337
+ id: {
1338
+ id: string;
1339
+ };
1340
+ index: string;
1341
+ last_update: string;
1342
+ max_distributed_point: string;
1343
+ max_stakes: string;
1344
+ point_distribution_time: string;
1345
+ stake_type: {
1346
+ type: string;
1347
+ fields: {
1348
+ name: string;
1349
+ };
1350
+ };
1351
+ stakes: string;
1352
+ };
1057
1353
  type ParsedSpoolData = {
1058
1354
  stakeType: string;
1059
1355
  maxPoint: number;
@@ -1078,6 +1374,13 @@ type CalculatedSpoolData = {
1078
1374
  endDate: Date;
1079
1375
  };
1080
1376
  type SpoolRewardPool = Required<Pick<ParsedSpoolRewardPoolData, 'exchangeRateNumerator' | 'exchangeRateDenominator'>> & CalculatedSpoolRewardPoolData;
1377
+ type OriginSpoolRewardPoolData = {
1378
+ claimed_rewards: string;
1379
+ exchange_rate_denominator: string;
1380
+ exchange_rate_numerator: string;
1381
+ rewards: string;
1382
+ spool_id: string;
1383
+ };
1081
1384
  type ParsedSpoolRewardPoolData = {
1082
1385
  claimedRewards: number;
1083
1386
  exchangeRateDenominator: number;
@@ -1098,6 +1401,8 @@ type CalculatedSpoolRewardPoolData = {
1098
1401
  claimedRewardValue: number;
1099
1402
  rewardPerSec: number;
1100
1403
  };
1404
+ type StakePools = OptionalKeys$2<Record<string, StakePool>>;
1405
+ type StakeRewardPools = OptionalKeys$2<Record<string, StakeRewardPool>>;
1101
1406
  type StakeAccounts = Record<string, StakeAccount[]>;
1102
1407
  interface StakeAccount {
1103
1408
  id: string;
@@ -1133,9 +1438,11 @@ interface StakeRewardPool {
1133
1438
  claimedRewards: number;
1134
1439
  }
1135
1440
 
1136
- type OptionalKeys$2<T> = {
1441
+ type OptionalKeys$1<T> = {
1137
1442
  [K in keyof T]?: T[K];
1138
1443
  };
1444
+ type Lendings = OptionalKeys$1<Record<string, Lending>>;
1445
+ type ObligationAccounts = OptionalKeys$1<Record<string, ObligationAccount>>;
1139
1446
  type Lending = Required<Pick<MarketPool, 'coinName' | 'symbol' | 'coinType' | 'marketCoinType' | 'sCoinType' | 'coinDecimal' | 'coinPrice' | 'conversionRate' | 'isIsolated'> & Pick<Spool, 'marketCoinPrice'>> & {
1140
1447
  supplyApr: number;
1141
1448
  supplyApy: number;
@@ -1178,9 +1485,9 @@ type ObligationAccount = {
1178
1485
  totalDepositedPools: number;
1179
1486
  totalBorrowedPools: number;
1180
1487
  totalRewardedPools: number;
1181
- collaterals: OptionalKeys$2<Record<string, ObligationCollateral>>;
1182
- debts: OptionalKeys$2<Record<string, ObligationDebt>>;
1183
- borrowIncentives: OptionalKeys$2<Record<string, ObligationBorrowIncentive>>;
1488
+ collaterals: OptionalKeys$1<Record<string, ObligationCollateral>>;
1489
+ debts: OptionalKeys$1<Record<string, ObligationDebt>>;
1490
+ borrowIncentives: OptionalKeys$1<Record<string, ObligationBorrowIncentive>>;
1184
1491
  };
1185
1492
  type ObligationCollateral = {
1186
1493
  coinName: string;
@@ -1248,6 +1555,32 @@ type TotalValueLocked = {
1248
1555
  totalValueChangeRatio?: number;
1249
1556
  };
1250
1557
 
1558
+ type Vesca = {
1559
+ id: string;
1560
+ keyId: string;
1561
+ keyObject?: SuiObjectRef;
1562
+ object: SuiObjectRef;
1563
+ lockedScaAmount: string;
1564
+ lockedScaCoin: number;
1565
+ currentVeScaBalance: number;
1566
+ unlockAt: number;
1567
+ };
1568
+ type VeScaTreasuryFields = {
1569
+ total_ve_sca_amount: string;
1570
+ sca_balance: string;
1571
+ unlock_schedule: {
1572
+ fields: {
1573
+ locked_sca_amount: string;
1574
+ };
1575
+ };
1576
+ };
1577
+ type VeScaTreasuryInfo = {
1578
+ totalLockedSca: number;
1579
+ totalVeSca: number;
1580
+ averageLockingPeriod: number;
1581
+ averageLockingPeriodUnit: string;
1582
+ };
1583
+
1251
1584
  type ScallopIndexerParams = {
1252
1585
  indexerApiUrl?: string;
1253
1586
  } & ScallopAxiosParams;
@@ -1326,10 +1659,10 @@ declare class ScallopIndexer extends ScallopAxios {
1326
1659
  getCoinPrices(): Promise<Record<string, number>>;
1327
1660
  }
1328
1661
 
1329
- type OptionalKeys$1<T> = {
1662
+ type OptionalKeys<T> = {
1330
1663
  [K in keyof T]?: T[K];
1331
1664
  };
1332
- type CoinPrices = OptionalKeys$1<Record<string, number>>;
1665
+ type CoinPrices = OptionalKeys<Record<string, number>>;
1333
1666
 
1334
1667
  type QueryInspectTxnParams = {
1335
1668
  queryTarget: string;
@@ -1481,7 +1814,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
1481
1814
  * @param ownerAddress - The owner address.
1482
1815
  * @return Obligations data.
1483
1816
  */
1484
- getObligations(ownerAddress?: string): Promise<Obligation$1[]>;
1817
+ getObligations(ownerAddress?: string): Promise<Obligation[]>;
1485
1818
  /**
1486
1819
  * Query obligation data.
1487
1820
  *
@@ -1645,7 +1978,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
1645
1978
  * @param ownerAddress - The owner address.
1646
1979
  * @return Borrow incentive accounts data.
1647
1980
  */
1648
- getBorrowIncentiveAccounts(obligationId: string | SuiObjectRef, coinNames?: string[]): Promise<{
1981
+ getBorrowIncentiveAccounts(obligationId: string | SuiObjectRef$1, coinNames?: string[]): Promise<{
1649
1982
  [x: string]: ParsedBorrowIncentiveAccountData | undefined;
1650
1983
  }>;
1651
1984
  /**
@@ -1725,7 +2058,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
1725
2058
  * @param veScaKey
1726
2059
  * @returns veSca
1727
2060
  */
1728
- getVeSca(veScaKey: string | SuiObjectData): Promise<any>;
2061
+ getVeSca(veScaKey: string | SuiObjectData): Promise<Vesca | undefined>;
1729
2062
  /**
1730
2063
  * Get all veSca from walletAdddress
1731
2064
  * @param walletAddress
@@ -1739,7 +2072,7 @@ declare class ScallopQuery implements ScallopQueryInterface {
1739
2072
  * Get total vesca treasury with movecall
1740
2073
  * @returns Promise<string | undefined>
1741
2074
  */
1742
- getVeScaTreasuryInfo(): Promise<any>;
2075
+ getVeScaTreasuryInfo(): Promise<VeScaTreasuryInfo | null>;
1743
2076
  /**
1744
2077
  * Return binded referrer veScaKeyId of referee walletAddress if exist
1745
2078
  * @param walletAddress
@@ -1763,13 +2096,13 @@ declare class ScallopQuery implements ScallopQueryInterface {
1763
2096
  * @param veScaKey
1764
2097
  * @returns Loyalty program information
1765
2098
  */
1766
- getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<any>;
2099
+ getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<LoyaltyProgramInfo | null>;
1767
2100
  /**
1768
2101
  * Get user's veSCA rewards informations from loyalty program
1769
2102
  * @param veScaKey
1770
2103
  * @returns Loyalty program information
1771
2104
  */
1772
- getVeScaLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<any>;
2105
+ getVeScaLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<VeScaLoyaltyProgramInfo | null>;
1773
2106
  /**
1774
2107
  * Get total supply of sCoin
1775
2108
  * @param sCoinName - Supported sCoin name
@@ -1834,7 +2167,9 @@ declare class ScallopQuery implements ScallopQueryInterface {
1834
2167
  marketPools?: MarketPools;
1835
2168
  coinPrices?: CoinPrices;
1836
2169
  indexer?: boolean;
1837
- }): Promise<any>;
2170
+ }): Promise<{
2171
+ [x: string]: number | undefined;
2172
+ }>;
1838
2173
  /**
1839
2174
  * Query all address (lending pool, collateral pool, borrow dynamics, interest models, etc.) of all pool
1840
2175
  * @returns
@@ -1900,13 +2235,13 @@ declare class ScallopQuery implements ScallopQueryInterface {
1900
2235
  borrowIncentives: any;
1901
2236
  };
1902
2237
  veScas: {
1903
- veScaKey: Vesca;
1904
- coinPrice: any;
1905
- lockedScaInCoin: Vesca;
2238
+ veScaKey: string;
2239
+ coinPrice: number;
2240
+ lockedScaInCoin: number;
1906
2241
  lockedScaInUsd: number;
1907
- currentVeScaBalance: Vesca;
2242
+ currentVeScaBalance: number;
1908
2243
  remainingLockPeriodInDays: number;
1909
- unlockAt: Vesca;
2244
+ unlockAt: number;
1910
2245
  }[];
1911
2246
  totalDebtValue: number;
1912
2247
  totalCollateralValue: number;
@@ -1932,14 +2267,25 @@ declare class ScallopQuery implements ScallopQueryInterface {
1932
2267
  getSwitchboardOnDemandAggregatorObjectIds(coinName: string[]): Promise<string[]>;
1933
2268
  }
1934
2269
 
2270
+ type CoreIds = {
2271
+ protocolPkg: string;
2272
+ market: string;
2273
+ version: string;
2274
+ coinDecimalsRegistry: string;
2275
+ xOracle: string;
2276
+ };
1935
2277
  type NestedResult = Extract<Argument, {
1936
2278
  $kind: 'NestedResult';
1937
2279
  }>;
1938
- type Obligation = NestedResult;
1939
- type ObligationKey = NestedResult;
1940
- type ObligationHotPotato = NestedResult;
2280
+ type ResultAsObligation = NestedResult;
2281
+ type ResultAsObligationKey = NestedResult;
2282
+ type ResultAsObligationHotPotato = NestedResult;
1941
2283
  type CoreNormalMethods = {
1942
- openObligation: () => [Obligation, ObligationKey, ObligationHotPotato];
2284
+ openObligation: () => [
2285
+ ResultAsObligation,
2286
+ ResultAsObligationKey,
2287
+ ResultAsObligationHotPotato
2288
+ ];
1943
2289
  returnObligation: (obligation: SuiObjectArg, obligationHotPotato: SuiObjectArg) => void;
1944
2290
  openObligationEntry: () => void;
1945
2291
  addCollateral: (obligation: SuiObjectArg, coin: SuiObjectArg, collateralCoinName: string) => void;
@@ -1967,7 +2313,18 @@ type CoreQuickMethods = {
1967
2313
  };
1968
2314
  type SuiTxBlockWithCoreNormalMethods = SuiTxBlock & SuiTxBlockWithSpool & CoreNormalMethods;
1969
2315
  type CoreTxBlock = SuiTxBlockWithCoreNormalMethods & CoreQuickMethods;
2316
+ type GenerateCoreNormalMethod = (params: {
2317
+ builder: ScallopBuilder;
2318
+ txBlock: SuiTxBlock;
2319
+ }) => CoreNormalMethods;
2320
+ type GenerateCoreQuickMethod = (params: {
2321
+ builder: ScallopBuilder;
2322
+ txBlock: SuiTxBlockWithCoreNormalMethods;
2323
+ }) => CoreQuickMethods;
1970
2324
 
2325
+ type SpoolIds = {
2326
+ spoolPkg: string;
2327
+ };
1971
2328
  type SpoolNormalMethods = {
1972
2329
  createStakeAccount: (stakeMarketCoinName: string) => TransactionResult;
1973
2330
  stake: (stakeAccount: SuiAddressArg, coin: SuiObjectArg, stakeMarketCoinName: string) => void;
@@ -1981,7 +2338,23 @@ type SpoolQuickMethods = {
1981
2338
  };
1982
2339
  type SuiTxBlockWithSpoolNormalMethods = SuiTxBlock & SuiTxBlockWithSCoin & SpoolNormalMethods;
1983
2340
  type SpoolTxBlock = SuiTxBlockWithSpoolNormalMethods & SpoolQuickMethods;
2341
+ type GenerateSpoolNormalMethod = (params: {
2342
+ builder: ScallopBuilder;
2343
+ txBlock: SuiTxBlock;
2344
+ }) => SpoolNormalMethods;
2345
+ type GenerateSpoolQuickMethod = (params: {
2346
+ builder: ScallopBuilder;
2347
+ txBlock: SuiTxBlockWithSpoolNormalMethods;
2348
+ }) => SpoolQuickMethods;
1984
2349
 
2350
+ type BorrowIncentiveIds = {
2351
+ borrowIncentivePkg: string;
2352
+ query: string;
2353
+ config: string;
2354
+ incentivePools: string;
2355
+ incentiveAccounts: string;
2356
+ obligationAccessStore: string;
2357
+ };
1985
2358
  type BorrowIncentiveNormalMethods = {
1986
2359
  stakeObligation: (obligation: SuiObjectArg, obligationKey: SuiObjectArg) => void;
1987
2360
  stakeObligationWithVesca: (obligation: SuiObjectArg, obligationKey: SuiObjectArg, veScaKey: SuiObjectArg) => void;
@@ -1997,6 +2370,14 @@ type BorrowIncentiveQuickMethods = {
1997
2370
  };
1998
2371
  type SuiTxBlockWithBorrowIncentiveNormalMethods = SuiTxBlock & BorrowIncentiveNormalMethods;
1999
2372
  type BorrowIncentiveTxBlock = SuiTxBlockWithBorrowIncentiveNormalMethods & BorrowIncentiveQuickMethods;
2373
+ type GenerateBorrowIncentiveNormalMethod = (params: {
2374
+ builder: ScallopBuilder;
2375
+ txBlock: SuiTxBlock;
2376
+ }) => BorrowIncentiveNormalMethods;
2377
+ type GenerateBorrowIncentiveQuickMethod = (params: {
2378
+ builder: ScallopBuilder;
2379
+ txBlock: SuiTxBlockWithBorrowIncentiveNormalMethods;
2380
+ }) => BorrowIncentiveQuickMethods;
2000
2381
 
2001
2382
  type VeScaNormalMethods = {
2002
2383
  lockSca: (scaCoin: SuiObjectArg, unlockAtInSecondTimestamp: number) => TransactionResult;
@@ -2064,6 +2445,14 @@ type VeScaQuickMethods = {
2064
2445
  };
2065
2446
  type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
2066
2447
  type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
2448
+ type GenerateVeScaNormalMethod = (params: {
2449
+ builder: ScallopBuilder;
2450
+ txBlock: SuiTxBlock;
2451
+ }) => VeScaNormalMethods;
2452
+ type GenerateVeScaQuickMethod = (params: {
2453
+ builder: ScallopBuilder;
2454
+ txBlock: SuiTxBlockWithVeScaNormalMethods;
2455
+ }) => VeScaQuickMethods;
2067
2456
 
2068
2457
  type LoyaltyProgramNormalMethods = {
2069
2458
  claimLoyaltyRevenue: (veScaKey: SuiObjectArg) => TransactionResult$1;
@@ -2075,7 +2464,18 @@ type LoyaltyProgramQuickMethods = {
2075
2464
  };
2076
2465
  type SuiTxBlockWithLoyaltyProgramNormalMethods = SuiTxBlock & LoyaltyProgramNormalMethods;
2077
2466
  type LoyaltyProgramTxBlock = SuiTxBlockWithLoyaltyProgramNormalMethods & LoyaltyProgramQuickMethods;
2467
+ type GenerateLoyaltyProgramNormalMethod = (params: {
2468
+ builder: ScallopBuilder;
2469
+ txBlock: SuiTxBlock;
2470
+ }) => LoyaltyProgramNormalMethods;
2471
+ type GenerateLoyaltyProgramQuickMethod = (params: {
2472
+ builder: ScallopBuilder;
2473
+ txBlock: SuiTxBlockWithLoyaltyProgramNormalMethods;
2474
+ }) => LoyaltyProgramQuickMethods;
2078
2475
 
2476
+ type sCoinPkgIds = {
2477
+ pkgId: string;
2478
+ };
2079
2479
  type sCoinNormalMethods = {
2080
2480
  /**
2081
2481
  * Lock marketCoin and return sCoin
@@ -2098,6 +2498,14 @@ type sCoinQuickMethods = {
2098
2498
  };
2099
2499
  type SuiTxBlockWithSCoinNormalMethods = SuiTxBlock & BaseScallopTxBlock & sCoinNormalMethods;
2100
2500
  type SCoinTxBlock = SuiTxBlockWithSCoinNormalMethods & sCoinQuickMethods;
2501
+ type GenerateSCoinNormalMethod = (params: {
2502
+ builder: ScallopBuilder;
2503
+ txBlock: SuiTxBlock;
2504
+ }) => sCoinNormalMethods;
2505
+ type GenerateSCoinQuickMethod = (params: {
2506
+ builder: ScallopBuilder;
2507
+ txBlock: SuiTxBlockWithSCoinNormalMethods;
2508
+ }) => sCoinQuickMethods;
2101
2509
 
2102
2510
  type ReferralNormalMethods = {
2103
2511
  bindToReferral: (veScaKeyId: string) => void;
@@ -2415,7 +2823,7 @@ declare class ScallopUtils implements ScallopUtilsInterface {
2415
2823
  * @param assetCoinNames - Specific an array of support asset coin name.
2416
2824
  * @return Asset coin price.
2417
2825
  */
2418
- getCoinPrices(coinNames?: string[]): Promise<OptionalKeys$1<Record<string, number>>>;
2826
+ getCoinPrices(coinNames?: string[]): Promise<OptionalKeys<Record<string, number>>>;
2419
2827
  /**
2420
2828
  * Convert apr to apy.
2421
2829
  *
@@ -2450,7 +2858,7 @@ declare class ScallopUtils implements ScallopUtilsInterface {
2450
2858
  * Get detailed contract address and price id information for supported pool in Scallop
2451
2859
  * @returns Supported pool informations
2452
2860
  */
2453
- getSupportedPoolAddresses(): PoolAddress$1[];
2861
+ getSupportedPoolAddresses(): PoolAddress[];
2454
2862
  }
2455
2863
 
2456
2864
  type ScallopClientParams = {
@@ -2508,7 +2916,7 @@ declare class ScallopClient implements ScallopClientInterface {
2508
2916
  * @param ownerAddress - The owner address.
2509
2917
  * @return Obligations data.
2510
2918
  */
2511
- getObligations(ownerAddress?: string): Promise<Obligation$1[]>;
2919
+ getObligations(ownerAddress?: string): Promise<Obligation[]>;
2512
2920
  /**
2513
2921
  * Query obligation data.
2514
2922
  *
@@ -2835,4 +3243,4 @@ declare class Scallop {
2835
3243
  getScallopConstants(): Promise<ScallopConstants>;
2836
3244
  }
2837
3245
 
2838
- export { API_BASE_URL, DEFAULT_CACHE_OPTIONS, IS_VE_SCA_TEST, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, OLD_BORROW_INCENTIVE_PROTOCOL_ID, RPC_PROVIDERS, SCA_COIN_TYPE, SDK_API_BASE_URL, SUPPORT_ORACLES, SUPPORT_ORACLE_LST, SUPPORT_SUI_LST, Scallop, ScallopAddress, ScallopBuilder, ScallopClient, ScallopConstants, ScallopIndexer, ScallopQuery, ScallopSuiKit, ScallopUtils, TEST_ADDRESSES, TEST_POOL_ADDRESSES, TEST_WHITELIST, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, X_ORACLE_LIST, X_ORACLE_RULES, queryKeys };
3246
+ export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type BalanceSheet, type BasePackage, type BaseScallopTxBlock, type BorrowDynamic, type BorrowFee, type BorrowIncentiveAccountKey, type BorrowIncentiveAccounts, type BorrowIncentiveAccountsQueryInterface, type BorrowIncentiveIds, type BorrowIncentiveNormalMethods, type BorrowIncentivePool, type BorrowIncentivePoolPoints, type BorrowIncentivePools, type BorrowIncentivePoolsQueryInterface, type BorrowIncentiveQuickMethods, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type CollateralStat, type CoreIds, type CoreNormalMethods, type CoreQuickMethods, type CoreTxBlock, DEFAULT_CACHE_OPTIONS, type GenerateBorrowIncentiveNormalMethod, type GenerateBorrowIncentiveQuickMethod, type GenerateCoreNormalMethod, type GenerateCoreQuickMethod, type GenerateLoyaltyProgramNormalMethod, type GenerateLoyaltyProgramQuickMethod, type GenerateSCoinNormalMethod, type GenerateSCoinQuickMethod, type GenerateSpoolNormalMethod, type GenerateSpoolQuickMethod, type GenerateVeScaNormalMethod, type GenerateVeScaQuickMethod, IS_VE_SCA_TEST, type InterestModel, type Lending, type Lendings, type LoyaltyProgramInfo, type LoyaltyProgramNormalMethods, type LoyaltyProgramQuickMethods, type LoyaltyProgramTxBlock, MAX_LOCK_DURATION, MAX_LOCK_ROUNDS, MIN_INITIAL_LOCK_AMOUNT, MIN_TOP_UP_AMOUNT, type Market, type MarketCoinAmounts, type MarketCollateral, type MarketCollaterals, type MarketPool, type MarketPools, type MarketQueryInterface, type NestedResult, OLD_BORROW_INCENTIVE_PROTOCOL_ID, type Obligation, type ObligationAccount, type ObligationAccounts, type ObligationBorrowIncentive, type ObligationBorrowIncentiveReward, type ObligationCollateral, type ObligationDebt, type ObligationQueryInterface, type OptionalKeys, type OracleLst, type OracleLstConfig, type OracleLstPackage, type OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type PackageName, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, QueryKeys, type QuickMethodReturnType, RPC_PROVIDERS, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinTxBlock, SDK_API_BASE_URL, SUPPORT_ORACLES, SUPPORT_ORACLE_LST, SUPPORT_SUI_LST, Scallop, ScallopAddress, ScallopBuilder, ScallopClient, ScallopConstants, ScallopIndexer, ScallopQuery, ScallopSuiKit, type ScallopTxBlock, ScallopUtils, type SelectCoinReturnType, type Spool, type SpoolData, type SpoolIds, type SpoolNormalMethods, type SpoolQuickMethods, type SpoolRewardPool, type SpoolTxBlock, type Spools, type StakeAccount, type StakeAccounts, type StakePool, type StakePools, type StakeRewardPool, type StakeRewardPools, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleLst, type SupportOracleType, type SupportedOracleSuiLst, TEST_ADDRESSES, TEST_POOL_ADDRESSES, TEST_WHITELIST, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaLoyaltyProgramInfo, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type Whitelist, X_ORACLE_LIST, X_ORACLE_RULES, queryKeys, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, type xOracleListType, type xOracleRuleType, type xOracleRules };