aftermath-ts-sdk 2.1.0-perps.1 → 2.1.0-perps.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 CHANGED
@@ -3376,7 +3376,7 @@ interface PerpetualsTwapOrderDetails {
3376
3376
  /** Market (clearing house) ID this TWAP order targets. */
3377
3377
  marketId: PerpetualsMarketId;
3378
3378
  /** Position side: `0` for bid (long), `1` for ask (short). */
3379
- side: 0 | 1;
3379
+ side: PerpetualsOrderSide;
3380
3380
  /** Total base-asset size to execute across all chunks (scaled base units). */
3381
3381
  size: bigint;
3382
3382
  /** Whether the order may only reduce an existing position. */
@@ -7956,6 +7956,24 @@ declare class FarmsStakingPool extends Caller {
7956
7956
  minStakeAmount: bigint;
7957
7957
  walletAddress: SuiAddress;
7958
7958
  }): Promise<_mysten_sui_transactions.Transaction>;
7959
+ /**
7960
+ * Builds a transaction to set the pool's minimum lock duration (ms).
7961
+ * Owner-cap only. V2 pools only — V1 vaults do not expose this entry.
7962
+ */
7963
+ getSetMinLockDurationMsTransaction(inputs: {
7964
+ ownerCapId: ObjectId;
7965
+ lockDurationMs: bigint;
7966
+ walletAddress: SuiAddress;
7967
+ }): _mysten_sui_transactions.Transaction;
7968
+ /**
7969
+ * Builds a transaction to set the pool's maximum lock duration (ms).
7970
+ * Owner-cap only. V2 pools only.
7971
+ */
7972
+ getSetMaxLockDurationMsTransaction(inputs: {
7973
+ ownerCapId: ObjectId;
7974
+ lockDurationMs: bigint;
7975
+ walletAddress: SuiAddress;
7976
+ }): _mysten_sui_transactions.Transaction;
7959
7977
  /**
7960
7978
  * Builds a transaction granting a one-time admin cap to another address, allowing them to perform specific
7961
7979
  * one-time administrative actions (like initializing a reward).
@@ -15734,6 +15752,29 @@ declare class FarmsApi implements MoveErrorsInterface {
15734
15752
  minStakeAmount: bigint;
15735
15753
  stakeCoinType: CoinType;
15736
15754
  }) => _mysten_sui_transactions.TransactionResult;
15755
+ /**
15756
+ * Creates a transaction command to set the minimum lock duration (ms) for a
15757
+ * staking pool. Owner-cap only; V2 vault module. Mirrors
15758
+ * `setStakingPoolMinStakeAmountTxV2`.
15759
+ */
15760
+ setStakingPoolMinLockDurationMsTxV2: (inputs: {
15761
+ tx: Transaction;
15762
+ ownerCapId: ObjectId;
15763
+ stakingPoolId: ObjectId;
15764
+ lockDurationMs: bigint;
15765
+ stakeCoinType: CoinType;
15766
+ }) => _mysten_sui_transactions.TransactionResult;
15767
+ /**
15768
+ * Creates a transaction command to set the maximum lock duration (ms) for a
15769
+ * staking pool. Owner-cap only; V2 vault module.
15770
+ */
15771
+ setStakingPoolMaxLockDurationMsTxV2: (inputs: {
15772
+ tx: Transaction;
15773
+ ownerCapId: ObjectId;
15774
+ stakingPoolId: ObjectId;
15775
+ lockDurationMs: bigint;
15776
+ stakeCoinType: CoinType;
15777
+ }) => _mysten_sui_transactions.TransactionResult;
15737
15778
  /**
15738
15779
  * Creates a Move call (V1) to **remove undistributed reward coins** from a staking pool.
15739
15780
  * Only callable by the pool **owner** (validated via `ownerCapId`). This does not claw back
@@ -16071,6 +16112,24 @@ declare class FarmsApi implements MoveErrorsInterface {
16071
16112
  minStakeAmount: bigint;
16072
16113
  stakeCoinType: CoinType;
16073
16114
  }, "tx">) => Transaction;
16115
+ buildSetStakingPoolMinLockDurationMsTxV2: (inputs: {
16116
+ walletAddress: SuiAddress;
16117
+ } & Omit<{
16118
+ tx: Transaction;
16119
+ ownerCapId: ObjectId;
16120
+ stakingPoolId: ObjectId;
16121
+ lockDurationMs: bigint;
16122
+ stakeCoinType: CoinType;
16123
+ }, "tx">) => Transaction;
16124
+ buildSetStakingPoolMaxLockDurationMsTxV2: (inputs: {
16125
+ walletAddress: SuiAddress;
16126
+ } & Omit<{
16127
+ tx: Transaction;
16128
+ ownerCapId: ObjectId;
16129
+ stakingPoolId: ObjectId;
16130
+ lockDurationMs: bigint;
16131
+ stakeCoinType: CoinType;
16132
+ }, "tx">) => Transaction;
16074
16133
  /**
16075
16134
  * Builds a transaction for **removing undistributed reward coins** from a staking pool (V1).
16076
16135
  * Requires the pool **OwnerCap**. The removal is specific to a `rewardCoinType`.
package/dist/index.js CHANGED
@@ -4991,6 +4991,38 @@ var init_farmsStakingPool = __esm({
4991
4991
  };
4992
4992
  return this.version() === 1 ? this.farmsApi().buildSetStakingPoolMinStakeAmountTxV1(args) : this.farmsApi().buildSetStakingPoolMinStakeAmountTxV2(args);
4993
4993
  }
4994
+ /**
4995
+ * Builds a transaction to set the pool's minimum lock duration (ms).
4996
+ * Owner-cap only. V2 pools only — V1 vaults do not expose this entry.
4997
+ */
4998
+ getSetMinLockDurationMsTransaction(inputs) {
4999
+ if (this.version() === 1) {
5000
+ throw new Error(
5001
+ "set_min_lock_duration_ms is not supported on V1 staking pools"
5002
+ );
5003
+ }
5004
+ return this.farmsApi().buildSetStakingPoolMinLockDurationMsTxV2({
5005
+ ...inputs,
5006
+ stakeCoinType: this.stakingPool.stakeCoinType,
5007
+ stakingPoolId: this.stakingPool.objectId
5008
+ });
5009
+ }
5010
+ /**
5011
+ * Builds a transaction to set the pool's maximum lock duration (ms).
5012
+ * Owner-cap only. V2 pools only.
5013
+ */
5014
+ getSetMaxLockDurationMsTransaction(inputs) {
5015
+ if (this.version() === 1) {
5016
+ throw new Error(
5017
+ "set_max_lock_duration_ms is not supported on V1 staking pools"
5018
+ );
5019
+ }
5020
+ return this.farmsApi().buildSetStakingPoolMaxLockDurationMsTxV2({
5021
+ ...inputs,
5022
+ stakeCoinType: this.stakingPool.stakeCoinType,
5023
+ stakingPoolId: this.stakingPool.objectId
5024
+ });
5025
+ }
4994
5026
  /**
4995
5027
  * Builds a transaction granting a one-time admin cap to another address, allowing them to perform specific
4996
5028
  * one-time administrative actions (like initializing a reward).
@@ -16538,6 +16570,49 @@ var init_farmsApi = __esm({
16538
16570
  ]
16539
16571
  });
16540
16572
  };
16573
+ /**
16574
+ * Creates a transaction command to set the minimum lock duration (ms) for a
16575
+ * staking pool. Owner-cap only; V2 vault module. Mirrors
16576
+ * `setStakingPoolMinStakeAmountTxV2`.
16577
+ */
16578
+ this.setStakingPoolMinLockDurationMsTxV2 = (inputs) => {
16579
+ const { tx } = inputs;
16580
+ return tx.moveCall({
16581
+ target: Helpers.transactions.createTxTarget(
16582
+ this.addresses.packages.vaultsV2,
16583
+ _FarmsApi.constants.moduleNames.vaultV2,
16584
+ "set_min_lock_duration_ms"
16585
+ ),
16586
+ typeArguments: [inputs.stakeCoinType],
16587
+ arguments: [
16588
+ tx.object(inputs.ownerCapId),
16589
+ tx.object(inputs.stakingPoolId),
16590
+ tx.object(this.addresses.objects.version),
16591
+ tx.pure.u64(inputs.lockDurationMs)
16592
+ ]
16593
+ });
16594
+ };
16595
+ /**
16596
+ * Creates a transaction command to set the maximum lock duration (ms) for a
16597
+ * staking pool. Owner-cap only; V2 vault module.
16598
+ */
16599
+ this.setStakingPoolMaxLockDurationMsTxV2 = (inputs) => {
16600
+ const { tx } = inputs;
16601
+ return tx.moveCall({
16602
+ target: Helpers.transactions.createTxTarget(
16603
+ this.addresses.packages.vaultsV2,
16604
+ _FarmsApi.constants.moduleNames.vaultV2,
16605
+ "set_max_lock_duration_ms"
16606
+ ),
16607
+ typeArguments: [inputs.stakeCoinType],
16608
+ arguments: [
16609
+ tx.object(inputs.ownerCapId),
16610
+ tx.object(inputs.stakingPoolId),
16611
+ tx.object(this.addresses.objects.version),
16612
+ tx.pure.u64(inputs.lockDurationMs)
16613
+ ]
16614
+ });
16615
+ };
16541
16616
  /**
16542
16617
  * Creates a Move call (V1) to **remove undistributed reward coins** from a staking pool.
16543
16618
  * Only callable by the pool **owner** (validated via `ownerCapId`). This does not claw back
@@ -17222,6 +17297,12 @@ var init_farmsApi = __esm({
17222
17297
  this.buildSetStakingPoolMinStakeAmountTxV2 = Helpers.transactions.createBuildTxFunc(
17223
17298
  this.setStakingPoolMinStakeAmountTxV2
17224
17299
  );
17300
+ this.buildSetStakingPoolMinLockDurationMsTxV2 = Helpers.transactions.createBuildTxFunc(
17301
+ this.setStakingPoolMinLockDurationMsTxV2
17302
+ );
17303
+ this.buildSetStakingPoolMaxLockDurationMsTxV2 = Helpers.transactions.createBuildTxFunc(
17304
+ this.setStakingPoolMaxLockDurationMsTxV2
17305
+ );
17225
17306
  /**
17226
17307
  * Builds a transaction for **removing undistributed reward coins** from a staking pool (V1).
17227
17308
  * Requires the pool **OwnerCap**. The removal is specific to a `rewardCoinType`.