@scallop-io/sui-scallop-sdk 2.1.2 → 2.1.3-merge-split-ve-sca-alpha.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.
package/dist/index.d.mts CHANGED
@@ -860,10 +860,16 @@ declare class ScallopQuery implements ScallopQueryInterface {
860
860
  getBindedVeScaKey(obligationId: string): Promise<string | null>;
861
861
  /**
862
862
  * Get user's veSCA loyalty program informations
863
- * @param walletAddress
863
+ * @param veScaKey
864
864
  * @returns Loyalty program information
865
865
  */
866
866
  getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<LoyaltyProgramInfo | null>;
867
+ /**
868
+ * Get user's veSCA rewards informations from loyalty program
869
+ * @param veScaKey
870
+ * @returns Loyalty program information
871
+ */
872
+ getVeScaLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<VeScaLoyaltyProgramInfo | null>;
867
873
  /**
868
874
  * Get total supply of sCoin
869
875
  * @param sCoinName - Supported sCoin name
@@ -1848,12 +1854,6 @@ type GenerateBorrowIncentiveQuickMethod = (params: {
1848
1854
  txBlock: SuiTxBlockWithBorrowIncentiveNormalMethods;
1849
1855
  }) => BorrowIncentiveQuickMethods;
1850
1856
 
1851
- type VescaIds = {
1852
- pkgId: string;
1853
- table: string;
1854
- treasury: string;
1855
- config: string;
1856
- };
1857
1857
  type VeScaNormalMethods = {
1858
1858
  lockSca: (scaCoin: SuiObjectArg, unlockAtInSecondTimestamp: number) => TransactionResult;
1859
1859
  extendLockPeriod: (veScaKey: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
@@ -1861,8 +1861,10 @@ type VeScaNormalMethods = {
1861
1861
  renewExpiredVeSca: (veScaKey: SuiObjectArg, scaCoin: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
1862
1862
  redeemSca: (veScaKey: SuiObjectArg) => TransactionResult;
1863
1863
  mintEmptyVeSca: () => TransactionResult;
1864
+ splitVeSca: (veScaKey: SuiObjectArg, splitAmount: string) => TransactionResult;
1865
+ mergeVeSca: (targetVeScaKey: SuiObjectArg, sourceVeScaKey: SuiObjectArg) => void;
1864
1866
  };
1865
- type RedeemScaQuickReturnType<T extends boolean> = T extends true ? void : TransactionResult | undefined;
1867
+ type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult | undefined;
1866
1868
  type VeScaQuickMethods = {
1867
1869
  /**
1868
1870
  * Quick methods to automate
@@ -1884,7 +1886,9 @@ type VeScaQuickMethods = {
1884
1886
  extendLockPeriodQuick: (lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
1885
1887
  extendLockAmountQuick: (scaAmount: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
1886
1888
  renewExpiredVeScaQuick: (scaAmount: number, lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
1887
- redeemScaQuick: <T extends boolean>(veSCaKey?: SuiObjectArg, transferSca?: T) => Promise<RedeemScaQuickReturnType<T>>;
1889
+ redeemScaQuick: <T extends boolean>(veScaKey?: SuiObjectArg, transferSca?: T) => Promise<QuickMethodReturnType<T>>;
1890
+ splitVeScaQuick: <T extends boolean>(splitAmount: string, veScaKey: string, transferVeScaKey?: T) => Promise<QuickMethodReturnType<T>>;
1891
+ mergeVeScaQuick: (targetVeScaKey: string, sourceVeScaKey: string) => Promise<void>;
1888
1892
  };
1889
1893
  type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
1890
1894
  type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
@@ -1909,16 +1913,13 @@ type ReferralQuickMethods = {
1909
1913
  type SuiTxBlockWithReferralNormalMethods = SuiTxBlock & ReferralNormalMethods;
1910
1914
  type ReferralTxBlock = SuiTxBlockWithReferralNormalMethods & ReferralQuickMethods;
1911
1915
 
1912
- type LoyaltyProgramIds = {
1913
- loyaltyProgramPkgId: string;
1914
- rewardPool: string;
1915
- userRewardTableId: string;
1916
- };
1917
1916
  type LoyaltyProgramNormalMethods = {
1918
1917
  claimLoyaltyRevenue: (veScaKey: SuiObjectArg) => TransactionResult$1;
1918
+ claimVeScaLoyaltyReward: (veScaKey: SuiObjectArg) => TransactionResult$1;
1919
1919
  };
1920
1920
  type LoyaltyProgramQuickMethods = {
1921
1921
  claimLoyaltyRevenueQuick: (veScaKey?: SuiObjectArg) => Promise<void>;
1922
+ claimVeScaLoyaltyRewardQuick: (veScaKey?: SuiObjectArg) => Promise<void>;
1922
1923
  };
1923
1924
  type SuiTxBlockWithLoyaltyProgramNormalMethods = SuiTxBlock & LoyaltyProgramNormalMethods;
1924
1925
  type LoyaltyProgramTxBlock = SuiTxBlockWithLoyaltyProgramNormalMethods & LoyaltyProgramQuickMethods;
@@ -2591,6 +2592,12 @@ type LoyaltyProgramInfo = {
2591
2592
  totalPoolReward: number;
2592
2593
  isClaimEnabled: boolean;
2593
2594
  };
2595
+ type VeScaLoyaltyProgramInfo = {
2596
+ pendingVeScaReward: number;
2597
+ pendingScaReward: number;
2598
+ totalPoolReward: number;
2599
+ isClaimEnabled: boolean;
2600
+ };
2594
2601
 
2595
2602
  type OptionalKeys$2<T> = {
2596
2603
  [K in keyof T]?: T[K];
@@ -2959,6 +2966,9 @@ interface AddressesInterface {
2959
2966
  table: string;
2960
2967
  treasury: string;
2961
2968
  config: string;
2969
+ subsTable: string;
2970
+ subsTableId: string;
2971
+ subsWhitelist: string;
2962
2972
  };
2963
2973
  referral: {
2964
2974
  id: string;
@@ -2975,10 +2985,18 @@ interface AddressesInterface {
2975
2985
  };
2976
2986
  loyaltyProgram: {
2977
2987
  id: string;
2988
+ adminCap?: string;
2978
2989
  object: string;
2979
2990
  rewardPool: string;
2980
2991
  userRewardTableId: string;
2981
2992
  };
2993
+ veScaLoyaltyProgram: {
2994
+ id: string;
2995
+ adminCap?: string;
2996
+ object: string;
2997
+ veScaRewardPool: string;
2998
+ veScaRewardTableId: string;
2999
+ };
2982
3000
  scoin: {
2983
3001
  id: string;
2984
3002
  coins: Partial<Record<string, {
@@ -3001,6 +3019,162 @@ type OptionalKeys<T> = {
3001
3019
  type CoinPrices = OptionalKeys<Record<string, number>>;
3002
3020
 
3003
3021
  declare const TEST_ADDRESSES: AddressesInterface;
3022
+ declare const WHITELIST: {
3023
+ lending: Set<string>;
3024
+ collateral: Set<string>;
3025
+ borrowing: Set<string>;
3026
+ packages: Set<string>;
3027
+ spool: Set<string>;
3028
+ scoin: Set<string>;
3029
+ suiBridge: Set<string>;
3030
+ wormhole: Set<string>;
3031
+ oracles: Set<string>;
3032
+ pythEndpoints: Set<string>;
3033
+ deprecated: Set<string>;
3034
+ borrowIncentiveRewards: Set<string>;
3035
+ rewardsAsPoint: Set<string>;
3036
+ emerging: Set<string>;
3037
+ };
3038
+ declare const POOL_ADDRESSES: {
3039
+ usdc: {
3040
+ coinName: string;
3041
+ symbol: string;
3042
+ lendingPoolAddress: string;
3043
+ collateralPoolAddress: string;
3044
+ borrowDynamic: string;
3045
+ interestModel: string;
3046
+ riskModel: string;
3047
+ borrowFeeKey: string;
3048
+ supplyLimitKey: string;
3049
+ borrowLimitKey: string;
3050
+ isolatedAssetKey: string;
3051
+ isIsolated: boolean;
3052
+ spool: string;
3053
+ spoolReward: string;
3054
+ sCoinType: string;
3055
+ sCoinTreasury: string;
3056
+ sCoinMetadataId: string;
3057
+ sCoinSymbol: string;
3058
+ sCoinName: string;
3059
+ coinMetadataId: string;
3060
+ coinType: string;
3061
+ spoolName: string;
3062
+ decimals: number;
3063
+ pythFeed: string;
3064
+ pythFeedObjectId: string;
3065
+ flashloanFeeObject: string;
3066
+ };
3067
+ sui: {
3068
+ coinName: string;
3069
+ symbol: string;
3070
+ lendingPoolAddress: string;
3071
+ collateralPoolAddress: string;
3072
+ borrowDynamic: string;
3073
+ interestModel: string;
3074
+ riskModel: string;
3075
+ borrowFeeKey: string;
3076
+ supplyLimitKey: string;
3077
+ borrowLimitKey: string;
3078
+ isolatedAssetKey: string;
3079
+ isIsolated: boolean;
3080
+ spool: string;
3081
+ spoolReward: string;
3082
+ sCoinType: string;
3083
+ sCoinTreasury: string;
3084
+ sCoinMetadataId: string;
3085
+ sCoinSymbol: string;
3086
+ sCoinName: string;
3087
+ coinMetadataId: string;
3088
+ coinType: string;
3089
+ spoolName: string;
3090
+ decimals: number;
3091
+ pythFeed: string;
3092
+ pythFeedObjectId: string;
3093
+ flashloanFeeObject: string;
3094
+ };
3095
+ sca: {
3096
+ coinName: string;
3097
+ symbol: string;
3098
+ lendingPoolAddress: string;
3099
+ collateralPoolAddress: string;
3100
+ borrowDynamic: string;
3101
+ interestModel: string;
3102
+ riskModel: string;
3103
+ borrowFeeKey: string;
3104
+ supplyLimitKey: string;
3105
+ borrowLimitKey: string;
3106
+ isolatedAssetKey: string;
3107
+ isIsolated: boolean;
3108
+ spool: string;
3109
+ spoolReward: string;
3110
+ sCoinType: string;
3111
+ sCoinTreasury: string;
3112
+ sCoinMetadataId: string;
3113
+ sCoinSymbol: string;
3114
+ sCoinName: string;
3115
+ coinMetadataId: string;
3116
+ coinType: string;
3117
+ spoolName: string;
3118
+ decimals: number;
3119
+ pythFeed: string;
3120
+ pythFeedObjectId: string;
3121
+ flashloanFeeObject: string;
3122
+ };
3123
+ fud: {
3124
+ coinName: string;
3125
+ symbol: string;
3126
+ lendingPoolAddress: string;
3127
+ collateralPoolAddress: string;
3128
+ borrowDynamic: string;
3129
+ interestModel: string;
3130
+ borrowFeeKey: string;
3131
+ supplyLimitKey: string;
3132
+ borrowLimitKey: string;
3133
+ isolatedAssetKey: string;
3134
+ isIsolated: boolean;
3135
+ spool: string;
3136
+ spoolReward: string;
3137
+ sCoinType: string;
3138
+ sCoinTreasury: string;
3139
+ sCoinMetadataId: string;
3140
+ sCoinSymbol: string;
3141
+ sCoinName: string;
3142
+ coinMetadataId: string;
3143
+ coinType: string;
3144
+ spoolName: string;
3145
+ decimals: number;
3146
+ pythFeed: string;
3147
+ pythFeedObjectId: string;
3148
+ flashloanFeeObject: string;
3149
+ };
3150
+ deep: {
3151
+ coinName: string;
3152
+ symbol: string;
3153
+ lendingPoolAddress: string;
3154
+ collateralPoolAddress: string;
3155
+ borrowDynamic: string;
3156
+ interestModel: string;
3157
+ borrowFeeKey: string;
3158
+ supplyLimitKey: string;
3159
+ borrowLimitKey: string;
3160
+ isolatedAssetKey: string;
3161
+ isIsolated: boolean;
3162
+ spool: string;
3163
+ spoolReward: string;
3164
+ sCoinType: string;
3165
+ sCoinTreasury: string;
3166
+ sCoinMetadataId: string;
3167
+ sCoinSymbol: string;
3168
+ sCoinName: string;
3169
+ coinMetadataId: string;
3170
+ coinType: string;
3171
+ spoolName: string;
3172
+ decimals: number;
3173
+ pythFeed: string;
3174
+ pythFeedObjectId: string;
3175
+ flashloanFeeObject: string;
3176
+ };
3177
+ };
3004
3178
 
3005
3179
  declare const UNLOCK_ROUND_DURATION: number;
3006
3180
  declare const MAX_LOCK_ROUNDS: 1460;
@@ -3010,4 +3184,4 @@ declare const MIN_TOP_UP_AMOUNT: 1000000000;
3010
3184
 
3011
3185
  declare const xOracleList: xOracleListType;
3012
3186
 
3013
- export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, 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 BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, 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 LoyaltyProgramIds, 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 MarketCoins, 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 OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, RPC_PROVIDERS, type RedeemScaQuickReturnType, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, 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 StakeMarketCoins, type StakePool, type StakePools, type StakeRewardCoins, type StakeRewardPool, type StakeRewardPools, type SuiBridgeCoins, type SuiBridgedCoinPackageIds, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleType, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VescaIds, type VoloCoinIds, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };
3187
+ export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, 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 BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, 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 MarketCoins, 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 OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, POOL_ADDRESSES, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, type QuickMethodReturnType, RPC_PROVIDERS, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, 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 StakeMarketCoins, type StakePool, type StakePools, type StakeRewardCoins, type StakeRewardPool, type StakeRewardPools, type SuiBridgeCoins, type SuiBridgedCoinPackageIds, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleType, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaLoyaltyProgramInfo, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VoloCoinIds, WHITELIST, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };
package/dist/index.d.ts CHANGED
@@ -860,10 +860,16 @@ declare class ScallopQuery implements ScallopQueryInterface {
860
860
  getBindedVeScaKey(obligationId: string): Promise<string | null>;
861
861
  /**
862
862
  * Get user's veSCA loyalty program informations
863
- * @param walletAddress
863
+ * @param veScaKey
864
864
  * @returns Loyalty program information
865
865
  */
866
866
  getLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<LoyaltyProgramInfo | null>;
867
+ /**
868
+ * Get user's veSCA rewards informations from loyalty program
869
+ * @param veScaKey
870
+ * @returns Loyalty program information
871
+ */
872
+ getVeScaLoyaltyProgramInfos(veScaKey?: string | SuiObjectData): Promise<VeScaLoyaltyProgramInfo | null>;
867
873
  /**
868
874
  * Get total supply of sCoin
869
875
  * @param sCoinName - Supported sCoin name
@@ -1848,12 +1854,6 @@ type GenerateBorrowIncentiveQuickMethod = (params: {
1848
1854
  txBlock: SuiTxBlockWithBorrowIncentiveNormalMethods;
1849
1855
  }) => BorrowIncentiveQuickMethods;
1850
1856
 
1851
- type VescaIds = {
1852
- pkgId: string;
1853
- table: string;
1854
- treasury: string;
1855
- config: string;
1856
- };
1857
1857
  type VeScaNormalMethods = {
1858
1858
  lockSca: (scaCoin: SuiObjectArg, unlockAtInSecondTimestamp: number) => TransactionResult;
1859
1859
  extendLockPeriod: (veScaKey: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
@@ -1861,8 +1861,10 @@ type VeScaNormalMethods = {
1861
1861
  renewExpiredVeSca: (veScaKey: SuiObjectArg, scaCoin: SuiObjectArg, newUnlockAtInSecondTimestamp: number) => void;
1862
1862
  redeemSca: (veScaKey: SuiObjectArg) => TransactionResult;
1863
1863
  mintEmptyVeSca: () => TransactionResult;
1864
+ splitVeSca: (veScaKey: SuiObjectArg, splitAmount: string) => TransactionResult;
1865
+ mergeVeSca: (targetVeScaKey: SuiObjectArg, sourceVeScaKey: SuiObjectArg) => void;
1864
1866
  };
1865
- type RedeemScaQuickReturnType<T extends boolean> = T extends true ? void : TransactionResult | undefined;
1867
+ type QuickMethodReturnType<T extends boolean> = T extends true ? void : TransactionResult | undefined;
1866
1868
  type VeScaQuickMethods = {
1867
1869
  /**
1868
1870
  * Quick methods to automate
@@ -1884,7 +1886,9 @@ type VeScaQuickMethods = {
1884
1886
  extendLockPeriodQuick: (lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
1885
1887
  extendLockAmountQuick: (scaAmount: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
1886
1888
  renewExpiredVeScaQuick: (scaAmount: number, lockPeriodInDays: number, veScaKey?: SuiObjectArg, autoCheck?: boolean) => Promise<void>;
1887
- redeemScaQuick: <T extends boolean>(veSCaKey?: SuiObjectArg, transferSca?: T) => Promise<RedeemScaQuickReturnType<T>>;
1889
+ redeemScaQuick: <T extends boolean>(veScaKey?: SuiObjectArg, transferSca?: T) => Promise<QuickMethodReturnType<T>>;
1890
+ splitVeScaQuick: <T extends boolean>(splitAmount: string, veScaKey: string, transferVeScaKey?: T) => Promise<QuickMethodReturnType<T>>;
1891
+ mergeVeScaQuick: (targetVeScaKey: string, sourceVeScaKey: string) => Promise<void>;
1888
1892
  };
1889
1893
  type SuiTxBlockWithVeScaNormalMethods = SuiTxBlock & VeScaNormalMethods;
1890
1894
  type VeScaTxBlock = SuiTxBlockWithVeScaNormalMethods & VeScaQuickMethods;
@@ -1909,16 +1913,13 @@ type ReferralQuickMethods = {
1909
1913
  type SuiTxBlockWithReferralNormalMethods = SuiTxBlock & ReferralNormalMethods;
1910
1914
  type ReferralTxBlock = SuiTxBlockWithReferralNormalMethods & ReferralQuickMethods;
1911
1915
 
1912
- type LoyaltyProgramIds = {
1913
- loyaltyProgramPkgId: string;
1914
- rewardPool: string;
1915
- userRewardTableId: string;
1916
- };
1917
1916
  type LoyaltyProgramNormalMethods = {
1918
1917
  claimLoyaltyRevenue: (veScaKey: SuiObjectArg) => TransactionResult$1;
1918
+ claimVeScaLoyaltyReward: (veScaKey: SuiObjectArg) => TransactionResult$1;
1919
1919
  };
1920
1920
  type LoyaltyProgramQuickMethods = {
1921
1921
  claimLoyaltyRevenueQuick: (veScaKey?: SuiObjectArg) => Promise<void>;
1922
+ claimVeScaLoyaltyRewardQuick: (veScaKey?: SuiObjectArg) => Promise<void>;
1922
1923
  };
1923
1924
  type SuiTxBlockWithLoyaltyProgramNormalMethods = SuiTxBlock & LoyaltyProgramNormalMethods;
1924
1925
  type LoyaltyProgramTxBlock = SuiTxBlockWithLoyaltyProgramNormalMethods & LoyaltyProgramQuickMethods;
@@ -2591,6 +2592,12 @@ type LoyaltyProgramInfo = {
2591
2592
  totalPoolReward: number;
2592
2593
  isClaimEnabled: boolean;
2593
2594
  };
2595
+ type VeScaLoyaltyProgramInfo = {
2596
+ pendingVeScaReward: number;
2597
+ pendingScaReward: number;
2598
+ totalPoolReward: number;
2599
+ isClaimEnabled: boolean;
2600
+ };
2594
2601
 
2595
2602
  type OptionalKeys$2<T> = {
2596
2603
  [K in keyof T]?: T[K];
@@ -2959,6 +2966,9 @@ interface AddressesInterface {
2959
2966
  table: string;
2960
2967
  treasury: string;
2961
2968
  config: string;
2969
+ subsTable: string;
2970
+ subsTableId: string;
2971
+ subsWhitelist: string;
2962
2972
  };
2963
2973
  referral: {
2964
2974
  id: string;
@@ -2975,10 +2985,18 @@ interface AddressesInterface {
2975
2985
  };
2976
2986
  loyaltyProgram: {
2977
2987
  id: string;
2988
+ adminCap?: string;
2978
2989
  object: string;
2979
2990
  rewardPool: string;
2980
2991
  userRewardTableId: string;
2981
2992
  };
2993
+ veScaLoyaltyProgram: {
2994
+ id: string;
2995
+ adminCap?: string;
2996
+ object: string;
2997
+ veScaRewardPool: string;
2998
+ veScaRewardTableId: string;
2999
+ };
2982
3000
  scoin: {
2983
3001
  id: string;
2984
3002
  coins: Partial<Record<string, {
@@ -3001,6 +3019,162 @@ type OptionalKeys<T> = {
3001
3019
  type CoinPrices = OptionalKeys<Record<string, number>>;
3002
3020
 
3003
3021
  declare const TEST_ADDRESSES: AddressesInterface;
3022
+ declare const WHITELIST: {
3023
+ lending: Set<string>;
3024
+ collateral: Set<string>;
3025
+ borrowing: Set<string>;
3026
+ packages: Set<string>;
3027
+ spool: Set<string>;
3028
+ scoin: Set<string>;
3029
+ suiBridge: Set<string>;
3030
+ wormhole: Set<string>;
3031
+ oracles: Set<string>;
3032
+ pythEndpoints: Set<string>;
3033
+ deprecated: Set<string>;
3034
+ borrowIncentiveRewards: Set<string>;
3035
+ rewardsAsPoint: Set<string>;
3036
+ emerging: Set<string>;
3037
+ };
3038
+ declare const POOL_ADDRESSES: {
3039
+ usdc: {
3040
+ coinName: string;
3041
+ symbol: string;
3042
+ lendingPoolAddress: string;
3043
+ collateralPoolAddress: string;
3044
+ borrowDynamic: string;
3045
+ interestModel: string;
3046
+ riskModel: string;
3047
+ borrowFeeKey: string;
3048
+ supplyLimitKey: string;
3049
+ borrowLimitKey: string;
3050
+ isolatedAssetKey: string;
3051
+ isIsolated: boolean;
3052
+ spool: string;
3053
+ spoolReward: string;
3054
+ sCoinType: string;
3055
+ sCoinTreasury: string;
3056
+ sCoinMetadataId: string;
3057
+ sCoinSymbol: string;
3058
+ sCoinName: string;
3059
+ coinMetadataId: string;
3060
+ coinType: string;
3061
+ spoolName: string;
3062
+ decimals: number;
3063
+ pythFeed: string;
3064
+ pythFeedObjectId: string;
3065
+ flashloanFeeObject: string;
3066
+ };
3067
+ sui: {
3068
+ coinName: string;
3069
+ symbol: string;
3070
+ lendingPoolAddress: string;
3071
+ collateralPoolAddress: string;
3072
+ borrowDynamic: string;
3073
+ interestModel: string;
3074
+ riskModel: string;
3075
+ borrowFeeKey: string;
3076
+ supplyLimitKey: string;
3077
+ borrowLimitKey: string;
3078
+ isolatedAssetKey: string;
3079
+ isIsolated: boolean;
3080
+ spool: string;
3081
+ spoolReward: string;
3082
+ sCoinType: string;
3083
+ sCoinTreasury: string;
3084
+ sCoinMetadataId: string;
3085
+ sCoinSymbol: string;
3086
+ sCoinName: string;
3087
+ coinMetadataId: string;
3088
+ coinType: string;
3089
+ spoolName: string;
3090
+ decimals: number;
3091
+ pythFeed: string;
3092
+ pythFeedObjectId: string;
3093
+ flashloanFeeObject: string;
3094
+ };
3095
+ sca: {
3096
+ coinName: string;
3097
+ symbol: string;
3098
+ lendingPoolAddress: string;
3099
+ collateralPoolAddress: string;
3100
+ borrowDynamic: string;
3101
+ interestModel: string;
3102
+ riskModel: string;
3103
+ borrowFeeKey: string;
3104
+ supplyLimitKey: string;
3105
+ borrowLimitKey: string;
3106
+ isolatedAssetKey: string;
3107
+ isIsolated: boolean;
3108
+ spool: string;
3109
+ spoolReward: string;
3110
+ sCoinType: string;
3111
+ sCoinTreasury: string;
3112
+ sCoinMetadataId: string;
3113
+ sCoinSymbol: string;
3114
+ sCoinName: string;
3115
+ coinMetadataId: string;
3116
+ coinType: string;
3117
+ spoolName: string;
3118
+ decimals: number;
3119
+ pythFeed: string;
3120
+ pythFeedObjectId: string;
3121
+ flashloanFeeObject: string;
3122
+ };
3123
+ fud: {
3124
+ coinName: string;
3125
+ symbol: string;
3126
+ lendingPoolAddress: string;
3127
+ collateralPoolAddress: string;
3128
+ borrowDynamic: string;
3129
+ interestModel: string;
3130
+ borrowFeeKey: string;
3131
+ supplyLimitKey: string;
3132
+ borrowLimitKey: string;
3133
+ isolatedAssetKey: string;
3134
+ isIsolated: boolean;
3135
+ spool: string;
3136
+ spoolReward: string;
3137
+ sCoinType: string;
3138
+ sCoinTreasury: string;
3139
+ sCoinMetadataId: string;
3140
+ sCoinSymbol: string;
3141
+ sCoinName: string;
3142
+ coinMetadataId: string;
3143
+ coinType: string;
3144
+ spoolName: string;
3145
+ decimals: number;
3146
+ pythFeed: string;
3147
+ pythFeedObjectId: string;
3148
+ flashloanFeeObject: string;
3149
+ };
3150
+ deep: {
3151
+ coinName: string;
3152
+ symbol: string;
3153
+ lendingPoolAddress: string;
3154
+ collateralPoolAddress: string;
3155
+ borrowDynamic: string;
3156
+ interestModel: string;
3157
+ borrowFeeKey: string;
3158
+ supplyLimitKey: string;
3159
+ borrowLimitKey: string;
3160
+ isolatedAssetKey: string;
3161
+ isIsolated: boolean;
3162
+ spool: string;
3163
+ spoolReward: string;
3164
+ sCoinType: string;
3165
+ sCoinTreasury: string;
3166
+ sCoinMetadataId: string;
3167
+ sCoinSymbol: string;
3168
+ sCoinName: string;
3169
+ coinMetadataId: string;
3170
+ coinType: string;
3171
+ spoolName: string;
3172
+ decimals: number;
3173
+ pythFeed: string;
3174
+ pythFeedObjectId: string;
3175
+ flashloanFeeObject: string;
3176
+ };
3177
+ };
3004
3178
 
3005
3179
  declare const UNLOCK_ROUND_DURATION: number;
3006
3180
  declare const MAX_LOCK_ROUNDS: 1460;
@@ -3010,4 +3184,4 @@ declare const MIN_TOP_UP_AMOUNT: 1000000000;
3010
3184
 
3011
3185
  declare const xOracleList: xOracleListType;
3012
3186
 
3013
- export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, 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 BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, 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 LoyaltyProgramIds, 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 MarketCoins, 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 OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, RPC_PROVIDERS, type RedeemScaQuickReturnType, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, 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 StakeMarketCoins, type StakePool, type StakePools, type StakeRewardCoins, type StakeRewardPool, type StakeRewardPools, type SuiBridgeCoins, type SuiBridgedCoinPackageIds, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleType, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VescaIds, type VoloCoinIds, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };
3187
+ export { API_BASE_URL, type AddressStringPath, type AddressesInterface, type AssetCoinIds, type AssetCoins, type BalanceSheet, 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 BorrowIncentiveRewardCoins, type BorrowIncentiveTxBlock, type CalculatedBorrowIncentivePoolPointData, type CalculatedMarketCollateralData, type CalculatedMarketPoolData, type CalculatedSpoolData, type CalculatedSpoolRewardPoolData, type CoinAmounts, type CoinPrices, type CoinWrappedType, type Coins, 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 MarketCoins, 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 OriginBorrowIncentiveAccountData, type OriginBorrowIncentiveAccountPoolData, type OriginBorrowIncentivePoolData, type OriginBorrowIncentivePoolPointData, type OriginMarketCollateralData, type OriginMarketPoolData, type OriginSpoolData, type OriginSpoolRewardPoolData, POOL_ADDRESSES, type ParsedBorrowIncentiveAccountData, type ParsedBorrowIncentiveAccountPoolData, type ParsedBorrowIncentivePoolData, type ParsedBorrowIncentivePoolPointData, type ParsedMarketCollateralData, type ParsedMarketPoolData, type ParsedSpoolData, type ParsedSpoolRewardPoolData, type PoolAddress, type QuickMethodReturnType, RPC_PROVIDERS, type RiskModel, SCA_COIN_TYPE, type SCoinAmounts, type SCoinConverterTreasury, type SCoinIds, type SCoinTreasuryCaps, type SCoinTxBlock, type SCoins, SDK_API_BASE_URL, 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 StakeMarketCoins, type StakePool, type StakePools, type StakeRewardCoins, type StakeRewardPool, type StakeRewardPools, type SuiBridgeCoins, type SuiBridgedCoinPackageIds, type SuiTxBlockWithBorrowIncentiveNormalMethods, type SuiTxBlockWithCoreNormalMethods, type SuiTxBlockWithLoyaltyProgramNormalMethods, type SuiTxBlockWithSCoin, type SuiTxBlockWithSCoinNormalMethods, type SuiTxBlockWithSpool, type SuiTxBlockWithSpoolNormalMethods, type SuiTxBlockWithVeScaNormalMethods, type SupportOracleType, TEST_ADDRESSES, type TotalValueLocked, UNLOCK_ROUND_DURATION, USE_TEST_ADDRESS, type VeScaLoyaltyProgramInfo, type VeScaNormalMethods, type VeScaQuickMethods, type VeScaTreasuryFields, type VeScaTreasuryInfo, type VeScaTxBlock, type Vesca, type VoloCoinIds, WHITELIST, type Whitelist, type WormholeCoinIds, _SUPPORT_ORACLES, queryKeys, type sCoinBalance, type sCoinNormalMethods, type sCoinPkgIds, type sCoinQuickMethods, xOracleList, type xOracleListType, type xOracleRuleType, type xOracleRules };