haedal-vault-sdk 1.0.2-alpha.2 → 1.0.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.ts +3 -141
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -4
- package/docs/vest-test-guide.md +0 -103
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CoinBalance
|
|
1
|
+
import { CoinBalance } from '@mysten/sui/client';
|
|
2
2
|
import { AggregatorClient } from '@cetusprotocol/aggregator-sdk';
|
|
3
|
-
import { PaginationArgs, DataPage,
|
|
3
|
+
import { PaginationArgs, DataPage, SuiAddressType, FullClient, CoinAsset, SuiResource } from '@cetusprotocol/common-sdk';
|
|
4
4
|
import { Pool as Pool$1, CetusClmmSDK } from '@cetusprotocol/sui-clmm-sdk';
|
|
5
5
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
6
6
|
import * as _pythnetwork_price_service_sdk from '@pythnetwork/price-service-sdk';
|
|
@@ -500,121 +500,8 @@ declare class PythPriceModule implements IModule {
|
|
|
500
500
|
getFeedInfo(coinType: string, forceRefresh: boolean): Promise<FeedInfo>;
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
-
type VestConfigs = {
|
|
504
|
-
versioned_id: string;
|
|
505
|
-
create_event_list: VestCreateEvent[];
|
|
506
|
-
};
|
|
507
|
-
type GlobalVestingPeriod = {
|
|
508
|
-
period: number;
|
|
509
|
-
release_time: string;
|
|
510
|
-
cetus_amount: string;
|
|
511
|
-
redeemed_amount: string;
|
|
512
|
-
};
|
|
513
|
-
type VaultsVestInfo = {
|
|
514
|
-
id: string;
|
|
515
|
-
vault_id: string;
|
|
516
|
-
index: number;
|
|
517
|
-
lp_coin_type: string;
|
|
518
|
-
vest_coin_type: string;
|
|
519
|
-
position: VaultsPosition;
|
|
520
|
-
balance: string;
|
|
521
|
-
total_supply: string;
|
|
522
|
-
impaired_a: string;
|
|
523
|
-
impaired_b: string;
|
|
524
|
-
cetus_amount: string;
|
|
525
|
-
redeemed_amount: string;
|
|
526
|
-
start_time: string;
|
|
527
|
-
global_vesting_periods: GlobalVestingPeriod[];
|
|
528
|
-
vest_infos: {
|
|
529
|
-
id: string;
|
|
530
|
-
size: string;
|
|
531
|
-
};
|
|
532
|
-
url: string;
|
|
533
|
-
} & CoinPairType;
|
|
534
|
-
type VaultsPosition = {
|
|
535
|
-
description: string;
|
|
536
|
-
id: string;
|
|
537
|
-
index: number;
|
|
538
|
-
liquidity: string;
|
|
539
|
-
name: string;
|
|
540
|
-
pool_id: string;
|
|
541
|
-
tick_lower_index: number;
|
|
542
|
-
tick_upper_index: number;
|
|
543
|
-
url: string;
|
|
544
|
-
} & CoinPairType;
|
|
545
|
-
type PeriodInfo = {
|
|
546
|
-
period: number;
|
|
547
|
-
cetus_amount: string;
|
|
548
|
-
is_redeemed: boolean;
|
|
549
|
-
};
|
|
550
|
-
type VestCreateEvent = {
|
|
551
|
-
clmm_vester_id: string;
|
|
552
|
-
lp_coin_type: string;
|
|
553
|
-
pool_id: string;
|
|
554
|
-
position_id: string;
|
|
555
|
-
vault_id: string;
|
|
556
|
-
vault_vester_id: string;
|
|
557
|
-
};
|
|
558
|
-
type VaultVestNFT = {
|
|
559
|
-
id: string;
|
|
560
|
-
index: number;
|
|
561
|
-
vault_id: string;
|
|
562
|
-
lp_amount: string;
|
|
563
|
-
redeemed_amount: string;
|
|
564
|
-
impaired_a: string;
|
|
565
|
-
impaired_b: string;
|
|
566
|
-
period_infos: PeriodInfo[];
|
|
567
|
-
url: string;
|
|
568
|
-
name: string;
|
|
569
|
-
vester_id: string;
|
|
570
|
-
};
|
|
571
|
-
type RedeemOption = {
|
|
572
|
-
vault_id: string;
|
|
573
|
-
vesting_nft_id: string;
|
|
574
|
-
vest_coin_type: string;
|
|
575
|
-
period: number;
|
|
576
|
-
} & CoinPairType;
|
|
577
|
-
|
|
578
503
|
type BigNumber = Decimal.Value | number | string;
|
|
579
504
|
|
|
580
|
-
declare class VestModule implements IModule$1<VolatileVaultsSDK> {
|
|
581
|
-
protected _sdk: VolatileVaultsSDK;
|
|
582
|
-
constructor(sdk: VolatileVaultsSDK);
|
|
583
|
-
get sdk(): VolatileVaultsSDK;
|
|
584
|
-
vestNftIsAvailable(vest_nft_id: string, vester_infos_handle: string): Promise<boolean>;
|
|
585
|
-
/**
|
|
586
|
-
* Get the vest create event list
|
|
587
|
-
* @returns {Promise<VestCreateEvent[]>} The vest create event list
|
|
588
|
-
*/
|
|
589
|
-
getVestCreateEventList(): Promise<VestCreateEvent[]>;
|
|
590
|
-
getVaultsVestInfoList(vault_ids: string[]): Promise<VaultsVestInfo[]>;
|
|
591
|
-
/**
|
|
592
|
-
* Get the vaults vest info
|
|
593
|
-
* @param vault_id - The vault id
|
|
594
|
-
* @param force_refresh - Whether to force refresh the cache
|
|
595
|
-
* @returns {Promise<VaultsVestInfo>} The vaults vest info
|
|
596
|
-
*/
|
|
597
|
-
getVaultsVestInfo(vault_id: string, force_refresh?: boolean): Promise<VaultsVestInfo>;
|
|
598
|
-
/**
|
|
599
|
-
* Get the vault vest event
|
|
600
|
-
* @param vault_id - The vault id
|
|
601
|
-
* @returns {VestCreateEvent} The vault vest event
|
|
602
|
-
*/
|
|
603
|
-
getVaultVestEvent(vault_id: string): Promise<VestCreateEvent>;
|
|
604
|
-
/**
|
|
605
|
-
* Get the vault vest nft list
|
|
606
|
-
* @param owner - The owner address
|
|
607
|
-
* @returns {Promise<VaultVestNFT[]>} The vault vest nft list
|
|
608
|
-
*/
|
|
609
|
-
getOwnerVaultVestNFT(owner: string): Promise<VaultVestNFT[]>;
|
|
610
|
-
/**
|
|
611
|
-
* Build the redeem payload
|
|
612
|
-
* @param options - The redeem options
|
|
613
|
-
* @returns {Transaction} The redeem payload
|
|
614
|
-
*/
|
|
615
|
-
buildRedeemPayload(options: RedeemOption[], tx?: Transaction): Promise<Transaction>;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
505
|
/**
|
|
619
506
|
* Represents options and configurations for an SDK.
|
|
620
507
|
*/
|
|
@@ -639,10 +526,6 @@ type SdkOptions = {
|
|
|
639
526
|
* Vaults configuration.
|
|
640
527
|
*/
|
|
641
528
|
vaults: VaultsConfigs;
|
|
642
|
-
/**
|
|
643
|
-
* Vest configuration.
|
|
644
|
-
*/
|
|
645
|
-
vest?: Package<VestConfigs>;
|
|
646
529
|
};
|
|
647
530
|
/**
|
|
648
531
|
* The entry class of VolatileVaultsSDK, which is almost responsible for all interactions with Vaults.
|
|
@@ -669,10 +552,6 @@ declare class VolatileVaultsSDK {
|
|
|
669
552
|
* Client for interacting with the Aggregator service.
|
|
670
553
|
*/
|
|
671
554
|
protected _aggregatorClient: AggregatorClient;
|
|
672
|
-
/**
|
|
673
|
-
* Module for interacting with vest.
|
|
674
|
-
*/
|
|
675
|
-
protected _vest: VestModule;
|
|
676
555
|
/**
|
|
677
556
|
* SDK for interacting with Cetus CLMM (Constant Product Automated Market Maker).
|
|
678
557
|
*/
|
|
@@ -718,11 +597,6 @@ declare class VolatileVaultsSDK {
|
|
|
718
597
|
* @returns {CetusClmmSDK} The CetusClmmSDK instance.
|
|
719
598
|
*/
|
|
720
599
|
get CetusClmmSDK(): CetusClmmSDK;
|
|
721
|
-
/**
|
|
722
|
-
* Getter for the VestModule instance.
|
|
723
|
-
* @returns {VestModule} The VestModule instance.
|
|
724
|
-
*/
|
|
725
|
-
get Vest(): VestModule;
|
|
726
600
|
/**
|
|
727
601
|
* Verifies if the sender address is valid.
|
|
728
602
|
* @throws Error if the sender address is invalid.
|
|
@@ -925,18 +799,6 @@ declare function getPositionPriceRange(tick_lower_index: number, tick_upper_inde
|
|
|
925
799
|
minPrice: string;
|
|
926
800
|
maxPrice: string;
|
|
927
801
|
};
|
|
928
|
-
/**
|
|
929
|
-
* Parses the vault vest info from the Sui object response.
|
|
930
|
-
* @param res - The Sui object response containing the vault vest info.
|
|
931
|
-
* @returns The parsed vault vest info.
|
|
932
|
-
*/
|
|
933
|
-
declare function parseVaultsVestInfo(res: SuiObjectResponse): VaultsVestInfo;
|
|
934
|
-
/**
|
|
935
|
-
* Parses the vault vest NFT from the Sui object response.
|
|
936
|
-
* @param res - The Sui object response containing the vault vest NFT.
|
|
937
|
-
* @returns The parsed vault vest NFT.
|
|
938
|
-
*/
|
|
939
|
-
declare function parseVaultVestNFT(res: SuiObjectResponse): VaultVestNFT;
|
|
940
802
|
|
|
941
803
|
declare const checkIsMinOrMaxIndex: (tick: number, type: "min" | "max", tickSpacing: number) => boolean;
|
|
942
804
|
declare function convertU64BytesToDecimal(bytes: number[]): string;
|
|
@@ -1000,4 +862,4 @@ interface InitSDKOptions {
|
|
|
1000
862
|
declare function initVaultSDK(options: InitSDKOptions): VolatileVaultsSDK;
|
|
1001
863
|
declare const defaultProvider: string[];
|
|
1002
864
|
|
|
1003
|
-
export { Balances, BigNumber, ClmmPoolBalance, ClmmVault, CollectFeeOptions, CollectRewardOptions, DepositCalculationOptions, DepositCalculationResult, DepositCalculationValueOptions, DepositMode, DepositOptions, FeedInfo,
|
|
865
|
+
export { Balances, BigNumber, ClmmPoolBalance, ClmmVault, CollectFeeOptions, CollectRewardOptions, DepositCalculationOptions, DepositCalculationResult, DepositCalculationValueOptions, DepositMode, DepositOptions, FeedInfo, LiquidityRange, LpCallback, PackageConfigs, Pool, PoolCoinTypes, Price, PythNodeError, PythPriceModule, SdkEnv, SdkOptions, VaultsBalance, VaultsConfigs, VaultsModule, VolatileVaultsSDK, WithdrawCalculationOptions, WithdrawCalculationResult, WithdrawMode, WithdrawOptions, WrapperPosition, buildPoolData, buildVaultsBalance, calculateAum, calculateDepositRatioFixTokenA, calculateTotalAumBasedOnQuote, checkIsMinOrMaxIndex, convertU64BytesToDecimal, VolatileVaultsSDK as default, defaultProvider, estCoinAmountsFromTotalAmount, feed_map_mainnet, feed_map_testnet, getCoinAmountsFromRatio, getPositionPriceRange, getPriceWithFormattedDecimals, getPrimitivePricesFromBaseQuote, getQuotePerBaseAndBasePerQuote, getShareBufferAssets, getUpdatePriceType, getVaultValidBalances, get_lp_amount_by_liquidity, get_lp_amount_by_tvl, get_share_liquidity_by_amount, initMainnetSDK, initTestnetSDK, initVaultSDK, oraclePriceMultiplierDecimal, printTransaction, toSuiObjectId, vaults_mainnet, vaults_testnet };
|