aftermath-ts-sdk 2.0.0 → 2.0.1

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
@@ -1,9 +1,8 @@
1
1
  import * as _mysten_sui_transactions from '@mysten/sui/transactions';
2
2
  import { Transaction, TransactionObjectArgument, TransactionArgument, Argument } from '@mysten/sui/transactions';
3
3
  import * as _mysten_sui_jsonRpc from '@mysten/sui/jsonRpc';
4
- import { EventId, DynamicFieldInfo, SuiTransactionBlockResponse, CoinMetadata, SuiValidatorSummary, ValidatorsApy, SuiSystemStateSummary, SuiObjectResponse, CoinStruct, SuiEvent, Unsubscribe, SuiEventFilter, TransactionEffects, SuiObjectDataOptions, SuiObjectDataFilter, SuiTransactionBlockResponseQuery, SuiJsonRpcClient, DynamicFieldName, DisplayFieldsResponse } from '@mysten/sui/jsonRpc';
4
+ import { EventId, DynamicFieldInfo, SuiTransactionBlockResponse, CoinMetadata, SuiValidatorSummary, ValidatorsApy, SuiSystemStateSummary, SuiObjectResponse, CoinStruct, SuiEvent, SuiEventFilter, TransactionEffects, SuiObjectDataOptions, SuiObjectDataFilter, SuiTransactionBlockResponseQuery, SuiJsonRpcClient, DynamicFieldName, DisplayFieldsResponse } from '@mysten/sui/jsonRpc';
5
5
  import { MultiSigPublicKey } from '@mysten/sui/multisig';
6
- import { ManipulateType, QUnitType, OpUnitType } from 'dayjs';
7
6
  import { BcsType } from '@mysten/sui/bcs';
8
7
  import { Keypair } from '@mysten/sui/cryptography';
9
8
 
@@ -350,6 +349,7 @@ interface CallerConfig {
350
349
  }
351
350
  interface ApiTransactionResponse {
352
351
  txKind: SerializedTransaction;
352
+ sponsorSignature?: string;
353
353
  }
354
354
  interface SdkTransactionResponse {
355
355
  tx: Transaction;
@@ -1482,6 +1482,57 @@ interface ApiNftAmmWithdrawBody {
1482
1482
  referrer?: SuiAddress;
1483
1483
  }
1484
1484
 
1485
+ /**
1486
+ * Semantic capability type for composed-flow transfers.
1487
+ *
1488
+ * Used by `getTransferCapTx` (Method 2) to specify which kind of capability
1489
+ * is being transferred without exposing Move type tags.
1490
+ */
1491
+ type PerpetualsCapType = "accountAdmin" | "accountAgent" | "vaultAdmin" | "vaultAgent";
1492
+ /**
1493
+ * Configuration for gas pool sponsorship on perpetuals transactions.
1494
+ *
1495
+ * When provided, the transaction will include a gas pool sponsor rebate step
1496
+ * that debits the specified wallet's gas pool.
1497
+ */
1498
+ interface PerpetualsSponsorConfig {
1499
+ /** Wallet address to use for gas pool sponsorship. */
1500
+ walletAddress: SuiAddress;
1501
+ }
1502
+ /**
1503
+ * Configuration for gas pool sponsorship on perpetuals transactions.
1504
+ *
1505
+ * When provided, the transaction will include a gas pool sponsor rebate step
1506
+ * that debits the specified wallet's gas pool.
1507
+ */
1508
+ interface PerpetualsSponsorConfig {
1509
+ /** Wallet address to use for gas pool sponsorship. */
1510
+ walletAddress: SuiAddress;
1511
+ }
1512
+ /**
1513
+ * PTB argument references returned by deferred `create_account` for use
1514
+ * in downstream composed endpoints (share-account, grant-agent-wallet, etc.).
1515
+ */
1516
+ interface DeferredAccountArgs {
1517
+ /** Argument reference for the created Account object. */
1518
+ accountArg: TransactionObjectArgument;
1519
+ /** Argument reference for the AccountSharePolicy. */
1520
+ sharePolicyArg: TransactionObjectArgument;
1521
+ /** Argument reference for the AccountCap<ADMIN>. */
1522
+ adminCapArg: TransactionObjectArgument;
1523
+ /** Collateral type for the account. */
1524
+ collateralCoinType: CoinType;
1525
+ }
1526
+ /**
1527
+ * PTB argument reference + semantic capability type for composed-flow
1528
+ * party transfers.
1529
+ */
1530
+ interface ComposedTransferArgs {
1531
+ /** PTB argument reference for the object to transfer. */
1532
+ objectArg: TransactionObjectArgument;
1533
+ /** Semantic capability type being transferred. */
1534
+ capType: PerpetualsCapType;
1535
+ }
1485
1536
  /**
1486
1537
  * Unique identifier for a perpetuals market, represented as a Sui object ID
1487
1538
  * (i.e. the `ClearingHouse` object on-chain).
@@ -1554,6 +1605,46 @@ declare enum PerpetualsStopOrderType {
1554
1605
  */
1555
1606
  Standalone = 1
1556
1607
  }
1608
+ /**
1609
+ * Execution details for a stop order that has been executed.
1610
+ */
1611
+ type PerpetualsExecutionInfo = {
1612
+ notSpecified: {};
1613
+ } | {
1614
+ standaloneExecuted: {
1615
+ executionPrice: number;
1616
+ };
1617
+ } | {
1618
+ stopLossExecuted: {
1619
+ executionPrice: number;
1620
+ };
1621
+ } | {
1622
+ takeProfitExecuted: {
1623
+ executionPrice: number;
1624
+ };
1625
+ };
1626
+ /**
1627
+ * Current state of a stop order in its lifecycle.
1628
+ */
1629
+ type PerpetualsOrderState = {
1630
+ unknown: {};
1631
+ } | {
1632
+ invalid: {
1633
+ error: string;
1634
+ };
1635
+ } | {
1636
+ pending: {};
1637
+ } | {
1638
+ active: {};
1639
+ } | {
1640
+ executed: PerpetualsExecutionInfo;
1641
+ } | {
1642
+ cancelled: {};
1643
+ } | {
1644
+ inExecution: {};
1645
+ } | {
1646
+ toCancel: {};
1647
+ };
1557
1648
  /**
1558
1649
  * Aggregate market configuration and state for a single perpetuals market.
1559
1650
  */
@@ -1645,6 +1736,8 @@ interface PerpetualsVaultLpCoin {
1645
1736
  lpAmount: Balance;
1646
1737
  /** Estimated USD value of `lpAmount` at query time. */
1647
1738
  lpAmountUsd: number;
1739
+ /** USD value of the deposit. */
1740
+ depositedAmountUsd: number;
1648
1741
  }
1649
1742
  /**
1650
1743
  * Aggregate position data for a single perpetuals market and account.
@@ -1915,6 +2008,8 @@ interface PerpetualsBuilderCodeParamaters {
1915
2008
  interface PerpetualsStopOrderData {
1916
2009
  /** ID of the stop order object on-chain. */
1917
2010
  objectId: ObjectId;
2011
+ /** Current state of the stop order in its lifecycle. */
2012
+ orderState: PerpetualsOrderState;
1918
2013
  /** Market the stop order is tied to. */
1919
2014
  marketId: PerpetualsMarketId;
1920
2015
  /** Size to execute when triggered (scaled base units). */
@@ -2204,6 +2299,13 @@ interface PerpetualsVaultObject {
2204
2299
  pausedUntilTimestamp: bigint | undefined;
2205
2300
  /** Timestamp at which `pause_vault_for_force_withdraw` was last called. */
2206
2301
  lastPausedTimestamp: Timestamp;
2302
+ /**
2303
+ * The amount of LP tokens locked by the vault owner (native units).
2304
+ *
2305
+ * This is the owner's initially locked liquidity, a portion of which can be
2306
+ * withdrawn via the owner locked liquidity withdraw flow.
2307
+ */
2308
+ ownerLockedLpBalance: Balance;
2207
2309
  }
2208
2310
  /**
2209
2311
  * Represents a single pending vault withdrawal request.
@@ -2321,10 +2423,22 @@ interface PerpetualsAccountMarginHistoryData {
2321
2423
  availableCollateralUsd: number;
2322
2424
  /** Total equity in USD. */
2323
2425
  totalEquityUsd: number;
2324
- /** Unrealized funding PnL in USD at that time. */
2325
- unrealizedFundingsUsd: number;
2326
- /** Unrealized position PnL in USD at that time. */
2327
- unrealizedPnlUsd: number;
2426
+ /** Realized funding PnL in USD at that time. */
2427
+ realizedFundingsUsd: number;
2428
+ /** Realized position PnL in USD at that time. */
2429
+ realizedPnlUsd: number;
2430
+ /** Taker volume in USD at that time. */
2431
+ takerVolumeUsd: number;
2432
+ /** Maker volume in USD at that time. */
2433
+ makerVolumeUsd: number;
2434
+ /** Taker fees in USD at that time. */
2435
+ takerFeesUsd: number;
2436
+ /** Maker fees in USD at that time. */
2437
+ makerFeesUsd: number;
2438
+ /** Liquidated fees in USD at that time. */
2439
+ liquidatedFeesUsd: number;
2440
+ /** Liquidator fees in USD at that time. */
2441
+ liquidatorFeesUsd: number;
2328
2442
  }
2329
2443
  /**
2330
2444
  * Individual order affecting an account.
@@ -2360,6 +2474,12 @@ type PerpetualsAccountOrderHistoryData = {
2360
2474
  /** Index price at which the stop order should trigger. */
2361
2475
  stopIndexPrice: number;
2362
2476
  };
2477
+ /** Optional order ID. */
2478
+ orderId?: string;
2479
+ /** Realized PnL for this order event, if applicable. */
2480
+ pnl?: number;
2481
+ /** Fees charged for this order event, if applicable. */
2482
+ fees?: number;
2363
2483
  };
2364
2484
  /**
2365
2485
  * Event emitted when collateral is deposited into an account.
@@ -2772,6 +2892,13 @@ interface ApiPerpetualsAdminAccountCapsResponse {
2772
2892
  interface ApiPerpetualsOwnedAccountCapsResponse {
2773
2893
  accountCaps: PerpetualsAccountCap[];
2774
2894
  }
2895
+ /**
2896
+ * Discrete event type recorded in user history responses
2897
+ * (trade, collateral, etc.).
2898
+ *
2899
+ * Serialized as PascalCase strings on the wire.
2900
+ */
2901
+ type UserHistoryEventType = "PostedOrder" | "CanceledOrder" | "FilledTakerOrder" | "FilledMakerOrder" | "LiquidatedPosition" | "PerformedLiquidation" | "PerformedADL" | "DepositedCollateral" | "WithdrewCollateral" | "AllocatedCollateral" | "DeallocatedCollateral" | "SettledFunding" | "CreatedStopOrderTicket" | "DeletedStopOrderTicket" | "ExecutedStopOrderTicket";
2775
2902
  /**
2776
2903
  * Generic shape for Perpetuals API historical data requests that include
2777
2904
  * `beforeTimestampCursor` and `limit` pagination parameters.
@@ -2839,6 +2966,12 @@ type ApiPerpetualsAccountOrderHistoryBody = ApiPerpetualsHistoricalDataWithCurso
2839
2966
  bytes: string;
2840
2967
  signature: string;
2841
2968
  };
2969
+ /**
2970
+ * Optional filter restricting results to the specified event types.
2971
+ *
2972
+ * When omitted, the backend returns events of all types.
2973
+ */
2974
+ eventTypes?: UserHistoryEventType[];
2842
2975
  };
2843
2976
  /**
2844
2977
  * Request body for fetching account collateral history with a cursor.
@@ -2850,6 +2983,12 @@ type ApiPerpetualsAccountCollateralHistoryBody = ApiPerpetualsHistoricalDataWith
2850
2983
  bytes: string;
2851
2984
  signature: string;
2852
2985
  };
2986
+ /**
2987
+ * Optional filter restricting results to the specified event types.
2988
+ *
2989
+ * When omitted, the backend returns events of all types.
2990
+ */
2991
+ eventTypes?: UserHistoryEventType[];
2853
2992
  };
2854
2993
  /**
2855
2994
  * Request body for previewing a market order placement (before sending a tx).
@@ -2877,6 +3016,37 @@ type ApiPerpetualsPreviewPlaceLimitOrderBody = Omit<ApiPerpetualsLimitOrderBody,
2877
3016
  } | {
2878
3017
  vaultId: ObjectId | undefined;
2879
3018
  });
3019
+ /**
3020
+ * Request body for previewing a scale order placement (before sending a tx).
3021
+ */
3022
+ type ApiPerpetualsPreviewPlaceScaleOrderBody = {
3023
+ marketId: PerpetualsMarketId;
3024
+ side: PerpetualsOrderSide;
3025
+ /** Total size distributed across all orders (scaled bigint). */
3026
+ totalSize: bigint;
3027
+ /** Starting price of the scale range (inclusive, scaled bigint). */
3028
+ startPrice: bigint;
3029
+ /** Ending price of the scale range (inclusive, scaled bigint). */
3030
+ endPrice: bigint;
3031
+ /** Number of limit orders to place across the range. */
3032
+ numberOfOrders: number;
3033
+ /** Order type (e.g. GTC, IOC). */
3034
+ orderType: PerpetualsOrderType;
3035
+ /** If true, orders can only reduce an existing position. */
3036
+ reduceOnly: boolean;
3037
+ /** Optional leverage override. */
3038
+ leverage?: number;
3039
+ /** Size ratio between last and first order. `1.0` = uniform, `2.0` = last is 2x first. */
3040
+ sizeSkew?: number;
3041
+ /** Optional integrator fee configuration. */
3042
+ builderCode?: PerpetualsBuilderCodeParamaters;
3043
+ /** Optional expiration timestamp in milliseconds since epoch. */
3044
+ expiryTimestamp?: bigint;
3045
+ } & ({
3046
+ accountId: PerpetualsAccountId | undefined;
3047
+ } | {
3048
+ vaultId: ObjectId | undefined;
3049
+ });
2880
3050
  /**
2881
3051
  * Request body for previewing cancel-order operations.
2882
3052
  */
@@ -3038,6 +3208,61 @@ interface ApiPerpetualsMarketCandleHistoryBody {
3038
3208
  interface ApiPerpetualsMarketCandleHistoryResponse {
3039
3209
  candles: PerpetualsMarketCandleDataPoint[];
3040
3210
  }
3211
+ /**
3212
+ * Request payload for fetching historical funding rate data for a given
3213
+ * perpetuals market.
3214
+ */
3215
+ interface ApiPerpetualsMarketFundingHistoryBody {
3216
+ /** Market ID to query. Must be a valid on-chain market ID. */
3217
+ marketId: PerpetualsMarketId;
3218
+ /** Start of the time range to query (Unix timestamp in **milliseconds**). */
3219
+ fromTimestamp: Timestamp;
3220
+ /** End of the time range to query (Unix timestamp in **milliseconds**). */
3221
+ toTimestamp: Timestamp;
3222
+ /** Maximum number of funding points to return. */
3223
+ limit?: number;
3224
+ }
3225
+ /**
3226
+ * Single funding rate datapoint for a perpetuals market at a given timestamp.
3227
+ *
3228
+ * Funding rate fields are expressed as fractions: `0.01` = `1%`.
3229
+ */
3230
+ interface PerpetualsMarketFundingHistoryPoint {
3231
+ /** Identifier of the perpetuals market. */
3232
+ marketId: PerpetualsMarketId;
3233
+ /** Timestamp at which this funding point was recorded (ms). */
3234
+ timestamp: Timestamp;
3235
+ /** On-chain event timestamp (ms). */
3236
+ eventTimestamp: Timestamp;
3237
+ /**
3238
+ * Funding rate applied to long positions for this period, as a fraction
3239
+ * (e.g. `0.01` = `1%`).
3240
+ */
3241
+ longFundingRate: Percentage;
3242
+ /**
3243
+ * Funding rate applied to short positions for this period, as a fraction
3244
+ * (e.g. `0.01` = `1%`).
3245
+ */
3246
+ shortFundingRate: Percentage;
3247
+ /**
3248
+ * Cumulative funding rate accrued by long positions up to this point, as
3249
+ * a fraction (e.g. `0.01` = `1%`).
3250
+ */
3251
+ cumulativeLongFundingRate: Percentage;
3252
+ /**
3253
+ * Cumulative funding rate accrued by short positions up to this point, as
3254
+ * a fraction (e.g. `0.01` = `1%`).
3255
+ */
3256
+ cumulativeShortFundingRate: Percentage;
3257
+ /** Sui transaction digest associated with this funding event. */
3258
+ txDigest: TransactionDigest;
3259
+ }
3260
+ /**
3261
+ * Response type for historical market funding data.
3262
+ */
3263
+ interface ApiPerpetualsMarketFundingHistoryResponse {
3264
+ history: PerpetualsMarketFundingHistoryPoint[];
3265
+ }
3041
3266
  /**
3042
3267
  * Request body for computing the maximum order size for an account in a
3043
3268
  * given market.
@@ -3088,6 +3313,7 @@ interface ApiPerpetualsStopOrderDatasResponse {
3088
3313
  */
3089
3314
  interface ApiPerpetualsCreateVaultCapBody {
3090
3315
  walletAddress: SuiAddress;
3316
+ sponsor?: PerpetualsSponsorConfig;
3091
3317
  lpCoinMetadata: {
3092
3318
  /** Name for the token */
3093
3319
  name: string;
@@ -3142,6 +3368,7 @@ type ApiPerpetualsCreateVaultBody = {
3142
3368
  forceWithdrawDelayMs: bigint;
3143
3369
  txKind?: SerializedTransaction;
3144
3370
  isSponsoredTx?: boolean;
3371
+ sponsor?: PerpetualsSponsorConfig;
3145
3372
  } & ({
3146
3373
  initialDepositAmount: Balance;
3147
3374
  } | {
@@ -3180,6 +3407,7 @@ interface ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody {
3180
3407
  * If provided, the new integrator approval will be added to this transaction.
3181
3408
  */
3182
3409
  txKind?: SerializedTransaction;
3410
+ sponsor?: PerpetualsSponsorConfig;
3183
3411
  }
3184
3412
  /**
3185
3413
  * Request payload for creating a transaction to revoke an integrator's permissions.
@@ -3207,6 +3435,7 @@ interface ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody {
3207
3435
  * If provided, the integrator removal will be added to this transaction.
3208
3436
  */
3209
3437
  txKind?: SerializedTransaction;
3438
+ sponsor?: PerpetualsSponsorConfig;
3210
3439
  }
3211
3440
  /**
3212
3441
  * Request payload for creating a transaction to initialize an integrator fee vault.
@@ -3234,6 +3463,7 @@ interface ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody {
3234
3463
  * If provided, the vault creation will be added to this transaction.
3235
3464
  */
3236
3465
  txKind?: SerializedTransaction;
3466
+ sponsor?: PerpetualsSponsorConfig;
3237
3467
  }
3238
3468
  /**
3239
3469
  * Request payload for creating a transaction to claim accumulated integrator fees from a vault.
@@ -3401,6 +3631,22 @@ interface ApiPerpetualsCreateAccountBody {
3401
3631
  walletAddress: SuiAddress;
3402
3632
  collateralCoinType: CoinType;
3403
3633
  txKind?: SerializedTransaction;
3634
+ deferShare?: boolean;
3635
+ sponsor?: PerpetualsSponsorConfig;
3636
+ }
3637
+ /**
3638
+ * Response from the create-account endpoint.
3639
+ *
3640
+ * When `deferShare` is false (default), returns `txKind` and optionally `sponsorSignature`.
3641
+ * When `deferShare` is true, additionally returns `deferred` with argument references
3642
+ * for PTB composition.
3643
+ */
3644
+ interface ApiPerpetualsCreateAccountResponse {
3645
+ txKind: SerializedTransaction;
3646
+ sponsorSignature?: string;
3647
+ /** Deferred account argument references for downstream composition
3648
+ * (only set when `deferShare = true`). */
3649
+ deferred?: DeferredAccountArgs;
3404
3650
  }
3405
3651
  /**
3406
3652
  * Request body for depositing collateral into a perpetuals account.
@@ -3416,6 +3662,7 @@ type ApiPerpetualsDepositCollateralBody = {
3416
3662
  collateralCoinType: CoinType;
3417
3663
  txKind?: SerializedTransaction;
3418
3664
  isSponsoredTx?: boolean;
3665
+ sponsor?: PerpetualsSponsorConfig;
3419
3666
  } & ({
3420
3667
  depositAmount: Balance;
3421
3668
  } | {
@@ -3429,6 +3676,7 @@ type ApiPerpetualsWithdrawCollateralBody = {
3429
3676
  withdrawAmount: Balance;
3430
3677
  recipientAddress?: SuiAddress;
3431
3678
  txKind?: SerializedTransaction;
3679
+ sponsor?: PerpetualsSponsorConfig;
3432
3680
  };
3433
3681
  /**
3434
3682
  * Response body for withdraw-collateral transactions.
@@ -3437,6 +3685,7 @@ type ApiPerpetualsWithdrawCollateralBody = {
3437
3685
  */
3438
3686
  interface ApiPerpetualsWithdrawCollateralResponse {
3439
3687
  txKind: SerializedTransaction;
3688
+ sponsorSignature?: string;
3440
3689
  coinOutArg: TransactionObjectArgument | undefined;
3441
3690
  }
3442
3691
  /**
@@ -3450,6 +3699,7 @@ interface ApiPerpetualsTransferCollateralBody {
3450
3699
  toAccountCapId?: ObjectId;
3451
3700
  transferAmount: Balance;
3452
3701
  txKind?: SerializedTransaction;
3702
+ sponsor?: PerpetualsSponsorConfig;
3453
3703
  }
3454
3704
  /**
3455
3705
  * Request body for allocating collateral to a given market (account/vault).
@@ -3457,7 +3707,14 @@ interface ApiPerpetualsTransferCollateralBody {
3457
3707
  type ApiPerpetualsAllocateCollateralBody = {
3458
3708
  marketId: PerpetualsMarketId;
3459
3709
  allocateAmount: Balance;
3710
+ /**
3711
+ * Caller wallet. For vault-backed accounts, when the caller is a vault
3712
+ * assistant (rather than the vault owner), the backend uses this to
3713
+ * resolve the correct assistant cap.
3714
+ */
3715
+ walletAddress?: SuiAddress;
3460
3716
  txKind?: SerializedTransaction;
3717
+ sponsor?: PerpetualsSponsorConfig;
3461
3718
  } & ({
3462
3719
  accountId: PerpetualsAccountId;
3463
3720
  accountCapId?: ObjectId;
@@ -3470,7 +3727,14 @@ type ApiPerpetualsAllocateCollateralBody = {
3470
3727
  type ApiPerpetualsDeallocateCollateralBody = {
3471
3728
  marketId: PerpetualsMarketId;
3472
3729
  deallocateAmount: Balance;
3730
+ /**
3731
+ * Caller wallet. For vault-backed accounts, when the caller is a vault
3732
+ * assistant (rather than the vault owner), the backend uses this to
3733
+ * resolve the correct assistant cap.
3734
+ */
3735
+ walletAddress?: SuiAddress;
3473
3736
  txKind?: SerializedTransaction;
3737
+ sponsor?: PerpetualsSponsorConfig;
3474
3738
  } & ({
3475
3739
  accountId: PerpetualsAccountId;
3476
3740
  accountCapId?: ObjectId;
@@ -3484,22 +3748,25 @@ type ApiPerpetualsDeallocateCollateralBody = {
3484
3748
  */
3485
3749
  interface SdkPerpetualsPlaceStopOrdersInputs {
3486
3750
  /** Stop orders to place (without objectId, which is created on-chain). */
3487
- stopOrders: Omit<PerpetualsStopOrderData, "objectId">[];
3751
+ stopOrders: Omit<PerpetualsStopOrderData, "objectId" | "orderState">[];
3488
3752
  /** Optional transaction to embed the call in. */
3489
3753
  tx?: Transaction;
3490
3754
  /** Optional gas coin for sponsored or custom gas usage. */
3491
3755
  gasCoinArg?: TransactionObjectArgument;
3492
3756
  /** Whether the transaction is expected to be sponsored by the API. */
3493
3757
  isSponsoredTx?: boolean;
3758
+ /** Optional gas pool sponsorship configuration. */
3759
+ sponsor?: PerpetualsSponsorConfig;
3494
3760
  }
3495
3761
  /**
3496
3762
  * Request body for placing stop orders via the API.
3497
3763
  */
3498
3764
  type ApiPerpetualsPlaceStopOrdersBody = {
3499
3765
  walletAddress: SuiAddress;
3500
- stopOrders: Omit<PerpetualsStopOrderData, "objectId">[];
3766
+ stopOrders: Omit<PerpetualsStopOrderData, "objectId" | "orderState">[];
3501
3767
  gasCoinArg?: TransactionObjectArgument;
3502
3768
  isSponsoredTx?: boolean;
3769
+ sponsor?: PerpetualsSponsorConfig;
3503
3770
  txKind?: SerializedTransaction;
3504
3771
  } & ({
3505
3772
  accountId: PerpetualsAccountId;
@@ -3527,6 +3794,8 @@ type SdkPerpetualsPlaceSlTpOrdersInputs = {
3527
3794
  gasCoinArg?: TransactionObjectArgument;
3528
3795
  /** Whether to treat the transaction as sponsored. */
3529
3796
  isSponsoredTx?: boolean;
3797
+ /** Optional gas pool sponsorship configuration. */
3798
+ sponsor?: PerpetualsSponsorConfig;
3530
3799
  };
3531
3800
  /**
3532
3801
  * API request body for placing SL/TP orders bound to a position.
@@ -3541,6 +3810,7 @@ type ApiPerpetualsPlaceSlTpOrdersBody = {
3541
3810
  limitOrderId?: PerpetualsOrderId;
3542
3811
  gasCoinArg?: TransactionObjectArgument;
3543
3812
  isSponsoredTx?: boolean;
3813
+ sponsor?: PerpetualsSponsorConfig;
3544
3814
  leverage?: number;
3545
3815
  txKind?: SerializedTransaction;
3546
3816
  } & ({
@@ -3555,7 +3825,14 @@ type ApiPerpetualsPlaceSlTpOrdersBody = {
3555
3825
  */
3556
3826
  type ApiPerpetualsEditStopOrdersBody = {
3557
3827
  stopOrders: PerpetualsStopOrderData[];
3828
+ /**
3829
+ * Caller wallet. For vault-backed accounts, when the caller is a vault
3830
+ * assistant (rather than the vault owner), the backend uses this to
3831
+ * resolve the correct assistant cap.
3832
+ */
3833
+ walletAddress?: SuiAddress;
3558
3834
  txKind?: SerializedTransaction;
3835
+ sponsor?: PerpetualsSponsorConfig;
3559
3836
  } & ({
3560
3837
  accountId: PerpetualsAccountId;
3561
3838
  accountCapId?: ObjectId;
@@ -3605,6 +3882,7 @@ type ApiPerpetualsMarketOrderBody = {
3605
3882
  builderCode?: PerpetualsBuilderCodeParamaters;
3606
3883
  /** Optional serialized transaction kind if assembled by the API. */
3607
3884
  txKind?: SerializedTransaction;
3885
+ sponsor?: PerpetualsSponsorConfig;
3608
3886
  } & ({
3609
3887
  accountId: PerpetualsAccountId;
3610
3888
  accountCapId?: ObjectId;
@@ -3655,6 +3933,92 @@ type ApiPerpetualsLimitOrderBody = {
3655
3933
  builderCode?: PerpetualsBuilderCodeParamaters;
3656
3934
  /** Optionally pre-built transaction payload. */
3657
3935
  txKind?: SerializedTransaction;
3936
+ sponsor?: PerpetualsSponsorConfig;
3937
+ } & ({
3938
+ accountId: PerpetualsAccountId;
3939
+ accountCapId?: ObjectId;
3940
+ } | {
3941
+ vaultId: ObjectId;
3942
+ });
3943
+ /**
3944
+ * API request body for placing a scale order (multiple limit orders
3945
+ * distributed across a price range) in a given market.
3946
+ */
3947
+ type ApiPerpetualsScaleOrderBody = {
3948
+ walletAddress: SuiAddress;
3949
+ marketId: PerpetualsMarketId;
3950
+ side: PerpetualsOrderSide;
3951
+ /** Total size distributed across all orders (base asset amount, scaled bigint). */
3952
+ totalSize: bigint;
3953
+ /** Starting price of the scale range (inclusive, scaled bigint). */
3954
+ startPrice: bigint;
3955
+ /** Ending price of the scale range (inclusive, scaled bigint). */
3956
+ endPrice: bigint;
3957
+ /** Number of limit orders to place across the range. */
3958
+ numberOfOrders: number;
3959
+ /** Order type (e.g. GTC, IOC). */
3960
+ orderType: PerpetualsOrderType;
3961
+ /** Collateral change associated with this order. */
3962
+ collateralChange: number;
3963
+ /** Whether the account already has a position in this market. */
3964
+ hasPosition: boolean;
3965
+ /** If true, orders can only reduce an existing position. */
3966
+ reduceOnly: boolean;
3967
+ /** True if position is closed. */
3968
+ cancelSlTp: boolean;
3969
+ /** Optional expiration timestamp in milliseconds since epoch. */
3970
+ expiryTimestamp?: bigint;
3971
+ /** Optional leverage override. */
3972
+ leverage?: number;
3973
+ /** Size ratio between last and first order. `1.0` = uniform, `2.0` = last is 2x first. */
3974
+ sizeSkew?: number;
3975
+ /** Optional integrator fee configuration. */
3976
+ builderCode?: PerpetualsBuilderCodeParamaters;
3977
+ /** Optionally pre-built transaction payload. */
3978
+ txKind?: SerializedTransaction;
3979
+ sponsor?: PerpetualsSponsorConfig;
3980
+ } & ({
3981
+ accountId: PerpetualsAccountId;
3982
+ accountCapId?: ObjectId;
3983
+ } | {
3984
+ vaultId: ObjectId;
3985
+ });
3986
+ /**
3987
+ * A single order to place as part of a cancel-and-place batch.
3988
+ */
3989
+ type ApiPerpetualsOrderToPlace = {
3990
+ /** Order side: `0` = bid (long), `1` = ask (short). */
3991
+ side: PerpetualsOrderSide;
3992
+ /** Limit price (scaled bigint). */
3993
+ price: bigint;
3994
+ /** Order size in scaled base units. */
3995
+ size: bigint;
3996
+ };
3997
+ /**
3998
+ * API request body for atomically canceling existing orders and placing
3999
+ * new ones in a single transaction.
4000
+ */
4001
+ type ApiPerpetualsCancelAndPlaceOrdersBody = {
4002
+ walletAddress: SuiAddress;
4003
+ marketId: PerpetualsMarketId;
4004
+ /** Order IDs to cancel. */
4005
+ orderIdsToCancel: PerpetualsOrderId[];
4006
+ /** New orders to place after the cancellation. */
4007
+ ordersToPlace: ApiPerpetualsOrderToPlace[];
4008
+ /** Order type (e.g. GTC, IOC). */
4009
+ orderType: PerpetualsOrderType;
4010
+ /** If true, placed orders can only reduce an existing position. */
4011
+ reduceOnly: boolean;
4012
+ /** Optional expiration timestamp in milliseconds since epoch. */
4013
+ expiryTimestamp?: bigint;
4014
+ /** Optional leverage override. */
4015
+ leverage?: number;
4016
+ /** Whether the account already has a position in this market. */
4017
+ hasPosition: boolean;
4018
+ /** Optional integrator fee configuration. */
4019
+ builderCode?: PerpetualsBuilderCodeParamaters;
4020
+ /** Optionally pre-built transaction payload. */
4021
+ txKind?: SerializedTransaction;
3658
4022
  } & ({
3659
4023
  accountId: PerpetualsAccountId;
3660
4024
  accountCapId?: ObjectId;
@@ -3673,6 +4037,7 @@ type ApiPerpetualsCancelOrdersBody = {
3673
4037
  collateralChange: number;
3674
4038
  }>;
3675
4039
  txKind?: SerializedTransaction;
4040
+ sponsor?: PerpetualsSponsorConfig;
3676
4041
  } & ({
3677
4042
  accountId: PerpetualsAccountId;
3678
4043
  accountCapId?: ObjectId;
@@ -3683,8 +4048,10 @@ type ApiPerpetualsCancelOrdersBody = {
3683
4048
  * API request body for canceling stop orders identified by object IDs.
3684
4049
  */
3685
4050
  type ApiPerpetualsCancelStopOrdersBody = {
4051
+ walletAddress: SuiAddress;
3686
4052
  stopOrderIds: ObjectId[];
3687
4053
  txKind?: SerializedTransaction;
4054
+ sponsor?: PerpetualsSponsorConfig;
3688
4055
  } & ({
3689
4056
  accountId: PerpetualsAccountId;
3690
4057
  accountCapId?: ObjectId;
@@ -3698,7 +4065,14 @@ type ApiPerpetualsSetLeverageTxBody = {
3698
4065
  marketId: PerpetualsMarketId;
3699
4066
  collateralChange: number;
3700
4067
  leverage: number;
4068
+ /**
4069
+ * Caller wallet. For vault-backed accounts, when the caller is a vault
4070
+ * assistant (rather than the vault owner), the backend uses this to
4071
+ * resolve the correct assistant cap.
4072
+ */
4073
+ walletAddress?: SuiAddress;
3701
4074
  txKind?: SerializedTransaction;
4075
+ sponsor?: PerpetualsSponsorConfig;
3702
4076
  } & ({
3703
4077
  accountId: PerpetualsAccountId;
3704
4078
  accountCapId?: ObjectId;
@@ -3858,10 +4232,18 @@ interface ApiPerpetualsMarketsPricesResponse {
3858
4232
  * The resulting on-chain transaction must be signed by the **account admin** wallet.
3859
4233
  * After execution, `recipientAddress` receives assistant-level permissions for `accountId`
3860
4234
  * (trading actions are allowed, but **withdrawing collateral** and managing other agent wallets are not).
4235
+ *
4236
+ * ### Methods
4237
+ * - **Method 1 (existing account)**: Provide `accountId`.
4238
+ * - **Method 2 (composed flow)**: Provide `deferred` with argument references
4239
+ * from a deferred `getCreateAccountTx` call.
3861
4240
  */
3862
4241
  type ApiPerpetualsGrantAgentWalletTxBody = {
3863
4242
  recipientAddress: SuiAddress;
3864
- accountId: PerpetualsAccountId;
4243
+ /** Perpetuals account ID (Method 1). */
4244
+ accountId?: PerpetualsAccountId;
4245
+ /** Composed PTB args from deferred create-account (Method 2). */
4246
+ deferred?: DeferredAccountArgs;
3865
4247
  txKind?: SerializedTransaction;
3866
4248
  };
3867
4249
  /**
@@ -3887,16 +4269,46 @@ type ApiPerpetualsTransferCapTxBody = {
3887
4269
  /**
3888
4270
  * Object ID of the capability to transfer.
3889
4271
  *
3890
- * This should be the object ID of the cap being transferred (e.g., an account cap or vault cap).
4272
+ * Required for Method 1 (on-chain object); omit for Method 2 (composed flow).
3891
4273
  */
3892
- capObjectId: ObjectId;
4274
+ capObjectId?: ObjectId;
4275
+ /**
4276
+ * Composed PTB argument + capability type from a deferred flow.
4277
+ *
4278
+ * Required for Method 2 (composed flow); omit for Method 1.
4279
+ */
4280
+ composed?: ComposedTransferArgs;
3893
4281
  /**
3894
4282
  * Optional serialized (base64) Sui `TransactionKind` to extend.
3895
4283
  *
3896
4284
  * When provided, the transfer operation is appended to the existing transaction.
3897
4285
  */
3898
4286
  txKind?: SerializedTransaction;
4287
+ sponsor?: PerpetualsSponsorConfig;
3899
4288
  };
4289
+ /**
4290
+ * Request body for sharing a Perpetuals account that was created with deferred sharing.
4291
+ *
4292
+ * This finalizes the account creation flow by consuming the `AccountSharePolicy`
4293
+ * and sharing the `Account` object.
4294
+ *
4295
+ * The deferred account fields (`accountArg`, `sharePolicyArg`, `adminCapArg`,
4296
+ * `collateralCoinType`) are sent as top-level fields (matching the API's flattened layout).
4297
+ *
4298
+ * ### Example flow
4299
+ * 1. `create-account` with `deferShare=true` → returns `deferred` with argument references
4300
+ * 2. `grant-agent-wallet` with `deferred` → mints assistant cap
4301
+ * 3. `transfer-cap` with `composed` → transfers admin cap to primary wallet
4302
+ * 4. `share` with deferred fields → finalizes account sharing
4303
+ */
4304
+ interface ApiPerpetualsShareAccountBody {
4305
+ accountArg: TransactionObjectArgument;
4306
+ sharePolicyArg: TransactionObjectArgument;
4307
+ adminCapArg: TransactionObjectArgument;
4308
+ collateralCoinType: CoinType;
4309
+ txKind?: SerializedTransaction;
4310
+ sponsor?: PerpetualsSponsorConfig;
4311
+ }
3900
4312
  /**
3901
4313
  * Request body for fetching LP coin prices for a set of vaults.
3902
4314
  *
@@ -3941,6 +4353,23 @@ interface ApiPerpetualsOwnedVaultCapsBody {
3941
4353
  interface ApiPerpetualsOwnedVaultCapsResponse {
3942
4354
  ownedVaultCaps: PerpetualsVaultCap[];
3943
4355
  }
4356
+ /**
4357
+ * Request body for fetching vault **assistant** capability objects owned by a
4358
+ * wallet.
4359
+ *
4360
+ * Assistant caps let a non-owner wallet operate a vault on behalf of the
4361
+ * owner. They are structurally identical to regular vault caps but grant a
4362
+ * narrower permission set.
4363
+ */
4364
+ interface ApiPerpetualsOwnedVaultAssistantCapsBody {
4365
+ walletAddress: SuiAddress;
4366
+ }
4367
+ /**
4368
+ * Response payload listing all vault assistant caps owned by the wallet.
4369
+ */
4370
+ interface ApiPerpetualsOwnedVaultAssistantCapsResponse {
4371
+ ownedVaultAssistantCaps: PerpetualsVaultCap[];
4372
+ }
3944
4373
  /**
3945
4374
  * API body to process forced withdrawals in a vault.
3946
4375
  */
@@ -3951,6 +4380,7 @@ interface ApiPerpetualsVaultProcessForceWithdrawRequestTxBody {
3951
4380
  sizesToClose: Record<PerpetualsMarketId, Balance>;
3952
4381
  recipientAddress?: SuiAddress;
3953
4382
  txKind?: SerializedTransaction;
4383
+ sponsor?: PerpetualsSponsorConfig;
3954
4384
  }
3955
4385
  /**
3956
4386
  * Response body for force-withdraw processing transactions.
@@ -3961,11 +4391,13 @@ interface ApiPerpetualsVaultProcessForceWithdrawRequestTxBody {
3961
4391
  */
3962
4392
  interface ApiPerpetualsVaultProcessForceWithdrawRequestTxResponse {
3963
4393
  txKind: SerializedTransaction;
4394
+ sponsorSignature?: string;
3964
4395
  coinOutArg: TransactionObjectArgument | undefined;
3965
4396
  }
3966
4397
  interface ApiPerpetualsVaultPauseVaultForForceWithdrawRequestTxBody {
3967
4398
  vaultId: ObjectId;
3968
4399
  txKind?: SerializedTransaction;
4400
+ sponsor?: PerpetualsSponsorConfig;
3969
4401
  }
3970
4402
  /**
3971
4403
  * API body to process regular withdraw requests for a vault.
@@ -3974,6 +4406,7 @@ interface ApiPerpetualsVaultOwnerProcessWithdrawRequestsTxBody {
3974
4406
  vaultId: ObjectId;
3975
4407
  userAddresses: SuiAddress[];
3976
4408
  txKind?: SerializedTransaction;
4409
+ sponsor?: PerpetualsSponsorConfig;
3977
4410
  }
3978
4411
  /**
3979
4412
  * API body to update slippage parameter for pending vault withdraw
@@ -3983,6 +4416,7 @@ interface ApiPerpetualsVaultUpdateWithdrawRequestSlippageTxBody {
3983
4416
  vaultId: ObjectId;
3984
4417
  minCollateralAmountOut: Balance;
3985
4418
  txKind?: SerializedTransaction;
4419
+ sponsor?: PerpetualsSponsorConfig;
3986
4420
  }
3987
4421
  /**
3988
4422
  * API body to update the force-withdrawal delay in a vault.
@@ -3991,6 +4425,7 @@ interface ApiPerpetualsVaultOwnerUpdateForceWithdrawDelayTxBody {
3991
4425
  vaultId: ObjectId;
3992
4426
  forceWithdrawDelayMs: bigint;
3993
4427
  txKind?: SerializedTransaction;
4428
+ sponsor?: PerpetualsSponsorConfig;
3994
4429
  }
3995
4430
  /**
3996
4431
  * API body to update the lock period on a vault.
@@ -3999,6 +4434,7 @@ interface ApiPerpetualsVaultOwnerUpdateLockPeriodTxBody {
3999
4434
  vaultId: ObjectId;
4000
4435
  lockPeriodMs: bigint;
4001
4436
  txKind?: SerializedTransaction;
4437
+ sponsor?: PerpetualsSponsorConfig;
4002
4438
  }
4003
4439
  /**
4004
4440
  * API body to update the owner's fee percentage on a vault.
@@ -4007,6 +4443,7 @@ interface ApiPerpetualsVaultOwnerUpdatePerformanceFeeTxBody {
4007
4443
  vaultId: ObjectId;
4008
4444
  performanceFeePercentage: number;
4009
4445
  txKind?: SerializedTransaction;
4446
+ sponsor?: PerpetualsSponsorConfig;
4010
4447
  }
4011
4448
  /**
4012
4449
  * API body for the vault owner withdrawing collected fees.
@@ -4022,6 +4459,7 @@ interface ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxBody {
4022
4459
  */
4023
4460
  interface ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse {
4024
4461
  txKind: SerializedTransaction;
4462
+ sponsorSignature?: string;
4025
4463
  coinOutArg: TransactionObjectArgument | undefined;
4026
4464
  }
4027
4465
  /**
@@ -4061,6 +4499,7 @@ interface ApiPerpetualsVaultCreateWithdrawRequestTxBody {
4061
4499
  lpWithdrawAmount: Balance;
4062
4500
  minCollateralAmountOut: Balance;
4063
4501
  txKind?: SerializedTransaction;
4502
+ sponsor?: PerpetualsSponsorConfig;
4064
4503
  }
4065
4504
  /**
4066
4505
  * API body for withdrawing collateral from a vault as owner.
@@ -4078,6 +4517,24 @@ interface ApiPerpetualsVaultOwnerWithdrawCollateralTxBody {
4078
4517
  * The SDK typically uses `txKind` to reconstruct a transaction locally.
4079
4518
  */
4080
4519
  interface ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse {
4520
+ txKind: SerializedTransaction;
4521
+ sponsorSignature?: string;
4522
+ coinOutArg: TransactionObjectArgument | undefined;
4523
+ }
4524
+ /**
4525
+ * API body for withdrawing the vault owner's locked liquidity.
4526
+ */
4527
+ interface ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxBody {
4528
+ vaultId: ObjectId;
4529
+ amount: Balance;
4530
+ minCollateralAmountOut: Balance;
4531
+ recipientAddress?: SuiAddress;
4532
+ txKind?: SerializedTransaction;
4533
+ }
4534
+ /**
4535
+ * Response body for vault owner withdraw-locked-liquidity transactions.
4536
+ */
4537
+ interface ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse {
4081
4538
  txKind: SerializedTransaction;
4082
4539
  coinOutArg: TransactionObjectArgument | undefined;
4083
4540
  }
@@ -4088,6 +4545,7 @@ interface ApiPerpetualsVaultCancelWithdrawRequestTxBody {
4088
4545
  vaultId: ObjectId;
4089
4546
  walletAddress: SuiAddress;
4090
4547
  txKind?: SerializedTransaction;
4548
+ sponsor?: PerpetualsSponsorConfig;
4091
4549
  }
4092
4550
  /**
4093
4551
  * Request body for depositing into a vault.
@@ -4100,6 +4558,7 @@ type ApiPerpetualsVaultDepositTxBody = {
4100
4558
  minLpAmountOut: Balance;
4101
4559
  txKind?: SerializedTransaction;
4102
4560
  isSponsoredTx?: boolean;
4561
+ sponsor?: PerpetualsSponsorConfig;
4103
4562
  } & ({
4104
4563
  depositAmount: Balance;
4105
4564
  collateralCoinType: CoinType;
@@ -4139,6 +4598,22 @@ type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse = {
4139
4598
  collateralAmountOut: Balance;
4140
4599
  collateralPrice: number;
4141
4600
  };
4601
+ /**
4602
+ * Request body for previewing a vault owner locked liquidity withdrawal.
4603
+ */
4604
+ interface ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityBody {
4605
+ vaultId: ObjectId;
4606
+ amount: Balance;
4607
+ }
4608
+ /**
4609
+ * Response body for vault owner locked liquidity withdrawal preview.
4610
+ */
4611
+ type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityResponse = {
4612
+ error: string;
4613
+ } | {
4614
+ collateralAmountOut: Balance;
4615
+ collateralPrice: number;
4616
+ };
4142
4617
  /**
4143
4618
  * Request body for previewing a vault deposit.
4144
4619
  */
@@ -4221,6 +4696,147 @@ type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesResponse = {
4221
4696
  maxFeesToWithdraw: Balance;
4222
4697
  feeCoinType: CoinType;
4223
4698
  };
4699
+ /**
4700
+ * Request body for calculating rewards and rebates for perpetuals accounts.
4701
+ *
4702
+ * This corresponds to `POST /api/perpetuals/rebates/rewards`.
4703
+ *
4704
+ * Given maker and taker reward pools and a list of accounts, computes
4705
+ * per-account reward allocations and fee-tier rebates.
4706
+ * When `accountIds` is omitted or empty, all eligible accounts are included.
4707
+ *
4708
+ * **Note:** All data returned is for the current epoch only.
4709
+ */
4710
+ interface ApiPerpetualsCurrentRebateRewardsBody {
4711
+ accountIds?: PerpetualsAccountId[];
4712
+ /** Total maker reward pool to distribute among eligible market makers. */
4713
+ totalMakerRewards: number;
4714
+ /** Total taker reward pool to distribute among eligible takers. */
4715
+ totalTakerRewards: number;
4716
+ /** Coefficients used to compute Q-scores and taker shares. */
4717
+ calculationVariables: PerpetualsCalculationVariables;
4718
+ }
4719
+ /**
4720
+ * Coefficients used when computing Q-scores and taker shares for the rebate
4721
+ * rewards calculation. Each is a weighting exponent applied to a corresponding
4722
+ * per-account metric.
4723
+ */
4724
+ interface PerpetualsCalculationVariables {
4725
+ /** Exponent applied to the raw Q-score component. */
4726
+ qScoreCoefficient: number;
4727
+ /** Exponent applied to the uptime component. */
4728
+ uptimeCoefficient: number;
4729
+ /** Exponent applied to the maker volume component. */
4730
+ mmVolumeCoefficient: number;
4731
+ /** Exponent applied to the taker volume component. */
4732
+ takerVolumeCoefficient: number;
4733
+ /** Exponent applied to the taker open-interest component. */
4734
+ takerOiCoefficient: number;
4735
+ }
4736
+ /**
4737
+ * Maker reward and rebate breakdown for a single account.
4738
+ */
4739
+ interface PerpetualsMakerData {
4740
+ /** Normalized Q-score: raw cross-market sum averaged over snapshot count. */
4741
+ qScore: number;
4742
+ /** Final score: `qScore^coeff * uptime^coeff * volume^coeff`. */
4743
+ qScoreFinal: number;
4744
+ /** Share of total `qScoreFinal` across all eligible accounts (between 0 and 1). */
4745
+ qScoreFinalShare: number;
4746
+ /** Cross-market uptime count (number of snapshots with qualifying orders). */
4747
+ uptime: number;
4748
+ /** Q-score-based rewards from the maker reward pool. */
4749
+ rewards: number;
4750
+ /** Cross-market maker volume in USD. */
4751
+ volume: number;
4752
+ /** Share of total maker volume across all eligible accounts (between 0 and 1). */
4753
+ volumeShare: number;
4754
+ /** Volume-share tier rebate: `tierRate * volume`. */
4755
+ volumeRebate: number;
4756
+ /** Total maker fees paid across all markets. */
4757
+ feesPaid: number;
4758
+ /** Fee tier rebate: `max(0, feesPaid - discountedFees)`. */
4759
+ feeRebate: number;
4760
+ }
4761
+ /**
4762
+ * Taker reward and rebate breakdown for a single account.
4763
+ */
4764
+ interface PerpetualsTakerData {
4765
+ /** Volume-share-based rewards from the taker reward pool. */
4766
+ rewards: number;
4767
+ /** Cross-market taker volume in USD. */
4768
+ volume: number;
4769
+ /** Share of total taker volume across all eligible accounts (between 0 and 1). */
4770
+ volumeShare: number;
4771
+ /** Total taker fees paid across all markets. */
4772
+ feesPaid: number;
4773
+ /** Fee tier rebate: `max(0, feesPaid - discountedFees)`. */
4774
+ feeRebate: number;
4775
+ }
4776
+ /**
4777
+ * Combined reward and rebate data for a single account.
4778
+ */
4779
+ interface PerpetualsRewardData {
4780
+ accountId: PerpetualsAccountId;
4781
+ /** Maker-side reward and rebate metrics. */
4782
+ maker: PerpetualsMakerData;
4783
+ /** Taker-side reward and rebate metrics. */
4784
+ taker: PerpetualsTakerData;
4785
+ }
4786
+ /**
4787
+ * Response body for the rewards and rebates calculation.
4788
+ */
4789
+ interface ApiPerpetualsCurrentRebateRewardsResponse {
4790
+ /** Sum of all final quality scores across eligible makers. */
4791
+ totalQScoreFinal: number;
4792
+ /** Total estimated gas cost for order management across all accounts (decimal SUI). */
4793
+ totalEstimatedGasCost: number;
4794
+ /** Per-account reward and rebate breakdown. */
4795
+ rewards: PerpetualsRewardData[];
4796
+ }
4797
+ /**
4798
+ * Request body for generating a CSV-formatted rebate report.
4799
+ *
4800
+ * This corresponds to `POST /api/perpetuals/rebates/create-csv-rebates`.
4801
+ *
4802
+ * Produces a CSV string containing per-account rebate and reward data.
4803
+ * When `accountIds` is omitted or empty, all eligible accounts are included.
4804
+ */
4805
+ interface ApiPerpetualsCreateCsvRebatesBody extends ApiPerpetualsCurrentRebateRewardsBody {
4806
+ /**
4807
+ * When true, aggregate rewards by owner address instead of per-account.
4808
+ * Defaults to false when omitted.
4809
+ */
4810
+ aggregated?: boolean;
4811
+ }
4812
+ /**
4813
+ * Response body for the CSV rebate report.
4814
+ */
4815
+ interface ApiPerpetualsCreateCsvRebatesResponse {
4816
+ /** The CSV-formatted rebate data as a string. */
4817
+ csv: string;
4818
+ }
4819
+ /**
4820
+ * Request body for generating a referral rebate CSV report.
4821
+ *
4822
+ * This corresponds to `POST /api/perpetuals/rebates/create-referral-csv-rebates`.
4823
+ *
4824
+ * Calculates referrer commissions and referee discounts based on trading
4825
+ * fees within the specified epoch.
4826
+ */
4827
+ interface ApiPerpetualsCreateReferralCsvRebatesBody {
4828
+ /** Epoch start timestamp in milliseconds. */
4829
+ epochStartTimestampMs: Timestamp;
4830
+ /** Epoch end timestamp in milliseconds. */
4831
+ epochEndTimestampMs: Timestamp;
4832
+ }
4833
+ /**
4834
+ * Response body for the referral rebate CSV report.
4835
+ */
4836
+ interface ApiPerpetualsCreateReferralCsvRebatesResponse {
4837
+ /** The CSV-formatted referral rebate data as a string. */
4838
+ csv: string;
4839
+ }
4224
4840
  /**
4225
4841
  * SDK-level inputs for placing a market order from a client.
4226
4842
  *
@@ -4258,6 +4874,22 @@ type SdkPerpetualsPlaceMarketOrderPreviewInputs = Omit<ApiPerpetualsPreviewPlace
4258
4874
  * SDK-level inputs for previewing a limit order.
4259
4875
  */
4260
4876
  type SdkPerpetualsPlaceLimitOrderPreviewInputs = Omit<ApiPerpetualsPreviewPlaceLimitOrderBody, "collateralCoinType" | "accountId">;
4877
+ /**
4878
+ * SDK-level inputs for placing a scale order from a client.
4879
+ */
4880
+ type SdkPerpetualsPlaceScaleOrderInputs = Omit<ApiPerpetualsScaleOrderBody, "accountId" | "txKind" | "walletAddress"> & {
4881
+ tx?: Transaction;
4882
+ };
4883
+ /**
4884
+ * SDK-level inputs for previewing a scale order.
4885
+ */
4886
+ type SdkPerpetualsPlaceScaleOrderPreviewInputs = Omit<ApiPerpetualsPreviewPlaceScaleOrderBody, "collateralCoinType" | "accountId">;
4887
+ /**
4888
+ * SDK-level inputs for building a cancel-and-place-orders transaction.
4889
+ */
4890
+ type SdkPerpetualsCancelAndPlaceOrdersInputs = Omit<ApiPerpetualsCancelAndPlaceOrdersBody, "accountId" | "txKind" | "walletAddress"> & {
4891
+ tx?: Transaction;
4892
+ };
4261
4893
  /**
4262
4894
  * SDK-level inputs for previewing order cancellations.
4263
4895
  */
@@ -4455,6 +5087,78 @@ interface PerpetualsWsCandleResponseMessage {
4455
5087
  lastCandle: PerpetualsMarketCandleDataPoint | undefined;
4456
5088
  }
4457
5089
 
5090
+ interface ApiGasPoolBody {
5091
+ walletAddress: SuiAddress;
5092
+ }
5093
+ interface ApiGasPoolResponse {
5094
+ walletAddress: SuiAddress;
5095
+ gasPoolId: ObjectId | undefined;
5096
+ balance: Balance;
5097
+ whitelistedAddresses: SuiAddress[];
5098
+ }
5099
+ interface ApiGasPoolCreateBody {
5100
+ walletAddress: SuiAddress;
5101
+ initialDepositAmount?: Balance;
5102
+ txKind?: SerializedTransaction;
5103
+ deferShare?: boolean;
5104
+ }
5105
+ interface ApiGasPoolCreateResponse {
5106
+ txKind: SerializedTransaction;
5107
+ gasPoolArg?: TransactionObjectArgument;
5108
+ sharePolicyArg?: TransactionObjectArgument;
5109
+ }
5110
+ interface ApiGasPoolDepositBody {
5111
+ walletAddress: SuiAddress;
5112
+ /** Whether to build the transaction for sponsored gas. Defaults to false. */
5113
+ isSponsoredTx?: boolean;
5114
+ /** Coin type of the deposit token. Defaults to SUI if omitted.
5115
+ * When set to a non-SUI type, the endpoint swaps to SUI before depositing. */
5116
+ coinType?: CoinType;
5117
+ /** Amount of the input coin to deposit (or swap, for non-SUI). */
5118
+ amount?: Balance;
5119
+ /** PTB coin argument to use as the input coin. If omitted, sourced from wallet. */
5120
+ coinArg?: TransactionObjectArgument;
5121
+ /** Slippage tolerance for non-SUI swaps (0.0–1.0). Defaults to 0.01. */
5122
+ slippage?: Slippage;
5123
+ txKind?: SerializedTransaction;
5124
+ gasPoolArg?: TransactionObjectArgument;
5125
+ }
5126
+ interface ApiGasPoolWithdrawBody {
5127
+ walletAddress: SuiAddress;
5128
+ amount: Balance;
5129
+ recipientAddress?: SuiAddress;
5130
+ /** When true, the withdrawn coin is not transferred; its arg is returned instead. */
5131
+ deferTransfer?: boolean;
5132
+ txKind?: SerializedTransaction;
5133
+ gasPoolArg?: TransactionObjectArgument;
5134
+ }
5135
+ interface ApiGasPoolWithdrawResponse {
5136
+ txKind: SerializedTransaction;
5137
+ /** PTB argument for the withdrawn coin (only set when `deferTransfer = true`). */
5138
+ withdrawnCoinArg?: TransactionObjectArgument;
5139
+ }
5140
+ interface ApiGasPoolSponsorBody {
5141
+ walletAddress: SuiAddress;
5142
+ amount: Balance;
5143
+ txKind?: SerializedTransaction;
5144
+ }
5145
+ interface ApiGasPoolGrantBody {
5146
+ walletAddress: SuiAddress;
5147
+ targetWalletAddress: SuiAddress;
5148
+ txKind?: SerializedTransaction;
5149
+ gasPoolArg?: TransactionObjectArgument;
5150
+ }
5151
+ interface ApiGasPoolRevokeBody {
5152
+ walletAddress: SuiAddress;
5153
+ targetWalletAddress: SuiAddress;
5154
+ txKind?: SerializedTransaction;
5155
+ }
5156
+ interface ApiGasPoolShareBody {
5157
+ gasPoolArg: TransactionObjectArgument;
5158
+ sharePolicyArg: TransactionObjectArgument;
5159
+ txKind?: SerializedTransaction;
5160
+ }
5161
+
4458
5162
  /**
4459
5163
  * A unique identifier, typically used to track items or route segments.
4460
5164
  */
@@ -5054,12 +5758,19 @@ interface PoolDataPoint {
5054
5758
  */
5055
5759
  type PoolGraphDataTimeframeKey = "1D" | "1W" | "1M" | "3M" | "6M" | "1Y";
5056
5760
  /**
5057
- * An optional object or approach to define timeframe windows, using
5058
- * dayjs manipulation. Not always used directly.
5761
+ * Unit of time used to describe a timeframe window (e.g. "day", "week").
5762
+ *
5763
+ * Mirrors dayjs's `ManipulateType` surface (long, plural, and short forms)
5764
+ * so consumers upgrading from pre-2.0 keep compiling.
5765
+ */
5766
+ type PoolGraphDataTimeUnit = "millisecond" | "second" | "minute" | "hour" | "day" | "week" | "month" | "year" | "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years" | "ms" | "s" | "m" | "h" | "d" | "D" | "M" | "y" | "w";
5767
+ /**
5768
+ * An optional object or approach to define timeframe windows.
5769
+ * Not always used directly.
5059
5770
  */
5060
5771
  interface PoolGraphDataTimeframe {
5061
5772
  time: Timestamp;
5062
- timeUnit: ManipulateType;
5773
+ timeUnit: PoolGraphDataTimeUnit;
5063
5774
  }
5064
5775
  /**
5065
5776
  * An object describing how each coin in a newly created pool is configured,
@@ -5383,12 +6094,12 @@ interface ApiReferralsSetReferrerResponse {
5383
6094
  }
5384
6095
 
5385
6096
  /**
5386
- * Request body for fetching a user's reward points.
6097
+ * Request body for fetching a user's total accumulated reward points.
5387
6098
  * Uses a pre-signed message (bytes + signature) for authentication.
5388
6099
  */
5389
6100
  interface ApiRewardsGetPointsBody {
5390
6101
  /**
5391
- * The user's Sui wallet address (e.g., "0x<address>").
6102
+ * Sui wallet address to query total points for.
5392
6103
  */
5393
6104
  walletAddress: SuiAddress;
5394
6105
  /**
@@ -5402,22 +6113,32 @@ interface ApiRewardsGetPointsBody {
5402
6113
  signature: string;
5403
6114
  }
5404
6115
  /**
5405
- * Response containing the user's reward points.
6116
+ * Response containing the user's total accumulated reward points.
5406
6117
  */
5407
6118
  interface ApiRewardsGetPointsResponse {
5408
6119
  /**
5409
- * The user's total reward points.
6120
+ * Total accumulated points for this wallet across all epochs and domains.
5410
6121
  */
5411
- points: number;
6122
+ totalPoints: number;
5412
6123
  }
5413
6124
  /**
5414
6125
  * Request body for fetching a user's rewards history.
6126
+ * Uses a pre-signed message (bytes + signature) for authentication.
5415
6127
  */
5416
6128
  interface ApiRewardsGetHistoryBody {
5417
6129
  /**
5418
6130
  * Sui wallet address to query history for.
5419
6131
  */
5420
6132
  walletAddress: SuiAddress;
6133
+ /**
6134
+ * The message bytes (base64 encoded) that the user previously signed.
6135
+ * Can be reused from other signed messages (e.g., Terms and Conditions).
6136
+ */
6137
+ bytes: string;
6138
+ /**
6139
+ * The signature corresponding to the signed message bytes.
6140
+ */
6141
+ signature: string;
5421
6142
  /**
5422
6143
  * Optional domain filter (e.g., "referrals", "perpetuals").
5423
6144
  * If omitted, returns all domains.
@@ -5445,18 +6166,22 @@ interface ApiRewardsGetHistoryResponse {
5445
6166
  */
5446
6167
  pagination: RewardsPaginationInfo;
5447
6168
  }
6169
+ /**
6170
+ * Event type for a rewards history entry.
6171
+ */
6172
+ type RewardsHistoryEventType = "deposit" | "withdraw" | "points";
5448
6173
  /**
5449
6174
  * A single historical reward entry.
5450
6175
  */
5451
6176
  interface RewardsHistoryEntry {
5452
6177
  /**
5453
- * Vault ID where the deposit was made.
6178
+ * Vault ID where the event occurred.
5454
6179
  */
5455
6180
  vaultId: ObjectId;
5456
6181
  /**
5457
- * Fully-qualified Coin type (e.g., "0x2::sui::SUI").
6182
+ * Fully-qualified Coin type (e.g., "0x2::sui::SUI"), or "points" for point entries.
5458
6183
  */
5459
- coinType: CoinType;
6184
+ coinType: "points" | (CoinType & {});
5460
6185
  /**
5461
6186
  * Reward amount in base units.
5462
6187
  */
@@ -5474,9 +6199,13 @@ interface RewardsHistoryEntry {
5474
6199
  */
5475
6200
  epochEndTimestampMs: Timestamp;
5476
6201
  /**
5477
- * Transaction digest for this deposit event, if available.
6202
+ * Transaction digest for this event, if available.
5478
6203
  */
5479
6204
  txDigest?: TransactionDigest;
6205
+ /**
6206
+ * Event type: "deposit", "withdraw", or "points".
6207
+ */
6208
+ eventType: RewardsHistoryEventType;
5480
6209
  }
5481
6210
  /**
5482
6211
  * Pagination information for paginated reward queries.
@@ -6272,6 +7001,7 @@ interface ApiOwnedStakedSuiFrensBody {
6272
7001
 
6273
7002
  type ResponseWithTxKind = {
6274
7003
  txKind: SerializedTransaction;
7004
+ sponsorSignature?: string;
6275
7005
  } & (Record<string, unknown> | {});
6276
7006
  declare class Caller {
6277
7007
  config: CallerConfig;
@@ -8121,7 +8851,7 @@ declare class Pools extends Caller {
8121
8851
  * This indicates the user's liquidity positions across multiple pools.
8122
8852
  *
8123
8853
  * @param inputs - An object containing the `walletAddress`.
8124
- * @returns A `PoolLpInfo` object summarizing the user's LP balances.
8854
+ * @returns An array of `PoolLpInfo` objects summarizing the user's LP balances.
8125
8855
  *
8126
8856
  * @example
8127
8857
  * ```typescript
@@ -8131,7 +8861,7 @@ declare class Pools extends Caller {
8131
8861
  */
8132
8862
  getOwnedLpCoins(inputs: {
8133
8863
  walletAddress: SuiAddress;
8134
- }): Promise<PoolLpInfo>;
8864
+ }): Promise<PoolLpInfo[]>;
8135
8865
  /**
8136
8866
  * Constructs or fetches a transaction to publish a new LP coin package,
8137
8867
  * typically used by advanced users or devs establishing new liquidity pools.
@@ -8572,6 +9302,19 @@ declare class PerpetualsMarket extends Caller {
8572
9302
  * @returns Either `{ error }` or a preview describing the simulated post-order state.
8573
9303
  */
8574
9304
  getPlaceLimitOrderPreview(inputs: SdkPerpetualsPlaceLimitOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
9305
+ /**
9306
+ * Market-level preview of placing a scale order.
9307
+ *
9308
+ * Similar to {@link getPlaceLimitOrderPreview}, this uses:
9309
+ * - `account/previews/place-scale-order`
9310
+ * - `accountId: undefined`
9311
+ *
9312
+ * @param inputs - {@link SdkPerpetualsPlaceScaleOrderPreviewInputs}.
9313
+ * @param abortSignal - Optional abort signal to cancel the request.
9314
+ *
9315
+ * @returns Either `{ error }` or a preview describing the simulated post-order state.
9316
+ */
9317
+ getPlaceScaleOrderPreview(inputs: SdkPerpetualsPlaceScaleOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
8575
9318
  /**
8576
9319
  * Fetch paginated order history for this market.
8577
9320
  *
@@ -8887,6 +9630,7 @@ declare class PerpetualsAccount extends Caller {
8887
9630
  getDepositCollateralTx(inputs: {
8888
9631
  tx?: Transaction;
8889
9632
  isSponsoredTx?: boolean;
9633
+ sponsor?: PerpetualsSponsorConfig;
8890
9634
  } & ({
8891
9635
  depositAmount: Balance;
8892
9636
  } | {
@@ -8922,6 +9666,7 @@ declare class PerpetualsAccount extends Caller {
8922
9666
  getWithdrawCollateralTx(inputs: {
8923
9667
  withdrawAmount: Balance;
8924
9668
  recipientAddress?: SuiAddress;
9669
+ sponsor?: PerpetualsSponsorConfig;
8925
9670
  tx?: Transaction;
8926
9671
  }): Promise<Omit<ApiPerpetualsWithdrawCollateralResponse, "txKind"> & {
8927
9672
  tx: Transaction;
@@ -8941,6 +9686,7 @@ declare class PerpetualsAccount extends Caller {
8941
9686
  getAllocateCollateralTx(inputs: {
8942
9687
  marketId: PerpetualsMarketId;
8943
9688
  allocateAmount: Balance;
9689
+ sponsor?: PerpetualsSponsorConfig;
8944
9690
  tx?: Transaction;
8945
9691
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
8946
9692
  tx: Transaction;
@@ -8960,6 +9706,7 @@ declare class PerpetualsAccount extends Caller {
8960
9706
  getDeallocateCollateralTx(inputs: {
8961
9707
  marketId: PerpetualsMarketId;
8962
9708
  deallocateAmount: Balance;
9709
+ sponsor?: PerpetualsSponsorConfig;
8963
9710
  tx?: Transaction;
8964
9711
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
8965
9712
  tx: Transaction;
@@ -8979,6 +9726,7 @@ declare class PerpetualsAccount extends Caller {
8979
9726
  transferAmount: Balance;
8980
9727
  toAccountId: PerpetualsAccountId;
8981
9728
  toAccountCapId?: ObjectId;
9729
+ sponsor?: PerpetualsSponsorConfig;
8982
9730
  tx?: Transaction;
8983
9731
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
8984
9732
  tx: Transaction;
@@ -9040,6 +9788,34 @@ declare class PerpetualsAccount extends Caller {
9040
9788
  getPlaceLimitOrderTx(inputs: SdkPerpetualsPlaceLimitOrderInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9041
9789
  tx: Transaction;
9042
9790
  }>;
9791
+ /**
9792
+ * Build a `place-scale-order` transaction for this account.
9793
+ *
9794
+ * A scale order distributes a total size across multiple limit orders
9795
+ * evenly spaced between a start and end price. An optional `sizeSkew`
9796
+ * parameter controls whether the distribution is uniform or weighted.
9797
+ *
9798
+ * @param inputs - See {@link SdkPerpetualsPlaceScaleOrderInputs}.
9799
+ *
9800
+ * @returns Transaction response containing `tx`.
9801
+ */
9802
+ getPlaceScaleOrderTx(inputs: SdkPerpetualsPlaceScaleOrderInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9803
+ tx: Transaction;
9804
+ }>;
9805
+ /**
9806
+ * Build a `cancel-and-place-orders` transaction for this account.
9807
+ *
9808
+ * Atomically cancels existing orders and places new ones in a single
9809
+ * transaction. Useful for rebalancing order grids or replacing stale
9810
+ * orders without intermediate exposure.
9811
+ *
9812
+ * @param inputs - See {@link SdkPerpetualsCancelAndPlaceOrdersInputs}.
9813
+ *
9814
+ * @returns Transaction response containing `tx`.
9815
+ */
9816
+ getCancelAndPlaceOrdersTx(inputs: SdkPerpetualsCancelAndPlaceOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9817
+ tx: Transaction;
9818
+ }>;
9043
9819
  /**
9044
9820
  * Build a `cancel-orders` transaction for this account.
9045
9821
  *
@@ -9061,6 +9837,7 @@ declare class PerpetualsAccount extends Caller {
9061
9837
  */
9062
9838
  getCancelOrdersTx(inputs: {
9063
9839
  tx?: Transaction;
9840
+ sponsor?: PerpetualsSponsorConfig;
9064
9841
  marketIdsToData: Record<PerpetualsMarketId, {
9065
9842
  orderIds: PerpetualsOrderId[];
9066
9843
  collateralChange: number;
@@ -9081,6 +9858,7 @@ declare class PerpetualsAccount extends Caller {
9081
9858
  */
9082
9859
  getCancelStopOrdersTx(inputs: {
9083
9860
  tx?: Transaction;
9861
+ sponsor?: PerpetualsSponsorConfig;
9084
9862
  stopOrderIds: ObjectId[];
9085
9863
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9086
9864
  tx: Transaction;
@@ -9166,6 +9944,7 @@ declare class PerpetualsAccount extends Caller {
9166
9944
  leverage: number;
9167
9945
  collateralChange: number;
9168
9946
  marketId: PerpetualsMarketId;
9947
+ sponsor?: PerpetualsSponsorConfig;
9169
9948
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9170
9949
  tx: Transaction;
9171
9950
  }>;
@@ -9235,6 +10014,22 @@ declare class PerpetualsAccount extends Caller {
9235
10014
  * {@link getPlaceMarketOrderPreview}.
9236
10015
  */
9237
10016
  getPlaceLimitOrderPreview(inputs: SdkPerpetualsPlaceLimitOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
10017
+ /**
10018
+ * Preview the effects of placing a scale order (without building a tx).
10019
+ *
10020
+ * A scale order distributes total size across multiple limit orders
10021
+ * spaced between a start and end price. The preview simulates:
10022
+ * - How much size would execute immediately vs post to the book
10023
+ * - Expected slippage and execution price
10024
+ * - Resulting position and margin impact
10025
+ *
10026
+ * @param inputs - See {@link SdkPerpetualsPlaceScaleOrderPreviewInputs}.
10027
+ * @param abortSignal - Optional `AbortSignal` to cancel the request.
10028
+ *
10029
+ * @returns Either an error message or a preview object similar to
10030
+ * {@link getPlaceMarketOrderPreview}.
10031
+ */
10032
+ getPlaceScaleOrderPreview(inputs: SdkPerpetualsPlaceScaleOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
9238
10033
  /**
9239
10034
  * Preview the effects of canceling orders across one or more markets.
9240
10035
  *
@@ -9669,11 +10464,13 @@ declare class PerpetualsVault extends Caller {
9669
10464
  walletAddress: SuiAddress;
9670
10465
  sizesToClose: Record<PerpetualsMarketId, Balance>;
9671
10466
  recipientAddress?: SuiAddress;
10467
+ sponsor?: PerpetualsSponsorConfig;
9672
10468
  tx?: Transaction;
9673
10469
  }): Promise<Omit<ApiPerpetualsVaultProcessForceWithdrawRequestTxResponse, "txKind"> & {
9674
10470
  tx: Transaction;
9675
10471
  }>;
9676
10472
  getPauseVaultForForceWithdrawRequestTx(inputs: {
10473
+ sponsor?: PerpetualsSponsorConfig;
9677
10474
  tx?: Transaction;
9678
10475
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9679
10476
  tx: Transaction;
@@ -9691,6 +10488,7 @@ declare class PerpetualsVault extends Caller {
9691
10488
  */
9692
10489
  getUpdateWithdrawRequestSlippageTx(inputs: {
9693
10490
  minCollateralAmountOut: Balance;
10491
+ sponsor?: PerpetualsSponsorConfig;
9694
10492
  tx?: Transaction;
9695
10493
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9696
10494
  tx: Transaction;
@@ -9705,6 +10503,7 @@ declare class PerpetualsVault extends Caller {
9705
10503
  */
9706
10504
  getOwnerUpdateForceWithdrawDelayTx(inputs: {
9707
10505
  forceWithdrawDelayMs: bigint;
10506
+ sponsor?: PerpetualsSponsorConfig;
9708
10507
  tx?: Transaction;
9709
10508
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9710
10509
  tx: Transaction;
@@ -9719,6 +10518,7 @@ declare class PerpetualsVault extends Caller {
9719
10518
  */
9720
10519
  getOwnerUpdateLockPeriodTx(inputs: {
9721
10520
  lockPeriodMs: bigint;
10521
+ sponsor?: PerpetualsSponsorConfig;
9722
10522
  tx?: Transaction;
9723
10523
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9724
10524
  tx: Transaction;
@@ -9734,6 +10534,7 @@ declare class PerpetualsVault extends Caller {
9734
10534
  */
9735
10535
  getOwnerUpdatePerformanceFeeTx(inputs: {
9736
10536
  performanceFeePercentage: number;
10537
+ sponsor?: PerpetualsSponsorConfig;
9737
10538
  tx?: Transaction;
9738
10539
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9739
10540
  tx: Transaction;
@@ -9751,6 +10552,7 @@ declare class PerpetualsVault extends Caller {
9751
10552
  */
9752
10553
  getOwnerProcessWithdrawRequestsTx(inputs: {
9753
10554
  userAddresses: SuiAddress[];
10555
+ sponsor?: PerpetualsSponsorConfig;
9754
10556
  tx?: Transaction;
9755
10557
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9756
10558
  tx: Transaction;
@@ -9791,6 +10593,30 @@ declare class PerpetualsVault extends Caller {
9791
10593
  }): Promise<Omit<ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse, "txKind"> & {
9792
10594
  tx: Transaction;
9793
10595
  }>;
10596
+ /**
10597
+ * Build an owner transaction to withdraw locked liquidity from the vault.
10598
+ *
10599
+ * Owner-locked liquidity is LP that was locked at vault creation time.
10600
+ * This flow allows the owner to withdraw a portion without going through
10601
+ * the standard withdraw-request lifecycle. Owner-locked withdrawals are
10602
+ * exempt from performance fees.
10603
+ *
10604
+ * @param inputs.amount - Amount of locked LP to withdraw (native units).
10605
+ * @param inputs.minCollateralAmountOut - Minimum collateral out to protect from slippage.
10606
+ * @param inputs.recipientAddress - Optional recipient address for withdrawn collateral.
10607
+ * @param inputs.tx - Optional transaction to extend.
10608
+ *
10609
+ * @returns Response containing `tx` and any extra outputs described by
10610
+ * {@link ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse}.
10611
+ */
10612
+ getOwnerWithdrawLockedLiquidityTx(inputs: {
10613
+ amount: Balance;
10614
+ minCollateralAmountOut: Balance;
10615
+ recipientAddress?: SuiAddress;
10616
+ tx?: Transaction;
10617
+ }): Promise<Omit<ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse, "txKind"> & {
10618
+ tx: Transaction;
10619
+ }>;
9794
10620
  /**
9795
10621
  * Build a user transaction to create a vault withdraw request.
9796
10622
  *
@@ -9808,6 +10634,7 @@ declare class PerpetualsVault extends Caller {
9808
10634
  walletAddress: SuiAddress;
9809
10635
  lpWithdrawAmount: Balance;
9810
10636
  minCollateralAmountOut: Balance;
10637
+ sponsor?: PerpetualsSponsorConfig;
9811
10638
  tx?: Transaction;
9812
10639
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9813
10640
  tx: Transaction;
@@ -9822,6 +10649,7 @@ declare class PerpetualsVault extends Caller {
9822
10649
  */
9823
10650
  getCancelWithdrawRequestTx(inputs: {
9824
10651
  walletAddress: SuiAddress;
10652
+ sponsor?: PerpetualsSponsorConfig;
9825
10653
  tx?: Transaction;
9826
10654
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
9827
10655
  tx: Transaction;
@@ -9854,6 +10682,7 @@ declare class PerpetualsVault extends Caller {
9854
10682
  getDepositTx(inputs: {
9855
10683
  walletAddress: SuiAddress;
9856
10684
  minLpAmountOut: Balance;
10685
+ sponsor?: PerpetualsSponsorConfig;
9857
10686
  tx?: Transaction;
9858
10687
  isSponsoredTx?: boolean;
9859
10688
  } & ({
@@ -9898,6 +10727,19 @@ declare class PerpetualsVault extends Caller {
9898
10727
  getPreviewOwnerWithdrawCollateral(inputs: {
9899
10728
  lpWithdrawAmount: Balance;
9900
10729
  }): Promise<ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse>;
10730
+ /**
10731
+ * Preview an owner locked liquidity withdrawal.
10732
+ *
10733
+ * Returns the estimated collateral output for withdrawing a given amount
10734
+ * of the owner's locked LP tokens. Owner-locked withdrawals are exempt
10735
+ * from performance fees.
10736
+ *
10737
+ * @param inputs.amount - Amount of locked LP to withdraw (native units).
10738
+ * @returns Preview response including estimated collateral out and price.
10739
+ */
10740
+ getPreviewOwnerWithdrawLockedLiquidity(inputs: {
10741
+ amount: Balance;
10742
+ }): Promise<ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityResponse>;
9901
10743
  /**
9902
10744
  * Preview creating a withdraw request.
9903
10745
  *
@@ -10262,6 +11104,20 @@ declare class Perpetuals extends Caller {
10262
11104
  * @returns {@link ApiPerpetualsOwnedVaultCapsResponse} containing vault caps.
10263
11105
  */
10264
11106
  getOwnedVaultCaps(inputs: ApiPerpetualsOwnedVaultCapsBody): Promise<ApiPerpetualsOwnedVaultCapsResponse>;
11107
+ /**
11108
+ * Fetch all vault **assistant** caps owned by a wallet.
11109
+ *
11110
+ * Assistant caps grant a non-owner wallet the ability to operate a vault
11111
+ * on behalf of the owner. The returned caps are structurally identical to
11112
+ * regular vault caps ({@link PerpetualsVaultCap}) and can be used to
11113
+ * construct a {@link PerpetualsAccount} that signs vault transactions with
11114
+ * the assistant's wallet.
11115
+ *
11116
+ * @param inputs.walletAddress - Assistant wallet address.
11117
+ * @returns {@link ApiPerpetualsOwnedVaultAssistantCapsResponse} containing
11118
+ * assistant caps.
11119
+ */
11120
+ getOwnedVaultAssistantCaps(inputs: ApiPerpetualsOwnedVaultAssistantCapsBody): Promise<ApiPerpetualsOwnedVaultAssistantCapsResponse>;
10265
11121
  /**
10266
11122
  * Fetch all pending vault withdrawal requests created by a given wallet.
10267
11123
  *
@@ -10304,6 +11160,18 @@ declare class Perpetuals extends Caller {
10304
11160
  * relocated to {@link PerpetualsMarket} in the future.
10305
11161
  */
10306
11162
  getMarketCandleHistory(inputs: ApiPerpetualsMarketCandleHistoryBody): Promise<ApiPerpetualsMarketCandleHistoryResponse>;
11163
+ /**
11164
+ * Fetch historical funding rate data for a single market.
11165
+ *
11166
+ * @param inputs.marketId - Market ID to query.
11167
+ * @param inputs.fromTimestamp - Start timestamp (inclusive).
11168
+ * @param inputs.toTimestamp - End timestamp (exclusive).
11169
+ * @param inputs.limit - Optional cap on the number of points returned.
11170
+ *
11171
+ * @returns {@link ApiPerpetualsMarketFundingHistoryResponse} containing
11172
+ * funding history points.
11173
+ */
11174
+ getMarketFundingHistory(inputs: ApiPerpetualsMarketFundingHistoryBody): Promise<ApiPerpetualsMarketFundingHistoryResponse>;
10307
11175
  /**
10308
11176
  * Fetch 24-hour volume and price change stats for multiple markets.
10309
11177
  *
@@ -10342,23 +11210,21 @@ declare class Perpetuals extends Caller {
10342
11210
  */
10343
11211
  getLpCoinPrices(inputs: ApiPerpetualsVaultLpCoinPricesBody): Promise<ApiPerpetualsVaultLpCoinPricesResponse>;
10344
11212
  /**
10345
- * Build a `transfer-cap` transaction that transfers a Perpetuals capability object (cap)
10346
- * to another wallet.
10347
- *
10348
- * Provide the `capObjectId` of the capability you want to transfer (e.g., an account cap
10349
- * or vault cap) and the `recipientAddress` that should receive it.
11213
+ * Build a transaction to transfer a Perpetuals capability object (cap) to another wallet.
10350
11214
  *
10351
- * This endpoint builds a transaction only; it does not submit it on-chain.
11215
+ * Supports two methods:
11216
+ * - **Method 1**: Provide `capObjectId` to transfer an existing on-chain object.
11217
+ * - **Method 2**: Provide `composed` with the PTB argument and capability type
11218
+ * from a deferred PTB composition (e.g., from `getCreateAccountTx` with `deferShare=true`).
10352
11219
  *
10353
11220
  * @param inputs.recipientAddress - Recipient wallet address that should receive the cap.
10354
- * @param inputs.capObjectId - Object ID of the capability to transfer.
11221
+ * @param inputs.capObjectId - Object ID of the capability to transfer (Method 1).
11222
+ * @param inputs.composed - Composed PTB argument + capability type (Method 2).
10355
11223
  * @param inputs.tx - Optional transaction to extend.
10356
11224
  *
10357
11225
  * @returns Transaction response containing a `tx`.
10358
11226
  */
10359
- getTransferCapTx(inputs: {
10360
- recipientAddress: SuiAddress;
10361
- capObjectId: ObjectId;
11227
+ getTransferCapTx(inputs: Omit<ApiPerpetualsTransferCapTxBody, "txKind"> & {
10362
11228
  tx?: Transaction;
10363
11229
  }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
10364
11230
  tx: Transaction;
@@ -10366,18 +11232,66 @@ declare class Perpetuals extends Caller {
10366
11232
  /**
10367
11233
  * Build a `create-account` transaction for Aftermath Perpetuals.
10368
11234
  *
11235
+ * When `deferShare` is `true`, the response includes a `deferred` object with
11236
+ * `accountArg`, `sharePolicyArg`, `adminCapArg`, and `collateralCoinType` so you
11237
+ * can compose additional commands (grant-agent-wallet, transfer-cap) before calling
11238
+ * {@link getShareAccountTx} to finalize.
11239
+ *
10369
11240
  * @param inputs.walletAddress - Wallet address that will own the new account.
10370
11241
  * @param inputs.collateralCoinType - Collateral coin type used by the account.
10371
- * @param inputs.tx - Optional {@link Transaction} to extend; if provided, the
10372
- * create-account commands are appended to this transaction.
11242
+ * @param inputs.deferShare - When true, returns `deferred` args without sharing yet.
11243
+ * @param inputs.tx - Optional {@link Transaction} to extend.
11244
+ * @returns `tx` plus optional `deferred` containing argument references when deferred.
11245
+ */
11246
+ getCreateAccountTx(inputs: Omit<ApiPerpetualsCreateAccountBody, "txKind"> & {
11247
+ tx?: Transaction;
11248
+ }): Promise<Omit<ApiPerpetualsCreateAccountResponse, "txKind"> & {
11249
+ tx: Transaction;
11250
+ }>;
11251
+ /**
11252
+ * Build a transaction that grants an Agent Wallet permission on a Perpetuals account.
10373
11253
  *
10374
- * @returns {@link SdkTransactionResponse} with `tx`.
11254
+ * Supports two methods:
11255
+ * - **Method 1 (existing account)**: Provide `accountId` to look up an existing shared account.
11256
+ * - **Method 2 (composed flow)**: Provide `deferred` with the argument references
11257
+ * from a deferred `getCreateAccountTx` call.
11258
+ *
11259
+ * @param inputs.recipientAddress - Wallet address to receive agent permissions.
11260
+ * @param inputs.accountId - Perpetuals account ID (Method 1).
11261
+ * @param inputs.deferred - Deferred account args from `getCreateAccountTx` (Method 2).
11262
+ * @param inputs.tx - Optional transaction to extend.
11263
+ *
11264
+ * @returns Transaction response containing a `tx`.
10375
11265
  */
10376
- getCreateAccountTx(inputs: {
10377
- walletAddress: SuiAddress;
10378
- collateralCoinType: CoinType;
11266
+ getGrantAgentWalletTx(inputs: Omit<ApiPerpetualsGrantAgentWalletTxBody, "txKind"> & {
10379
11267
  tx?: Transaction;
10380
- }): Promise<SdkTransactionResponse>;
11268
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
11269
+ tx: Transaction;
11270
+ }>;
11271
+ /**
11272
+ * Build a transaction to share a Perpetuals account that was created with deferred sharing.
11273
+ *
11274
+ * This finalizes the account creation flow by consuming the `AccountSharePolicy`
11275
+ * and sharing the `Account` object. Call this after composing additional commands
11276
+ * (grant-agent-wallet, transfer-cap) with the args returned by {@link getCreateAccountTx}.
11277
+ *
11278
+ * Pass the deferred fields (`accountArg`, `sharePolicyArg`, `adminCapArg`,
11279
+ * `collateralCoinType`) from the `deferred` object returned by `getCreateAccountTx`.
11280
+ *
11281
+ * @param inputs.accountArg - Account argument from deferred create.
11282
+ * @param inputs.sharePolicyArg - Share policy argument from deferred create.
11283
+ * @param inputs.adminCapArg - Admin cap argument from deferred create.
11284
+ * @param inputs.collateralCoinType - Collateral type for the account.
11285
+ * @param inputs.sponsor - Optional sponsorship config.
11286
+ * @param inputs.tx - Optional transaction to extend.
11287
+ *
11288
+ * @returns Transaction response containing a `tx`.
11289
+ */
11290
+ getShareAccountTx(inputs: Omit<ApiPerpetualsShareAccountBody, "txKind"> & {
11291
+ tx?: Transaction;
11292
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
11293
+ tx: Transaction;
11294
+ }>;
10381
11295
  /**
10382
11296
  * Build a `create-vault-cap` transaction.
10383
11297
  *
@@ -10445,6 +11359,7 @@ declare class Perpetuals extends Caller {
10445
11359
  lockPeriodMs: bigint;
10446
11360
  performanceFeePercentage: Percentage;
10447
11361
  forceWithdrawDelayMs: bigint;
11362
+ sponsor?: PerpetualsSponsorConfig;
10448
11363
  tx?: Transaction;
10449
11364
  isSponsoredTx?: boolean;
10450
11365
  } & ({
@@ -10454,6 +11369,52 @@ declare class Perpetuals extends Caller {
10454
11369
  })): Promise<Omit<ApiTransactionResponse, "txKind"> & {
10455
11370
  tx: Transaction;
10456
11371
  }>;
11372
+ /**
11373
+ * Calculate rewards and rebates for one or more perpetuals accounts.
11374
+ *
11375
+ * Computes per-account maker and taker reward allocations, fee-tier rebates,
11376
+ * and volume-based metrics. When `accountIds` is omitted or empty, all eligible
11377
+ * accounts are included.
11378
+ *
11379
+ * **Note:** All data returned is for the current epoch only.
11380
+ *
11381
+ * @param inputs.totalMakerRewards - Total maker reward pool to distribute.
11382
+ * @param inputs.totalTakerRewards - Total taker reward pool to distribute.
11383
+ * @param inputs.accountIds - Optional list of account IDs.
11384
+ * @returns {@link ApiPerpetualsCurrentRebateRewardsResponse} with per-account reward and rebate data.
11385
+ *
11386
+ * @example
11387
+ * ```ts
11388
+ * const { totalQScoreFinal, rewards } = await perps.getCurrentRebateRewards({
11389
+ * totalMakerRewards: 10000,
11390
+ * totalTakerRewards: 5000,
11391
+ * });
11392
+ * ```
11393
+ */
11394
+ getCurrentRebateRewards(inputs: ApiPerpetualsCurrentRebateRewardsBody): Promise<ApiPerpetualsCurrentRebateRewardsResponse>;
11395
+ /**
11396
+ * Generate a CSV-formatted rebate report for perpetuals market makers.
11397
+ *
11398
+ * Computes per-account reward allocations and fee-tier rebate adjustments,
11399
+ * returning the result as a CSV string. When `aggregated` is true, the CSV
11400
+ * groups rewards by owner address instead of per-account.
11401
+ *
11402
+ * **Note:** All data returned is for the current epoch only.
11403
+ *
11404
+ * @param inputs - {@link ApiPerpetualsCreateCsvRebatesBody}.
11405
+ * @returns {@link ApiPerpetualsCreateCsvRebatesResponse} containing the CSV string.
11406
+ */
11407
+ getCsvRebates(inputs: ApiPerpetualsCreateCsvRebatesBody): Promise<ApiPerpetualsCreateCsvRebatesResponse>;
11408
+ /**
11409
+ * Generate a CSV-formatted referral rebate report.
11410
+ *
11411
+ * Calculates referrer commissions and referee discounts based on trading
11412
+ * fees within the specified epoch, returning the result as a CSV string.
11413
+ *
11414
+ * @param inputs - {@link ApiPerpetualsCreateReferralCsvRebatesBody}.
11415
+ * @returns {@link ApiPerpetualsCreateReferralCsvRebatesResponse} containing the CSV string.
11416
+ */
11417
+ getReferralCsvRebates(inputs: ApiPerpetualsCreateReferralCsvRebatesBody): Promise<ApiPerpetualsCreateReferralCsvRebatesResponse>;
10457
11418
  /**
10458
11419
  * Build a transaction to create an integrator configuration.
10459
11420
  *
@@ -10476,7 +11437,9 @@ declare class Perpetuals extends Caller {
10476
11437
  * });
10477
11438
  * ```
10478
11439
  */
10479
- getCreateBuilderCodeIntegratorConfigTx(inputs: ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody): Promise<Omit<ApiTransactionResponse, "txKind"> & {
11440
+ getCreateBuilderCodeIntegratorConfigTx(inputs: Omit<ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, "txKind"> & {
11441
+ tx?: Transaction;
11442
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
10480
11443
  tx: Transaction;
10481
11444
  }>;
10482
11445
  /**
@@ -10501,7 +11464,9 @@ declare class Perpetuals extends Caller {
10501
11464
  * });
10502
11465
  * ```
10503
11466
  */
10504
- getRemoveBuilderCodeIntegratorConfigTx(inputs: ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody): Promise<Omit<ApiTransactionResponse, "txKind"> & {
11467
+ getRemoveBuilderCodeIntegratorConfigTx(inputs: Omit<ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody, "txKind"> & {
11468
+ tx?: Transaction;
11469
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
10505
11470
  tx: Transaction;
10506
11471
  }>;
10507
11472
  /**
@@ -10526,7 +11491,9 @@ declare class Perpetuals extends Caller {
10526
11491
  * });
10527
11492
  * ```
10528
11493
  */
10529
- getCreateBuilderCodeIntegratorVaultTx(inputs: ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody): Promise<Omit<ApiTransactionResponse, "txKind"> & {
11494
+ getCreateBuilderCodeIntegratorVaultTx(inputs: Omit<ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, "txKind"> & {
11495
+ tx?: Transaction;
11496
+ }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
10530
11497
  tx: Transaction;
10531
11498
  }>;
10532
11499
  /**
@@ -10565,7 +11532,9 @@ declare class Perpetuals extends Caller {
10565
11532
  * // response.coinOutArg can be used in subsequent transaction commands
10566
11533
  * ```
10567
11534
  */
10568
- getClaimBuilderCodeIntegratorVaultFeesTx(inputs: ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody): Promise<Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, "txKind"> & {
11535
+ getClaimBuilderCodeIntegratorVaultFeesTx(inputs: Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, "txKind"> & {
11536
+ tx?: Transaction;
11537
+ }): Promise<Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, "txKind"> & {
10569
11538
  tx: Transaction;
10570
11539
  }>;
10571
11540
  /**
@@ -11500,6 +12469,145 @@ declare class Staking extends Caller {
11500
12469
  private useProvider;
11501
12470
  }
11502
12471
 
12472
+ /**
12473
+ * The `GasPools` class provides methods for interacting with shared gas pool
12474
+ * endpoints on the Aftermath platform. This includes querying pool details
12475
+ * and building transactions for creating, depositing into, withdrawing from,
12476
+ * sponsoring, granting access to, and revoking access from gas pools.
12477
+ *
12478
+ * @example
12479
+ * ```typescript
12480
+ * const gasPools = new GasPools({ network: "MAINNET" });
12481
+ *
12482
+ * // Get gas pool details
12483
+ * const pool = await gasPools.getPool({
12484
+ * walletAddress: "0x..."
12485
+ * });
12486
+ *
12487
+ * // Build a deposit transaction
12488
+ * const { tx } = await gasPools.getDepositTx({
12489
+ * walletAddress: "0x...",
12490
+ * depositAmount: 100_000_000n
12491
+ * });
12492
+ * ```
12493
+ */
12494
+ declare class GasPools extends Caller {
12495
+ readonly Provider?: AftermathApi | undefined;
12496
+ constructor(config?: CallerConfig, Provider?: AftermathApi | undefined);
12497
+ /**
12498
+ * Fetches the gas pool details for a given wallet address.
12499
+ *
12500
+ * @param inputs - {@link ApiGasPoolBody}
12501
+ * @returns {@link ApiGasPoolResponse} containing pool ID, balance, and whitelisted addresses.
12502
+ */
12503
+ getPool(inputs: ApiGasPoolBody): Promise<ApiGasPoolResponse>;
12504
+ /**
12505
+ * Builds a transaction to create a new gas pool for the given wallet.
12506
+ *
12507
+ * When `deferShare` is `true`, the response includes `gasPoolArg` and
12508
+ * `sharePolicyArg` so you can compose additional commands (e.g. deposit,
12509
+ * grant) before calling {@link getShareTx} to finalize.
12510
+ *
12511
+ * @param inputs.walletAddress - Wallet address to create the gas pool for.
12512
+ * @param inputs.initialDepositAmount - Optional initial deposit amount in MIST.
12513
+ * @param inputs.deferShare - When true, returns args without sharing yet.
12514
+ * @param inputs.tx - Optional transaction to extend.
12515
+ * @returns `tx` plus optional `gasPoolArg` and `sharePolicyArg` when deferred.
12516
+ */
12517
+ getCreateTx(inputs: Omit<ApiGasPoolCreateBody, "txKind"> & {
12518
+ tx?: Transaction;
12519
+ }): Promise<Omit<ApiGasPoolCreateResponse, "txKind"> & {
12520
+ tx: Transaction;
12521
+ }>;
12522
+ /**
12523
+ * Builds a transaction to deposit into the gas pool.
12524
+ *
12525
+ * Supports SUI and non-SUI deposits. For non-SUI deposits, the input coin
12526
+ * is swapped into SUI via the Aftermath router before depositing.
12527
+ *
12528
+ * @param inputs.walletAddress - Wallet address submitting the deposit.
12529
+ * @param inputs.isSponsoredTx - Whether to build the transaction for sponsored gas. Defaults to false.
12530
+ * @param inputs.coinType - Coin type to deposit. Defaults to SUI.
12531
+ * @param inputs.amount - Amount to deposit (required when sourcing from wallet or for non-SUI).
12532
+ * @param inputs.coinArg - PTB coin argument to use as input (if omitted, sourced from wallet).
12533
+ * @param inputs.slippage - Slippage tolerance for non-SUI swaps (defaults to 0.01).
12534
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
12535
+ * @param inputs.tx - Optional transaction to extend.
12536
+ * @returns {@link SdkTransactionResponse} with `tx`.
12537
+ */
12538
+ getDepositTx(inputs: Omit<ApiGasPoolDepositBody, "txKind"> & {
12539
+ tx?: Transaction;
12540
+ }): Promise<SdkTransactionResponse>;
12541
+ /**
12542
+ * Builds a transaction to withdraw SUI from the gas pool.
12543
+ *
12544
+ * When `deferTransfer` is `true`, the withdrawn coin is not transferred.
12545
+ * Instead, `withdrawnCoinArg` is returned for further PTB composition.
12546
+ *
12547
+ * @param inputs.walletAddress - Wallet address submitting the withdrawal.
12548
+ * @param inputs.amount - Amount of SUI to withdraw in MIST.
12549
+ * @param inputs.recipientAddress - Optional recipient (defaults to `walletAddress`).
12550
+ * @param inputs.deferTransfer - When true, returns the withdrawn coin arg instead of transferring.
12551
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
12552
+ * @param inputs.tx - Optional transaction to extend.
12553
+ * @returns `tx` plus optional `withdrawnCoinArg` when deferred.
12554
+ */
12555
+ getWithdrawTx(inputs: Omit<ApiGasPoolWithdrawBody, "txKind"> & {
12556
+ tx?: Transaction;
12557
+ }): Promise<Omit<ApiGasPoolWithdrawResponse, "txKind"> & {
12558
+ tx: Transaction;
12559
+ }>;
12560
+ /**
12561
+ * Builds a transaction to sponsor (rebate) the transaction sender
12562
+ * using SUI from the gas pool.
12563
+ *
12564
+ * @param inputs.walletAddress - Wallet address submitting the sponsor transaction.
12565
+ * @param inputs.amount - Amount of SUI to rebate in MIST.
12566
+ * @param inputs.tx - Optional transaction to extend.
12567
+ * @returns {@link SdkTransactionResponse} with `tx`.
12568
+ */
12569
+ getSponsorTx(inputs: Omit<ApiGasPoolSponsorBody, "txKind"> & {
12570
+ tx?: Transaction;
12571
+ }): Promise<SdkTransactionResponse>;
12572
+ /**
12573
+ * Builds a transaction to grant another wallet access to the gas pool.
12574
+ *
12575
+ * @param inputs.walletAddress - Owner wallet address.
12576
+ * @param inputs.targetWalletAddress - Wallet address to grant access to.
12577
+ * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
12578
+ * @param inputs.tx - Optional transaction to extend.
12579
+ * @returns {@link SdkTransactionResponse} with `tx`.
12580
+ */
12581
+ getGrantTx(inputs: Omit<ApiGasPoolGrantBody, "txKind"> & {
12582
+ tx?: Transaction;
12583
+ }): Promise<SdkTransactionResponse>;
12584
+ /**
12585
+ * Builds a transaction to revoke another wallet's access to the gas pool.
12586
+ *
12587
+ * @param inputs.walletAddress - Owner wallet address.
12588
+ * @param inputs.targetWalletAddress - Wallet address to revoke access from.
12589
+ * @param inputs.tx - Optional transaction to extend.
12590
+ * @returns {@link SdkTransactionResponse} with `tx`.
12591
+ */
12592
+ getRevokeTx(inputs: Omit<ApiGasPoolRevokeBody, "txKind"> & {
12593
+ tx?: Transaction;
12594
+ }): Promise<SdkTransactionResponse>;
12595
+ /**
12596
+ * Builds a transaction to share a gas pool that was created with `deferShare: true`.
12597
+ *
12598
+ * Use this after composing additional commands (deposit, grant, etc.) with
12599
+ * the `gasPoolArg` returned by {@link getCreateTx}.
12600
+ *
12601
+ * @param inputs.gasPoolArg - Gas pool argument from a deferred create.
12602
+ * @param inputs.sharePolicyArg - Share policy argument from a deferred create.
12603
+ * @param inputs.tx - Optional transaction to extend.
12604
+ * @returns {@link SdkTransactionResponse} with `tx`.
12605
+ */
12606
+ getShareTx(inputs: Omit<ApiGasPoolShareBody, "txKind"> & {
12607
+ tx?: Transaction;
12608
+ }): Promise<SdkTransactionResponse>;
12609
+ }
12610
+
11503
12611
  /**
11504
12612
  * The `Sui` class provides utilities to fetch core Sui chain information,
11505
12613
  * such as the system state. It also exposes a set of constant addresses
@@ -14850,8 +15958,8 @@ declare class LimitOrdersApi {
14850
15958
  }
14851
15959
 
14852
15960
  declare class MultisigApi {
14853
- private readonly Provider;
14854
15961
  readonly sharedCustodyAddresses: SharedCustodyAddresses;
15962
+ private readonly Provider;
14855
15963
  constructor(Provider: AftermathApi);
14856
15964
  getMultisigForUser(inputs: ApiMultisigUserBody): MultisigData;
14857
15965
  }
@@ -14993,7 +16101,6 @@ declare class PerpetualsApi implements MoveErrorsInterface {
14993
16101
  * Provides methods to interact with the Pools API.
14994
16102
  */
14995
16103
  declare class PoolsApi implements MoveErrorsInterface {
14996
- private readonly Provider;
14997
16104
  /**
14998
16105
  * Constants used in the pools API.
14999
16106
  */
@@ -15020,6 +16127,7 @@ declare class PoolsApi implements MoveErrorsInterface {
15020
16127
  withdrawV2: AnyObjectType;
15021
16128
  };
15022
16129
  readonly moveErrors: MoveErrors;
16130
+ private readonly Provider;
15023
16131
  /**
15024
16132
  * Creates an instance of PoolsApi.
15025
16133
  * @param {AftermathApi} Provider - An instance of AftermathApi.
@@ -15239,7 +16347,7 @@ declare class PoolsApi implements MoveErrorsInterface {
15239
16347
  slippage: Slippage;
15240
16348
  pool: Pool;
15241
16349
  referrer?: SuiAddress;
15242
- }) => Promise<TransactionObjectArgument>;
16350
+ }) => TransactionObjectArgument;
15243
16351
  /**
15244
16352
  * Fetches a transaction block for depositing in a pool.
15245
16353
  * @async
@@ -15313,12 +16421,12 @@ declare class PoolsApi implements MoveErrorsInterface {
15313
16421
  newFeeRecipient: SuiAddress;
15314
16422
  lpCoinType: CoinType;
15315
16423
  }, "tx">) => Transaction;
15316
- private tradeEventType;
15317
- private depositEventType;
15318
- private withdrawEventType;
15319
- private tradeV2EventType;
15320
- private depositV2EventType;
15321
- private withdrawV2EventType;
16424
+ private readonly tradeEventType;
16425
+ private readonly depositEventType;
16426
+ private readonly withdrawEventType;
16427
+ private readonly tradeV2EventType;
16428
+ private readonly depositV2EventType;
16429
+ private readonly withdrawV2EventType;
15322
16430
  }
15323
16431
 
15324
16432
  declare class ReferralVaultApi {
@@ -15743,21 +16851,21 @@ declare class EventsApiHelpers {
15743
16851
  fetchSubscribeToUserEvents: (_inputs: {
15744
16852
  address: SuiAddress;
15745
16853
  onEvent: (event: SuiEvent) => void;
15746
- }) => Promise<Unsubscribe>;
16854
+ }) => Promise<never>;
15747
16855
  fetchCastEventsWithCursor: <EventOnChainType, EventType>(inputs: {
15748
16856
  query: SuiEventFilter;
15749
16857
  eventFromEventOnChain: (eventOnChain: EventOnChainType) => EventType;
15750
16858
  } & EventsInputs) => Promise<EventsWithCursor<EventType>>;
15751
16859
  fetchEventsWithinTime: <T extends Event$1>(inputs: {
15752
16860
  fetchEventsFunc: (eventsInputs: EventsInputs) => Promise<EventsWithCursor<T>>;
15753
- timeUnit: QUnitType | OpUnitType;
15754
- time: number;
16861
+ timeMs: number;
15755
16862
  limitStepSize?: number;
15756
16863
  }) => Promise<T[]>;
15757
16864
  fetchAllEvents: <T>(inputs: {
15758
16865
  fetchEventsFunc: (eventsInputs: EventsInputs) => Promise<EventsWithCursor<T>>;
15759
16866
  limitStepSize?: number;
15760
16867
  }) => Promise<T[]>;
16868
+ private static resolveEventType;
15761
16869
  static suiEventOfTypeOrUndefined: (event: SuiEvent, eventType: AnyObjectType | (() => AnyObjectType)) => SuiEvent | undefined;
15762
16870
  static castEventOfTypeOrUndefined: <EventTypeOnChain, EventType>(event: SuiEvent, eventType: AnyObjectType | (() => AnyObjectType), castFunction: (eventOnChain: EventTypeOnChain) => EventType, exactMatch?: boolean) => EventType | undefined;
15763
16871
  static findCastEventsOrUndefined: <EventTypeOnChain, EventType>(inputs: {
@@ -15771,7 +16879,7 @@ declare class EventsApiHelpers {
15771
16879
  castFunction: (eventOnChain: EventTypeOnChain) => EventType;
15772
16880
  }) => EventType | undefined;
15773
16881
  static findCastEventInTransactionOrUndefined: <EventTypeOnChain, EventType>(transaction: SuiTransactionBlockResponse, eventType: AnyObjectType | (() => AnyObjectType), castFunction: (eventOnChain: EventTypeOnChain) => EventType) => EventType | undefined;
15774
- static findCastEventInTransactionsOrUndefined: <EventTypeOnChain, EventType>(transactions: SuiTransactionBlockResponse[], eventType: AnyObjectType | (() => AnyObjectType), castFunction: (eventOnChain: EventTypeOnChain) => EventType) => (EventType & ({} | null)) | undefined;
16882
+ static findCastEventInTransactionsOrUndefined: <EventTypeOnChain, EventType>(transactions: SuiTransactionBlockResponse[], eventType: AnyObjectType | (() => AnyObjectType), castFunction: (eventOnChain: EventTypeOnChain) => EventType) => EventType | undefined;
15775
16883
  static createEventType: (packageAddress: string, packageName: string, eventType: string, wrapperType?: string) => string;
15776
16884
  }
15777
16885
 
@@ -16362,7 +17470,7 @@ declare class Helpers {
16362
17470
  * @param arr - The input array.
16363
17471
  * @returns The index of the maximum value, or -1 if the array is empty.
16364
17472
  */
16365
- static indexOfMax: (arr: any[]) => number;
17473
+ static indexOfMax: <T extends number | bigint | string | Date>(arr: T[]) => number;
16366
17474
  private static uniqueObjectArray;
16367
17475
  /**
16368
17476
  * Returns a new array with unique elements from the input array,
@@ -16439,7 +17547,7 @@ declare class Helpers {
16439
17547
  * @param lastCollection - The second array.
16440
17548
  * @returns An array of `[firstCollection[i], lastCollection[i]]` pairs.
16441
17549
  */
16442
- static zip<S1, S2>(firstCollection: Array<S1>, lastCollection: Array<S2>): Array<[S1, S2]>;
17550
+ static zip<S1, S2>(firstCollection: S1[], lastCollection: S2[]): [S1, S2][];
16443
17551
  /**
16444
17552
  * Removes circular references from an object or array, returning a JSON-safe structure.
16445
17553
  * Any cyclic references are replaced with `undefined`.
@@ -16755,6 +17863,10 @@ declare class Aftermath extends Caller {
16755
17863
  * Returns an instance of `Referrals` for referral-based interactions in the protocol.
16756
17864
  */
16757
17865
  Referrals: () => Referrals;
17866
+ /**
17867
+ * Returns an instance of `GasPools` for shared gas pool interactions.
17868
+ */
17869
+ GasPools: () => GasPools;
16758
17870
  /**
16759
17871
  * Returns an instance of `Perpetuals` for futures or perpetual contract interactions.
16760
17872
  */
@@ -16825,4 +17937,4 @@ declare class Aftermath extends Caller {
16825
17937
  static casting: typeof Casting;
16826
17938
  }
16827
17939
 
16828
- export { type AfSuiRouterPoolObject, Aftermath, AftermathApi, 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 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 ApiPerpetualsCancelOrdersBody, type ApiPerpetualsCancelStopOrdersBody, type ApiPerpetualsCreateAccountBody, type ApiPerpetualsCreateVaultBody, type ApiPerpetualsCreateVaultCapBody, type ApiPerpetualsDeallocateCollateralBody, type ApiPerpetualsDepositCollateralBody, type ApiPerpetualsEditStopOrdersBody, type ApiPerpetualsExecutionPriceBody, type ApiPerpetualsExecutionPriceResponse, type ApiPerpetualsGrantAgentWalletTxBody, type ApiPerpetualsHistoricalDataWithCursorBody, type ApiPerpetualsHistoricalDataWithCursorResponse, type ApiPerpetualsLimitOrderBody, type ApiPerpetualsMarketCandleHistoryBody, type ApiPerpetualsMarketCandleHistoryResponse, type ApiPerpetualsMarketOrderBody, type ApiPerpetualsMarketOrderHistoryBody, type ApiPerpetualsMarketOrderHistoryResponse, type ApiPerpetualsMarkets24hrStatsResponse, type ApiPerpetualsMarketsBody, type ApiPerpetualsMarketsPricesBody, type ApiPerpetualsMarketsPricesResponse, type ApiPerpetualsMarketsResponse, type ApiPerpetualsMaxOrderSizeBody, type ApiPerpetualsOrderbooksBody, type ApiPerpetualsOrderbooksResponse, type ApiPerpetualsOwnedAccountCapsBody, type ApiPerpetualsOwnedAccountCapsResponse, type ApiPerpetualsOwnedVaultCapsBody, type ApiPerpetualsOwnedVaultCapsResponse, type ApiPerpetualsPlaceSlTpOrdersBody, type ApiPerpetualsPlaceStopOrdersBody, type ApiPerpetualsPreviewCancelOrdersBody, type ApiPerpetualsPreviewCancelOrdersResponse, type ApiPerpetualsPreviewEditCollateralBody, type ApiPerpetualsPreviewEditCollateralResponse, type ApiPerpetualsPreviewPlaceLimitOrderBody, type ApiPerpetualsPreviewPlaceMarketOrderBody, type ApiPerpetualsPreviewPlaceOrderResponse, type ApiPerpetualsPreviewSetLeverageBody, type ApiPerpetualsPreviewSetLeverageResponse, type ApiPerpetualsRevokeAgentWalletTxBody, type ApiPerpetualsSetLeverageTxBody, 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 ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxBody, type ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse, type ApiPerpetualsVaultPauseVaultForForceWithdrawRequestTxBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestResponse, type ApiPerpetualsVaultPreviewDepositBody, type ApiPerpetualsVaultPreviewDepositResponse, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsBody, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralBody, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse, 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 ConfigAddresses, type CreatedAccountEvent, type CreatedDaoFeePoolEvent, type CreatedStopOrderTicketEvent, type DaoFeePoolObject, type DaoFeePoolOwnerCapObject, type DaoFeePoolsAddresses, type DcaAddresses, type DeallocatedCollateralEvent, type DecimalsScalar, type DeletedStopOrderTicketEvent, type DepositedCollateralEvent, type DynamicFieldObjectsWithCursor, type DynamicFieldsInputs, type DynamicFieldsWithCursor, type DynamicGasAddresses, type EditedStopOrderTicketDetailsEvent, type EditedStopOrderTicketExecutorEvent, 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, 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 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 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 PerpetualsFilledOrderData, type PerpetualsIntegratorVaultData, PerpetualsMarket, type PerpetualsMarket24hrStats, type PerpetualsMarketCandleDataPoint, type PerpetualsMarketData, type PerpetualsMarketId, type PerpetualsMarketOrderHistoryData, type PerpetualsMarketParams, type PerpetualsMarketState, type PerpetualsOrderData, type PerpetualsOrderEvent, type PerpetualsOrderId, type PerpetualsOrderIdAsString, type PerpetualsOrderInfo, type PerpetualsOrderPrice, PerpetualsOrderSide, PerpetualsOrderType, type PerpetualsOrderbook, type PerpetualsOrderbookDeltas, type PerpetualsOrderbookItem, type PerpetualsPartialVaultCap, type PerpetualsPosition, type PerpetualsStopOrderData, PerpetualsStopOrderType, 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 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 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 SdkPerpetualsCancelOrdersPreviewInputs, type SdkPerpetualsPlaceLimitOrderInputs, type SdkPerpetualsPlaceLimitOrderPreviewInputs, type SdkPerpetualsPlaceMarketOrderInputs, type SdkPerpetualsPlaceMarketOrderPreviewInputs, 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 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 ValidatorConfigObject, type ValidatorOperationCapObject, 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 };
17940
+ export { type AfSuiRouterPoolObject, Aftermath, AftermathApi, 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 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 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 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 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, 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 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 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 };