aftermath-ts-sdk 2.1.0-perps.0 → 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
@@ -81,6 +81,10 @@ type Slippage = number;
81
81
  * Represents an unscaled percentage (e.g., 0.01 = 1%).
82
82
  */
83
83
  type Percentage = number;
84
+ /**
85
+ * Represents basis points, expressed as an integer hundredth of a percent (e.g., 2000 = 20%, 50 = 0.5%).
86
+ */
87
+ type Bps = number;
84
88
  /**
85
89
  * Annual percentage rate (APR), expressed as a `number` (e.g., 0.01 = 1%).
86
90
  */
@@ -3365,6 +3369,167 @@ type ApiPerpetualsStopOrderDatasBody = {
3365
3369
  interface ApiPerpetualsStopOrderDatasResponse {
3366
3370
  stopOrderDatas: PerpetualsStopOrderData[];
3367
3371
  }
3372
+ /**
3373
+ * Per-order TWAP (time-weighted-average-price) request payload.
3374
+ */
3375
+ interface PerpetualsTwapOrderDetails {
3376
+ /** Market (clearing house) ID this TWAP order targets. */
3377
+ marketId: PerpetualsMarketId;
3378
+ /** Position side: `0` for bid (long), `1` for ask (short). */
3379
+ side: PerpetualsOrderSide;
3380
+ /** Total base-asset size to execute across all chunks (scaled base units). */
3381
+ size: bigint;
3382
+ /** Whether the order may only reduce an existing position. */
3383
+ reduceOnly: boolean;
3384
+ /** Number of child executions to split the order into. */
3385
+ chunksAmount: number;
3386
+ /** Target spacing between chunk executions, in milliseconds. */
3387
+ executionGapMs: number;
3388
+ /** Allowed jitter around each scheduled execution time, in milliseconds. */
3389
+ executionTimeUncertaintyMs: number;
3390
+ /** Optional deadline for the first execution (ms since epoch). */
3391
+ firstRunExpireTimestamp?: bigint;
3392
+ /** Optional overall expiry for the TWAP order (ms since epoch). */
3393
+ expireTimestamp?: bigint;
3394
+ /** How long to keep retrying a failed chunk execution, in milliseconds. */
3395
+ timeForRetryMs: number;
3396
+ /** Allowed deviation of a chunk's size from its target, in basis points. */
3397
+ amountUncertaintyBps: Bps;
3398
+ /** Cap on a single execution's size, as basis points of total size. */
3399
+ maxOneExecutionAmountBps: Bps;
3400
+ /**
3401
+ * Threshold below which a small trailing remainder is merged into the final
3402
+ * chunk, in basis points.
3403
+ */
3404
+ smallTailMergeThresholdBps: Bps;
3405
+ /** Max slippage tolerated per chunk execution, in basis points. */
3406
+ maxSlippageBps: Bps;
3407
+ /** Optional integrator fee configuration (friendly fractional fee). */
3408
+ builderCode?: PerpetualsBuilderCodeParamaters;
3409
+ }
3410
+ /**
3411
+ * Lifecycle state of a TWAP order.
3412
+ */
3413
+ type PerpetualsTwapOrderState = "unknown" | "invalid" | "pending" | "active" | "reservedForProcessing" | "executing" | "completed" | "spoiled" | "cancelled" | "toCancel" | "finalized";
3414
+ /**
3415
+ * Per-order TWAP details as returned by the read endpoint.
3416
+ *
3417
+ * Same fields as {@link PerpetualsTwapOrderDetails} minus `builderCode`, which
3418
+ * the read response does not include.
3419
+ */
3420
+ type PerpetualsTwapOrderDetailsData = Omit<PerpetualsTwapOrderDetails, "builderCode">;
3421
+ /**
3422
+ * A TWAP order as surfaced to clients by the read endpoint.
3423
+ */
3424
+ interface PerpetualsTwapOrderData {
3425
+ /** ID of the TWAP order object on-chain. */
3426
+ twapOrderObjectId: ObjectId;
3427
+ /** Collateral coin type backing the order. */
3428
+ collateralType: CoinType;
3429
+ /** Current lifecycle state of the TWAP order. */
3430
+ orderState: PerpetualsTwapOrderState;
3431
+ /** Reason the order is invalid, when `orderState === "invalid"`. */
3432
+ invalidReason?: string;
3433
+ /** Free-form status message about the order, if any. */
3434
+ statusMessage?: string;
3435
+ /** Order details. */
3436
+ details: PerpetualsTwapOrderDetailsData;
3437
+ /** Base-asset amount already executed (scaled base units). */
3438
+ processedAmount: bigint;
3439
+ /** Base-asset amount currently reserved for execution (scaled base units). */
3440
+ scheduledAmount: bigint;
3441
+ /** Timestamp (ms since epoch) of the most recent chunk execution. */
3442
+ lastExecutionTimestampMs: Timestamp;
3443
+ }
3444
+ /**
3445
+ * Edit to apply to an existing TWAP order. Any field left undefined is unchanged.
3446
+ */
3447
+ interface PerpetualsTwapOrderEdit {
3448
+ /** Replacement order details (full set). */
3449
+ newDetails?: PerpetualsTwapOrderDetails;
3450
+ /** Replacement set of authorized executor addresses. */
3451
+ newExecutors?: string[];
3452
+ }
3453
+ /**
3454
+ * Body fields the SDK fills in automatically, so callers omit them from every
3455
+ * `Sdk*Inputs` type.
3456
+ */
3457
+ type PerpetualsServerInjectedTxFields = "txKind" | "walletAddress" | "accountId" | "accountCapId";
3458
+ /**
3459
+ * SDK-level inputs for creating one or more TWAP orders — the request body
3460
+ * without the auto-filled fields, plus an optional transaction to extend.
3461
+ */
3462
+ type SdkPerpetualsCreateTwapOrdersInputs = Omit<ApiPerpetualsCreateTwapOrdersBody, PerpetualsServerInjectedTxFields> & {
3463
+ tx?: Transaction;
3464
+ };
3465
+ /**
3466
+ * Request body for creating TWAP orders via the API.
3467
+ */
3468
+ interface ApiPerpetualsCreateTwapOrdersBody {
3469
+ accountId: PerpetualsAccountId;
3470
+ accountCapId?: ObjectId;
3471
+ walletAddress: SuiAddress;
3472
+ twapOrders: PerpetualsTwapOrderDetails[];
3473
+ gasCoinArg?: TransactionObjectArgument;
3474
+ txKind?: SerializedTransaction;
3475
+ isSponsoredTx?: boolean;
3476
+ sponsor?: PerpetualsSponsorConfig;
3477
+ }
3478
+ /**
3479
+ * Request body for editing existing TWAP orders via the API.
3480
+ *
3481
+ * `newTwapOrders` maps each TWAP order object id to the edit to apply.
3482
+ */
3483
+ interface ApiPerpetualsEditTwapOrdersBody {
3484
+ accountId: PerpetualsAccountId;
3485
+ accountCapId?: ObjectId;
3486
+ walletAddress: SuiAddress;
3487
+ newTwapOrders: Record<ObjectId, PerpetualsTwapOrderEdit>;
3488
+ txKind?: SerializedTransaction;
3489
+ sponsor?: PerpetualsSponsorConfig;
3490
+ }
3491
+ /**
3492
+ * SDK-level inputs for editing existing TWAP orders — the request body without
3493
+ * the auto-filled fields, plus an optional transaction to extend.
3494
+ */
3495
+ type SdkPerpetualsEditTwapOrdersInputs = Omit<ApiPerpetualsEditTwapOrdersBody, PerpetualsServerInjectedTxFields> & {
3496
+ tx?: Transaction;
3497
+ };
3498
+ /**
3499
+ * Request body for canceling TWAP orders identified by object IDs.
3500
+ */
3501
+ interface ApiPerpetualsCancelTwapOrdersBody {
3502
+ accountId: PerpetualsAccountId;
3503
+ accountCapId?: ObjectId;
3504
+ walletAddress: SuiAddress;
3505
+ twapOrderIds: ObjectId[];
3506
+ txKind?: SerializedTransaction;
3507
+ sponsor?: PerpetualsSponsorConfig;
3508
+ }
3509
+ /**
3510
+ * SDK-level inputs for canceling TWAP orders — the request body without the
3511
+ * auto-filled fields, plus an optional transaction to extend.
3512
+ */
3513
+ type SdkPerpetualsCancelTwapOrdersInputs = Omit<ApiPerpetualsCancelTwapOrdersBody, PerpetualsServerInjectedTxFields> & {
3514
+ tx?: Transaction;
3515
+ };
3516
+ /**
3517
+ * Request body for fetching the TWAP orders of an account, validated using a
3518
+ * wallet signature.
3519
+ */
3520
+ interface ApiPerpetualsTwapOrderDatasBody {
3521
+ accountId: PerpetualsAccountId;
3522
+ walletAddress: SuiAddress;
3523
+ bytes: string;
3524
+ signature: string;
3525
+ marketIds?: PerpetualsMarketId[];
3526
+ }
3527
+ /**
3528
+ * Response payload for TWAP-order queries.
3529
+ */
3530
+ interface ApiPerpetualsTwapOrderDatasResponse {
3531
+ twapOrderDatas: PerpetualsTwapOrderData[];
3532
+ }
3368
3533
  /**
3369
3534
  * Request body for creating a vault capability (vault cap) for a given wallet.
3370
3535
  */
@@ -7791,6 +7956,24 @@ declare class FarmsStakingPool extends Caller {
7791
7956
  minStakeAmount: bigint;
7792
7957
  walletAddress: SuiAddress;
7793
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;
7794
7977
  /**
7795
7978
  * Builds a transaction granting a one-time admin cap to another address, allowing them to perform specific
7796
7979
  * one-time administrative actions (like initializing a reward).
@@ -9791,6 +9974,54 @@ declare class PerpetualsAccount extends Caller {
9791
9974
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9792
9975
  tx: Transaction;
9793
9976
  }>;
9977
+ /**
9978
+ * Build a `create-twap-orders` transaction for this account.
9979
+ *
9980
+ * @param inputs - See {@link SdkPerpetualsCreateTwapOrdersInputs}.
9981
+ *
9982
+ * @returns Transaction response containing `tx`.
9983
+ */
9984
+ getCreateTwapOrdersTx(inputs: SdkPerpetualsCreateTwapOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9985
+ tx: Transaction;
9986
+ }>;
9987
+ /**
9988
+ * Build an `edit-twap-orders` transaction for this account.
9989
+ * `newTwapOrders` maps each TWAP order object id to the edit to apply.
9990
+ *
9991
+ * @param inputs.newTwapOrders - Map of TWAP order id to the edit to apply.
9992
+ * @param inputs.tx - Optional transaction to extend.
9993
+ *
9994
+ * @returns Transaction response containing `tx`.
9995
+ */
9996
+ getEditTwapOrdersTx(inputs: SdkPerpetualsEditTwapOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9997
+ tx: Transaction;
9998
+ }>;
9999
+ /**
10000
+ * Build a `cancel-twap-orders` transaction for this account.
10001
+ * This cancels TWAP order objects by their object IDs.
10002
+ *
10003
+ * @param inputs.tx - Optional transaction to extend.
10004
+ * @param inputs.twapOrderIds - Array of TWAP order object IDs to cancel.
10005
+ *
10006
+ * @returns Transaction response containing `tx`.
10007
+ */
10008
+ getCancelTwapOrdersTx(inputs: SdkPerpetualsCancelTwapOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
10009
+ tx: Transaction;
10010
+ }>;
10011
+ /**
10012
+ * Fetch TWAP-order data for this account, using an off-chain signed payload.
10013
+ *
10014
+ * @param inputs.bytes - Serialized message that was signed.
10015
+ * @param inputs.signature - Signature over `bytes`.
10016
+ * @param inputs.marketIds - Optional subset of markets to filter results by.
10017
+ *
10018
+ * @returns {@link ApiPerpetualsTwapOrderDatasResponse} containing `twapOrderDatas`.
10019
+ */
10020
+ getTwapOrderDatas(inputs: {
10021
+ bytes: string;
10022
+ signature: string;
10023
+ marketIds?: PerpetualsMarketId[];
10024
+ }): Promise<ApiPerpetualsTwapOrderDatasResponse>;
9794
10025
  /**
9795
10026
  * Build a `set-leverage` transaction for a given market.
9796
10027
  *
@@ -12862,7 +13093,7 @@ interface DcaIntegratorFeeData {
12862
13093
  /**
12863
13094
  * The fee in basis points (bps). e.g., 100 => 1%.
12864
13095
  */
12865
- feeBps: number;
13096
+ feeBps: Bps;
12866
13097
  /**
12867
13098
  * The Sui address that will receive the fee portion.
12868
13099
  */
@@ -12926,7 +13157,7 @@ interface ApiDcaTransactionForCreateOrderBody {
12926
13157
  /**
12927
13158
  * The maximum allowable slippage (in basis points) for each trade, e.g. 100 => 1%.
12928
13159
  */
12929
- maxAllowableSlippageBps: number;
13160
+ maxAllowableSlippageBps: Bps;
12930
13161
  /**
12931
13162
  * The per-trade amount of `allocateCoinType` to be used, e.g. each trade uses 2 SUI if this is `2e9`.
12932
13163
  */
@@ -13045,7 +13276,7 @@ interface DcaOrderOverviewObject {
13045
13276
  /**
13046
13277
  * The maximum slippage (bps) allowed for each trade.
13047
13278
  */
13048
- maxSlippageBps: number;
13279
+ maxSlippageBps: Bps;
13049
13280
  /**
13050
13281
  * Optional bounding strategy with min/max acceptable prices.
13051
13282
  */
@@ -13337,7 +13568,7 @@ interface LimitOrdersIntegratorFeeData {
13337
13568
  /**
13338
13569
  * The integrator fee percentage in basis points (bps), e.g., 100 => 1%.
13339
13570
  */
13340
- feeBps: number;
13571
+ feeBps: Bps;
13341
13572
  /**
13342
13573
  * The recipient address for fee collection.
13343
13574
  */
@@ -15521,6 +15752,29 @@ declare class FarmsApi implements MoveErrorsInterface {
15521
15752
  minStakeAmount: bigint;
15522
15753
  stakeCoinType: CoinType;
15523
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;
15524
15778
  /**
15525
15779
  * Creates a Move call (V1) to **remove undistributed reward coins** from a staking pool.
15526
15780
  * Only callable by the pool **owner** (validated via `ownerCapId`). This does not claw back
@@ -15858,6 +16112,24 @@ declare class FarmsApi implements MoveErrorsInterface {
15858
16112
  minStakeAmount: bigint;
15859
16113
  stakeCoinType: CoinType;
15860
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;
15861
16133
  /**
15862
16134
  * Builds a transaction for **removing undistributed reward coins** from a staking pool (V1).
15863
16135
  * Requires the pool **OwnerCap**. The removal is specific to a `rewardCoinType`.
@@ -17979,4 +18251,4 @@ declare class Aftermath extends Caller {
17979
18251
  static casting: typeof Casting;
17980
18252
  }
17981
18253
 
17982
- export { type AfSuiRouterPoolObject, Aftermath, AftermathApi, type AftermathOptions, type AllocatedCollateralEvent, type AmountInCoinAndUsd, type AnyObjectType, type ApiAccessoriesForSuiFrenBody, type ApiAddSuiFrenAccessoryBody, type ApiCreateAuthAccountBody, type ApiCreatePoolBody, type ApiDataWithCursorBody, type ApiDelegatedStakesBody, type ApiDynamicFieldsBody, type ApiDynamicGasBody, type ApiDynamicGasResponse, type ApiEventsBody, type ApiFarmsCreateStakingPoolBody, type ApiFarmsCreateStakingPoolBodyV1, type ApiFarmsDepositPrincipalBody, type ApiFarmsGrantOneTimeAdminCapBody, type ApiFarmsIncreaseStakingPoolRewardsEmissionsBody, type ApiFarmsInitializeStakingPoolRewardBody, type ApiFarmsLockBody, type ApiFarmsOwnedStakedPositionsBody, type ApiFarmsOwnedStakingPoolOneTimeAdminCapsBody, type ApiFarmsOwnedStakingPoolOwnerCapsBody, type ApiFarmsRenewLockBody, type ApiFarmsStakeBody, type ApiFarmsStakeBodyV1, type ApiFarmsTopUpStakingPoolRewardsBody, type ApiFarmsUnlockBody, type ApiFarmsUnstakeBody, type ApiFaucetMintSuiFrenBody, type ApiFaucetRequestBody, type ApiGasPoolBody, type ApiGasPoolCreateBody, type ApiGasPoolCreateResponse, type ApiGasPoolDepositBody, type ApiGasPoolGrantBody, type ApiGasPoolResponse, type ApiGasPoolRevokeBody, type ApiGasPoolShareBody, type ApiGasPoolSponsorBody, type ApiGasPoolWithdrawBody, type ApiGasPoolWithdrawResponse, type ApiGetAccessTokenBody, type ApiGetAccessTokenResponse, type ApiHarvestFarmsRewardsBody, type ApiHarvestSuiFrenFeesBody, type ApiIndexerEventsBody, type ApiIndexerUserEventsBody, type ApiMixSuiFrensBody, type ApiNftAmmBuyBody, type ApiNftAmmDepositBody, type ApiNftAmmSellBody, type ApiNftAmmWithdrawBody, type ApiOwnedStakedSuiFrensBody, type ApiOwnedSuiFrenAccessoriesBody, type ApiOwnedSuiFrensBody, type ApiPerpetualsAccountCollateralHistoryBody, type ApiPerpetualsAccountCollateralHistoryResponse, type ApiPerpetualsAccountMarginHistoryBody, type ApiPerpetualsAccountMarginHistoryResponse, type ApiPerpetualsAccountOrderHistoryBody, type ApiPerpetualsAccountOrderHistoryResponse, type ApiPerpetualsAccountPositionsBody, type ApiPerpetualsAccountPositionsResponse, type ApiPerpetualsAdminAccountCapsBody, type ApiPerpetualsAdminAccountCapsResponse, type ApiPerpetualsAllMarketsBody, type ApiPerpetualsAllMarketsResponse, type ApiPerpetualsAllocateCollateralBody, type ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, type ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, type ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, type ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, type ApiPerpetualsBuilderCodesIntegratorConfigBody, type ApiPerpetualsBuilderCodesIntegratorConfigResponse, type ApiPerpetualsBuilderCodesIntegratorVaultsBody, type ApiPerpetualsBuilderCodesIntegratorVaultsResponse, type ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody, type ApiPerpetualsCancelAndPlaceOrdersBody, type ApiPerpetualsCancelOrdersBody, type ApiPerpetualsCancelStopOrdersBody, type ApiPerpetualsCreateAccountBody, type ApiPerpetualsCreateAccountResponse, type ApiPerpetualsCreateCsvRebatesBody, type ApiPerpetualsCreateCsvRebatesResponse, type ApiPerpetualsCreateReferralCsvRebatesBody, type ApiPerpetualsCreateReferralCsvRebatesResponse, type ApiPerpetualsCreateVaultBody, type ApiPerpetualsCreateVaultCapBody, type ApiPerpetualsCurrentRebateRewardsBody, type ApiPerpetualsCurrentRebateRewardsResponse, type ApiPerpetualsDeallocateCollateralBody, type ApiPerpetualsDepositCollateralBody, type ApiPerpetualsEditStopOrdersBody, type ApiPerpetualsExecutionPriceBody, type ApiPerpetualsExecutionPriceResponse, type ApiPerpetualsGrantAgentWalletTxBody, type ApiPerpetualsHistoricalDataWithCursorBody, type ApiPerpetualsHistoricalDataWithCursorResponse, type ApiPerpetualsLimitOrderBody, type ApiPerpetualsMarketCandleHistoryBody, type ApiPerpetualsMarketCandleHistoryResponse, type ApiPerpetualsMarketFundingHistoryBody, type ApiPerpetualsMarketFundingHistoryResponse, type ApiPerpetualsMarketOrderBody, type ApiPerpetualsMarketOrderHistoryBody, type ApiPerpetualsMarketOrderHistoryResponse, type ApiPerpetualsMarkets24hrStatsResponse, type ApiPerpetualsMarketsBody, type ApiPerpetualsMarketsPricesBody, type ApiPerpetualsMarketsPricesResponse, type ApiPerpetualsMarketsResponse, type ApiPerpetualsMaxOrderSizeBody, type ApiPerpetualsOrderToPlace, type ApiPerpetualsOrderbooksBody, type ApiPerpetualsOrderbooksResponse, type ApiPerpetualsOwnedAccountCapsBody, type ApiPerpetualsOwnedAccountCapsResponse, type ApiPerpetualsOwnedVaultAssistantCapsBody, type ApiPerpetualsOwnedVaultAssistantCapsResponse, type ApiPerpetualsOwnedVaultCapsBody, type ApiPerpetualsOwnedVaultCapsResponse, type ApiPerpetualsPlaceSlTpOrdersBody, type ApiPerpetualsPlaceStopOrdersBody, type ApiPerpetualsPreviewCancelOrdersBody, type ApiPerpetualsPreviewCancelOrdersResponse, type ApiPerpetualsPreviewEditCollateralBody, type ApiPerpetualsPreviewEditCollateralResponse, type ApiPerpetualsPreviewPlaceLimitOrderBody, type ApiPerpetualsPreviewPlaceMarketOrderBody, type ApiPerpetualsPreviewPlaceOrderResponse, type ApiPerpetualsPreviewPlaceScaleOrderBody, type ApiPerpetualsPreviewSetLeverageBody, type ApiPerpetualsPreviewSetLeverageResponse, type ApiPerpetualsRevokeAgentWalletTxBody, type ApiPerpetualsScaleOrderBody, type ApiPerpetualsSetLeverageTxBody, type ApiPerpetualsShareAccountBody, type ApiPerpetualsStopOrderDatasBody, type ApiPerpetualsStopOrderDatasResponse, type ApiPerpetualsTransferCapTxBody, type ApiPerpetualsTransferCollateralBody, type ApiPerpetualsVaultCancelWithdrawRequestTxBody, type ApiPerpetualsVaultCreateWithdrawRequestTxBody, type ApiPerpetualsVaultDepositTxBody, type ApiPerpetualsVaultLpCoinPricesBody, type ApiPerpetualsVaultLpCoinPricesResponse, type ApiPerpetualsVaultOwnedLpCoinsBody, type ApiPerpetualsVaultOwnedLpCoinsResponse, type ApiPerpetualsVaultOwnedWithdrawRequestsBody, type ApiPerpetualsVaultOwnedWithdrawRequestsResponse, type ApiPerpetualsVaultOwnerProcessWithdrawRequestsTxBody, type ApiPerpetualsVaultOwnerUpdateForceWithdrawDelayTxBody, type ApiPerpetualsVaultOwnerUpdateLockPeriodTxBody, type ApiPerpetualsVaultOwnerUpdatePerformanceFeeTxBody, type ApiPerpetualsVaultOwnerWithdrawCollateralTxBody, type ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse, type ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxBody, type ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse, type ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxBody, type ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse, type ApiPerpetualsVaultPauseVaultForForceWithdrawRequestTxBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestResponse, type ApiPerpetualsVaultPreviewDepositBody, type ApiPerpetualsVaultPreviewDepositResponse, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsBody, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralBody, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityBody, type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesBody, type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesResponse, type ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestBody, type ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestResponse, type ApiPerpetualsVaultPreviewProcessForceWithdrawRequestBody, type ApiPerpetualsVaultPreviewProcessForceWithdrawRequestResponse, type ApiPerpetualsVaultProcessForceWithdrawRequestTxBody, type ApiPerpetualsVaultProcessForceWithdrawRequestTxResponse, type ApiPerpetualsVaultUpdateWithdrawRequestSlippageTxBody, type ApiPerpetualsVaultsBody, type ApiPerpetualsVaultsResponse, type ApiPerpetualsVaultsWithdrawRequestsBody, type ApiPerpetualsVaultsWithdrawRequestsResponse, type ApiPerpetualsWithdrawCollateralBody, type ApiPerpetualsWithdrawCollateralResponse, type ApiPoolAllCoinWithdrawBody, type ApiPoolDepositBody, type ApiPoolObjectIdForLpCoinTypeBody, type ApiPoolSpotPriceBody, type ApiPoolTradeBody, type ApiPoolWithdrawBody, type ApiPoolsOwnedDaoFeePoolOwnerCapsBody, type ApiPoolsStatsBody, type ApiPublishLpCoinBody, type ApiReferralsCreateReferralLinkBody, type ApiReferralsCreateReferralLinkResponse, type ApiReferralsGetLinkedRefCodeBody, type ApiReferralsGetLinkedRefCodeResponse, type ApiReferralsGetRefCodeBody, type ApiReferralsGetRefCodeResponse, type ApiReferralsGetRefereesBody, type ApiReferralsGetRefereesResponse, type ApiReferralsIsRefCodeTakenBody, type ApiReferralsIsRefCodeTakenResponse, type ApiReferralsSetReferrerBody, type ApiReferralsSetReferrerResponse, type ApiRemoveSuiFrenAccessoryBody, type ApiRewardsClaimRequestTxBody, type ApiRewardsClaimRequestTxResponse, type ApiRewardsGetClaimableBody, type ApiRewardsGetClaimableResponse, type ApiRewardsGetHistoryBody, type ApiRewardsGetHistoryResponse, type ApiRewardsGetPointsBody, type ApiRewardsGetPointsResponse, type ApiRouterAddTransactionForCompleteTradeRouteBody, type ApiRouterAddTransactionForCompleteTradeRouteResponse, type ApiRouterCompleteTradeRouteBody, type ApiRouterDynamicGasBody, type ApiRouterPartialCompleteTradeRouteBody, type ApiRouterTradeEventsBody, type ApiRouterTransactionForCompleteTradeRouteBody, type ApiStakeBody, type ApiStakeStakedSuiBody, type ApiStakeSuiFrenBody, type ApiStakingEventsBody, type ApiStakingPositionsBody, type ApiTransactionResponse, type ApiTransactionsBody, type ApiUnstakeBody, type ApiUnstakeSuiFrenBody, type ApiUpdateValidatorFeeBody, type ApiValidatorOperationCapsBody, type Apr, type Apy, Auth, type Balance, type BigIntAsString, type Byte, type CallerConfig, type CanceledOrderEvent, type CapyLabsAppObject, Casting, Coin, type CoinDecimal, type CoinGeckoChain, type CoinGeckoCoinApiId, type CoinGeckoCoinData, type CoinGeckoCoinSymbolData, type CoinGeckoHistoricalTradeData, type CoinGeckoTickerData, type CoinMetadaWithInfo, type CoinPriceInfo, type CoinSymbol, type CoinSymbolToCoinTypes, type CoinSymbolsToPriceInfo, type CoinType, type CoinWithAmount, type CoinWithAmountOrUndefined, type CoinsToBalance, type CoinsToBalanceOrUndefined, type CoinsToDecimals, type CoinsToPrice, type CoinsToPriceInfo, type CollateralEvent, type Color, type ComposedTransferArgs, type ConfigAddresses, type CreatedAccountEvent, type CreatedDaoFeePoolEvent, type CreatedStopOrderTicketEvent, type DaoFeePoolObject, type DaoFeePoolOwnerCapObject, type DaoFeePoolsAddresses, type DcaAddresses, type DeallocatedCollateralEvent, type DecimalsScalar, type DeferredAccountArgs, type DeletedStopOrderTicketEvent, type DepositedCollateralEvent, type DynamicFieldObjectsWithCursor, type DynamicFieldsInputs, type DynamicFieldsWithCursor, type DynamicGasAddresses, type EditedStopOrderTicketDetailsEvent, type EditedStopOrderTicketExecutorEvent, type EmptyObject, type EpochWasChangedEvent, type Event$1 as Event, type EventsInputs, type EventsWithCursor, type ExecutedStopOrderTicketEvent, type ExternalFee, type FarmEvent, type FarmOwnerOrOneTimeAdminCap, type FarmUserEvent, Farms, type FarmsAddedRewardEvent, type FarmsAddresses, type FarmsCreatedVaultEvent, type FarmsDepositedPrincipalEvent, type FarmsDestroyedStakedPositionEvent, type FarmsHarvestedRewardsEvent, type FarmsIncreasedEmissionsEvent, type FarmsInitializedRewardEvent, type FarmsJoinedEvent, type FarmsLockEnforcement, type FarmsLockedEvent, type FarmsMultiplier, type FarmsSplitEvent, type FarmsStakedEvent, FarmsStakedPosition, type FarmsStakedPositionObject, type FarmsStakedPositionRewardCoin, type FarmsStakedRelaxedEvent, FarmsStakingPool, type FarmsStakingPoolObject, type FarmsStakingPoolRewardCoin, type FarmsUnlockedEvent, type FarmsVersion, type FarmsWithdrewPrincipalEvent, Faucet, type FaucetAddCoinEvent, type FaucetAddresses, type FaucetMintCoinEvent, type FilePath, type FilledMakerOrderEventFields, type FilledMakerOrdersEvent, type FilledTakerOrderEvent, type FunctionName, type GasBudget, GasPools, type HarvestSuiFrenFeesEvent, Helpers, type IFixed, type IFixedAsBytes, type IFixedAsString, type IFixedAsStringBytes, type IdAsStringBytes, type IndexerDataWithCursorQueryParams, type IndexerEventsWithCursor, type KeyType, type KioskObject, type KioskOwnerCapObject, type LimitAddresses, type LiquidatedEvent, type LocalUrl, type MixSuiFrensEvent, type ModuleName, type MoveErrorCode, type MoveErrors, type MoveErrorsInterface, type Nft, NftAmm, type NftAmmAddresses, type NftAmmInterfaceGenericTypes, type NftAmmMarketObject, type NftDisplay, type NftDisplayOther, type NftDisplaySuggested, type NftInfo, type NftsAddresses, type NormalizedBalance, type NumberAsString, type Object$1 as Object, type ObjectDigest, type ObjectId, type ObjectVersion, type OrderbookFillReceiptEvent, type PackageId, type ParsedMoveError, type PartialFarmsStakedPositionObject, type PartialSuiFrenObject, type Percentage, Perpetuals, PerpetualsAccount, type PerpetualsAccountCap, type PerpetualsAccountCollateralChange, type PerpetualsAccountData, type PerpetualsAccountId, type PerpetualsAccountMarginHistoryData, type PerpetualsAccountMarginHistoryTimeframeKey, type PerpetualsAccountObject, type PerpetualsAccountOrderHistoryData, type PerpetualsAddresses, type PerpetualsBuilderCodeParamaters, type PerpetualsCalculationVariables, type PerpetualsCapType, type PerpetualsClientOrderId, type PerpetualsExecutionInfo, type PerpetualsFilledOrderData, type PerpetualsIntegratorVaultData, type PerpetualsMakerData, PerpetualsMarket, type PerpetualsMarket24hrStats, type PerpetualsMarketCandleDataPoint, type PerpetualsMarketData, type PerpetualsMarketFundingHistoryPoint, type PerpetualsMarketId, type PerpetualsMarketOrderHistoryData, type PerpetualsMarketParams, type PerpetualsMarketState, type PerpetualsOrderData, type PerpetualsOrderEvent, type PerpetualsOrderId, type PerpetualsOrderIdAsString, type PerpetualsOrderInfo, type PerpetualsOrderPrice, PerpetualsOrderSide, type PerpetualsOrderState, PerpetualsOrderType, type PerpetualsOrderbook, type PerpetualsOrderbookDeltas, type PerpetualsOrderbookItem, type PerpetualsPartialVaultCap, type PerpetualsPosition, type PerpetualsRewardData, type PerpetualsSponsorConfig, type PerpetualsStopOrderData, PerpetualsStopOrderTriggerPriceType, PerpetualsStopOrderType, type PerpetualsTakerData, type PerpetualsTopOfOrderbook, type PerpetualsTopOfOrderbookDataPoint, type PerpetualsTwapEvent, PerpetualsVault, type PerpetualsVaultCap, type PerpetualsVaultLpCoin, type PerpetualsVaultMetatada, type PerpetualsVaultObject, type PerpetualsVaultWithdrawRequest, type PerpetualsVaultsAddresses, type PerpetualsWsCandleResponseMessage, type PerpetualsWsUpdatesMarketOrdersPayload, type PerpetualsWsUpdatesMarketOrdersSubscriptionType, type PerpetualsWsUpdatesMarketSubscriptionType, type PerpetualsWsUpdatesOraclePayload, type PerpetualsWsUpdatesOracleSubscriptionType, type PerpetualsWsUpdatesOrderbookPayload, type PerpetualsWsUpdatesOrderbookSubscriptionType, type PerpetualsWsUpdatesResponseMessage, type PerpetualsWsUpdatesSubscriptionAction, type PerpetualsWsUpdatesSubscriptionMessage, type PerpetualsWsUpdatesSubscriptionType, type PerpetualsWsUpdatesTopOfOrderbookPayload, type PerpetualsWsUpdatesTopOfOrderbookSubscriptionType, type PerpetualsWsUpdatesUserCollateralChangesPayload, type PerpetualsWsUpdatesUserCollateralChangesSubscriptionType, type PerpetualsWsUpdatesUserOrdersPayload, type PerpetualsWsUpdatesUserOrdersSubscriptionType, type PerpetualsWsUpdatesUserPayload, type PerpetualsWsUpdatesUserSubscriptionType, Pool, type PoolCoin, type PoolCoins, type PoolCreationCoinInfo, type PoolCreationLpCoinMetadata, type PoolDataPoint, type PoolDepositEvent, type PoolDepositFee, type PoolFlatness, type PoolGraphDataTimeUnit, type PoolGraphDataTimeframe, type PoolGraphDataTimeframeKey, type PoolLpInfo, type PoolName, type PoolObject, type PoolStats, type PoolTradeEvent, type PoolTradeFee, type PoolWeight, type PoolWithdrawEvent, type PoolWithdrawFee, Pools, type PoolsAddresses, type PostedOrderEvent, type RateLimit, type ReceivedCollateralEvent, type ReducedOrderEvent, ReferralVault, type ReferralVaultAddresses, type ReferralsRefereeInfo, type RewardsClaimableReward, type RewardsHistoryEntry, type RewardsHistoryEventType, type RewardsPaginationInfo, Router, type RouterAddresses, type RouterCompleteTradeRoute, type RouterCompleteTradeRouteWithFee, type RouterExternalFee, type RouterProtocolName, type RouterTradeCoin, type RouterTradeEvent, type RouterTradeInfo, type RouterTradePath, type RouterTradeRoute, type RpcEndpoint, type ScallopAddresses, type SdkPerpetualsCancelAndPlaceOrdersInputs, type SdkPerpetualsCancelOrdersPreviewInputs, type SdkPerpetualsPlaceLimitOrderInputs, type SdkPerpetualsPlaceLimitOrderPreviewInputs, type SdkPerpetualsPlaceMarketOrderInputs, type SdkPerpetualsPlaceMarketOrderPreviewInputs, type SdkPerpetualsPlaceScaleOrderInputs, type SdkPerpetualsPlaceScaleOrderPreviewInputs, type SdkPerpetualsPlaceSlTpOrdersInputs, type SdkPerpetualsPlaceStopOrdersInputs, type SdkTransactionResponse, type SerializedTransaction, type ServiceCoinData, type ServiceCoinDataV2, type SetPositionInitialMarginRatioEvent, type SettledFundingEvent, type SharedCustodyAddresses, type SignMessageCallback, type Slippage, type StakeBalanceDynamicField, type StakeEvent, type StakePosition, type StakeSuiFrenEvent, type StakedEvent, StakedSuiFren, type StakedSuiFrenInfo, type StakedSuiFrenMetadataV1Object, type StakedSuiFrenPositionObject, type StakedSuiVaultStateObject, Staking, type StakingAddresses, type StakingApyDataPoint, type StakingApyTimeframeKey, type StakingPoolOneTimeAdminCapObject, type StakingPoolOwnerCapObject, type StakingPosition, type StringByte, Sui, type SuiAddress, type SuiCheckpoint, type SuiDelegatedStake, type SuiDelegatedStakeState, SuiFren, type SuiFrenAccessoryName, type SuiFrenAccessoryObject, type SuiFrenAccessoryType, type SuiFrenAttributes, type SuiFrenObject, type SuiFrenStats, type SuiFrenVaultStateV1Object, SuiFrens, type SuiFrensAddresses, SuiFrensSortOption, type SuiNetwork, type Timestamp, type TransactionDigest, type TransactionsWithCursor, type TransferredDeallocatedCollateralEvent, type TranslatedMoveError, type TxBytes, type UniqueId, type UnstakeEvent, type UnstakePosition, type UnstakePositionState, type UnstakeRequestedEvent, type UnstakeSuiFrenEvent, type UnstakedEvent, type UpdatedFeeBpsEvent, type UpdatedFeeRecipientEvent, type UpdatedFundingEvent, type UpdatedMarketVersionEvent, type UpdatedPremiumTwapEvent, type UpdatedSpreadTwapEvent, type Url, type UserEventsInputs, type UserHistoryEventType, type ValidatorConfigObject, type ValidatorOperationCapObject, type ValueOf, type WithdrewCollateralEvent, isAllocatedCollateralEvent, isCanceledOrderEvent, isDeallocatedCollateralEvent, isDepositedCollateralEvent, isFarmsDepositedPrincipalEvent, isFarmsHarvestedRewardsEvent, isFarmsLockedEvent, isFarmsStakedEvent, isFarmsUnlockedEvent, isFarmsWithdrewPrincipalEvent, isFilledMakerOrdersEvent, isFilledTakerOrderEvent, isLiquidatedEvent, isPostedOrderEvent, isReducedOrderEvent, isSettledFundingEvent, isStakeEvent, isStakePosition, isSuiDelegatedStake, isUnstakeEvent, isUnstakePosition, isUpdatedFundingEvent, isUpdatedMarketVersion, isUpdatedPremiumTwapEvent, isUpdatedSpreadTwapEvent, isWithdrewCollateralEvent };
18254
+ export { type AfSuiRouterPoolObject, Aftermath, AftermathApi, type AftermathOptions, type AllocatedCollateralEvent, type AmountInCoinAndUsd, type AnyObjectType, type ApiAccessoriesForSuiFrenBody, type ApiAddSuiFrenAccessoryBody, type ApiCreateAuthAccountBody, type ApiCreatePoolBody, type ApiDataWithCursorBody, type ApiDelegatedStakesBody, type ApiDynamicFieldsBody, type ApiDynamicGasBody, type ApiDynamicGasResponse, type ApiEventsBody, type ApiFarmsCreateStakingPoolBody, type ApiFarmsCreateStakingPoolBodyV1, type ApiFarmsDepositPrincipalBody, type ApiFarmsGrantOneTimeAdminCapBody, type ApiFarmsIncreaseStakingPoolRewardsEmissionsBody, type ApiFarmsInitializeStakingPoolRewardBody, type ApiFarmsLockBody, type ApiFarmsOwnedStakedPositionsBody, type ApiFarmsOwnedStakingPoolOneTimeAdminCapsBody, type ApiFarmsOwnedStakingPoolOwnerCapsBody, type ApiFarmsRenewLockBody, type ApiFarmsStakeBody, type ApiFarmsStakeBodyV1, type ApiFarmsTopUpStakingPoolRewardsBody, type ApiFarmsUnlockBody, type ApiFarmsUnstakeBody, type ApiFaucetMintSuiFrenBody, type ApiFaucetRequestBody, type ApiGasPoolBody, type ApiGasPoolCreateBody, type ApiGasPoolCreateResponse, type ApiGasPoolDepositBody, type ApiGasPoolGrantBody, type ApiGasPoolResponse, type ApiGasPoolRevokeBody, type ApiGasPoolShareBody, type ApiGasPoolSponsorBody, type ApiGasPoolWithdrawBody, type ApiGasPoolWithdrawResponse, type ApiGetAccessTokenBody, type ApiGetAccessTokenResponse, type ApiHarvestFarmsRewardsBody, type ApiHarvestSuiFrenFeesBody, type ApiIndexerEventsBody, type ApiIndexerUserEventsBody, type ApiMixSuiFrensBody, type ApiNftAmmBuyBody, type ApiNftAmmDepositBody, type ApiNftAmmSellBody, type ApiNftAmmWithdrawBody, type ApiOwnedStakedSuiFrensBody, type ApiOwnedSuiFrenAccessoriesBody, type ApiOwnedSuiFrensBody, type ApiPerpetualsAccountCollateralHistoryBody, type ApiPerpetualsAccountCollateralHistoryResponse, type ApiPerpetualsAccountMarginHistoryBody, type ApiPerpetualsAccountMarginHistoryResponse, type ApiPerpetualsAccountOrderHistoryBody, type ApiPerpetualsAccountOrderHistoryResponse, type ApiPerpetualsAccountPositionsBody, type ApiPerpetualsAccountPositionsResponse, type ApiPerpetualsAdminAccountCapsBody, type ApiPerpetualsAdminAccountCapsResponse, type ApiPerpetualsAllMarketsBody, type ApiPerpetualsAllMarketsResponse, type ApiPerpetualsAllocateCollateralBody, type ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, type ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, type ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, type ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, type ApiPerpetualsBuilderCodesIntegratorConfigBody, type ApiPerpetualsBuilderCodesIntegratorConfigResponse, type ApiPerpetualsBuilderCodesIntegratorVaultsBody, type ApiPerpetualsBuilderCodesIntegratorVaultsResponse, type ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody, type ApiPerpetualsCancelAndPlaceOrdersBody, type ApiPerpetualsCancelOrdersBody, type ApiPerpetualsCancelStopOrdersBody, type ApiPerpetualsCancelTwapOrdersBody, type ApiPerpetualsCreateAccountBody, type ApiPerpetualsCreateAccountResponse, type ApiPerpetualsCreateCsvRebatesBody, type ApiPerpetualsCreateCsvRebatesResponse, type ApiPerpetualsCreateReferralCsvRebatesBody, type ApiPerpetualsCreateReferralCsvRebatesResponse, type ApiPerpetualsCreateTwapOrdersBody, type ApiPerpetualsCreateVaultBody, type ApiPerpetualsCreateVaultCapBody, type ApiPerpetualsCurrentRebateRewardsBody, type ApiPerpetualsCurrentRebateRewardsResponse, type ApiPerpetualsDeallocateCollateralBody, type ApiPerpetualsDepositCollateralBody, type ApiPerpetualsEditStopOrdersBody, type ApiPerpetualsEditTwapOrdersBody, type ApiPerpetualsExecutionPriceBody, type ApiPerpetualsExecutionPriceResponse, type ApiPerpetualsGrantAgentWalletTxBody, type ApiPerpetualsHistoricalDataWithCursorBody, type ApiPerpetualsHistoricalDataWithCursorResponse, type ApiPerpetualsLimitOrderBody, type ApiPerpetualsMarketCandleHistoryBody, type ApiPerpetualsMarketCandleHistoryResponse, type ApiPerpetualsMarketFundingHistoryBody, type ApiPerpetualsMarketFundingHistoryResponse, type ApiPerpetualsMarketOrderBody, type ApiPerpetualsMarketOrderHistoryBody, type ApiPerpetualsMarketOrderHistoryResponse, type ApiPerpetualsMarkets24hrStatsResponse, type ApiPerpetualsMarketsBody, type ApiPerpetualsMarketsPricesBody, type ApiPerpetualsMarketsPricesResponse, type ApiPerpetualsMarketsResponse, type ApiPerpetualsMaxOrderSizeBody, type ApiPerpetualsOrderToPlace, type ApiPerpetualsOrderbooksBody, type ApiPerpetualsOrderbooksResponse, type ApiPerpetualsOwnedAccountCapsBody, type ApiPerpetualsOwnedAccountCapsResponse, type ApiPerpetualsOwnedVaultAssistantCapsBody, type ApiPerpetualsOwnedVaultAssistantCapsResponse, type ApiPerpetualsOwnedVaultCapsBody, type ApiPerpetualsOwnedVaultCapsResponse, type ApiPerpetualsPlaceSlTpOrdersBody, type ApiPerpetualsPlaceStopOrdersBody, type ApiPerpetualsPreviewCancelOrdersBody, type ApiPerpetualsPreviewCancelOrdersResponse, type ApiPerpetualsPreviewEditCollateralBody, type ApiPerpetualsPreviewEditCollateralResponse, type ApiPerpetualsPreviewPlaceLimitOrderBody, type ApiPerpetualsPreviewPlaceMarketOrderBody, type ApiPerpetualsPreviewPlaceOrderResponse, type ApiPerpetualsPreviewPlaceScaleOrderBody, type ApiPerpetualsPreviewSetLeverageBody, type ApiPerpetualsPreviewSetLeverageResponse, type ApiPerpetualsRevokeAgentWalletTxBody, type ApiPerpetualsScaleOrderBody, type ApiPerpetualsSetLeverageTxBody, type ApiPerpetualsShareAccountBody, type ApiPerpetualsStopOrderDatasBody, type ApiPerpetualsStopOrderDatasResponse, type ApiPerpetualsTransferCapTxBody, type ApiPerpetualsTransferCollateralBody, type ApiPerpetualsTwapOrderDatasBody, type ApiPerpetualsTwapOrderDatasResponse, type ApiPerpetualsVaultCancelWithdrawRequestTxBody, type ApiPerpetualsVaultCreateWithdrawRequestTxBody, type ApiPerpetualsVaultDepositTxBody, type ApiPerpetualsVaultLpCoinPricesBody, type ApiPerpetualsVaultLpCoinPricesResponse, type ApiPerpetualsVaultOwnedLpCoinsBody, type ApiPerpetualsVaultOwnedLpCoinsResponse, type ApiPerpetualsVaultOwnedWithdrawRequestsBody, type ApiPerpetualsVaultOwnedWithdrawRequestsResponse, type ApiPerpetualsVaultOwnerProcessWithdrawRequestsTxBody, type ApiPerpetualsVaultOwnerUpdateForceWithdrawDelayTxBody, type ApiPerpetualsVaultOwnerUpdateLockPeriodTxBody, type ApiPerpetualsVaultOwnerUpdatePerformanceFeeTxBody, type ApiPerpetualsVaultOwnerWithdrawCollateralTxBody, type ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse, type ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxBody, type ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse, type ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxBody, type ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse, type ApiPerpetualsVaultPauseVaultForForceWithdrawRequestTxBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestResponse, type ApiPerpetualsVaultPreviewDepositBody, type ApiPerpetualsVaultPreviewDepositResponse, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsBody, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralBody, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityBody, type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesBody, type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesResponse, type ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestBody, type ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestResponse, type ApiPerpetualsVaultPreviewProcessForceWithdrawRequestBody, type ApiPerpetualsVaultPreviewProcessForceWithdrawRequestResponse, type ApiPerpetualsVaultProcessForceWithdrawRequestTxBody, type ApiPerpetualsVaultProcessForceWithdrawRequestTxResponse, type ApiPerpetualsVaultUpdateWithdrawRequestSlippageTxBody, type ApiPerpetualsVaultsBody, type ApiPerpetualsVaultsResponse, type ApiPerpetualsVaultsWithdrawRequestsBody, type ApiPerpetualsVaultsWithdrawRequestsResponse, type ApiPerpetualsWithdrawCollateralBody, type ApiPerpetualsWithdrawCollateralResponse, type ApiPoolAllCoinWithdrawBody, type ApiPoolDepositBody, type ApiPoolObjectIdForLpCoinTypeBody, type ApiPoolSpotPriceBody, type ApiPoolTradeBody, type ApiPoolWithdrawBody, type ApiPoolsOwnedDaoFeePoolOwnerCapsBody, type ApiPoolsStatsBody, type ApiPublishLpCoinBody, type ApiReferralsCreateReferralLinkBody, type ApiReferralsCreateReferralLinkResponse, type ApiReferralsGetLinkedRefCodeBody, type ApiReferralsGetLinkedRefCodeResponse, type ApiReferralsGetRefCodeBody, type ApiReferralsGetRefCodeResponse, type ApiReferralsGetRefereesBody, type ApiReferralsGetRefereesResponse, type ApiReferralsIsRefCodeTakenBody, type ApiReferralsIsRefCodeTakenResponse, type ApiReferralsSetReferrerBody, type ApiReferralsSetReferrerResponse, type ApiRemoveSuiFrenAccessoryBody, type ApiRewardsClaimRequestTxBody, type ApiRewardsClaimRequestTxResponse, type ApiRewardsGetClaimableBody, type ApiRewardsGetClaimableResponse, type ApiRewardsGetHistoryBody, type ApiRewardsGetHistoryResponse, type ApiRewardsGetPointsBody, type ApiRewardsGetPointsResponse, type ApiRouterAddTransactionForCompleteTradeRouteBody, type ApiRouterAddTransactionForCompleteTradeRouteResponse, type ApiRouterCompleteTradeRouteBody, type ApiRouterDynamicGasBody, type ApiRouterPartialCompleteTradeRouteBody, type ApiRouterTradeEventsBody, type ApiRouterTransactionForCompleteTradeRouteBody, type ApiStakeBody, type ApiStakeStakedSuiBody, type ApiStakeSuiFrenBody, type ApiStakingEventsBody, type ApiStakingPositionsBody, type ApiTransactionResponse, type ApiTransactionsBody, type ApiUnstakeBody, type ApiUnstakeSuiFrenBody, type ApiUpdateValidatorFeeBody, type ApiValidatorOperationCapsBody, type Apr, type Apy, Auth, type Balance, type BigIntAsString, type Bps, type Byte, type CallerConfig, type CanceledOrderEvent, type CapyLabsAppObject, Casting, Coin, type CoinDecimal, type CoinGeckoChain, type CoinGeckoCoinApiId, type CoinGeckoCoinData, type CoinGeckoCoinSymbolData, type CoinGeckoHistoricalTradeData, type CoinGeckoTickerData, type CoinMetadaWithInfo, type CoinPriceInfo, type CoinSymbol, type CoinSymbolToCoinTypes, type CoinSymbolsToPriceInfo, type CoinType, type CoinWithAmount, type CoinWithAmountOrUndefined, type CoinsToBalance, type CoinsToBalanceOrUndefined, type CoinsToDecimals, type CoinsToPrice, type CoinsToPriceInfo, type CollateralEvent, type Color, type ComposedTransferArgs, type ConfigAddresses, type CreatedAccountEvent, type CreatedDaoFeePoolEvent, type CreatedStopOrderTicketEvent, type DaoFeePoolObject, type DaoFeePoolOwnerCapObject, type DaoFeePoolsAddresses, type DcaAddresses, type DeallocatedCollateralEvent, type DecimalsScalar, type DeferredAccountArgs, type DeletedStopOrderTicketEvent, type DepositedCollateralEvent, type DynamicFieldObjectsWithCursor, type DynamicFieldsInputs, type DynamicFieldsWithCursor, type DynamicGasAddresses, type EditedStopOrderTicketDetailsEvent, type EditedStopOrderTicketExecutorEvent, type EmptyObject, type EpochWasChangedEvent, type Event$1 as Event, type EventsInputs, type EventsWithCursor, type ExecutedStopOrderTicketEvent, type ExternalFee, type FarmEvent, type FarmOwnerOrOneTimeAdminCap, type FarmUserEvent, Farms, type FarmsAddedRewardEvent, type FarmsAddresses, type FarmsCreatedVaultEvent, type FarmsDepositedPrincipalEvent, type FarmsDestroyedStakedPositionEvent, type FarmsHarvestedRewardsEvent, type FarmsIncreasedEmissionsEvent, type FarmsInitializedRewardEvent, type FarmsJoinedEvent, type FarmsLockEnforcement, type FarmsLockedEvent, type FarmsMultiplier, type FarmsSplitEvent, type FarmsStakedEvent, FarmsStakedPosition, type FarmsStakedPositionObject, type FarmsStakedPositionRewardCoin, type FarmsStakedRelaxedEvent, FarmsStakingPool, type FarmsStakingPoolObject, type FarmsStakingPoolRewardCoin, type FarmsUnlockedEvent, type FarmsVersion, type FarmsWithdrewPrincipalEvent, Faucet, type FaucetAddCoinEvent, type FaucetAddresses, type FaucetMintCoinEvent, type FilePath, type FilledMakerOrderEventFields, type FilledMakerOrdersEvent, type FilledTakerOrderEvent, type FunctionName, type GasBudget, GasPools, type HarvestSuiFrenFeesEvent, Helpers, type IFixed, type IFixedAsBytes, type IFixedAsString, type IFixedAsStringBytes, type IdAsStringBytes, type IndexerDataWithCursorQueryParams, type IndexerEventsWithCursor, type KeyType, type KioskObject, type KioskOwnerCapObject, type LimitAddresses, type LiquidatedEvent, type LocalUrl, type MixSuiFrensEvent, type ModuleName, type MoveErrorCode, type MoveErrors, type MoveErrorsInterface, type Nft, NftAmm, type NftAmmAddresses, type NftAmmInterfaceGenericTypes, type NftAmmMarketObject, type NftDisplay, type NftDisplayOther, type NftDisplaySuggested, type NftInfo, type NftsAddresses, type NormalizedBalance, type NumberAsString, type Object$1 as Object, type ObjectDigest, type ObjectId, type ObjectVersion, type OrderbookFillReceiptEvent, type PackageId, type ParsedMoveError, type PartialFarmsStakedPositionObject, type PartialSuiFrenObject, type Percentage, Perpetuals, PerpetualsAccount, type PerpetualsAccountCap, type PerpetualsAccountCollateralChange, type PerpetualsAccountData, type PerpetualsAccountId, type PerpetualsAccountMarginHistoryData, type PerpetualsAccountMarginHistoryTimeframeKey, type PerpetualsAccountObject, type PerpetualsAccountOrderHistoryData, type PerpetualsAddresses, type PerpetualsBuilderCodeParamaters, type PerpetualsCalculationVariables, type PerpetualsCapType, type PerpetualsClientOrderId, type PerpetualsExecutionInfo, type PerpetualsFilledOrderData, type PerpetualsIntegratorVaultData, type PerpetualsMakerData, PerpetualsMarket, type PerpetualsMarket24hrStats, type PerpetualsMarketCandleDataPoint, type PerpetualsMarketData, type PerpetualsMarketFundingHistoryPoint, type PerpetualsMarketId, type PerpetualsMarketOrderHistoryData, type PerpetualsMarketParams, type PerpetualsMarketState, type PerpetualsOrderData, type PerpetualsOrderEvent, type PerpetualsOrderId, type PerpetualsOrderIdAsString, type PerpetualsOrderInfo, type PerpetualsOrderPrice, PerpetualsOrderSide, type PerpetualsOrderState, PerpetualsOrderType, type PerpetualsOrderbook, type PerpetualsOrderbookDeltas, type PerpetualsOrderbookItem, type PerpetualsPartialVaultCap, type PerpetualsPosition, type PerpetualsRewardData, type PerpetualsServerInjectedTxFields, type PerpetualsSponsorConfig, type PerpetualsStopOrderData, PerpetualsStopOrderTriggerPriceType, PerpetualsStopOrderType, type PerpetualsTakerData, type PerpetualsTopOfOrderbook, type PerpetualsTopOfOrderbookDataPoint, type PerpetualsTwapEvent, type PerpetualsTwapOrderData, type PerpetualsTwapOrderDetails, type PerpetualsTwapOrderDetailsData, type PerpetualsTwapOrderEdit, type PerpetualsTwapOrderState, PerpetualsVault, type PerpetualsVaultCap, type PerpetualsVaultLpCoin, type PerpetualsVaultMetatada, type PerpetualsVaultObject, type PerpetualsVaultWithdrawRequest, type PerpetualsVaultsAddresses, type PerpetualsWsCandleResponseMessage, type PerpetualsWsUpdatesMarketOrdersPayload, type PerpetualsWsUpdatesMarketOrdersSubscriptionType, type PerpetualsWsUpdatesMarketSubscriptionType, type PerpetualsWsUpdatesOraclePayload, type PerpetualsWsUpdatesOracleSubscriptionType, type PerpetualsWsUpdatesOrderbookPayload, type PerpetualsWsUpdatesOrderbookSubscriptionType, type PerpetualsWsUpdatesResponseMessage, type PerpetualsWsUpdatesSubscriptionAction, type PerpetualsWsUpdatesSubscriptionMessage, type PerpetualsWsUpdatesSubscriptionType, type PerpetualsWsUpdatesTopOfOrderbookPayload, type PerpetualsWsUpdatesTopOfOrderbookSubscriptionType, type PerpetualsWsUpdatesUserCollateralChangesPayload, type PerpetualsWsUpdatesUserCollateralChangesSubscriptionType, type PerpetualsWsUpdatesUserOrdersPayload, type PerpetualsWsUpdatesUserOrdersSubscriptionType, type PerpetualsWsUpdatesUserPayload, type PerpetualsWsUpdatesUserSubscriptionType, Pool, type PoolCoin, type PoolCoins, type PoolCreationCoinInfo, type PoolCreationLpCoinMetadata, type PoolDataPoint, type PoolDepositEvent, type PoolDepositFee, type PoolFlatness, type PoolGraphDataTimeUnit, type PoolGraphDataTimeframe, type PoolGraphDataTimeframeKey, type PoolLpInfo, type PoolName, type PoolObject, type PoolStats, type PoolTradeEvent, type PoolTradeFee, type PoolWeight, type PoolWithdrawEvent, type PoolWithdrawFee, Pools, type PoolsAddresses, type PostedOrderEvent, type RateLimit, type ReceivedCollateralEvent, type ReducedOrderEvent, ReferralVault, type ReferralVaultAddresses, type ReferralsRefereeInfo, type RewardsClaimableReward, type RewardsHistoryEntry, type RewardsHistoryEventType, type RewardsPaginationInfo, Router, type RouterAddresses, type RouterCompleteTradeRoute, type RouterCompleteTradeRouteWithFee, type RouterExternalFee, type RouterProtocolName, type RouterTradeCoin, type RouterTradeEvent, type RouterTradeInfo, type RouterTradePath, type RouterTradeRoute, type RpcEndpoint, type ScallopAddresses, type SdkPerpetualsCancelAndPlaceOrdersInputs, type SdkPerpetualsCancelOrdersPreviewInputs, type SdkPerpetualsCancelTwapOrdersInputs, type SdkPerpetualsCreateTwapOrdersInputs, type SdkPerpetualsEditTwapOrdersInputs, type SdkPerpetualsPlaceLimitOrderInputs, type SdkPerpetualsPlaceLimitOrderPreviewInputs, type SdkPerpetualsPlaceMarketOrderInputs, type SdkPerpetualsPlaceMarketOrderPreviewInputs, type SdkPerpetualsPlaceScaleOrderInputs, type SdkPerpetualsPlaceScaleOrderPreviewInputs, type SdkPerpetualsPlaceSlTpOrdersInputs, type SdkPerpetualsPlaceStopOrdersInputs, type SdkTransactionResponse, type SerializedTransaction, type ServiceCoinData, type ServiceCoinDataV2, type SetPositionInitialMarginRatioEvent, type SettledFundingEvent, type SharedCustodyAddresses, type SignMessageCallback, type Slippage, type StakeBalanceDynamicField, type StakeEvent, type StakePosition, type StakeSuiFrenEvent, type StakedEvent, StakedSuiFren, type StakedSuiFrenInfo, type StakedSuiFrenMetadataV1Object, type StakedSuiFrenPositionObject, type StakedSuiVaultStateObject, Staking, type StakingAddresses, type StakingApyDataPoint, type StakingApyTimeframeKey, type StakingPoolOneTimeAdminCapObject, type StakingPoolOwnerCapObject, type StakingPosition, type StringByte, Sui, type SuiAddress, type SuiCheckpoint, type SuiDelegatedStake, type SuiDelegatedStakeState, SuiFren, type SuiFrenAccessoryName, type SuiFrenAccessoryObject, type SuiFrenAccessoryType, type SuiFrenAttributes, type SuiFrenObject, type SuiFrenStats, type SuiFrenVaultStateV1Object, SuiFrens, type SuiFrensAddresses, SuiFrensSortOption, type SuiNetwork, type Timestamp, type TransactionDigest, type TransactionsWithCursor, type TransferredDeallocatedCollateralEvent, type TranslatedMoveError, type TxBytes, type UniqueId, type UnstakeEvent, type UnstakePosition, type UnstakePositionState, type UnstakeRequestedEvent, type UnstakeSuiFrenEvent, type UnstakedEvent, type UpdatedFeeBpsEvent, type UpdatedFeeRecipientEvent, type UpdatedFundingEvent, type UpdatedMarketVersionEvent, type UpdatedPremiumTwapEvent, type UpdatedSpreadTwapEvent, type Url, type UserEventsInputs, type UserHistoryEventType, type ValidatorConfigObject, type ValidatorOperationCapObject, type ValueOf, type WithdrewCollateralEvent, isAllocatedCollateralEvent, isCanceledOrderEvent, isDeallocatedCollateralEvent, isDepositedCollateralEvent, isFarmsDepositedPrincipalEvent, isFarmsHarvestedRewardsEvent, isFarmsLockedEvent, isFarmsStakedEvent, isFarmsUnlockedEvent, isFarmsWithdrewPrincipalEvent, isFilledMakerOrdersEvent, isFilledTakerOrderEvent, isLiquidatedEvent, isPostedOrderEvent, isReducedOrderEvent, isSettledFundingEvent, isStakeEvent, isStakePosition, isSuiDelegatedStake, isUnstakeEvent, isUnstakePosition, isUpdatedFundingEvent, isUpdatedMarketVersion, isUpdatedPremiumTwapEvent, isUpdatedSpreadTwapEvent, isWithdrewCollateralEvent };
package/dist/index.js CHANGED
@@ -1544,7 +1544,8 @@ var init_caller = __esm({
1544
1544
  throw new Error("no apiBaseUrl: unable to fetch data");
1545
1545
  }
1546
1546
  const safeUrl = this.apiBaseUrl.slice(-1) === "/" ? this.apiBaseUrl.slice(0, -1) : this.apiBaseUrl;
1547
- return `${safeUrl}/${this.apiEndpoint}/${this.apiUrlPrefix + (url === "" ? "" : "/")}${url}`;
1547
+ const endpointSegment = this.apiEndpoint ? `${this.apiEndpoint}/` : "";
1548
+ return `${safeUrl}/${endpointSegment}${this.apiUrlPrefix + (url === "" ? "" : "/")}${url}`;
1548
1549
  };
1549
1550
  this.setAccessToken = (accessToken) => {
1550
1551
  this.config.accessToken = accessToken;
@@ -1665,7 +1666,8 @@ var init_caller = __esm({
1665
1666
  ""
1666
1667
  );
1667
1668
  const baseWs = baseHttp.replace(_Caller.HTTP_PROTOCOL_REGEX, "ws$1://");
1668
- const prefix = `${this.apiEndpoint}/${this.apiUrlPrefix}`;
1669
+ const endpointSegment = this.apiEndpoint ? `${this.apiEndpoint}/` : "";
1670
+ const prefix = `${endpointSegment}${this.apiUrlPrefix}`;
1669
1671
  const normalizedPrefix = prefix.replace(
1670
1672
  _Caller.TRAILING_SLASHES_REGEX,
1671
1673
  ""
@@ -4989,6 +4991,38 @@ var init_farmsStakingPool = __esm({
4989
4991
  };
4990
4992
  return this.version() === 1 ? this.farmsApi().buildSetStakingPoolMinStakeAmountTxV1(args) : this.farmsApi().buildSetStakingPoolMinStakeAmountTxV2(args);
4991
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
+ }
4992
5026
  /**
4993
5027
  * Builds a transaction granting a one-time admin cap to another address, allowing them to perform specific
4994
5028
  * one-time administrative actions (like initializing a reward).
@@ -9607,6 +9641,113 @@ var init_perpetualsAccount = __esm({
9607
9641
  }
9608
9642
  );
9609
9643
  }
9644
+ /**
9645
+ * Build a `create-twap-orders` transaction for this account.
9646
+ *
9647
+ * @param inputs - See {@link SdkPerpetualsCreateTwapOrdersInputs}.
9648
+ *
9649
+ * @returns Transaction response containing `tx`.
9650
+ */
9651
+ async getCreateTwapOrdersTx(inputs) {
9652
+ if ("vaultId" in this.accountCap) {
9653
+ throw new Error("TWAP orders are not yet supported for vault accounts");
9654
+ }
9655
+ const { tx, ...otherInputs } = inputs;
9656
+ return this.fetchApiTxObject(
9657
+ "account/transactions/create-twap-orders",
9658
+ {
9659
+ ...otherInputs,
9660
+ txKind: await this.api?.Transactions().fetchBase64TxKindFromTx({ tx }),
9661
+ walletAddress: this.ownerAddress(),
9662
+ accountId: this.accountCap.accountId,
9663
+ accountCapId: this.accountCap.objectId
9664
+ },
9665
+ void 0,
9666
+ {
9667
+ txKind: true
9668
+ }
9669
+ );
9670
+ }
9671
+ /**
9672
+ * Build an `edit-twap-orders` transaction for this account.
9673
+ * `newTwapOrders` maps each TWAP order object id to the edit to apply.
9674
+ *
9675
+ * @param inputs.newTwapOrders - Map of TWAP order id to the edit to apply.
9676
+ * @param inputs.tx - Optional transaction to extend.
9677
+ *
9678
+ * @returns Transaction response containing `tx`.
9679
+ */
9680
+ async getEditTwapOrdersTx(inputs) {
9681
+ if ("vaultId" in this.accountCap) {
9682
+ throw new Error("TWAP orders are not yet supported for vault accounts");
9683
+ }
9684
+ const { tx, ...otherInputs } = inputs;
9685
+ return this.fetchApiTxObject(
9686
+ "account/transactions/edit-twap-orders",
9687
+ {
9688
+ ...otherInputs,
9689
+ txKind: await this.api?.Transactions().fetchBase64TxKindFromTx({ tx }),
9690
+ walletAddress: this.ownerAddress(),
9691
+ accountId: this.accountCap.accountId,
9692
+ accountCapId: this.accountCap.objectId
9693
+ },
9694
+ void 0,
9695
+ {
9696
+ txKind: true
9697
+ }
9698
+ );
9699
+ }
9700
+ /**
9701
+ * Build a `cancel-twap-orders` transaction for this account.
9702
+ * This cancels TWAP order objects by their object IDs.
9703
+ *
9704
+ * @param inputs.tx - Optional transaction to extend.
9705
+ * @param inputs.twapOrderIds - Array of TWAP order object IDs to cancel.
9706
+ *
9707
+ * @returns Transaction response containing `tx`.
9708
+ */
9709
+ async getCancelTwapOrdersTx(inputs) {
9710
+ if ("vaultId" in this.accountCap) {
9711
+ throw new Error("TWAP orders are not yet supported for vault accounts");
9712
+ }
9713
+ const { tx, ...otherInputs } = inputs;
9714
+ return this.fetchApiTxObject(
9715
+ "account/transactions/cancel-twap-orders",
9716
+ {
9717
+ ...otherInputs,
9718
+ txKind: await this.api?.Transactions().fetchBase64TxKindFromTx({ tx }),
9719
+ walletAddress: this.ownerAddress(),
9720
+ accountId: this.accountCap.accountId,
9721
+ accountCapId: this.accountCap.objectId
9722
+ },
9723
+ void 0,
9724
+ {
9725
+ txKind: true
9726
+ }
9727
+ );
9728
+ }
9729
+ /**
9730
+ * Fetch TWAP-order data for this account, using an off-chain signed payload.
9731
+ *
9732
+ * @param inputs.bytes - Serialized message that was signed.
9733
+ * @param inputs.signature - Signature over `bytes`.
9734
+ * @param inputs.marketIds - Optional subset of markets to filter results by.
9735
+ *
9736
+ * @returns {@link ApiPerpetualsTwapOrderDatasResponse} containing `twapOrderDatas`.
9737
+ */
9738
+ async getTwapOrderDatas(inputs) {
9739
+ if ("vaultId" in this.accountCap) {
9740
+ throw new Error("TWAP orders are not yet supported for vault accounts");
9741
+ }
9742
+ const { bytes, signature, marketIds } = inputs;
9743
+ return await this.fetchApi("account/twap-order-datas", {
9744
+ bytes,
9745
+ signature,
9746
+ walletAddress: this.ownerAddress(),
9747
+ marketIds: marketIds ?? [],
9748
+ accountId: this.accountCap.accountId
9749
+ });
9750
+ }
9610
9751
  // public async getReduceOrderTx(inputs: {
9611
9752
  // tx?: Transaction;
9612
9753
  // collateralChange: number;
@@ -16429,6 +16570,49 @@ var init_farmsApi = __esm({
16429
16570
  ]
16430
16571
  });
16431
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
+ };
16432
16616
  /**
16433
16617
  * Creates a Move call (V1) to **remove undistributed reward coins** from a staking pool.
16434
16618
  * Only callable by the pool **owner** (validated via `ownerCapId`). This does not claw back
@@ -17113,6 +17297,12 @@ var init_farmsApi = __esm({
17113
17297
  this.buildSetStakingPoolMinStakeAmountTxV2 = Helpers.transactions.createBuildTxFunc(
17114
17298
  this.setStakingPoolMinStakeAmountTxV2
17115
17299
  );
17300
+ this.buildSetStakingPoolMinLockDurationMsTxV2 = Helpers.transactions.createBuildTxFunc(
17301
+ this.setStakingPoolMinLockDurationMsTxV2
17302
+ );
17303
+ this.buildSetStakingPoolMaxLockDurationMsTxV2 = Helpers.transactions.createBuildTxFunc(
17304
+ this.setStakingPoolMaxLockDurationMsTxV2
17305
+ );
17116
17306
  /**
17117
17307
  * Builds a transaction for **removing undistributed reward coins** from a staking pool (V1).
17118
17308
  * Requires the pool **OwnerCap**. The removal is specific to a `rewardCoinType`.