import * as _mysten_sui_transactions from '@mysten/sui/transactions';
import { Transaction, TransactionObjectArgument, TransactionArgument, Argument } from '@mysten/sui/transactions';
import * as _mysten_sui_jsonRpc from '@mysten/sui/jsonRpc';
import { EventId, DynamicFieldInfo, SuiTransactionBlockResponse, CoinMetadata, SuiValidatorSummary, ValidatorsApy, SuiSystemStateSummary, SuiObjectResponse, CoinStruct, SuiEvent, SuiEventFilter, TransactionEffects, SuiObjectDataOptions, SuiObjectDataFilter, SuiTransactionBlockResponseQuery, SuiJsonRpcClient, DynamicFieldName, DisplayFieldsResponse } from '@mysten/sui/jsonRpc';
import { MultiSigPublicKey } from '@mysten/sui/multisig';
import { BcsType } from '@mysten/sui/bcs';
import { Keypair } from '@mysten/sui/cryptography';

/**
 * Represents the body payload sent to the dynamic gas service,
 * which includes the serialized transaction and any user-provided
 * gas configuration (e.g., coin type).
 */
interface ApiDynamicGasBody {
    /**
     * The serialized transaction block in base64 or similar format.
     */
    serializedTx: SerializedTransaction;
    /**
     * The address of the user for whom the dynamic gas is being set.
     */
    walletAddress: SuiAddress;
    /**
     * The coin type to be used for gas payment (e.g., "0x2::sui::SUI").
     */
    gasCoinType: CoinType;
}
/**
 * Represents the response from the dynamic gas service, typically returning
 * updated transaction bytes and possibly a sponsored signature if the
 * transaction gas is being partially or fully sponsored.
 */
interface ApiDynamicGasResponse {
    /**
     * The modified transaction bytes that incorporate a gas coin or sponsor information.
     */
    txBytes: SerializedTransaction;
    /**
     * A signature used to sponsor or verify the updated transaction, if applicable.
     */
    sponsoredSignature: string;
}

type SuiNetwork = "DEVNET" | "TESTNET" | "LOCAL" | "MAINNET";

/**
 * Represents a token or currency balance in the system, defined as a bigint.
 */
type Balance = bigint;
/**
 * Represents a fixed-point integer using a bigint. May be used for calculations requiring
 * precision (e.g., decimal-like math).
 */
type IFixed = bigint;
type SuiCheckpoint = bigint;
/**
 * Represents a gas budget for transactions. Typically a raw `number`.
 */
type GasBudget = number;
/**
 * Represents a timestamp in milliseconds or seconds. Typically a raw `number`.
 */
type Timestamp = number;
/**
 * A single byte, typically expressed as a `number` from 0 to 255.
 */
type Byte = number;
/**
 * Defines the allowable slippage in a trading scenario, expressed as an unscaled percentage (e.g., 0.01 = 1%).
 */
type Slippage = number;
/**
 * Represents an unscaled percentage (e.g., 0.01 = 1%).
 */
type Percentage = number;
/**
 * Annual percentage rate (APR), expressed as a `number` (e.g., 0.01 = 1%).
 */
type Apr = number;
/**
 * Annual percentage yield (APY), expressed as a `number` (e.g., 0.01 = 1%).
 */
type Apy = number;
/**
 * Represents the version of an on-chain object, expressed as a `number`.
 */
type ObjectVersion = number;
/**
 * Represents an error code from a Move smart contract, typically a `number`.
 */
type MoveErrorCode = number;
/**
 * Represents a serialized transaction in a base64 or similar format.
 */
type SerializedTransaction = string;
/**
 * Represents raw transaction bytes in a base64 or similar format.
 */
type TxBytes = string;
/**
 * Represents a BigInt in string form, typically used for JSON serialization.
 */
type BigIntAsString = string;
/**
 * Represents a numeric value in string form, typically used for JSON serialization.
 */
type NumberAsString = string;
/**
 * Represents an IFixed value in string form, typically used for JSON serialization.
 */
type IFixedAsString = string;
/**
 * A key type used in certain contexts, typically a string (e.g., "ed25519", "secp256k1").
 */
type KeyType = string;
/**
 * Represents any string identifying an object type, such as "0x2::sui::SUI".
 */
type AnyObjectType = string;
/**
 * Represents the name of a Move module, e.g. "Router" or "Coin".
 */
type ModuleName = string;
/**
 * Represents the name of a Move function, e.g. "swap" or "mint".
 */
type FunctionName = string;
/**
 * Represents the ID of a published Move package on the Sui network, e.g. "0x<package_id>".
 */
type PackageId = string;
/**
 * Represents a color in a string format (e.g., "#FFFFFF" or "blue").
 */
type Color = string;
/**
 * Represents a URL in string format (e.g., "https://example.com").
 */
type Url = string;
/**
 * Represents a local resource URL (e.g., "file://path/to/resource").
 */
type LocalUrl = string;
/**
 * Represents a file path (e.g., "/usr/local/bin").
 */
type FilePath = string;
/**
 * Represents an on-chain object ID (e.g., "0x<32-byte_hex>").
 */
type ObjectId = string;
/**
 * Represents a Sui wallet address (e.g., "0x<address>").
 */
type SuiAddress = string;
/**
 * Represents a TransactionDigest from a Sui transaction, typically a hex-encoded string.
 */
type TransactionDigest = string;
/**
 * Represents a single byte in string form, usually hex-encoded (e.g., "0xFF").
 */
type StringByte = string;
/**
 * Represents an object's digest, typically a hex-encoded string.
 */
type ObjectDigest = string;
/**
 * Represents an IFixed type as an array of bytes.
 */
type IFixedAsBytes = Byte[];
/**
 * Represents an IFixed type in string form, each byte also in string form.
 */
type IFixedAsStringBytes = string[];
/**
 * Represents an ID as an array of bytes in string form.
 */
type IdAsStringBytes = string[];
/**
 * Holds information about third-party fees in transactions, including the recipient
 * and the fee percentage to be collected.
 */
interface ExternalFee {
    /**
     * Address of the recipient for collected fees.
     */
    recipient: SuiAddress;
    /**
     * Percentage of the fee to be collected.
     * @remarks 0.54 = 54%
     */
    feePercentage: Percentage;
}
/**
 * A function signature for signing arbitrary messages. Typically used in
 * cryptographic contexts.
 */
type SignMessageCallback = (args: {
    message: Uint8Array;
}) => Promise<{
    signature: string;
}>;
/**
 * Generic shape for events with optional paging cursor data.
 */
interface IndexerEventsWithCursor<EventType> {
    /**
     * An array of events of type `EventType`.
     */
    events: EventType[];
    /**
     * The next cursor position. If undefined, no more events are available.
     */
    nextCursor: number | undefined;
}
/**
 * A generic shape for events with a Sui-based cursor structure.
 */
interface EventsWithCursor<EventType> {
    /**
     * An array of events of type `EventType`.
     */
    events: EventType[];
    /**
     * The next cursor position. If null, no more events are available.
     */
    nextCursor: EventId | null;
}
/**
 * Represents a Sui event, typically including type, timestamp, and transaction digest.
 */
interface Event$1 {
    /**
     * A string identifying the Move event type.
     */
    type: AnyObjectType;
    /**
     * Timestamp of the event, if available.
     */
    timestamp: Timestamp | undefined;
    /**
     * The transaction digest associated with the event.
     */
    txnDigest: TransactionDigest;
}
/**
 * Common inputs for event retrieval, including an optional cursor and limit.
 */
interface EventsInputs {
    /**
     * Cursor for pagination, often an EventId or numeric index.
     */
    cursor?: EventId;
    /**
     * Limit for pagination, specifying the maximum number of events.
     */
    limit?: number;
}
/**
 * Inputs for retrieving user events, extending from general event inputs
 * and including the user's wallet address.
 */
type UserEventsInputs = EventsInputs & {
    walletAddress: SuiAddress;
};
/**
 * Represents a Sui object, including its ID and type.
 */
interface Object$1 {
    /**
     * The on-chain object ID.
     */
    objectId: ObjectId;
    /**
     * The Move type of the object.
     */
    objectType: AnyObjectType;
}
/**
 * Holds the dynamic fields and an optional next cursor for pagination.
 */
interface DynamicFieldsWithCursor {
    /**
     * An array of dynamic field information objects.
     */
    dynamicFields: DynamicFieldInfo[];
    /**
     * The next cursor for pagination. If null, no more fields are available.
     */
    nextCursor: ObjectId | null;
}
/**
 * Holds the dynamic field objects and an optional next cursor for pagination.
 */
interface DynamicFieldObjectsWithCursor<ObjectType> {
    /**
     * An array of objects derived from dynamic fields.
     */
    dynamicFieldObjects: ObjectType[];
    /**
     * The next cursor for pagination. If null, no more fields are available.
     */
    nextCursor: ObjectId | null;
}
/**
 * Inputs for fetching dynamic fields, including optional cursor and limit for pagination.
 */
interface DynamicFieldsInputs {
    cursor?: ObjectId;
    limit?: number;
}
/**
 * A collection of transactions with a cursor for pagination.
 */
interface TransactionsWithCursor {
    /**
     * An array of Sui transactions.
     */
    transactions: SuiTransactionBlockResponse[];
    /**
     * The next cursor for pagination. If null, no more transactions are available.
     */
    nextCursor: TransactionDigest | null;
}
/**
 * Generic shape for API data requests that include pagination parameters.
 */
interface ApiDataWithCursorBody<CursorType> {
    /**
     * Cursor for pagination.
     */
    cursor?: CursorType;
    /**
     * Limit for pagination.
     */
    limit?: number;
}
/**
 * Specifies the shape for API calls involving events.
 */
type ApiEventsBody = ApiDataWithCursorBody<EventId>;
/**
 * Specifies the shape for API calls involving dynamic fields.
 */
type ApiDynamicFieldsBody = ApiDataWithCursorBody<ObjectId>;
/**
 * Specifies the shape for API calls involving transactions.
 */
type ApiTransactionsBody = ApiDataWithCursorBody<TransactionDigest>;
/**
 * Body payload for indexer-based event queries, using a numeric cursor.
 */
type ApiIndexerEventsBody = ApiDataWithCursorBody<number>;
/**
 * Body payload for indexer-based user events, extending from `ApiIndexerEventsBody`.
 */
type ApiIndexerUserEventsBody = ApiIndexerEventsBody & {
    /**
     * The wallet address of the user.
     */
    walletAddress: SuiAddress;
};
/**
 * Represents query parameters for retrieving data with skip/limit pagination in an indexer.
 */
interface IndexerDataWithCursorQueryParams {
    skip: number;
    limit: number;
}
/**
 * Configuration for constructing a `Caller`. Includes network specification
 * and optional access token for authentication.
 */
interface CallerConfig {
    /**
     * The target Sui network (e.g., "MAINNET", "TESTNET"). Determines the
     * default API host when `baseUrl` is not supplied.
     */
    network?: SuiNetwork;
    /**
     * Explicit override for the API host (e.g. `"http://localhost:8080"`).
     * Takes precedence over the network-derived default. Use this to point
     * the SDK at a custom or local backend.
     */
    baseUrl?: string;
    /**
     * Access token used for authenticated requests, if required.
     */
    accessToken?: string;
    /**
     * URL path segment placed between the host and the package prefix when
     * building API call URLs (`{host}/{apiEndpoint}/{package}/...`).
     * Defaults to `"api"`. Override only when targeting a backend that
     * mounts the Aftermath API under a different path.
     */
    apiEndpoint?: string;
}
interface ApiTransactionResponse {
    txKind: SerializedTransaction;
    sponsorSignature?: string;
}
interface SdkTransactionResponse {
    tx: Transaction;
}

interface KioskOwnerCapObject extends Object$1 {
    kioskObjectId: ObjectId;
}
interface KioskObject extends Object$1 {
    kioskOwnerCapId: ObjectId;
    nfts: Nft[];
    isPersonal: boolean;
}
interface Nft {
    info: NftInfo;
    display: NftDisplay;
}
interface NftInfo {
    objectId: ObjectId;
    objectType: AnyObjectType;
}
interface NftDisplay {
    suggested: NftDisplaySuggested;
    other: NftDisplayOther;
}
interface NftDisplaySuggested {
    name?: string;
    link?: Url;
    imageUrl?: Url;
    description?: string;
    projectUrl?: Url;
    creator?: string;
}
type NftDisplayOther = Record<string, string>;

type CoinGeckoChain = Lowercase<"Ethereum" | "Arbitrum" | "Bsc" | "Solana" | "Sui" | "Polygon" | "Avalanche" | "Optimism" | "Base">;
type CoinGeckoCoinApiId = string;
interface CoinGeckoCoinData {
    chain: CoinGeckoChain | "";
    apiId: CoinGeckoCoinApiId;
    name: string;
    symbol: CoinSymbol;
    coinType: CoinType;
}
interface CoinGeckoCoinSymbolData {
    apiId: CoinGeckoCoinApiId;
    name: string;
    symbol: CoinSymbol;
}

type RpcEndpoint = string;
interface ConfigAddresses {
    faucet?: FaucetAddresses;
    staking?: StakingAddresses;
    pools?: PoolsAddresses;
    daoFeePools?: DaoFeePoolsAddresses;
    suiFrens?: SuiFrensAddresses;
    nftAmm?: NftAmmAddresses;
    router?: RouterAddresses;
    referralVault?: ReferralVaultAddresses;
    perpetuals?: PerpetualsAddresses;
    perpetualsVaults?: PerpetualsVaultsAddresses;
    farms?: FarmsAddresses;
    dynamicGas?: DynamicGasAddresses;
    scallop?: ScallopAddresses;
    dca?: DcaAddresses;
    limitOrders?: LimitAddresses;
    sharedCustody?: SharedCustodyAddresses;
    nfts?: NftsAddresses;
}
interface FaucetAddresses {
    packages: {
        faucet: SuiAddress;
        suiFrensGenesisWrapper: SuiAddress;
    };
    objects: {
        faucet: ObjectId;
        suiFrensMint: ObjectId;
    };
}
interface StakingAddresses {
    packages: {
        lsd: SuiAddress;
        afsui: SuiAddress;
        events: SuiAddress;
    };
    objects: {
        stakedSuiVault: ObjectId;
        stakedSuiVaultState: ObjectId;
        safe: ObjectId;
        treasury: ObjectId;
        referralVault: ObjectId;
        validatorConfigsTable: ObjectId;
        aftermathValidator: ObjectId;
    };
}
interface PoolsAddresses {
    packages: {
        amm: SuiAddress;
        ammInterface: SuiAddress;
        events: SuiAddress;
        eventsV2: SuiAddress;
    };
    objects: {
        poolRegistry: ObjectId;
        protocolFeeVault: ObjectId;
        treasury: ObjectId;
        insuranceFund: ObjectId;
        lpCoinsTable: ObjectId;
    };
    other?: {
        createLpCoinPackageCompilations: Record<CoinDecimal, string>;
    };
}
interface DaoFeePoolsAddresses {
    packages: {
        amm: SuiAddress;
        events: SuiAddress;
    };
    objects: {
        version: ObjectId;
    };
}
interface SuiFrensAddresses {
    packages: {
        suiFrens: SuiAddress;
        suiFrensBullshark: SuiAddress;
        accessories: SuiAddress;
        suiFrensVault: SuiAddress;
        suiFrensVaultCapyLabsExtension: SuiAddress;
    };
    objects: {
        capyLabsApp: ObjectId;
        suiFrensVault: ObjectId;
        suiFrensVaultStateV1: ObjectId;
        suiFrensVaultStateV1MetadataTable: ObjectId;
        suiFrensVaultCapyLabsExtension: ObjectId;
    };
}
interface NftAmmAddresses {
    packages: {
        nftAmm: SuiAddress;
    };
    objects: {
        protocolFeeVault: ObjectId;
        treasury: ObjectId;
        insuranceFund: ObjectId;
        referralVault: ObjectId;
    };
}
interface RouterAddresses {
    packages: {
        utils: SuiAddress;
    };
}
interface ReferralVaultAddresses {
    packages: {
        referralVault: SuiAddress;
    };
    objects: {
        referralVault: ObjectId;
    };
}
interface PerpetualsAddresses {
    packages: {
        events: SuiAddress;
    };
    objects: {
        registry: ObjectId;
    };
}
interface PerpetualsVaultsAddresses {
    other: {
        createLpCoinPackageCompilation: string;
    };
}
interface FarmsAddresses {
    packages: {
        vaults: SuiAddress;
        vaultsInitial: SuiAddress;
        vaultsV2: SuiAddress;
        eventsV2: SuiAddress;
    };
    objects: {
        version: ObjectId;
    };
}
interface DynamicGasAddresses {
    sponsorAddress: SuiAddress;
}
interface ScallopAddresses {
    objects: {
        version: ObjectId;
        afSuiMarket: ObjectId;
        coinDecimalsRegistry: ObjectId;
        xOracle: ObjectId;
    };
}
interface DcaAddresses {
    packages: {
        dca: SuiAddress;
        events: SuiAddress;
        eventsV2: SuiAddress;
    };
    objects: {
        readonly config: ObjectId;
    };
}
interface LimitAddresses {
    packages: {
        limitOrders: SuiAddress;
        events: SuiAddress;
    };
}
interface SharedCustodyAddresses {
    address: ObjectId;
    publicKey: ObjectId;
}
interface NftsAddresses {
    packages: {
        mystenTransferPolicy: SuiAddress;
    };
}

interface MoveErrorsInterface {
    readonly moveErrors: MoveErrors;
}
type MoveErrors = Record<PackageId, Record<"ANY" | ModuleName, Record<MoveErrorCode, string>>>;
/** Parsed location of a Move abort, the output of `Helpers.parseMoveErrorMessage`. */
interface ParsedMoveError {
    errorCode: MoveErrorCode;
    packageId: ObjectId;
    module: ModuleName;
}
/** Parsed Move abort plus the human-readable message resolved from the registry. */
interface TranslatedMoveError extends ParsedMoveError {
    error: string;
}

/**
 * Interface specifying allowable rate limits for an auth account.
 * The `p` field indicates the path or endpoint (e.g., "/pools"),
 * while `m` indicates the method-based limits (GET or POST, or both).
 */
interface RateLimit {
    /**
     * The path or endpoint to be rate-limited, e.g. "/pools" or "/router/trade".
     */
    p: string;
    /**
     * The method-based limit specification.
     * For example:
     * ```
     * { GET: { l: 100 } }
     * { POST: { l: 50 } }
     * { GET: { l: 100 }, POST: { l: 100 } }
     * ```
     */
    m: {
        GET: {
            l: number;
        };
    } | {
        POST: {
            l: number;
        };
    } | {
        GET: {
            l: number;
        };
        POST: {
            l: number;
        };
    };
}
/**
 * The request body for creating a new auth account, typically
 * reserved for admin usage. The admin signs a JSON containing
 * an "AccountCreate" `method` plus desired sub-account data.
 */
interface ApiCreateAuthAccountBody {
    /**
     * The admin's Sui address, zero-padded if necessary.
     */
    walletAddress: SuiAddress;
    /**
     * The signature of the serialized JSON data, from the admin's private key.
     */
    signature: string;
    /**
     * The JSON string that was signed, containing the method and sub-account details.
     */
    serializedJson: string;
}
/**
 * The request body for obtaining or refreshing an access token. The user signs
 * a "GetAccessToken" method message plus any relevant fields.
 */
interface ApiGetAccessTokenBody {
    /**
     * The user's Sui address, zero-padded if needed.
     */
    walletAddress: SuiAddress;
    /**
     * The signature over the JSON-serialized request data (nonce, date, etc.).
     */
    signature: string;
    /**
     * The actual JSON string that was signed, e.g.:
     * ```
     * {
     *   "date": 1234567890,
     *   "nonce": 512,
     *   "method": "GetAccessToken",
     *   "value": {}
     * }
     * ```
     */
    serializedJson: string;
}
/**
 * The response returned when a user obtains or refreshes an access token,
 * containing the token string, the HTTP header name (usually "Authorization"),
 * and the token's expiration timestamp in milliseconds.
 */
interface ApiGetAccessTokenResponse {
    /**
     * The newly issued access token to be used in `Authorization` headers.
     */
    accessToken: string;
    /**
     * The header key that should contain `accessToken` (e.g., "Authorization").
     */
    header: string;
    /**
     * The UNIX timestamp (milliseconds) after which the token is invalid.
     */
    expirationTimestamp: Timestamp;
}

/**
 * Represents the decimal precision of a coin (e.g., 9 or 18).
 */
type CoinDecimal = number;
/**
 * A string that uniquely identifies a coin type in the Sui network
 * (e.g., "0x2::sui::SUI").
 */
type CoinType = string;
/**
 * Represents a short symbol or ticker for a coin (e.g., "SUI", "BTC").
 */
type CoinSymbol = string;
/**
 * Represents a coin with an amount in integer or floating form, typically used
 * to specify a user’s holding or a transaction amount.
 */
interface CoinWithAmount {
    /**
     * The coin type, e.g. "0x2::sui::SUI".
     */
    coin: CoinType;
    /**
     * The amount of the coin, typically expressed as an integer number of smallest units.
     */
    amount: number;
}
/**
 * Represents a coin with an amount that can be `undefined`, typically for optional or
 * deferred usage scenarios.
 */
interface CoinWithAmountOrUndefined {
    /**
     * The coin type, e.g. "0x2::sui::SUI".
     */
    coin: CoinType;
    /**
     * The amount of the coin, which can be `undefined`.
     */
    amount: number | undefined;
}
/**
 * Represents an amount in both coin denomination and USD value for reference.
 */
interface AmountInCoinAndUsd {
    /**
     * The amount of the coin in smallest units.
     */
    amount: number;
    /**
     * The USD equivalent of that coin amount.
     */
    amountUsd: number;
}
/**
 * Maps a coin type to a numerical balance. Typically used to store multiple
 * coin balances under their respective coin types.
 */
type CoinsToBalance = Record<CoinType, Balance>;
/**
 * Maps a coin type to a numerical balance, which may be `undefined`.
 */
type CoinsToBalanceOrUndefined = Record<CoinType, Balance | undefined>;
/**
 * Maps a coin type to its price, typically as a number in USD or another fiat currency.
 */
type CoinsToPrice = Record<CoinType, number>;
/**
 * Maps a coin type to its on-chain decimal precision.
 */
type CoinsToDecimals = Record<CoinType, CoinDecimal>;
/**
 * Maps a coin type to price information, typically containing a price and a 24-hour change.
 */
type CoinsToPriceInfo = Record<CoinType, CoinPriceInfo>;
/**
 * Maps a coin symbol (e.g., "SUI") to its price information, typically containing a price and a 24-hour change.
 */
type CoinSymbolsToPriceInfo = Record<CoinSymbol, CoinPriceInfo>;
/**
 * Maps a coin symbol (e.g., "SUI") to an array of possible coin types (e.g., "0x2::sui::SUI").
 */
type CoinSymbolToCoinTypes = Record<CoinSymbol, CoinType[]>;
/**
 * Represents pricing information for a coin, including current price and 24-hour percentage change.
 */
interface CoinPriceInfo {
    /**
     * The current price in USD or another currency.
     */
    price: number;
    /**
     * The 24-hour percentage change of the coin price.
     * @remarks 0.54 = 54%
     */
    priceChange24HoursPercentage: Percentage;
}
/**
 * Extends the Sui `CoinMetadata` with optional properties relevant to external data
 * sources (e.g., CoinGecko).
 */
type CoinMetadaWithInfo = CoinMetadata & {
    /**
     * Indicates whether this coin's metadata was generated automatically.
     */
    isGenerated?: boolean;
    /**
     * The associated CoinGecko API ID, if available.
     */
    coingeckoId?: CoinGeckoCoinApiId;
};
/**
 * Represents a coin reference in the Move environment, using either an on-chain ObjectId
 * or an input index or result index from a transaction.
 */
type ServiceCoinData = {
    Coin: ObjectId;
} | {
    Input: number;
} | {
    Result: number;
} | {
    NestedResult: [number, number];
};
/**
 * **Legacy type** representing a coin reference in the Move environment, using
 * older transaction output indexing structures.
 */
type ServiceCoinDataV2 = "Gas" | {
    Input: number;
} | {
    Result: number;
} | {
    NestedResult: [number, number];
};

/**
 * A multiplier type (in fixed-point bigint) used to scale a staked amount based on lock duration.
 * Typically, 1.0 is represented as 1e9 (i.e., `FixedUtils.fixedOneB`).
 */
type FarmsMultiplier = bigint;
/**
 * Enumerates the supported farm system versions.
 */
type FarmsVersion = 1 | 2;
/**
 * A union type indicating whether an action is authorized by the `ownerCapId`
 * or by a `oneTimeAdminCapId`.
 */
type FarmOwnerOrOneTimeAdminCap = {
    ownerCapId: ObjectId;
} | {
    oneTimeAdminCapId: ObjectId;
};
/**
 * Indicates how strictly the lock duration is enforced in the vault.
 * - **Strict**: The position cannot be unlocked before the lock period ends.
 * - **Relaxed**: The position can be unlocked early, but may have penalized rewards.
 */
type FarmsLockEnforcement = "Strict" | "Relaxed";
/**
 * Describes a single reward coin's parameters and state within a staking pool.
 */
interface FarmsStakingPoolRewardCoin {
    /**
     * The coin type of this reward (e.g., "0x2::sui::SUI").
     */
    coinType: CoinType;
    /**
     * The total number of reward tokens allocated for this pool (in smallest units).
     */
    rewards: Balance;
    /**
     * Represents how many rewards are allocated per share in the pool. The share
     * is typically the "stakedAmountWithMultiplier".
     */
    rewardsAccumulatedPerShare: Balance;
    /**
     * The emission rate per emission schedule for this reward coin. For example, if
     * `emissionSchedulesMs` is 1 hour, then this emissionRate is distributed each hour.
     */
    emissionRate: Balance;
    /**
     * The interval (in ms) at which the emissionRate is released.
     */
    emissionSchedulesMs: Timestamp;
    /**
     * The timestamp (ms) when emission for this reward coin starts.
     */
    emissionStartTimestamp: Timestamp;
    /**
     * The last timestamp (ms) at which rewards were emitted for this reward coin.
     */
    lastRewardTimestamp: Timestamp;
    /**
     * The total number of rewards still available. If we have distributed
     * part of `rewards`, the remainder is `rewardsRemaining`.
     */
    rewardsRemaining: Balance;
    /**
     * The actual number of reward tokens in the pool's on-chain object. This can differ
     * from `rewards` for internal or reserved logic.
     */
    actualRewards: Balance;
}
/**
 * Represents the core object for a staking pool (a "vault"). It includes
 * information about staking amounts, locking constraints, reward coins,
 * and emission parameters.
 */
interface FarmsStakingPoolObject extends Object$1 {
    /**
     * The coin type that users stake into this pool.
     */
    stakeCoinType: CoinType;
    /**
     * The total amount of staked tokens (principal) in this pool, in smallest units.
     */
    stakedAmount: Balance;
    /**
     * The total staked amount multiplied by users' lock multipliers. Used for reward calculations.
     */
    stakedAmountWithMultiplier: Balance;
    /**
     * The minimum time (ms) that a position can be locked for a valid multiplier.
     */
    minLockDurationMs: Timestamp;
    /**
     * The maximum time (ms) that a position can be locked. The position's lock multiplier is derived from
     * minLockDurationMs to maxLockDurationMs.
     */
    maxLockDurationMs: Timestamp;
    /**
     * The maximum lock multiplier in fixed-point representation (1.0 = 1e9).
     */
    maxLockMultiplier: FarmsMultiplier;
    /**
     * An array of reward coins that this pool distributes.
     */
    rewardCoins: FarmsStakingPoolRewardCoin[];
    /**
     * The timestamp (ms) after which no further emissions occur.
     */
    emissionEndTimestamp: Timestamp;
    /**
     * The minimum stake required to open a position in this pool.
     */
    minStakeAmount: Balance;
    /**
     * Whether the pool is forcibly unlocked. If `true`, positions might be able to exit early.
     */
    isUnlocked: boolean;
    /**
     * The lock enforcement policy for this pool.
     * - "Strict": positions must be unlocked before any principal can be withdrawn
     * - "Relaxed": positions can withdraw principal while locked, forfeiting pro-rata locked rewards
     */
    lockEnforcement: FarmsLockEnforcement;
    /**
     * Indicates whether this is version 1 or version 2 of the farm system.
     */
    version: FarmsVersion;
}
/**
 * Represents the owner's capability to manage a specific staking pool. Typically
 * allows updating emission rates, reward coins, or other parameters.
 */
interface StakingPoolOwnerCapObject extends Object$1 {
    /**
     * The staking pool (vault) ID associated with this owner cap.
     */
    stakingPoolId: ObjectId;
}
/**
 * Represents a one-time admin capability object for a specific staking pool. Allows
 * the holder to initialize a new reward coin once.
 */
interface StakingPoolOneTimeAdminCapObject extends Object$1 {
    /**
     * The staking pool (vault) ID associated with this admin cap.
     */
    stakingPoolId: ObjectId;
}
/**
 * Represents the rewards accumulated and owed to a staked position for a specific coin type.
 */
interface FarmsStakedPositionRewardCoin {
    /**
     * The coin type of the reward.
     */
    coinType: CoinType;
    /**
     * The base (non-multiplied) rewards accrued since the position was opened or last updated.
     */
    baseRewardsAccumulated: Balance;
    /**
     * The base rewards debt, representing the total base rewards from time t0 to the last update checkpoint.
     */
    baseRewardsDebt: Balance;
    /**
     * The multiplier-based rewards accrued, factoring in the lock multiplier, since the position was opened or last updated.
     */
    multiplierRewardsAccumulated: Balance;
    /**
     * The multiplier-based rewards debt, from time t0 to the last update checkpoint.
     */
    multiplierRewardsDebt: Balance;
}
/**
 * Represents a user's staked position in a specific staking pool, including
 * the lock parameters, staked amounts, and accumulated rewards.
 */
interface FarmsStakedPositionObject extends Object$1 {
    /**
     * The on-chain object ID of the pool in which this position is staked.
     */
    stakingPoolObjectId: ObjectId;
    /**
     * The coin type that was staked into this position (matching the pool's stakeCoinType).
     */
    stakeCoinType: CoinType;
    /**
     * The amount of principal staked in smallest units.
     */
    stakedAmount: Balance;
    /**
     * The principal multiplied by the lock multiplier.
     */
    stakedAmountWithMultiplier: Balance;
    /**
     * The timestamp (ms) when this position’s lock started.
     */
    lockStartTimestamp: Timestamp;
    /**
     * The duration (ms) for which this position is locked.
     */
    lockDurationMs: Timestamp;
    /**
     * The current lock multiplier in fixed-point representation.
     */
    lockMultiplier: FarmsMultiplier;
    /**
     * An array of reward coins that track base + multiplier rewards for this position.
     */
    rewardCoins: FarmsStakedPositionRewardCoin[];
    /**
     * The last time (ms) that rewards were updated or harvested for this position.
     */
    lastHarvestRewardsTimestamp: Timestamp;
    /**
     * The farm system version of this staked position (1 or 2).
     */
    version: FarmsVersion;
}
/**
 * A partial staked position structure sometimes used internally, excluding
 * certain fields like `coinType`.
 */
type PartialFarmsStakedPositionObject = Omit<FarmsStakedPositionObject, "rewardCoins"> & {
    rewardCoins: Omit<FarmsStakedPositionRewardCoin, "coinType">[];
};
/**
 * A union type representing any possible event from a farm (vault) system.
 */
type FarmEvent = FarmsAddedRewardEvent | FarmsCreatedVaultEvent | FarmsDepositedPrincipalEvent | FarmsDestroyedStakedPositionEvent | FarmsHarvestedRewardsEvent | FarmsIncreasedEmissionsEvent | FarmsInitializedRewardEvent | FarmsJoinedEvent | FarmsLockedEvent | FarmsSplitEvent | FarmsStakedEvent | FarmsStakedRelaxedEvent | FarmsUnlockedEvent | FarmsWithdrewPrincipalEvent;
/**
 * A union type for events that specifically involve user interactions with a farm,
 * such as depositing principal, harvesting, or unlocking.
 */
type FarmUserEvent = FarmsDepositedPrincipalEvent | FarmsHarvestedRewardsEvent | FarmsLockedEvent | FarmsStakedEvent | FarmsUnlockedEvent | FarmsWithdrewPrincipalEvent;
/**
 * Type guard to determine if a `FarmUserEvent` is a `FarmsDepositedPrincipalEvent`.
 */
declare const isFarmsDepositedPrincipalEvent: (event: FarmUserEvent) => event is FarmsDepositedPrincipalEvent;
/**
 * Type guard to determine if a `FarmUserEvent` is a `FarmsHarvestedRewardsEvent`.
 */
declare const isFarmsHarvestedRewardsEvent: (event: FarmUserEvent) => event is FarmsHarvestedRewardsEvent;
/**
 * Type guard to determine if a `FarmUserEvent` is a `FarmsLockedEvent`.
 */
declare const isFarmsLockedEvent: (event: FarmUserEvent) => event is FarmsLockedEvent;
/**
 * Type guard to determine if a `FarmUserEvent` is a `FarmsStakedEvent`.
 */
declare const isFarmsStakedEvent: (event: FarmUserEvent) => event is FarmsStakedEvent;
/**
 * Type guard to determine if a `FarmUserEvent` is a `FarmsUnlockedEvent`.
 */
declare const isFarmsUnlockedEvent: (event: FarmUserEvent) => event is FarmsUnlockedEvent;
/**
 * Type guard to determine if a `FarmUserEvent` is a `FarmsWithdrewPrincipalEvent`.
 */
declare const isFarmsWithdrewPrincipalEvent: (event: FarmUserEvent) => event is FarmsWithdrewPrincipalEvent;
/**
 * Fired when additional reward tokens are added to a vault after creation.
 */
interface FarmsAddedRewardEvent extends Event$1 {
    vaultId: ObjectId;
    rewardType: CoinType;
    rewardAmount: Balance;
}
/**
 * Fired when a new vault (staking pool) is created.
 */
interface FarmsCreatedVaultEvent extends Event$1 {
    vaultId: ObjectId;
    stakeType: CoinType;
    minLockDurationMs: Timestamp;
    maxLockDurationMs: Timestamp;
    maxLockMultiplier: FarmsMultiplier;
    minStakeAmount: Balance;
}
/**
 * Fired when principal is deposited into a staked position in the vault.
 */
interface FarmsDepositedPrincipalEvent extends Event$1 {
    stakedPositionId: ObjectId;
    vaultId: ObjectId;
    amount: Balance;
    stakeType: CoinType;
}
/**
 * Fired when a staked position object is destroyed.
 */
interface FarmsDestroyedStakedPositionEvent extends Event$1 {
    stakedPositionId: ObjectId;
}
/**
 * Fired when a user harvests their rewards from one or more staked positions.
 */
interface FarmsHarvestedRewardsEvent extends Event$1 {
    vaultId: ObjectId;
    rewardTypes: CoinType[];
    rewardAmounts: Balance[];
}
/**
 * Fired when emissions (or the emission schedule) are increased for a specific reward coin.
 */
interface FarmsIncreasedEmissionsEvent extends Event$1 {
    vaultId: ObjectId;
    rewardType: CoinType;
    emissionScheduleMs: Timestamp;
    emissionRate: Balance;
}
/**
 * Fired when a new reward coin is initialized in the vault.
 */
interface FarmsInitializedRewardEvent extends Event$1 {
    vaultId: ObjectId;
    rewardType: CoinType;
    rewardAmount: Balance;
    emissionRate: Balance;
    emissionStartMs: Timestamp;
}
/**
 * Fired when two staked positions are combined (joined) into one.
 */
interface FarmsJoinedEvent extends Event$1 {
    stakedPositionId: ObjectId;
    otherStakedPositionId: ObjectId;
}
/**
 * Fired when a position is locked, specifying the lock duration and multiplier.
 */
interface FarmsLockedEvent extends Event$1 {
    stakedPositionId: ObjectId;
    vaultId: ObjectId;
    stakedType: CoinType;
    stakedAmount: Balance;
    lockStartTimestampMs: Timestamp;
    lockDurationMs: Timestamp;
    lockMultiplier: FarmsMultiplier;
}
/**
 * Fired when a staked position is split into two separate positions.
 */
interface FarmsSplitEvent extends Event$1 {
    stakedPositionId: ObjectId;
    splitStakedPositionId: ObjectId;
}
/**
 * Fired when a user stakes a new position in the vault (version 1 only).
 */
interface FarmsStakedEvent extends Event$1 {
    stakedPositionId: ObjectId;
    vaultId: ObjectId;
    stakedType: CoinType;
    stakedAmount: Balance;
    multipliedStakedAmount: Balance;
    lockStartTimestampMs: Timestamp;
    lockDurationMs: Timestamp;
    lockMultiplier: FarmsMultiplier;
}
/**
 * Fired when a user stakes a new position in the vault under "relaxed" locking (version 2).
 */
interface FarmsStakedRelaxedEvent extends Event$1 {
    stakedPositionId: ObjectId;
    vaultId: ObjectId;
    stakedType: CoinType;
    stakedAmount: Balance;
    lockStartTimestampMs: Timestamp;
    lockEndTimestampMs: Timestamp;
}
/**
 * Fired when a position is unlocked.
 */
interface FarmsUnlockedEvent extends Event$1 {
    stakedPositionId: ObjectId;
    vaultId: ObjectId;
    stakedType: CoinType;
    stakedAmount: Balance;
}
/**
 * Fired when principal is withdrawn from a staked position.
 */
interface FarmsWithdrewPrincipalEvent extends Event$1 {
    stakedPositionId: ObjectId;
    vaultId: ObjectId;
    amount: Balance;
    stakeType: CoinType;
}
/**
 * Request body for fetching all staked positions owned by a given user.
 */
interface ApiFarmsOwnedStakedPositionsBody {
    /**
     * The user's wallet address whose positions are being queried.
     */
    walletAddress: SuiAddress;
}
/**
 * Request body for staking tokens in a pool (version 2).
 */
interface ApiFarmsStakeBody {
    stakingPoolId: ObjectId;
    lockDurationMs: Timestamp;
    stakeCoinType: CoinType;
    stakeAmount: Balance;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
}
/**
 * **Deprecated**: Use `ApiFarmsStakeBody` instead.
 */
interface ApiFarmsStakeBodyV1 {
    stakingPoolId: ObjectId;
    lockDurationMs: Timestamp;
    stakeCoinType: CoinType;
    stakeAmount: Balance;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
}
/**
 * Request body for depositing additional principal into an existing staked position.
 */
interface ApiFarmsDepositPrincipalBody {
    stakedPositionId: ObjectId;
    stakingPoolId: ObjectId;
    stakeCoinType: CoinType;
    depositAmount: Balance;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
}
/**
 * Request body for fully or partially unstaking a position.
 */
interface ApiFarmsUnstakeBody {
    stakedPositionId: ObjectId;
    stakingPoolId: ObjectId;
    stakeCoinType: CoinType;
    rewardCoinTypes: CoinType[];
    withdrawAmount: Balance;
    walletAddress: SuiAddress;
    claimSuiAsAfSui?: boolean;
}
/**
 * Request body for locking a staked position to gain a multiplier (version 2).
 */
interface ApiFarmsLockBody {
    stakedPositionId: ObjectId;
    stakingPoolId: ObjectId;
    lockDurationMs: Timestamp;
    stakeCoinType: CoinType;
    walletAddress: SuiAddress;
}
/**
 * Request body for renewing an existing lock on a staked position.
 */
interface ApiFarmsRenewLockBody {
    stakedPositionId: ObjectId;
    stakingPoolId: ObjectId;
    stakeCoinType: CoinType;
    walletAddress: SuiAddress;
}
/**
 * Request body for unlocking a staked position prior to or at lock expiry.
 */
interface ApiFarmsUnlockBody {
    stakedPositionId: ObjectId;
    stakingPoolId: ObjectId;
    stakeCoinType: CoinType;
    walletAddress: SuiAddress;
}
/**
 * Request body for harvesting rewards from one or more staked positions.
 */
interface ApiHarvestFarmsRewardsBody {
    stakingPoolId: ObjectId;
    stakeCoinType: CoinType;
    stakedPositionIds: ObjectId[];
    rewardCoinTypes: CoinType[];
    walletAddress: SuiAddress;
    claimSuiAsAfSui?: boolean;
}
/**
 * Request body for creating a new staking pool (version 2).
 */
interface ApiFarmsCreateStakingPoolBody {
    minLockDurationMs: Timestamp;
    maxLockDurationMs: Timestamp;
    maxLockMultiplier: FarmsMultiplier;
    minStakeAmount: Balance;
    stakeCoinType: CoinType;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
}
/**
 * **Deprecated**: Use `ApiFarmsCreateStakingPoolBody` instead.
 */
interface ApiFarmsCreateStakingPoolBodyV1 {
    minLockDurationMs: Timestamp;
    maxLockDurationMs: Timestamp;
    maxLockMultiplier: FarmsMultiplier;
    minStakeAmount: Balance;
    stakeCoinType: CoinType;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
}
/**
 * Request body for initializing a new reward in a staking pool, requiring either `ownerCapId` or `oneTimeAdminCapId`.
 */
type ApiFarmsInitializeStakingPoolRewardBody = {
    stakingPoolId: ObjectId;
    rewardAmount: Balance;
    emissionScheduleMs: Timestamp;
    emissionRate: bigint;
    emissionDelayTimestampMs: Timestamp;
    stakeCoinType: CoinType;
    rewardCoinType: CoinType;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
} & FarmOwnerOrOneTimeAdminCap;
/**
 * Request body for topping up multiple reward coins in a staking pool, requiring either `ownerCapId` or `oneTimeAdminCapId`.
 */
type ApiFarmsTopUpStakingPoolRewardsBody = {
    stakingPoolId: ObjectId;
    stakeCoinType: CoinType;
    rewards: {
        rewardCoinType: CoinType;
        rewardAmount: Balance;
    }[];
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
} & FarmOwnerOrOneTimeAdminCap;
/**
 * Request body for increasing the emissions for specified reward coins in a pool (owner only).
 */
interface ApiFarmsIncreaseStakingPoolRewardsEmissionsBody {
    ownerCapId: ObjectId;
    stakingPoolId: ObjectId;
    stakeCoinType: CoinType;
    rewards: {
        rewardCoinType: CoinType;
        emissionScheduleMs: Timestamp;
        emissionRate: bigint;
    }[];
    walletAddress: SuiAddress;
}
/**
 * Request body for fetching staking pool owner caps owned by a user.
 */
interface ApiFarmsOwnedStakingPoolOwnerCapsBody {
    walletAddress: SuiAddress;
}
/**
 * Request body for fetching staking pool one-time admin caps owned by a user.
 */
interface ApiFarmsOwnedStakingPoolOneTimeAdminCapsBody {
    walletAddress: SuiAddress;
}
/**
 * Request body for granting a one-time admin cap of a particular reward coin to another user.
 */
interface ApiFarmsGrantOneTimeAdminCapBody {
    ownerCapId: ObjectId;
    recipientAddress: SuiAddress;
    rewardCoinType: CoinType;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
}

interface FaucetMintCoinEvent extends Event$1 {
    minter: SuiAddress;
    coinType: CoinType;
    amount: Balance;
}
interface FaucetAddCoinEvent extends Event$1 {
    coinType: CoinType;
}
interface ApiFaucetRequestBody {
    coinType: CoinType;
    walletAddress: SuiAddress;
}
interface ApiFaucetMintSuiFrenBody {
    mintFee: Balance;
    suiFrenType: AnyObjectType;
    walletAddress: SuiAddress;
}

interface NftAmmMarketObject extends Object$1 {
    nftsTable: {
        objectId: ObjectId;
        size: bigint;
    };
    pool: PoolObject;
    fractionalizedSupply: Balance;
    fractionalizedCoinAmount: Balance;
    fractionalizedCoinType: CoinType;
    assetCoinType: CoinType;
    lpCoinType: CoinType;
    nftType: AnyObjectType;
}
type NftAmmInterfaceGenericTypes = [
    lpCoinType: CoinType,
    fractionalizedCoinType: CoinType,
    assetCoinType: CoinType,
    nftType: AnyObjectType
];
interface ApiNftAmmBuyBody {
    marketObjectId: ObjectId;
    walletAddress: SuiAddress;
    nftObjectIds: ObjectId[];
    slippage: Slippage;
    referrer?: SuiAddress;
}
interface ApiNftAmmSellBody {
    marketObjectId: ObjectId;
    walletAddress: SuiAddress;
    nftObjectIds: ObjectId[];
    slippage: Slippage;
    referrer?: SuiAddress;
}
interface ApiNftAmmDepositBody {
    walletAddress: SuiAddress;
    marketObjectId: ObjectId;
    assetCoinAmountIn: Balance;
    nftObjectIds: ObjectId[];
    slippage: Slippage;
    referrer?: SuiAddress;
}
interface ApiNftAmmWithdrawBody {
    walletAddress: SuiAddress;
    marketObjectId: ObjectId;
    lpCoinAmount: Balance;
    nftObjectIds: ObjectId[];
    slippage: Slippage;
    referrer?: SuiAddress;
}

/**
 * Semantic capability type for composed-flow transfers.
 *
 * Used by `getTransferCapTx` (Method 2) to specify which kind of capability
 * is being transferred without exposing Move type tags.
 */
type PerpetualsCapType = "accountAdmin" | "accountAgent" | "vaultAdmin" | "vaultAgent";
/**
 * Configuration for gas pool sponsorship on perpetuals transactions.
 *
 * When provided, the transaction will include a gas pool sponsor rebate step
 * that debits the specified wallet's gas pool.
 */
interface PerpetualsSponsorConfig {
    /** Wallet address to use for gas pool sponsorship. */
    walletAddress: SuiAddress;
}
/**
 * Configuration for gas pool sponsorship on perpetuals transactions.
 *
 * When provided, the transaction will include a gas pool sponsor rebate step
 * that debits the specified wallet's gas pool.
 */
interface PerpetualsSponsorConfig {
    /** Wallet address to use for gas pool sponsorship. */
    walletAddress: SuiAddress;
}
/**
 * PTB argument references returned by deferred `create_account` for use
 * in downstream composed endpoints (share-account, grant-agent-wallet, etc.).
 */
interface DeferredAccountArgs {
    /** Argument reference for the created Account object. */
    accountArg: TransactionObjectArgument;
    /** Argument reference for the AccountSharePolicy. */
    sharePolicyArg: TransactionObjectArgument;
    /** Argument reference for the AccountCap<ADMIN>. */
    adminCapArg: TransactionObjectArgument;
    /** Collateral type for the account. */
    collateralCoinType: CoinType;
}
/**
 * PTB argument reference + semantic capability type for composed-flow
 * party transfers.
 */
interface ComposedTransferArgs {
    /** PTB argument reference for the object to transfer. */
    objectArg: TransactionObjectArgument;
    /** Semantic capability type being transferred. */
    capType: PerpetualsCapType;
}
/**
 * Unique identifier for a perpetuals market, represented as a Sui object ID
 * (i.e. the `ClearingHouse` object on-chain).
 */
type PerpetualsMarketId = ObjectId;
/**
 * Unique numeric identifier for a perpetuals account.
 *
 * This is a bigint, as it is derived directly from the on-chain representation.
 */
type PerpetualsAccountId = bigint;
/**
 * Unique numeric identifier for a perpetuals order.
 *
 * This ID is stable across events and API responses.
 */
type PerpetualsOrderId = bigint;
/**
 * String representation of a {@link PerpetualsOrderId}.
 *
 * Some APIs serialize order IDs as strings instead of `bigint`.
 */
type PerpetualsOrderIdAsString = string;
/**
 * Price type for orders, represented as a fixed-point `bigint` in the
 * on-chain format (e.g., scaled by `1e9`).
 */
type PerpetualsOrderPrice = bigint;
/**
 * Side of a perpetuals order.
 *
 * - `Bid` (0): Long-side orders / buyers.
 * - `Ask` (1): Short-side orders / sellers.
 */
declare enum PerpetualsOrderSide {
    Ask = 1,// true
    Bid = 0
}
/**
 * Order execution and posting behavior.
 *
 * - `Standard`: No special constraints.
 * - `FillOrKill`: Either fully fills immediately or cancels.
 * - `PostOnly`: Only posts to the book; will not take liquidity.
 * - `ImmediateOrCancel`: Fills as much as possible immediately; remainder is canceled.
 */
declare enum PerpetualsOrderType {
    Standard = 0,
    FillOrKill = 1,
    PostOnly = 2,
    ImmediateOrCancel = 3
}
/**
 * Stop order mode.
 *
 * - `SlTp`: Stop Loss / Take Profit order, intended to close a position
 *   (fully or partially).
 * - `Standalone`: Independent stop order that can both reduce or increase
 *   the position, potentially requiring additional allocated collateral.
 */
declare enum PerpetualsStopOrderType {
    /**
     * Stop Loss / Take Profit stop order. Can to be placed to close (fully or partially)
     * the position.
     */
    SlTp = 0,
    /**
     * Stop order that can be both reduce or increase the position's size. May require
     * some collateral to be allocated to be able to be placed.
     */
    Standalone = 1
}
/**
 * Execution details for a stop order that has been executed.
 */
type PerpetualsExecutionInfo = {
    notSpecified: {};
} | {
    standaloneExecuted: {
        executionPrice: number;
    };
} | {
    stopLossExecuted: {
        executionPrice: number;
    };
} | {
    takeProfitExecuted: {
        executionPrice: number;
    };
};
/**
 * Current state of a stop order in its lifecycle.
 */
type PerpetualsOrderState = {
    unknown: {};
} | {
    invalid: {
        error: string;
    };
} | {
    pending: {};
} | {
    active: {};
} | {
    executed: PerpetualsExecutionInfo;
} | {
    cancelled: {};
} | {
    inExecution: {};
} | {
    toCancel: {};
};
/**
 * Aggregate market configuration and state for a single perpetuals market.
 */
interface PerpetualsMarketData {
    /** Package ID of the deployed perpetuals contract. */
    packageId: PackageId;
    /** Object ID for the market (clearing house) on-chain. */
    objectId: ObjectId;
    /** Collateral coin type used for margin in this market. */
    collateralCoinType: CoinType;
    /** Static configuration parameters for this market. */
    marketParams: PerpetualsMarketParams;
    /** Dynamic runtime state (funding, open interest, etc.). */
    marketState: PerpetualsMarketState;
    /** Current price of collateral in USD or the platform's base unit. */
    collateralPrice: number;
    /** Oracle/index price of the base asset for this market. */
    indexPrice: number;
    /** Estimated funding rate for the next funding interval. */
    estimatedFundingRate: Percentage;
    /** Timestamp (ms) for the next funding event, as a bigint. */
    nextFundingTimestampMs: bigint;
}
/**
 * On-chain capability object that grants control over a perpetuals account.
 *
 * This represents an "owned" account capability, used to sign and authorize
 * account-level actions.
 */
interface PerpetualsAccountCap {
    /** Object ID of the account capability on-chain. */
    objectId: ObjectId;
    /** Wallet address that owns this account capability. */
    walletAddress: SuiAddress;
    /** Logical ID of the associated perpetuals account. */
    accountId: PerpetualsAccountId;
    /** Object ID of the associated `PerpetualsAccountObject`. */
    accountObjectId: ObjectId;
    /** Collateral coin type backing this account. */
    collateralCoinType: CoinType;
    /** Total collateral (native units) associated with this account. */
    collateral: number;
    /** On-chain object version. */
    objectVersion: ObjectVersion;
    /** On-chain object digest. */
    objectDigest: ObjectDigest;
    /** True if this account cap was allocated to an agent wallet from the admin account cap owner. */
    isAgent: boolean;
    /** Initial shared version of the underlying perpetuals `Account` object. Required when constructing transactions that reference the shared account object. */
    accountObjectInitialSharedVersion: ObjectVersion;
    /** Sui object IDs of agent account caps that have been whitelisted to operate on behalf of this account. */
    whitelistedAgentCapIds: ObjectId[];
}
/**
 * Base vault-capability object, as represented on-chain.
 */
interface PerpetualsVaultCap {
    /** Vault object ID that this cap grants permissions for. */
    vaultId: ObjectId;
    /** Capability object ID. */
    objectId: ObjectId;
    /** Owner of the vault-capability. */
    ownerAddress: SuiAddress;
    /** Collateral coin type used by the vault account. */
    collateralCoinType: CoinType;
    /** Perpetuals account ID controlled by the vault. */
    accountId: PerpetualsAccountId;
    /** Object ID of the account object owned by the vault. */
    accountObjectId: ObjectId;
}
type PerpetualsPartialVaultCap = Omit<PerpetualsVaultCap, "objectId">;
/**
 * Representation of an LP (share) coin position for a specific vault.
 *
 * This is typically returned by API endpoints that enumerate a wallet's vault
 * positions. `lpAmount` is the raw on-chain balance for the vault's LP coin type.
 *
 * Notes:
 * - `lpAmountUsd` is a convenience valuation derived from current vault TVL and LP supply.
 * - The LP coin itself is an on-chain `Coin<T>` object, but here we expose the derived,
 *   aggregated view needed by UIs.
 */
interface PerpetualsVaultLpCoin {
    /** Vault identifier that minted the LP coin. */
    vaultId: ObjectId;
    /** Object ID of the specific LP coin object held by the user. */
    objectId: ObjectId;
    /** Raw LP token amount (native units; not human-decimal adjusted). */
    lpAmount: Balance;
    /** Estimated USD value of `lpAmount` at query time. */
    lpAmountUsd: number;
    /** USD value of the deposit. */
    depositedAmountUsd: number;
}
/**
 * Aggregate position data for a single perpetuals market and account.
 *
 * Values are generally denoted in:
 * - Base asset units (e.g. BTC)
 * - Quote units (e.g. USD)
 * - Collateral units (per `collateralCoinType`)
 */
interface PerpetualsPosition {
    /** Allocated collateral (in collateral coins). */
    collateral: number;
    /** Net base asset amount (positive = long, negative = short). */
    baseAssetAmount: number;
    /** Notional exposure of the position in quote units. */
    quoteAssetNotionalAmount: number;
    /** Cumulative funding rate accrued on the long side. */
    cumFundingRateLong: number;
    /** Cumulative funding rate accrued on the short side. */
    cumFundingRateShort: number;
    /** Aggregate size of resting asks in this market for the account. */
    asksQuantity: number;
    /** Aggregate size of resting bids in this market for the account. */
    bidsQuantity: number;
    /** Market identifier for this position. */
    marketId: PerpetualsMarketId;
    /** All pending (open) orders associated with this position. */
    pendingOrders: {
        /** Unique ID of the order. */
        orderId: PerpetualsOrderId;
        /** Side of the order (Bid/Ask). */
        side: PerpetualsOrderSide;
        /** Current size remaining of the order in base units (scaled as bigint). */
        currentSize: bigint;
        /** Initial size of the order in base units (scaled as bigint). */
        initialSize: bigint;
    }[];
    /** Maker fee rate applied to this position (as a fraction). */
    makerFee: Percentage;
    /** Taker fee rate applied to this position (as a fraction). */
    takerFee: Percentage;
    /** Effective leverage applied to the position. */
    leverage: number;
    /** Collateral value in USD. */
    collateralUsd: number;
    /** Current margin ratio (collateral / exposure). */
    marginRatio: number;
    /** Free margin available in USD. */
    freeMarginUsd: number;
    /** Free (unlocked) collateral in collateral units. */
    freeCollateral: number;
    /** Unrealized funding PnL in USD. */
    unrealizedFundingsUsd: number;
    /** Unrealized position PnL in USD. */
    unrealizedPnlUsd: number;
    /** Average entry price of the position. */
    entryPrice: number;
    /** Approximate liquidation price for the position. */
    liquidationPrice: number;
}
/**
 * Static configuration parameters describing a perpetuals market.
 *
 * These values are typically immutable or rarely changed, and are used
 * to drive risk limits, pricing, and fee schedules.
 */
interface PerpetualsMarketParams {
    /** Initial margin requirement for new positions (fraction). */
    marginRatioInitial: number;
    /** Maintenance margin requirement for open positions (fraction). */
    marginRatioMaintenance: number;
    /** Symbol of the underlying asset. */
    baseAssetSymbol: CoinSymbol;
    /** On-chain ID of the oracle providing the base asset price. */
    basePriceFeedId: ObjectId;
    /** On-chain ID of the oracle providing the collateral asset price. */
    collateralPriceFeedId: ObjectId;
    /** Funding interval duration in milliseconds. */
    fundingFrequencyMs: bigint;
    /** Funding period used for calculations in milliseconds. */
    fundingPeriodMs: bigint;
    /** TWAP frequency for the premium in milliseconds. */
    premiumTwapFrequencyMs: bigint;
    /** TWAP period for the premium in milliseconds. */
    premiumTwapPeriodMs: bigint;
    /** TWAP frequency for the spread in milliseconds. */
    spreadTwapFrequencyMs: bigint;
    /** TWAP period for the spread in milliseconds. */
    spreadTwapPeriodMs: bigint;
    /** TWAP period for gas price in milliseconds. */
    gasPriceTwapPeriodMs: bigint;
    /** Maker fee rate (fraction) charged for providing liquidity. */
    makerFee: Percentage;
    /** Taker fee rate (fraction) charged for taking liquidity. */
    takerFee: Percentage;
    /** Liquidation fee rate (fraction) charged on liquidations. */
    liquidationFee: Percentage;
    /** Fee rate (fraction) for forced cancellation. */
    forceCancelFee: Percentage;
    /** Fraction of fees directed to the insurance fund. */
    insuranceFundFee: Percentage;
    /** Minimum notional order value in USD. */
    minOrderUsdValue: number;
    /** Minimum base size increment for orders (lot size, scaled bigint). */
    lotSize: bigint;
    /** Minimum price increment (tick size, scaled bigint). */
    tickSize: bigint;
    /** Scaling factor used in internal fixed-point conversions. */
    scalingFactor: number;
    /** Additional taker fee that depends on gas cost. */
    gasPriceTakerFee: Percentage;
    /** Z-score threshold used for outlier detection in pricing. */
    zScoreThreshold: number;
    /** Maximum open interest (notional or base) allowed in the market. */
    maxPendingOrders: bigint;
    /** Oracle tolerance for the base asset price (scaled bigint). */
    baseOracleTolerance: bigint;
    /** Oracle tolerance for the collateral price (scaled bigint). */
    collateralOracleTolerance: bigint;
    /** Maximum open interest (absolute). */
    maxOpenInterest: number;
    /** Threshold above which open interest is considered elevated. */
    maxOpenInterestThreshold: number;
    /** Maximum fraction of open interest a single position can hold. */
    maxOpenInterestPositionPercent: number;
}
/**
 * Dynamic runtime state of a perpetuals market.
 *
 * These values are updated frequently and used to compute funding
 * and other time-variant metrics.
 */
interface PerpetualsMarketState {
    /** Cumulative funding rate for long positions. */
    cumFundingRateLong: number;
    /** Cumulative funding rate for short positions. */
    cumFundingRateShort: number;
    /** Last timestamp when funding was updated. */
    fundingLastUpdateTimestamp: Timestamp;
    /** Premium TWAP value (book vs index). */
    premiumTwap: number;
    /** Timestamp of last premium TWAP update. */
    premiumTwapLastUpdateTimestamp: Timestamp;
    /** Spread TWAP value. */
    spreadTwap: number;
    /** Timestamp of last spread TWAP update. */
    spreadTwapLastUpdateTimestamp: Timestamp;
    /** Current open interest in the market. */
    openInterest: number;
    /** Total fees accrued by the market. */
    feesAccrued: number;
}
/**
 * Single OHLCV data point for a market candle.
 *
 * Typically used in charts and historical data views.
 */
interface PerpetualsMarketCandleDataPoint {
    /** Start timestamp of this candle. */
    timestamp: Timestamp;
    /** High price within this interval. */
    high: number;
    /** Low price within this interval. */
    low: number;
    /** Open price at the beginning of the interval. */
    open: number;
    /** Close price at the end of the interval. */
    close: number;
    /** Traded volume (base units) during the interval. */
    volume: number;
}
/**
 * A single entry (price level) in an orderbook side.
 */
interface PerpetualsOrderbookItem {
    /** Total size resting at this price level (base units). */
    size: number;
    /** Price level for the aggregated orders. */
    price: number;
}
/**
 * Aggregated orderbook snapshot for a perpetuals market.
 */
interface PerpetualsOrderbook {
    /** Bid-side price levels (sorted descending by price). */
    bids: PerpetualsOrderbookItem[];
    /** Ask-side price levels (sorted ascending by price). */
    asks: PerpetualsOrderbookItem[];
    /** Sum of bid-side size across all levels. */
    asksTotalSize: number;
    /** Sum of ask-side size across all levels. */
    bidsTotalSize: number;
    /** Best bid price (highest bid), or undefined if no bids. */
    bestBidPrice: number | undefined;
    /** Best ask price (lowest ask), or undefined if no asks. */
    bestAskPrice: number | undefined;
    /** Mid price between best bid and best ask, if both exist. */
    midPrice: number | undefined;
    /** Incremental nonce associated with this snapshot. */
    nonce: bigint;
}
/**
 * Incremental deltas to an orderbook snapshot.
 *
 * These are typically used over websockets for streaming updates.
 */
interface PerpetualsOrderbookDeltas {
    /** Updated bid-side price levels. */
    bidsDeltas: PerpetualsOrderbookItem[];
    /** Updated ask-side price levels. */
    asksDeltas: PerpetualsOrderbookItem[];
    /** Delta of total ask-side size. */
    asksTotalSizeDelta: number;
    /** Delta of total bid-side size. */
    bidsTotalSizeDelta: number;
    /** Nonce for ordering deltas. */
    nonce: bigint;
}
/**
 * Core order metadata for perpetuals orders.
 *
 * This is shared across multiple internal and external APIs.
 */
interface PerpetualsOrderData {
    /** Unique ID of the order. */
    orderId: PerpetualsOrderId;
    /** Initial order size in scaled base units. */
    initialSize: bigint;
    /** Current size remaining in scaled base units. */
    currentSize: bigint;
    /** Order side (Bid or Ask). */
    side: PerpetualsOrderSide;
    /** Market this order belongs to. */
    marketId: PerpetualsMarketId;
}
/**
 * Optional integrator fee configuration for an order.
 *
 * When provided, this allows an approved integrator to collect a fee on the taker
 * volume generated by this order. The integrator must have been previously approved
 * by the user via the create-integration endpoint, and the taker fee must not exceed
 * the maximum fee approved by the user.
 */
interface PerpetualsBuilderCodeParamaters {
    /**
     * Sui address of the integrator who will receive the fee.
     *
     * This integrator must have been previously approved by the account owner,
     * and must have a vault created for the market where the order is being placed.
     */
    integratorAddress: SuiAddress;
    /**
     * Taker fee (as a decimal) to be charged on this order's taker volume.
     *
     * For example, 0.0005 represents a 0.05% fee. This value must not exceed
     * the maximum taker fee that the user approved for this integrator.
     * The fee is only applied to taker volume (not maker volume).
     */
    takerFee: Percentage;
}
/**
 * Full stop-order representation on-chain.
 *
 * Can represent:
 * - SL/TP orders (`slTp`)
 * - Standalone stops (`nonSlTp`)
 */
interface PerpetualsStopOrderData {
    /** ID of the stop order object on-chain. */
    objectId: ObjectId;
    /** Current state of the stop order in its lifecycle. */
    orderState: PerpetualsOrderState;
    /** Market the stop order is tied to. */
    marketId: PerpetualsMarketId;
    /** Size to execute when triggered (scaled base units). */
    size: bigint;
    /** Direction of the stop order. */
    side: PerpetualsOrderSide;
    /** Optional expiration time (ms or seconds, depending on protocol). */
    expiryTimestamp?: bigint;
    /** Optional limit order parameters when the stop triggers. */
    limitOrder?: {
        /** Limit price to post or execute at, scaled bigint. */
        price: bigint;
        /** Order type semantics. */
        orderType: PerpetualsOrderType;
    };
    /** Stop loss / take profit configuration. */
    slTp?: {
        /** Index price at which to trigger a stop loss. */
        stopLossIndexPrice?: number;
        /** Index price at which to take profit. */
        takeProfitIndexPrice?: number;
        /** Unique order identifier for limit order sl/tp is tied to. */
        limitOrderId?: PerpetualsOrderId;
    };
    /** Non-SL/TP standalone stop configuration. */
    nonSlTp?: {
        /** Index price threshold used for triggering. */
        stopIndexPrice: number;
        /** If true, triggers when index >= threshold, otherwise index <= threshold. */
        triggerIfGeStopIndexPrice: boolean;
        /** Whether the stop can only reduce an existing position. */
        reduceOnly: boolean;
    };
}
/**
 * Filled order data used in execution price previews and trade details.
 */
interface PerpetualsFilledOrderData {
    /** Filled size in base units (non-scaled). */
    size: number;
    /** Execution price for the fill. */
    price: number;
}
/**
 * High-level order info with price and size only.
 */
interface PerpetualsOrderInfo {
    /** Order price. */
    price: number;
    /** Order size (scaled base units). */
    size: bigint;
}
/**
 * Pairing of a perpetuals account capability and its current account state.
 */
interface PerpetualsAccountData {
    /** Account capability object. */
    accountCap: PerpetualsAccountCap;
    /** Account state object. */
    account: PerpetualsAccountObject;
}
/**
 * Aggregate account-level metrics for perpetuals.
 */
interface PerpetualsAccountObject {
    /** Numeric ID of the account. */
    accountId: PerpetualsAccountId;
    /** Total equity in USD. */
    totalEquityUsd: number;
    /** Available collateral in collateral units. */
    availableCollateral: number;
    /** Available collateral in USD. */
    availableCollateralUsd: number;
    /** Sum of unrealized funding PnL across markets. */
    totalUnrealizedFundingsUsd: number;
    /** Sum of unrealized position PnL across markets. */
    totalUnrealizedPnlUsd: number;
    /** Per-market positions for this account. */
    positions: PerpetualsPosition[];
}
/**
 * Human-facing metadata for vault discovery / browsing.
 *
 * This is intended for UI display and is not used for any on-chain risk or
 * accounting logic.
 *
 * Note: The type name contains a historical misspelling ("Metatada") and is
 * preserved for backward compatibility.
 */
interface PerpetualsVaultMetatada {
    /**
     * A human-readable name for the `Vault`.
     */
    name: string;
    /**
     * A verbose description of the `Vault`.
     */
    description: string;
    /**
     * The `Vault` curator's name.
     */
    curatorName: string | undefined;
    /**
     * A url for the `Vault`'s curator. Ideally their website.
     */
    curatorUrl: string | undefined;
    /**
     * An image url for the `Vault`'s curator. Ideally their logo.
     */
    curatorLogoUrl: string | undefined;
    /**
     * Extra / optional fields for future extensibility. Recommended keys include: twitter_url.
     */
    extraFields: Record<string, string>;
}
/**
 * On-chain representation of a vault that manages user collateral and
 * interacts with clearing houses on their behalf.
 */
interface PerpetualsVaultObject {
    /**
     * Unique identifier for distinct network identification.
     */
    objectId: ObjectId;
    /**
     * Contract version number for controlled upgrades.
     */
    version: bigint;
    /**
     * Curator-provided metadata used for vault discovery and display.
     *
     * This data is expected to be relatively stable and is typically set at
     * creation time (though it may be updatable depending on protocol rules).
     */
    metadata: PerpetualsVaultMetatada;
    /**
     * Supply of LP coins from a `TreasuryCap` for liquidity integrity.
     *
     * This is the total minted supply of the vault's LP token. Together with
     * `tvlUsd` and `totalCollateral`, this is used to derive LP share price.
     */
    lpSupply: Balance;
    /**
     * Total balance of underlying Coin (`C`), deposited by users.
     *
     * "Idle" collateral is not currently allocated to any clearing house
     * position. It remains held by the vault and can be used for new allocations
     * or withdrawals (subject to lock/queue rules).
     */
    idleCollateral: Balance;
    /**
     * USD valuation of `idleCollateral` at query time.
     *
     * This is derived using the vault's collateral oracle price and is provided
     * for UI convenience.
     */
    idleCollateralUsd: number;
    /**
     * Total collateral owned by the vault in native units.
     *
     * This is the sum of:
     * - idle collateral held directly by the vault, and
     * - collateral currently allocated across clearing houses/positions.
     */
    totalCollateral: Balance;
    /**
     * USD valuation of `totalCollateral` at query time.
     *
     * This is typically derived from `totalCollateral` and the collateral oracle
     * price used by the vault.
     */
    totalCollateralUsd: number;
    /**
     * Total value locked in USD for this vault.
     *
     * Depending on protocol accounting, this may match `totalCollateralUsd`, or
     * may incorporate additional adjustments. It is the primary headline number
     * used for ranking and display.
     */
    tvlUsd: number;
    /**
     * IDs of `ClearingHouse` where `Vault` has positions.
     */
    marketIds: PerpetualsMarketId[];
    /**
     * Vault parameters
     */
    parameters: {
        /**
         * Lock-in duration for engaged assets in milliseconds.
         */
        lockPeriodMs: bigint;
        /**
         * Fee rate for vault's owner, collected from user's profits when they withdraw
         */
        performanceFeePercentage: number;
        /**
         * Delay period to wait for eventual force withdrawing
         *
         * Force-withdrawal is an emergency/escape hatch path; this delay gives the
         * vault time to unwind positions before executing the withdrawal.
         */
        forceWithdrawDelayMs: bigint;
        /**
         * Price feed storage id idetifying the oracle price for `C`
         */
        collateralPriceFeedStorageId: ObjectId;
        /**
         * Source object ID for the collateral price feed storage.
         *
         * Some oracle integrations separate the "storage object" from the "source"
         * (e.g., an aggregator or publisher object). This field identifies the
         * upstream source used to populate `collateralPriceFeedStorageId`.
         */
        collateralPriceFeedStorageSourceId: ObjectId;
        /**
         * Maximum tolerated deviation for the collateral oracle price.
         *
         * Used as a safety bound when valuing deposits/withdrawals and computing
         * USD conversions. This is typically a fixed-point or scaled bigint value,
         * consistent with the on-chain oracle representation.
         */
        collateralPriceFeedStorageTolerance: bigint;
        /**
         * Maximum margin ratio tolerance for force-withdraw processing.
         *
         * Force-withdraw generally requires closing positions. This tolerance
         * controls how much worse (or better) the resulting margin ratio is allowed
         * to be, compared to a target/expected value, before rejecting the action.
         */
        maxForceWithdrawMarginRatioTolerance: number;
        /**
         * Scaling factor to apply to `C` to convert a balance to ifixed.
         */
        /**
         * Used to calculate user's minimum deposit value in usd
         */
        scalingFactor: number;
        /**
         * The maximum number of distinct `ClearingHouse`.
         */
        maxMarketsInVault: bigint;
        /**
         * The maximum number of pending orders allowed for a single position in the `Vault`.
         */
        maxPendingOrdersPerPosition: bigint;
        /**
         * Maximum total collateral (native units) that can be deposited into the vault.
         *
         * This is a capacity/risk control parameter. Deposits that would cause the
         * vault to exceed this limit should be rejected by the protocol/backend.
         */
        maxTotalDepositedCollateral: Balance;
        /** Minimum position margin (USD) to trigger full close during force withdraw. */
        minForceWithdrawValueUsd: number;
    };
    /** Owner address of the vault. */
    ownerAddress: SuiAddress;
    /** Creation timestamp of the vault. */
    creationTimestamp: Timestamp | undefined;
    /** Underlying perpetuals account ID that the vault uses. */
    accountId: PerpetualsAccountId;
    /** Account object ID used by the vault. */
    accountObjectId: ObjectId;
    /** Collateral coin type accepted by this vault. */
    collateralCoinType: CoinType;
    /**
     * LP coin type minted by this vault.
     *
     * This is the `Coin<T>` type used to represent shares in the vault. Users
     * receive LP coins on deposit and burn/return them on withdrawal.
     */
    lpCoinType: CoinType;
    /** Decimals for the LP token minted by this vault. */
    lpCoinDecimals: CoinDecimal;
    /**
     * Estimated monthly APR for this vault, expressed as a percentage.
     *
     * This is typically computed off-chain from historical performance and/or
     * accounting state. It is a display metric and should not be treated as a
     * guaranteed rate.
     */
    monthlyAprPercentage: Percentage;
    /** The annualized percentage return from incentives (added yields) */
    monthlyBoostedAprPercentage: Percentage;
    /** Indicates the vault is temporarily paused until the timestamp (if present). */
    pausedUntilTimestamp: bigint | undefined;
    /** Timestamp at which `pause_vault_for_force_withdraw` was last called. */
    lastPausedTimestamp: Timestamp;
    /**
     * The amount of LP tokens locked by the vault owner (native units).
     *
     * This is the owner's initially locked liquidity, a portion of which can be
     * withdrawn via the owner locked liquidity withdraw flow.
     */
    ownerLockedLpBalance: Balance;
}
/**
 * Represents a single pending vault withdrawal request.
 */
interface PerpetualsVaultWithdrawRequest {
    /**
     * The address of the user that created the withdraw request
     */
    userAddress: SuiAddress;
    /**
     * Object id of the vault associated with the withdraw request
     */
    vaultId: SuiAddress;
    /**
     * The amount of the shares requested for withdrawal.
     */
    lpAmountIn: Balance;
    /**
     * USD valuation of `lpAmountIn` at request time (or at query time, depending on backend).
     *
     * This field is provided for UI convenience and may be computed using the
     * vault's LP share price.
     */
    lpAmountInUsd: number;
    /**
     * Timestamp of request's creation
     */
    requestTimestamp: Timestamp;
    /**
     * The minimum amount of the collateral balance expected as output for this withdrawal
     *
     * This acts as a slippage/price-protection bound for the user.
     */
    minCollateralAmountOut: Balance;
    /**
     * USD valuation of `minCollateralAmountOut`, using the vault's collateral oracle.
     *
     * Provided for display; the on-chain constraint is enforced by
     * `minCollateralAmountOut` (native units).
     */
    minCollateralAmountOutUsd: number;
}
/**
 * Event emitted when a clearing house (market) is upgraded to a new version.
 */
interface UpdatedMarketVersionEvent extends Event$1 {
    /** Market identifier for which the version changed. */
    marketId: PerpetualsMarketId;
    /** New version value. */
    version: bigint;
}
/**
 * Type guard for {@link UpdatedMarketVersionEvent}.
 *
 * @param event - Generic event.
 * @returns `true` if this is an `UpdatedMarketVersionEvent`.
 */
declare const isUpdatedMarketVersion: (event: Event$1) => event is UpdatedMarketVersionEvent;
/**
 * Cursor-based response wrapping a list of collateral changes for an account.
 */
type ApiPerpetualsAccountCollateralHistoryResponse = ApiPerpetualsHistoricalDataWithCursorResponse & {
    /** Collateral changes in chronological order. */
    collateralChanges: PerpetualsAccountCollateralChange[];
};
/**
 * Single collateral change record for an account.
 *
 * This may represent:
 * - Deposits / withdrawals
 * - Liquidations
 * - Funding settlements
 * - Trading fees
 */
interface PerpetualsAccountCollateralChange {
    /** When the change occurred. */
    timestamp: Timestamp;
    /** Sui transaction digest that produced this change. */
    txDigest: TransactionDigest;
    /** Market ID, if applicable (can be undefined for global changes). */
    marketId: PerpetualsMarketId | undefined;
    /** Concrete event type fully qualified (Sui struct type). */
    eventType: AnyObjectType;
    /** Net change in collateral units. */
    collateralChange: number;
    /** Net change in USD value. */
    collateralChangeUsd: number;
    /** Optional breakdown of fees, with variant shapes based on event. */
    fees?: {
        netFeesUsd: number;
        liquidationFeesUsd: number;
        forceCancelFeesUsd: number;
        insuranceFundFeesUsd: number;
    } | {
        netFeesUsd: number;
        liqorFeesUsd: number;
    } | {
        netFeesUsd: number;
    };
}
/**
 * Cursor-based response wrapping a list of orders for an account.
 */
type ApiPerpetualsAccountOrderHistoryResponse = ApiPerpetualsHistoricalDataWithCursorResponse & {
    /** Orders in chronological order. */
    orders: PerpetualsAccountOrderHistoryData[];
};
/**
 * Historical margin data point for an account, used in margin history views.
 */
interface PerpetualsAccountMarginHistoryData {
    /** Timestamp of this snapshot. */
    timestamp: Timestamp;
    /** Available collateral in USD. */
    availableCollateralUsd: number;
    /** Total equity in USD. */
    totalEquityUsd: number;
    /** Realized funding PnL in USD at that time. */
    realizedFundingsUsd: number;
    /** Realized position PnL in USD at that time. */
    realizedPnlUsd: number;
    /** Taker volume in USD at that time. */
    takerVolumeUsd: number;
    /** Maker volume in USD at that time. */
    makerVolumeUsd: number;
    /** Taker fees in USD at that time. */
    takerFeesUsd: number;
    /** Maker fees in USD at that time. */
    makerFeesUsd: number;
    /** Liquidated fees in USD at that time. */
    liquidatedFeesUsd: number;
    /** Liquidator fees in USD at that time. */
    liquidatorFeesUsd: number;
}
/**
 * Individual order affecting an account.
 */
interface PerpetualsAccountOrderHistoryData {
    /** Timestamp of the order. */
    timestamp: Timestamp;
    /** Sui transaction digest. */
    txDigest: TransactionDigest;
    /** Market in which this order occurred. */
    marketId: PerpetualsMarketId;
    /** Concrete event type. */
    eventType: AnyObjectType;
    /** Side of the order relative to the account (Bid/Ask). */
    side: PerpetualsOrderSide;
    /** Price for this order. */
    price: number;
    /** Size in base units. */
    size: number;
    /** Optional stop-loss / take-profit data. */
    slTp?: {
        /** Optional stop-loss trigger price based on the index price. */
        stopLossIndexPrice?: number;
        /** Optional take-profit trigger price based on the index price. */
        takeProfitIndexPrice?: number;
        /** Unique order identifier for limit order sl/tp is tied to. */
        limitOrderId?: PerpetualsOrderId;
    };
    /** Stop order data that is not a stop-loss / take-profit order
     * (e.g. generic trigger orders).
     */
    stopOrder?: {
        /** Index price at which the stop order should trigger. */
        stopIndexPrice: number;
    };
    /** Optional order ID. */
    orderId?: string;
    /** Realized PnL for this order event, if applicable. */
    pnl?: number;
    /** Fees charged for this order event, if applicable. */
    fees?: number;
}
/**
 * Event emitted when collateral is deposited into an account.
 */
interface DepositedCollateralEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    collateralDelta: Balance;
}
/**
 * Event emitted when collateral is allocated from general account collateral
 * into a specific market position.
 */
interface AllocatedCollateralEvent extends Event$1 {
    marketId: PerpetualsMarketId;
    accountId: PerpetualsAccountId;
    collateralDelta: Balance;
}
/**
 * Event emitted when collateral is deallocated from a market back to
 * the account's general collateral.
 */
interface DeallocatedCollateralEvent extends Event$1 {
    marketId: PerpetualsMarketId;
    accountId: PerpetualsAccountId;
    collateralDelta: Balance;
}
/**
 * Event emitted when collateral is withdrawn from the account.
 */
interface WithdrewCollateralEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    collateralDelta: Balance;
}
/**
 * Event emitted when funding is settled for an account and market.
 */
interface SettledFundingEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    collateralDeltaUsd: number;
    marketId: PerpetualsMarketId;
    marketFundingRateLong: number;
    marketFundingRateShort: number;
}
/**
 * Union of all event types that impact account collateral.
 */
type CollateralEvent = WithdrewCollateralEvent | DepositedCollateralEvent | SettledFundingEvent | LiquidatedEvent | FilledTakerOrderEvent | FilledMakerOrdersEvent | AllocatedCollateralEvent | DeallocatedCollateralEvent;
/**
 * Type guard for {@link WithdrewCollateralEvent}.
 */
declare const isWithdrewCollateralEvent: (event: Event$1) => event is WithdrewCollateralEvent;
/**
 * Type guard for {@link DepositedCollateralEvent}.
 */
declare const isDepositedCollateralEvent: (event: Event$1) => event is DepositedCollateralEvent;
/**
 * Type guard for {@link DeallocatedCollateralEvent}.
 */
declare const isDeallocatedCollateralEvent: (event: Event$1) => event is DeallocatedCollateralEvent;
/**
 * Type guard for {@link AllocatedCollateralEvent}.
 */
declare const isAllocatedCollateralEvent: (event: Event$1) => event is AllocatedCollateralEvent;
/**
 * Type guard for {@link SettledFundingEvent}.
 */
declare const isSettledFundingEvent: (event: Event$1) => event is SettledFundingEvent;
/**
 * Event emitted when an account is liquidated in a given market.
 */
interface LiquidatedEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    collateralDeltaUsd: number;
    /** Liquidator's account ID. */
    liqorAccountId: PerpetualsAccountId;
    marketId: PerpetualsMarketId;
    side: PerpetualsOrderSide;
    /** Amount of base asset liquidated. */
    baseLiquidated: number;
    /** Amount of quote asset liquidated. */
    quoteLiquidated: number;
    /** Liquidated account's PnL in USD for this event. */
    liqeePnlUsd: number;
    /** Liquidation fee paid in USD. */
    liquidationFeesUsd: number;
    /** Force-cancel fees collected in USD. */
    forceCancelFeesUsd: number;
    /** Fees directed to the insurance fund in USD. */
    insuranceFundFeesUsd: number;
}
/**
 * Type guard for {@link LiquidatedEvent}.
 */
declare const isLiquidatedEvent: (event: Event$1) => event is LiquidatedEvent;
/**
 * Event emitted when a new perpetuals account is created for a user.
 */
interface CreatedAccountEvent extends Event$1 {
    user: SuiAddress;
    accountId: PerpetualsAccountId;
}
/**
 * Event emitted when an account's initial margin ratio for a position
 * is explicitly set or adjusted.
 */
interface SetPositionInitialMarginRatioEvent extends Event$1 {
    marketId: PerpetualsMarketId;
    accountId: PerpetualsAccountId;
    initialMarginRatio: number;
}
/**
 * Trade data used for market-level trade history.
 */
interface PerpetualsMarketOrderHistoryData {
    /** Timestamp of the trade. */
    timestamp: Timestamp;
    /** Transaction digest. */
    txDigest: TransactionDigest;
    /** Side of the trade. */
    side: PerpetualsOrderSide;
    /** Filled size in base units. */
    sizeFilled: number;
    /** Order price (limit price) used for the trade. */
    orderPrice: number;
}
/**
 * Cursor-based wrapper for market-level order history.
 */
type ApiPerpetualsMarketOrderHistoryResponse = ApiPerpetualsHistoricalDataWithCursorResponse & {
    /** Orders in this page. */
    orders: PerpetualsMarketOrderHistoryData[];
};
/**
 * Event emitted when an order is filled or dropped by the orderbook
 * (book-keeping receipt).
 */
interface OrderbookFillReceiptEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    orderId: PerpetualsOrderId;
    size: bigint;
    /** Whether the order was dropped instead of filled. */
    dropped: boolean;
}
/**
 * Event emitted when an order is canceled.
 */
interface CanceledOrderEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    marketId: PerpetualsMarketId;
    side: PerpetualsOrderSide;
    size: bigint;
    orderId: PerpetualsOrderId;
}
/**
 * Event emitted when one or more maker orders are filled against a taker.
 */
interface FilledMakerOrdersEvent extends Event$1 {
    /** List of per-maker fills for this aggregate event. */
    events: FilledMakerOrderEventFields[];
}
/**
 * Details for a single maker order fill inside a {@link FilledMakerOrdersEvent}.
 */
interface FilledMakerOrderEventFields {
    accountId: PerpetualsAccountId;
    takerAccountId: PerpetualsAccountId;
    collateralDeltaUsd: number;
    marketId: PerpetualsMarketId;
    side: PerpetualsOrderSide;
    size: bigint;
    sizeRemaining: bigint;
    orderId: PerpetualsOrderId;
    dropped: boolean;
    pnlUsd: number;
    feesUsd: number;
    canceledSize: bigint;
}
/**
 * Event emitted when a taker order is executed.
 */
interface FilledTakerOrderEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    collateralDeltaUsd: number;
    marketId: PerpetualsMarketId;
    side: PerpetualsOrderSide;
    baseAssetDelta: number;
    quoteAssetDelta: number;
    takerPnlUsd: number;
    takerFeesUsd: number;
}
/**
 * Union of all order-related events in the protocol.
 */
type PerpetualsOrderEvent = CanceledOrderEvent | PostedOrderEvent | PostedOrderEvent | FilledMakerOrdersEvent | FilledTakerOrderEvent | LiquidatedEvent | ReducedOrderEvent;
/**
 * Event emitted when a new order is posted to the orderbook.
 */
interface PostedOrderEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    marketId: PerpetualsMarketId;
    orderId: PerpetualsOrderId;
    size: bigint;
    reduceOnly: boolean;
    expiryTimestamp?: bigint;
}
/**
 * Event emitted when an order is posted.
 *
 * NOTE: This is a second definition of `PostedOrderEvent` used in a
 * simplified context (without `reduceOnly` / `expiryTimestamp`).
 */
interface PostedOrderEvent extends Event$1 {
    accountId: PerpetualsAccountId;
    marketId: PerpetualsMarketId;
    orderId: PerpetualsOrderId;
    size: bigint;
    side: PerpetualsOrderSide;
}
/**
 * Event emitted when an existing order is reduced (partial cancellation or
 * adjustment of size).
 */
interface ReducedOrderEvent extends Event$1 {
    marketId: PerpetualsMarketId;
    accountId: PerpetualsAccountId;
    sizeChange: bigint;
    orderId: PerpetualsOrderId;
}
/**
 * Type guard for {@link CanceledOrderEvent}.
 */
declare const isCanceledOrderEvent: (event: Event$1) => event is CanceledOrderEvent;
/**
 * Type guard for {@link PostedOrderEvent}.
 */
declare const isPostedOrderEvent: (event: Event$1) => event is PostedOrderEvent;
/**
 * Type guard for {@link FilledMakerOrdersEvent}.
 */
declare const isFilledMakerOrdersEvent: (event: Event$1) => event is FilledMakerOrdersEvent;
/**
 * Type guard for {@link FilledTakerOrderEvent}.
 */
declare const isFilledTakerOrderEvent: (event: Event$1) => event is FilledTakerOrderEvent;
/**
 * Type guard for {@link ReducedOrderEvent}.
 */
declare const isReducedOrderEvent: (event: Event$1) => event is ReducedOrderEvent;
/**
 * Event emitted when a stop order ticket is created.
 *
 * Stop order tickets represent off-chain-executable stop orders that
 * executors can trigger.
 */
interface CreatedStopOrderTicketEvent extends Event$1 {
    ticketId: ObjectId;
    accountId: PerpetualsAccountId;
    subAccountId?: ObjectId;
    executors: SuiAddress[];
    gas: Balance;
    stopOrderType: PerpetualsStopOrderType;
    /** Encrypted stop-order details (payload). */
    encryptedDetails: Byte[];
}
/**
 * Event emitted when a stop order ticket is executed.
 */
interface ExecutedStopOrderTicketEvent extends Event$1 {
    ticketId: ObjectId;
    accountId: PerpetualsAccountId;
    executor: SuiAddress;
}
/**
 * Event emitted when a stop order ticket is deleted or canceled.
 */
interface DeletedStopOrderTicketEvent extends Event$1 {
    ticketId: ObjectId;
    accountId: PerpetualsAccountId;
    subAccountId?: ObjectId;
    executor: SuiAddress;
}
/**
 * Event emitted when the details (payload) of a stop order ticket are edited.
 */
interface EditedStopOrderTicketDetailsEvent extends Event$1 {
    ticketId: ObjectId;
    accountId: PerpetualsAccountId;
    subAccountId?: ObjectId;
    encryptedDetails: Byte[];
    stopOrderType: PerpetualsStopOrderType;
}
/**
 * Event emitted when the set of executors for a stop order ticket is edited.
 */
interface EditedStopOrderTicketExecutorEvent extends Event$1 {
    ticketId: ObjectId;
    accountId: PerpetualsAccountId;
    subAccountId?: ObjectId;
    executors: SuiAddress[];
}
/**
 * Event emitted when deallocated collateral is transferred from a clearing
 * house to an account or subaccount.
 */
interface TransferredDeallocatedCollateralEvent extends Event$1 {
    chId: ObjectId;
    /** Account or SubAccount object id. */
    objectId: ObjectId;
    accountId: PerpetualsAccountId;
    collateral: Balance;
}
/**
 * Event emitted when an account or subaccount receives collateral.
 */
interface ReceivedCollateralEvent extends Event$1 {
    /** Account or SubAccount object id. */
    objectId: ObjectId;
    accountId: PerpetualsAccountId;
    collateral: Balance;
}
/**
 * Event emitted when premium TWAP is updated for a market.
 */
interface UpdatedPremiumTwapEvent extends Event$1 {
    marketId: PerpetualsMarketId;
    bookPrice: number;
    indexPrice: number;
    premiumTwap: number;
    premiumTwapLastUpdateMs: number;
}
/**
 * Event emitted when spread TWAP is updated for a market.
 */
interface UpdatedSpreadTwapEvent extends Event$1 {
    marketId: PerpetualsMarketId;
    bookPrice: number;
    indexPrice: number;
    spreadTwap: number;
    spreadTwapLastUpdateMs: number;
}
/**
 * Union of all TWAP-related events.
 */
type PerpetualsTwapEvent = UpdatedPremiumTwapEvent | UpdatedSpreadTwapEvent;
/**
 * Type guard for {@link UpdatedPremiumTwapEvent}.
 */
declare const isUpdatedPremiumTwapEvent: (event: Event$1) => event is UpdatedPremiumTwapEvent;
/**
 * Type guard for {@link UpdatedSpreadTwapEvent}.
 */
declare const isUpdatedSpreadTwapEvent: (event: Event$1) => event is UpdatedSpreadTwapEvent;
/**
 * Event emitted when market funding values are updated.
 */
interface UpdatedFundingEvent extends Event$1 {
    marketId: PerpetualsMarketId;
    cumFundingRateLong: number;
    cumFundingRateShort: number;
    fundingLastUpdateMs: Timestamp;
}
/**
 * Type guard for {@link UpdatedFundingEvent}.
 */
declare const isUpdatedFundingEvent: (event: Event$1) => event is UpdatedFundingEvent;
/**
 * Request body for fetching all account caps owned by a given wallet.
 */
interface ApiPerpetualsOwnedAccountCapsBody {
    walletAddress: SuiAddress;
    collateralCoinTypes?: CoinType[];
}
/**
 * Request body for fetching specific admin account caps by their account IDs.
 */
interface ApiPerpetualsAdminAccountCapsBody {
    accountIds: PerpetualsAccountId[];
}
/**
 * Response payload for fetching positions for one or more accounts.
 *
 * The backend returns a list of {@link PerpetualsAccountObject} snapshots.
 * Each snapshot includes per-market {@link PerpetualsPosition} data.
 */
interface ApiPerpetualsAccountPositionsResponse {
    accounts: PerpetualsAccountObject[];
}
/**
 * Request body for fetching positions for a set of accounts.
 *
 * `marketIds` can be supplied as an optimization hint to limit the markets
 * included in each account's returned `positions` array.
 */
interface ApiPerpetualsAccountPositionsBody {
    accountIds: PerpetualsAccountId[];
    marketIds?: PerpetualsMarketId[];
}
/**
 * Response payload for fetching admin account caps by explicit account IDs.
 */
interface ApiPerpetualsAdminAccountCapsResponse {
    accountCaps: PerpetualsAccountCap[];
}
/**
 * Response payload for fetching all account caps owned by a wallet.
 *
 * This is typically used during onboarding / wallet connect to discover
 * existing accounts.
 */
interface ApiPerpetualsOwnedAccountCapsResponse {
    accountCaps: PerpetualsAccountCap[];
}
/**
 * Discrete event type recorded in user history responses
 * (trade, collateral, etc.).
 *
 * Serialized as PascalCase strings on the wire.
 */
type UserHistoryEventType = "PostedOrder" | "CanceledOrder" | "FilledTakerOrder" | "FilledMakerOrder" | "LiquidatedPosition" | "PerformedLiquidation" | "PerformedADL" | "DepositedCollateral" | "WithdrewCollateral" | "AllocatedCollateral" | "DeallocatedCollateral" | "SettledFunding" | "CreatedStopOrderTicket" | "DeletedStopOrderTicket" | "ExecutedStopOrderTicket";
/**
 * Generic shape for Perpetuals API historical data requests that include
 * `beforeTimestampCursor` and `limit` pagination parameters.
 */
interface ApiPerpetualsHistoricalDataWithCursorBody {
    /**
     * Cursor for pagination.
     */
    beforeTimestampCursor?: Timestamp;
    /**
     * Limit for pagination.
     */
    limit?: number;
}
/**
 * Generic shape for Perpetuals API historical data responses that include
 * `nextBeforeTimestampCursor` pagination parameter.
 */
interface ApiPerpetualsHistoricalDataWithCursorResponse {
    /**
     * The next cursor position. If undefined, no more data is available.
     */
    nextBeforeTimestampCursor: Timestamp | undefined;
}
/**
 * Enumerates the timeframes available for retrieving historical account margin data,
 * such as `"1D"`, `"1W"`, `"1M"`, etc.
 */
type PerpetualsAccountMarginHistoryTimeframeKey = "1D" | "1W" | "1M" | "ALL";
/**
 * Request payload for fetching historical margin metrics for an account.
 */
interface ApiPerpetualsAccountMarginHistoryBody {
    /**
     * Account ID.
     */
    accountId: PerpetualsAccountId;
    /**
     * Timeframe from which to obtain historical data from.
     */
    timeframe: PerpetualsAccountMarginHistoryTimeframeKey;
}
/**
 * Response payload for historical margin metrics.
 *
 * The returned array is ordered chronologically by `timestamp` (oldest -> newest)
 * unless the backend specifies otherwise.
 */
interface ApiPerpetualsAccountMarginHistoryResponse {
    marginHistoryDatas: PerpetualsAccountMarginHistoryData[];
}
/**
 * Request body for fetching account-level order history with a cursor.
 */
type ApiPerpetualsMarketOrderHistoryBody = ApiPerpetualsHistoricalDataWithCursorBody & {
    marketId: PerpetualsMarketId;
};
/**
 * Request body for fetching account-level order history with a cursor.
 */
type ApiPerpetualsAccountOrderHistoryBody = ApiPerpetualsHistoricalDataWithCursorBody & {
    accountId: PerpetualsAccountId;
    authentication?: {
        walletAddress: SuiAddress;
        bytes: string;
        signature: string;
    };
    /**
     * Optional filter restricting results to the specified event types.
     *
     * When omitted, the backend returns events of all types.
     */
    eventTypes?: UserHistoryEventType[];
};
/**
 * Request body for fetching account collateral history with a cursor.
 */
type ApiPerpetualsAccountCollateralHistoryBody = ApiPerpetualsHistoricalDataWithCursorBody & {
    accountId: PerpetualsAccountId;
    authentication?: {
        walletAddress: SuiAddress;
        bytes: string;
        signature: string;
    };
    /**
     * Optional filter restricting results to the specified event types.
     *
     * When omitted, the backend returns events of all types.
     */
    eventTypes?: UserHistoryEventType[];
};
/**
 * Request body for previewing a market order placement (before sending a tx).
 *
 * This version is used by the API and includes account or vault context.
 */
type ApiPerpetualsPreviewPlaceMarketOrderBody = Omit<ApiPerpetualsMarketOrderBody, "collateralChange" | "walletAddress" | "hasPosition" | "cancelSlTp" | "txKind" | "accountId" | "slTp" | "slippage"> & {
    /** Optional leverage override for the preview. */
    leverage?: number;
} & ({
    accountId: PerpetualsAccountId | undefined;
} | {
    vaultId: ObjectId | undefined;
});
/**
 * Request body for previewing a limit order placement (before sending a tx).
 *
 * This version is used by the API and includes account or vault context.
 */
type ApiPerpetualsPreviewPlaceLimitOrderBody = Omit<ApiPerpetualsLimitOrderBody, "collateralChange" | "walletAddress" | "hasPosition" | "cancelSlTp" | "txKind" | "accountId" | "slTp"> & {
    /** Optional leverage override for the preview. */
    leverage?: number;
} & ({
    accountId: PerpetualsAccountId | undefined;
} | {
    vaultId: ObjectId | undefined;
});
/**
 * Request body for previewing a scale order placement (before sending a tx).
 */
type ApiPerpetualsPreviewPlaceScaleOrderBody = {
    marketId: PerpetualsMarketId;
    side: PerpetualsOrderSide;
    /** Total size distributed across all orders (scaled bigint). */
    totalSize: bigint;
    /** Starting price of the scale range (inclusive, scaled bigint). */
    startPrice: bigint;
    /** Ending price of the scale range (inclusive, scaled bigint). */
    endPrice: bigint;
    /** Number of limit orders to place across the range. */
    numberOfOrders: number;
    /** Order type (e.g. GTC, IOC). */
    orderType: PerpetualsOrderType;
    /** If true, orders can only reduce an existing position. */
    reduceOnly: boolean;
    /** Optional leverage override. */
    leverage?: number;
    /** Size ratio between last and first order. `1.0` = uniform, `2.0` = last is 2x first. */
    sizeSkew?: number;
    /** Optional integrator fee configuration. */
    builderCode?: PerpetualsBuilderCodeParamaters;
    /** Optional expiration timestamp in milliseconds since epoch. */
    expiryTimestamp?: bigint;
} & ({
    accountId: PerpetualsAccountId | undefined;
} | {
    vaultId: ObjectId | undefined;
});
/**
 * Request body for previewing cancel-order operations.
 */
type ApiPerpetualsPreviewCancelOrdersBody = {
    /** Per-market mapping of order IDs to cancel. */
    marketIdsToData: Record<PerpetualsMarketId, {
        orderIds: PerpetualsOrderId[];
    }>;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * Request body for previewing a leverage change for a given position.
 */
type ApiPerpetualsPreviewSetLeverageBody = {
    marketId: PerpetualsMarketId;
    leverage: number;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * Request body for previewing a collateral allocation/deallocation for a given position.
 */
type ApiPerpetualsPreviewEditCollateralBody = {
    marketId: PerpetualsMarketId;
    collateralChange: Balance;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * Response type for a leverage preview request.
 *
 * Either returns an error, or the position and collateral after the change.
 */
type ApiPerpetualsPreviewSetLeverageResponse = {
    error: string;
} | {
    updatedPosition: PerpetualsPosition;
    collateralChange: number;
};
/**
 * Response type for a allocate/deallocate collateral preview request.
 *
 * Either returns an error, or the position and collateral after the change.
 */
type ApiPerpetualsPreviewEditCollateralResponse = {
    error: string;
} | {
    updatedPosition: PerpetualsPosition;
    collateralChange: number;
};
/**
 * Generic response type for a place-order preview (market or limit).
 */
type ApiPerpetualsPreviewPlaceOrderResponse = {
    error: string;
} | {
    /** Simulated position after the market order. */
    updatedPosition: PerpetualsPosition;
    /** Absolute price slippage between reference price and execution price. */
    priceSlippage: number;
    /** Relative price slippage expressed as a fraction
     * (e.g. `0.01` == 1% slippage). */
    percentSlippage: number;
    /** Size that is expected to be filled immediately (in base units). */
    filledSize: number;
    /** Notional value in USD of the `filledSize`. */
    filledSizeUsd: number;
    /** Any size that remains posted as liquidity (for market orders this is
     * usually zero unless partially resting is supported). */
    postedSize: number;
    /** Notional value in USD of the `postedSize`. For pure market orders this
     * is typically `0`. */
    postedSizeUsd: number;
    /** Net collateral change in USD (e.g. fees, margin changes). */
    collateralChange: number;
    /** Effective execution price for the filled portion of the order. */
    executionPrice: number;
    /** Whether there is an existing position in this market. */
    hasPosition: boolean;
    /** True is position is closed. */
    cancelSlTp: boolean;
};
/**
 * Response type for cancel-order preview.
 */
type ApiPerpetualsPreviewCancelOrdersResponse = {
    error: string;
} | {
    marketIdsToData: Record<PerpetualsMarketId, {
        updatedPosition: PerpetualsPosition;
        collateralChange: number;
    }>;
};
/**
 * Request body for computing an execution price for a hypothetical trade
 * using the current orderbook state and oracle prices.
 */
interface ApiPerpetualsExecutionPriceBody {
    side: PerpetualsOrderSide;
    size: bigint;
    /** Lot size used to discretize the order size. */
    lotSize: number;
    /** Available collateral. */
    collateral: Balance;
    /** Oracle ID for the base price. */
    basePriceFeedId: ObjectId;
    /** Oracle ID for the collateral price. */
    collateralPriceFeedId: ObjectId;
    /** Optional user-specified price constraint. */
    price?: number;
}
/**
 * Response body for execution price previews.
 */
interface ApiPerpetualsExecutionPriceResponse {
    executionPrice: number;
    sizeFilled: number;
    sizePosted: number;
    fills: PerpetualsFilledOrderData[];
}
/**
 * Request payload for fetching historical candle (OHLCV) data for a given
 * perpetuals market.
 */
interface ApiPerpetualsMarketCandleHistoryBody {
    /**
     * Identifier of the perpetuals market whose candles you want to fetch.
     *
     * Must be a valid on-chain market ID.
     */
    marketId: PerpetualsMarketId;
    /**
     * Start of the time range to query, as a Unix timestamp in **milliseconds**.
     */
    fromTimestamp: Timestamp;
    /**
     * End of the time range to query, as a Unix timestamp in **milliseconds**.
     */
    toTimestamp: Timestamp;
    /**
     * Candle interval / resolution in **milliseconds** (e.g. 60_000 for 1m,
     * 300_000 for 5m).
     */
    intervalMs: number;
}
/**
 * Response type for historical market candle data.
 */
interface ApiPerpetualsMarketCandleHistoryResponse {
    candles: PerpetualsMarketCandleDataPoint[];
}
/**
 * Request payload for fetching historical funding rate data for a given
 * perpetuals market.
 */
interface ApiPerpetualsMarketFundingHistoryBody {
    /** Market ID to query. Must be a valid on-chain market ID. */
    marketId: PerpetualsMarketId;
    /** Start of the time range to query (Unix timestamp in **milliseconds**). */
    fromTimestamp: Timestamp;
    /** End of the time range to query (Unix timestamp in **milliseconds**). */
    toTimestamp: Timestamp;
    /** Maximum number of funding points to return. */
    limit?: number;
}
/**
 * Single funding rate datapoint for a perpetuals market at a given timestamp.
 *
 * Funding rate fields are expressed as fractions: `0.01` = `1%`.
 */
interface PerpetualsMarketFundingHistoryPoint {
    /** Identifier of the perpetuals market. */
    marketId: PerpetualsMarketId;
    /** Timestamp at which this funding point was recorded (ms). */
    timestamp: Timestamp;
    /** On-chain event timestamp (ms). */
    eventTimestamp: Timestamp;
    /**
     * Funding rate applied to long positions for this period, as a fraction
     * (e.g. `0.01` = `1%`).
     */
    longFundingRate: Percentage;
    /**
     * Funding rate applied to short positions for this period, as a fraction
     * (e.g. `0.01` = `1%`).
     */
    shortFundingRate: Percentage;
    /**
     * Cumulative funding rate accrued by long positions up to this point, as
     * a fraction (e.g. `0.01` = `1%`).
     */
    cumulativeLongFundingRate: Percentage;
    /**
     * Cumulative funding rate accrued by short positions up to this point, as
     * a fraction (e.g. `0.01` = `1%`).
     */
    cumulativeShortFundingRate: Percentage;
    /** Sui transaction digest associated with this funding event. */
    txDigest: TransactionDigest;
}
/**
 * Response type for historical market funding data.
 */
interface ApiPerpetualsMarketFundingHistoryResponse {
    history: PerpetualsMarketFundingHistoryPoint[];
}
/**
 * Request body for computing the maximum order size for an account in a
 * given market.
 */
interface ApiPerpetualsMaxOrderSizeBody {
    marketId: PerpetualsMarketId;
    accountId: PerpetualsAccountId;
    side: PerpetualsOrderSide;
    leverage?: number;
    price?: number;
    /**
     * Optional integrator fee configuration for an order.
     *
     * If provided, the integrator specified in the configuration will receive a fee
     * on the taker volume generated by this order. The integrator must have been
     * previously approved by the account owner, and the fee must not exceed the
     * maximum fee the user approved for that integrator.
     */
    builderCode?: PerpetualsBuilderCodeParamaters;
}
/**
 * Request body for fetching stop-order data associated with an account or vault,
 * validated using a wallet signature.
 */
type ApiPerpetualsStopOrderDatasBody = {
    walletAddress: SuiAddress;
    bytes: string;
    signature: string;
    marketIds?: PerpetualsMarketId[];
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * Response payload for stop-order queries.
 *
 * Stop orders are returned in their normalized on-chain shape
 * ({@link PerpetualsStopOrderData}). Clients should interpret `slTp` vs `nonSlTp`
 * to determine the stop semantics.
 */
interface ApiPerpetualsStopOrderDatasResponse {
    stopOrderDatas: PerpetualsStopOrderData[];
}
/**
 * Request body for creating a vault capability (vault cap) for a given wallet.
 */
interface ApiPerpetualsCreateVaultCapBody {
    walletAddress: SuiAddress;
    sponsor?: PerpetualsSponsorConfig;
    lpCoinMetadata: {
        /** Name for the token */
        name: string;
        /** Symbol for the token */
        symbol: string;
        /** Description of the token */
        description: string;
        /** URL for the token logo */
        iconUrl?: string;
    };
}
/**
 * Request body for creating a new vault with initial deposit.
 *
 * The deposit can be specified either:
 * - As a numeric `initialDepositAmount`, or
 * - As an existing `depositCoinArg` (coin object).
 */
type ApiPerpetualsCreateVaultBody = {
    walletAddress: SuiAddress;
    metadata: {
        /**
         * A human-readable name for the `Vault`.
         */
        name: string;
        /**
         * A verbose description of the `Vault`.
         */
        description: string;
        /**
         * The `Vault` curator's name.
         */
        curatorName?: string;
        /**
         * A url for the `Vault`'s curator. Ideally their website.
         */
        curatorUrl?: string;
        /**
         * An image url for the `Vault`'s curator. Ideally their logo.
         */
        curatorLogoUrl?: string;
        /**
         * Extra / optional fields for future extensibility. Recommended keys include: twitter_url.
         */
        extraFields?: Record<string, string>;
    };
    coinMetadataId: ObjectId;
    treasuryCapId: ObjectId;
    collateralCoinType: CoinType;
    lockPeriodMs: bigint;
    performanceFeePercentage: Percentage;
    forceWithdrawDelayMs: bigint;
    txKind?: SerializedTransaction;
    isSponsoredTx?: boolean;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    initialDepositAmount: Balance;
} | {
    initialDepositCoinArg: TransactionObjectArgument;
});
/**
 * Request payload for creating an integrator configuration approval transaction.
 *
 * This transaction allows a user to approve an integrator to receive fees on orders
 * placed on their behalf. The user sets a maximum taker fee that the integrator
 * can charge per order.
 */
interface ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody {
    /**
     * Account ID encoded as a bigint.
     *
     * This is the perpetuals account that is granting permission to the integrator.
     */
    accountId: PerpetualsAccountId;
    /**
     * Sui address of the integrator being approved.
     *
     * Must be a valid Sui object ID.
     */
    integratorAddress: SuiAddress;
    /**
     * Maximum taker fee (as a decimal) that the integrator can charge per order.
     *
     * For example, 0.001 represents a 0.1% maximum fee. The integrator can set
     * any fee up to this maximum when placing orders on behalf of the user.
     */
    maxTakerFee: Percentage;
    /**
     * Optional existing transaction kind (base64-encoded) to extend.
     *
     * If provided, the new integrator approval will be added to this transaction.
     */
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request payload for creating a transaction to revoke an integrator's permissions.
 *
 * This transaction removes an integrator's approval to collect fees on orders
 * placed on behalf of the user. After revocation, the integrator will no longer
 * be able to submit orders with fees for this account.
 */
interface ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody {
    /**
     * Account ID encoded as a bigint.
     *
     * This is the perpetuals account that is revoking the integrator's permission.
     */
    accountId: PerpetualsAccountId;
    /**
     * Sui address of the integrator whose permissions are being revoked.
     *
     * Must be a valid Sui object ID.
     */
    integratorAddress: SuiAddress;
    /**
     * Optional existing transaction kind (base64-encoded) to extend.
     *
     * If provided, the integrator removal will be added to this transaction.
     */
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request payload for creating a transaction to initialize an integrator fee vault.
 *
 * Before an integrator can claim fees from a specific market, they must first create
 * a vault for that market. This is a one-time setup per integrator per market.
 */
interface ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody {
    /**
     * Market (clearing house) ID where the integrator vault will be created.
     *
     * Must be a valid Sui object ID.
     */
    marketId: PerpetualsMarketId;
    /**
     * Sui address of the integrator creating the vault.
     *
     * Must be a valid Sui object ID.
     * This integrator will be able to claim fees from this vault.
     */
    integratorAddress: SuiAddress;
    /**
     * Optional existing transaction kind (base64-encoded) to extend.
     *
     * If provided, the vault creation will be added to this transaction.
     */
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request payload for creating a transaction to claim accumulated integrator fees from a vault.
 *
 * Integrators earn fees on taker volume generated by orders they submit on behalf of users.
 * These fees accumulate in a vault per market (clearing house), and can be claimed at any time
 * by the integrator.
 */
interface ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody {
    /**
     * Market (clearing house) ID where the integrator fees were earned.
     *
     * Must be a valid Sui object ID.
     */
    marketId: PerpetualsMarketId;
    /**
     * Sui address of the integrator claiming their fees.
     *
     * Must be a valid Sui object ID.
     * Only the integrator who earned the fees can claim them.
     */
    integratorAddress: SuiAddress;
    /**
     * Optional recipient address for the claimed fees.
     *
     * When provided, the transaction will include an on-chain transfer of the
     * claimed coin to this address. When omitted, the claimed coin is exposed
     * as a transaction argument that can be used in subsequent commands.
     */
    recipientAddress?: SuiAddress;
    /**
     * Optional existing transaction kind (base64-encoded) to extend.
     *
     * If provided, the fee claim will be added to this transaction.
     */
    txKind?: SerializedTransaction;
}
/**
 * Response payload for claim integrator vault fees transaction.
 *
 * Contains the transaction kind and optionally a coin output argument when
 * no recipient address was provided.
 */
interface ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse {
    /**
     * Base64-encoded Sui `TransactionKind` representing the claim (and
     * optional transfer) transaction.
     */
    txKind: SerializedTransaction;
    /**
     * When `recipientAddress` is omitted, this contains a readable argument
     * pointing to the claimed coin output, so callers can wire it into
     * subsequent steps.
     */
    coinOutArg?: TransactionObjectArgument;
}
/**
 * Request payload for fetching integrator configuration for a specific account and integrator.
 *
 * This endpoint checks whether an integrator has been approved by an account to collect fees,
 * and if so, returns the maximum taker fee the integrator is authorized to charge.
 */
interface ApiPerpetualsBuilderCodesIntegratorConfigBody {
    /**
     * Account ID encoded as a bigint.
     *
     * This is the perpetuals account whose integrator approval is being queried.
     */
    accountId: PerpetualsAccountId;
    /**
     * Sui address of the integrator whose configuration is being queried.
     *
     * Must be a valid Sui object ID.
     */
    integratorAddress: SuiAddress;
}
/**
 * Response payload containing integrator configuration details.
 *
 * Returns whether an integrator configuration exists and the maximum taker fee
 * if the integrator has been approved.
 */
interface ApiPerpetualsBuilderCodesIntegratorConfigResponse {
    /**
     * Maximum taker fee (as a decimal) that the integrator is authorized to charge.
     *
     * For example, 0.001 represents a 0.1% maximum fee. This value is only meaningful
     * if `exists` is true.
     */
    maxTakerFee: Percentage | undefined;
    /**
     * Whether an integrator configuration exists for this account-integrator pair.
     *
     * If false, the integrator has not been approved by the account and cannot
     * collect fees on orders placed on behalf of the account.
     */
    exists: boolean;
}
/**
 * Individual integrator vault data for a specific market.
 *
 * Contains the market ID and the accumulated fees available to claim from that market's vault.
 */
interface PerpetualsIntegratorVaultData {
    /**
     * Market (clearing house) object ID.
     */
    marketId: PerpetualsMarketId;
    /**
     * The collateral coin type used by this market.
     */
    collateralCoinType: CoinType;
    /**
     * Total accumulated fees in the market's collateral currency that are available to claim.
     *
     * Fees are denominated in the collateral coin type used by the market.
     */
    fees: number;
    /**
     * Total accumulated fees converted to USD.
     */
    feesUsd: number;
}
/**
 * Request payload for fetching integrator vault fees across multiple markets.
 *
 * This endpoint returns the accumulated fees an integrator has earned in their vaults
 * across one or more markets (clearing houses). These fees are generated from taker
 * volume on orders the integrator submitted on behalf of users.
 */
interface ApiPerpetualsBuilderCodesIntegratorVaultsBody {
    /**
     * List of market (clearing house) IDs to query for integrator vault fees.
     *
     * Each market ID must be a valid Sui object ID.
     */
    marketIds: PerpetualsMarketId[];
    /**
     * Sui address of the integrator whose vault fees are being queried.
     *
     * Must be a valid Sui object ID.
     */
    integratorAddress: SuiAddress;
}
/**
 * Response payload containing accumulated fees per market for an integrator.
 *
 * Returns a vector of integrator vault data, one entry per market queried.
 * Markets where the integrator has no vault may be omitted or have zero fees.
 */
interface ApiPerpetualsBuilderCodesIntegratorVaultsResponse {
    /**
     * Vector of integrator vault data containing market IDs and their accumulated fees.
     *
     * Each entry represents a market where the integrator has a vault and potentially
     * claimable fees. The order matches the order of market IDs in the request.
     */
    integratorVaults: PerpetualsIntegratorVaultData[];
}
/**
 * Request body for creating a new perpetuals account for a given wallet
 * and collateral coin type.
 */
interface ApiPerpetualsCreateAccountBody {
    walletAddress: SuiAddress;
    collateralCoinType: CoinType;
    txKind?: SerializedTransaction;
    deferShare?: boolean;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Response from the create-account endpoint.
 *
 * When `deferShare` is false (default), returns `txKind` and optionally `sponsorSignature`.
 * When `deferShare` is true, additionally returns `deferred` with argument references
 * for PTB composition.
 */
interface ApiPerpetualsCreateAccountResponse {
    txKind: SerializedTransaction;
    sponsorSignature?: string;
    /** Deferred account argument references for downstream composition
     * (only set when `deferShare = true`). */
    deferred?: DeferredAccountArgs;
}
/**
 * Request body for depositing collateral into a perpetuals account.
 *
 * The deposit can be provided by:
 * - `depositAmount` (numeric amount), or
 * - `depositCoinArg` (Sui coin object).
 */
type ApiPerpetualsDepositCollateralBody = {
    walletAddress: SuiAddress;
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
    collateralCoinType: CoinType;
    txKind?: SerializedTransaction;
    isSponsoredTx?: boolean;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    depositAmount: Balance;
} | {
    depositCoinArg: TransactionObjectArgument;
});
/**
 * Request body for withdrawing collateral from an account.
 */
interface ApiPerpetualsWithdrawCollateralBody {
    accountId: PerpetualsAccountId;
    withdrawAmount: Balance;
    recipientAddress?: SuiAddress;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Response body for withdraw-collateral transactions.
 *
 * The SDK typically uses `txKind` to reconstruct a transaction locally.
 */
interface ApiPerpetualsWithdrawCollateralResponse {
    txKind: SerializedTransaction;
    sponsorSignature?: string;
    coinOutArg: TransactionObjectArgument | undefined;
}
/**
 * Request body for transferring collateral between two perpetuals accounts.
 */
interface ApiPerpetualsTransferCollateralBody {
    walletAddress: SuiAddress;
    fromAccountId: PerpetualsAccountId;
    fromAccountCapId?: ObjectId;
    toAccountId: PerpetualsAccountId;
    toAccountCapId?: ObjectId;
    transferAmount: Balance;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request body for allocating collateral to a given market (account/vault).
 */
type ApiPerpetualsAllocateCollateralBody = {
    marketId: PerpetualsMarketId;
    allocateAmount: Balance;
    /**
     * Caller wallet. For vault-backed accounts, when the caller is a vault
     * assistant (rather than the vault owner), the backend uses this to
     * resolve the correct assistant cap.
     */
    walletAddress?: SuiAddress;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * Request body for deallocating collateral from a given market (account/vault).
 */
type ApiPerpetualsDeallocateCollateralBody = {
    marketId: PerpetualsMarketId;
    deallocateAmount: Balance;
    /**
     * Caller wallet. For vault-backed accounts, when the caller is a vault
     * assistant (rather than the vault owner), the backend uses this to
     * resolve the correct assistant cap.
     */
    walletAddress?: SuiAddress;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * SDK-level inputs for placing one or more stop orders.
 *
 * This is a client-facing type that wraps the on-chain format.
 */
interface SdkPerpetualsPlaceStopOrdersInputs {
    /** Stop orders to place (without objectId, which is created on-chain). */
    stopOrders: Omit<PerpetualsStopOrderData, "objectId" | "orderState">[];
    /** Optional transaction to embed the call in. */
    tx?: Transaction;
    /** Optional gas coin for sponsored or custom gas usage. */
    gasCoinArg?: TransactionObjectArgument;
    /** Whether the transaction is expected to be sponsored by the API. */
    isSponsoredTx?: boolean;
    /** Optional gas pool sponsorship configuration. */
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request body for placing stop orders via the API.
 */
type ApiPerpetualsPlaceStopOrdersBody = {
    walletAddress: SuiAddress;
    stopOrders: Omit<PerpetualsStopOrderData, "objectId" | "orderState">[];
    gasCoinArg?: TransactionObjectArgument;
    isSponsoredTx?: boolean;
    sponsor?: PerpetualsSponsorConfig;
    txKind?: SerializedTransaction;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * SDK-level inputs for placing stop-loss / take-profit orders bound to a
 * specific market and position side.
 */
interface SdkPerpetualsPlaceSlTpOrdersInputs {
    marketId: PerpetualsMarketId;
    /** Optional target size for SL/TP orders (scaled base units). */
    size?: bigint;
    /** Index price at which to trigger stop loss. */
    stopLossIndexPrice?: number;
    /** Index price at which to trigger take profit. */
    takeProfitIndexPrice?: number;
    /** Unique order identifier for limit order sl/tp is tied to. */
    limitOrderId?: PerpetualsOrderId;
    /** Optional transaction to embed in. */
    tx?: Transaction;
    /** Optional gas coin argument. */
    gasCoinArg?: TransactionObjectArgument;
    /** Whether to treat the transaction as sponsored. */
    isSponsoredTx?: boolean;
    /** Optional gas pool sponsorship configuration. */
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API request body for placing SL/TP orders bound to a position.
 */
type ApiPerpetualsPlaceSlTpOrdersBody = {
    marketId: PerpetualsMarketId;
    walletAddress: SuiAddress;
    positionSide: PerpetualsOrderSide;
    size?: bigint;
    stopLossIndexPrice?: number;
    takeProfitIndexPrice?: number;
    limitOrderId?: PerpetualsOrderId;
    gasCoinArg?: TransactionObjectArgument;
    isSponsoredTx?: boolean;
    sponsor?: PerpetualsSponsorConfig;
    leverage?: number;
    txKind?: SerializedTransaction;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * API request body for editing existing stop orders for an
 * account or vault.
 */
type ApiPerpetualsEditStopOrdersBody = {
    stopOrders: PerpetualsStopOrderData[];
    /**
     * Caller wallet. For vault-backed accounts, when the caller is a vault
     * assistant (rather than the vault owner), the backend uses this to
     * resolve the correct assistant cap.
     */
    walletAddress?: SuiAddress;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * API request body for placing a market order in a given market.
 *
 * This form is used by the backend and includes contextual information
 * like `accountId` or `vaultId`.
 */
type ApiPerpetualsMarketOrderBody = {
    walletAddress: SuiAddress;
    marketId: PerpetualsMarketId;
    side: PerpetualsOrderSide;
    /** Order size in scaled base units. */
    size: bigint;
    /** Change in collateral allocated to this position (collateral units). */
    collateralChange: number;
    /** Whether the account already has a position in this market. */
    hasPosition: boolean;
    /** True is position is closed. */
    cancelSlTp: boolean;
    /** If true, order can only reduce an existing position. */
    reduceOnly: boolean;
    /** Allowable max slippage for trade execution. */
    slippage: Slippage;
    /** Optional leverage override. */
    leverage?: number;
    /** Optional SL/TP instructions to be placed along with the market order. */
    slTp?: {
        gasCoinArg?: TransactionObjectArgument;
        isSponsoredTx?: boolean;
        size?: bigint;
        stopLossIndexPrice?: number;
        takeProfitIndexPrice?: number;
    };
    /**
     * Optional integrator fee configuration for this order.
     *
     * If provided, the integrator specified in the configuration will receive a fee
     * on the taker volume generated by this order. The integrator must have been
     * previously approved by the account owner, and the fee must not exceed the
     * maximum fee the user approved for that integrator.
     */
    builderCode?: PerpetualsBuilderCodeParamaters;
    /** Optional serialized transaction kind if assembled by the API. */
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * API request body for placing a limit order in a given market.
 */
type ApiPerpetualsLimitOrderBody = {
    marketId: PerpetualsMarketId;
    walletAddress: SuiAddress;
    side: PerpetualsOrderSide;
    /** Order size in scaled base units. */
    size: bigint;
    /** Limit price in scaled fixed-point representation. */
    price: bigint;
    /** How the order behaves on the orderbook. */
    orderType: PerpetualsOrderType;
    /** Change in collateral allocated to this position. */
    collateralChange: number;
    /** Whether the account already has a position in this market. */
    hasPosition: boolean;
    /** True is position is closed. */
    cancelSlTp: boolean;
    /** If true, order can only reduce an existing position. */
    reduceOnly: boolean;
    /** Optional expiration for the order. */
    expiryTimestamp?: bigint;
    /** Optional leverage override. */
    leverage?: number;
    /** Optional SL/TP instructions to be placed along with the limit order. */
    slTp?: {
        gasCoinArg?: TransactionObjectArgument;
        isSponsoredTx?: boolean;
        size?: bigint;
        stopLossIndexPrice?: number;
        takeProfitIndexPrice?: number;
    };
    /**
     * Optional integrator fee configuration for this order.
     *
     * If provided, the integrator specified in the configuration will receive a fee
     * on the taker volume generated by this order. The integrator must have been
     * previously approved by the account owner, and the fee must not exceed the
     * maximum fee the user approved for that integrator.
     */
    builderCode?: PerpetualsBuilderCodeParamaters;
    /** Optionally pre-built transaction payload. */
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * API request body for placing a scale order (multiple limit orders
 * distributed across a price range) in a given market.
 */
type ApiPerpetualsScaleOrderBody = {
    walletAddress: SuiAddress;
    marketId: PerpetualsMarketId;
    side: PerpetualsOrderSide;
    /** Total size distributed across all orders (base asset amount, scaled bigint). */
    totalSize: bigint;
    /** Starting price of the scale range (inclusive, scaled bigint). */
    startPrice: bigint;
    /** Ending price of the scale range (inclusive, scaled bigint). */
    endPrice: bigint;
    /** Number of limit orders to place across the range. */
    numberOfOrders: number;
    /** Order type (e.g. GTC, IOC). */
    orderType: PerpetualsOrderType;
    /** Collateral change associated with this order. */
    collateralChange: number;
    /** Whether the account already has a position in this market. */
    hasPosition: boolean;
    /** If true, orders can only reduce an existing position. */
    reduceOnly: boolean;
    /** True if position is closed. */
    cancelSlTp: boolean;
    /** Optional expiration timestamp in milliseconds since epoch. */
    expiryTimestamp?: bigint;
    /** Optional leverage override. */
    leverage?: number;
    /** Size ratio between last and first order. `1.0` = uniform, `2.0` = last is 2x first. */
    sizeSkew?: number;
    /** Optional integrator fee configuration. */
    builderCode?: PerpetualsBuilderCodeParamaters;
    /** Optionally pre-built transaction payload. */
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * A single order to place as part of a cancel-and-place batch.
 */
interface ApiPerpetualsOrderToPlace {
    /** Order side: `0` = bid (long), `1` = ask (short). */
    side: PerpetualsOrderSide;
    /** Limit price (scaled bigint). */
    price: bigint;
    /** Order size in scaled base units. */
    size: bigint;
}
/**
 * API request body for atomically canceling existing orders and placing
 * new ones in a single transaction.
 */
type ApiPerpetualsCancelAndPlaceOrdersBody = {
    walletAddress: SuiAddress;
    marketId: PerpetualsMarketId;
    /** Order IDs to cancel. */
    orderIdsToCancel: PerpetualsOrderId[];
    /** New orders to place after the cancellation. */
    ordersToPlace: ApiPerpetualsOrderToPlace[];
    /** Order type (e.g. GTC, IOC). */
    orderType: PerpetualsOrderType;
    /** If true, placed orders can only reduce an existing position. */
    reduceOnly: boolean;
    /** Optional expiration timestamp in milliseconds since epoch. */
    expiryTimestamp?: bigint;
    /** Optional leverage override. */
    leverage?: number;
    /** Whether the account already has a position in this market. */
    hasPosition: boolean;
    /** Optional integrator fee configuration. */
    builderCode?: PerpetualsBuilderCodeParamaters;
    /** Optionally pre-built transaction payload. */
    txKind?: SerializedTransaction;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * API request body for canceling one or more orders for an
 * account or vault, per market.
 */
type ApiPerpetualsCancelOrdersBody = {
    walletAddress: SuiAddress;
    marketIdsToData: Record<PerpetualsMarketId, {
        orderIds: PerpetualsOrderId[];
        /** Collateral change associated with canceling these orders. */
        collateralChange: number;
    }>;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * API request body for canceling stop orders identified by object IDs.
 */
type ApiPerpetualsCancelStopOrdersBody = {
    walletAddress: SuiAddress;
    stopOrderIds: ObjectId[];
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * API body for setting leverage on an existing position.
 */
type ApiPerpetualsSetLeverageTxBody = {
    marketId: PerpetualsMarketId;
    collateralChange: number;
    leverage: number;
    /**
     * Caller wallet. For vault-backed accounts, when the caller is a vault
     * assistant (rather than the vault owner), the backend uses this to
     * resolve the correct assistant cap.
     */
    walletAddress?: SuiAddress;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    accountId: PerpetualsAccountId;
    accountCapId?: ObjectId;
} | {
    vaultId: ObjectId;
});
/**
 * 24-hour volume and price change statistics for a single market.
 */
interface PerpetualsMarket24hrStats {
    /** The total 24h volume in USD. */
    volumeUsd: number;
    /** The total 24h volume measured in the base asset. */
    volumeBaseAssetAmount: number;
    /**
     * Absolute price change over the last 24h, denominated in the
     * base asset's quote units.
     */
    priceChange: number;
    /** Relative price change over the last 24h (e.g. +5% => `0.05`). */
    priceChangePercentage: number;
    /** Latest base asset price for this market. */
    basePrice: number;
    /** Latest collateral asset price used in this market. */
    collateralPrice: number;
    /**
     * Mid price derived from the current order book.
     *
     * Calculated as the average of the best bid and best ask.
     * `undefined` if either side of the book is empty.
     */
    midPrice: number | undefined;
    /**
     * Mark price used for liquidations and risk calculations.
     *
     * Computed as the median of the index TWAP, the current
     * book-derived price, and the index price adjusted for
     * funding contributions.
     */
    markPrice: number;
}
/**
 * Response type for requesting 24h stats for multiple markets.
 */
interface ApiPerpetualsMarkets24hrStatsResponse {
    marketsStats: PerpetualsMarket24hrStats[];
}
/**
 * Request body for fetching all markets for a given collateral type.
 *
 * This endpoint is commonly used to populate a "Markets" list filtered by
 * the user's selected collateral (e.g., USDC-margined markets).
 */
interface ApiPerpetualsAllMarketsBody {
    collateralCoinType: CoinType;
}
/**
 * Response payload for {@link ApiPerpetualsAllMarketsBody}.
 *
 * Returns enriched market data including parameters, state, and current prices.
 */
interface ApiPerpetualsAllMarketsResponse {
    markets: PerpetualsMarketData[];
}
/**
 * Request body for fetching a specific set of markets by ID.
 */
interface ApiPerpetualsMarketsBody {
    marketIds: PerpetualsMarketId[];
}
/**
 * Response payload for {@link ApiPerpetualsMarketsBody}.
 *
 * Each item includes the market data.
 */
interface ApiPerpetualsMarketsResponse {
    marketDatas: {
        market: PerpetualsMarketData;
    }[];
}
/**
 * Request body for fetching a specific set of orderbooks by market ID.
 */
interface ApiPerpetualsOrderbooksBody {
    marketIds: PerpetualsMarketId[];
}
/**
 * Response payload for {@link ApiPerpetualsOrderbooksBody}.
 *
 * Each item includes the current orderbook snapshot.
 */
interface ApiPerpetualsOrderbooksResponse {
    orderbooks: {
        orderbook: PerpetualsOrderbook;
    }[];
}
/**
 * Request body for fetching vault objects.
 *
 * If `vaultIds` is omitted, the API may return all vaults (potentially paginated
 * at the transport layer).
 */
interface ApiPerpetualsVaultsBody {
    vaultIds?: ObjectId[];
}
/**
 * Response payload for vault queries.
 */
interface ApiPerpetualsVaultsResponse {
    vaults: PerpetualsVaultObject[];
}
/**
 * Request body for fetching current prices for a list of markets.
 *
 * This is a lightweight alternative to fetching full {@link PerpetualsMarketData}
 * when only prices are needed.
 */
interface ApiPerpetualsMarketsPricesBody {
    marketIds: PerpetualsMarketId[];
}
/**
 * Response payload for {@link ApiPerpetualsMarketsPricesBody}.
 *
 * Returns base (index/oracle) and collateral prices, the order book mid price,
 * and the mark price used for liquidations and risk calculations.
 */
interface ApiPerpetualsMarketsPricesResponse {
    marketsPrices: {
        /** Identifier of the market. */
        marketId: PerpetualsMarketId;
        /** Latest base asset price for this market. */
        basePrice: number;
        /** Latest collateral asset price used in this market. */
        collateralPrice: number;
        /**
         * Mid price derived from the current order book.
         *
         * Calculated as the average of the best bid and best ask.
         * `undefined` if either side of the book is empty.
         */
        midPrice: number | undefined;
        /**
         * Mark price used for liquidations and risk calculations.
         *
         * Computed as the median of the index TWAP, the current
         * book-derived price, and the index price adjusted for
         * funding contributions.
         */
        markPrice: number;
    }[];
}
/**
 * Request body for granting an Agent Wallet on a perpetuals account.
 *
 * This corresponds to `POST /api/perpetuals/account/transactions/grant-agent-wallet`.
 *
 * The resulting on-chain transaction must be signed by the **account admin** wallet.
 * After execution, `recipientAddress` receives assistant-level permissions for `accountId`
 * (trading actions are allowed, but **withdrawing collateral** and managing other agent wallets are not).
 *
 * ### Methods
 * - **Method 1 (existing account)**: Provide `accountId`.
 * - **Method 2 (composed flow)**: Provide `deferred` with argument references
 *   from a deferred `getCreateAccountTx` call.
 */
interface ApiPerpetualsGrantAgentWalletTxBody {
    recipientAddress: SuiAddress;
    /** Perpetuals account ID (Method 1). */
    accountId?: PerpetualsAccountId;
    /** Composed PTB args from deferred create-account (Method 2). */
    deferred?: DeferredAccountArgs;
    txKind?: SerializedTransaction;
}
/**
 * Request body for revoking an Agent Wallet from a perpetuals account.
 *
 * This corresponds to `POST /api/perpetuals/account/transactions/revoke-agent-wallet`.
 *
 * The resulting on-chain transaction must be signed by the **account admin** wallet.
 * `accountCapId` is the object ID of the assistant capability to revoke.
 */
interface ApiPerpetualsRevokeAgentWalletTxBody {
    accountId: PerpetualsAccountId;
    accountCapId: ObjectId;
    txKind?: SerializedTransaction;
}
interface ApiPerpetualsTransferCapTxBody {
    /**
     * Recipient wallet address that should receive the capability object.
     *
     * Must be a valid Sui address string.
     */
    recipientAddress: SuiAddress;
    /**
     * Object ID of the capability to transfer.
     *
     * Required for Method 1 (on-chain object); omit for Method 2 (composed flow).
     */
    capObjectId?: ObjectId;
    /**
     * Composed PTB argument + capability type from a deferred flow.
     *
     * Required for Method 2 (composed flow); omit for Method 1.
     */
    composed?: ComposedTransferArgs;
    /**
     * Optional serialized (base64) Sui `TransactionKind` to extend.
     *
     * When provided, the transfer operation is appended to the existing transaction.
     */
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request body for sharing a Perpetuals account that was created with deferred sharing.
 *
 * This finalizes the account creation flow by consuming the `AccountSharePolicy`
 * and sharing the `Account` object.
 *
 * The deferred account fields (`accountArg`, `sharePolicyArg`, `adminCapArg`,
 * `collateralCoinType`) are sent as top-level fields (matching the API's flattened layout).
 *
 * ### Example flow
 * 1. `create-account` with `deferShare=true` → returns `deferred` with argument references
 * 2. `grant-agent-wallet` with `deferred` → mints assistant cap
 * 3. `transfer-cap` with `composed` → transfers admin cap to primary wallet
 * 4. `share` with deferred fields → finalizes account sharing
 */
interface ApiPerpetualsShareAccountBody {
    accountArg: TransactionObjectArgument;
    sharePolicyArg: TransactionObjectArgument;
    adminCapArg: TransactionObjectArgument;
    collateralCoinType: CoinType;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request body for fetching LP coin prices for a set of vaults.
 *
 * LP coin price is typically expressed in USD per 1 LP token (native units adjusted
 * using `lpCoinDecimals` on the vault object).
 */
interface ApiPerpetualsVaultLpCoinPricesBody {
    vaultIds: ObjectId[];
}
/**
 * Response payload for {@link ApiPerpetualsVaultLpCoinPricesBody}.
 *
 * The response is index-aligned with the request `vaultIds` array.
 */
interface ApiPerpetualsVaultLpCoinPricesResponse {
    lpCoinPrices: number[];
}
/**
 * Request body for fetching a wallet's owned LP coin objects across vaults.
 */
interface ApiPerpetualsVaultOwnedLpCoinsBody {
    walletAddress: SuiAddress;
}
/**
 * Response payload listing owned LP coin objects (per vault).
 */
interface ApiPerpetualsVaultOwnedLpCoinsResponse {
    ownedLpCoins: PerpetualsVaultLpCoin[];
}
/**
 * Request body for fetching vault capability objects owned by a wallet.
 *
 * Vault caps are typically owned by the vault creator/owner and are required
 * for privileged vault actions (processing withdrawals, updating parameters, etc.).
 */
interface ApiPerpetualsOwnedVaultCapsBody {
    walletAddress: SuiAddress;
}
/**
 * Response payload listing all vault caps owned by the wallet.
 */
interface ApiPerpetualsOwnedVaultCapsResponse {
    ownedVaultCaps: PerpetualsVaultCap[];
}
/**
 * Request body for fetching vault **assistant** capability objects owned by a
 * wallet.
 *
 * Assistant caps let a non-owner wallet operate a vault on behalf of the
 * owner. They are structurally identical to regular vault caps but grant a
 * narrower permission set.
 */
interface ApiPerpetualsOwnedVaultAssistantCapsBody {
    walletAddress: SuiAddress;
}
/**
 * Response payload listing all vault assistant caps owned by the wallet.
 */
interface ApiPerpetualsOwnedVaultAssistantCapsResponse {
    ownedVaultAssistantCaps: PerpetualsVaultCap[];
}
/**
 * API body to process forced withdrawals in a vault.
 */
interface ApiPerpetualsVaultProcessForceWithdrawRequestTxBody {
    walletAddress: SuiAddress;
    vaultId: ObjectId;
    /** Per-market sizes to close as part of force withdraw. */
    sizesToClose: Record<PerpetualsMarketId, Balance>;
    recipientAddress?: SuiAddress;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Response body for force-withdraw processing transactions.
 *
 * - `txKind` is a serialized transaction kind the client can sign/submit.
 * - `coinOutArg` (if present) is the transaction argument referencing the
 *   withdrawn collateral coin output.
 */
interface ApiPerpetualsVaultProcessForceWithdrawRequestTxResponse {
    txKind: SerializedTransaction;
    sponsorSignature?: string;
    coinOutArg: TransactionObjectArgument | undefined;
}
interface ApiPerpetualsVaultPauseVaultForForceWithdrawRequestTxBody {
    vaultId: ObjectId;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API body to process regular withdraw requests for a vault.
 */
interface ApiPerpetualsVaultOwnerProcessWithdrawRequestsTxBody {
    vaultId: ObjectId;
    userAddresses: SuiAddress[];
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API body to update slippage parameter for pending vault withdraw
 * request for a specific vault.
 */
interface ApiPerpetualsVaultUpdateWithdrawRequestSlippageTxBody {
    vaultId: ObjectId;
    minCollateralAmountOut: Balance;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API body to update the force-withdrawal delay in a vault.
 */
interface ApiPerpetualsVaultOwnerUpdateForceWithdrawDelayTxBody {
    vaultId: ObjectId;
    forceWithdrawDelayMs: bigint;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API body to update the lock period on a vault.
 */
interface ApiPerpetualsVaultOwnerUpdateLockPeriodTxBody {
    vaultId: ObjectId;
    lockPeriodMs: bigint;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API body to update the owner's fee percentage on a vault.
 */
interface ApiPerpetualsVaultOwnerUpdatePerformanceFeeTxBody {
    vaultId: ObjectId;
    performanceFeePercentage: number;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API body for the vault owner withdrawing collected fees.
 */
interface ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxBody {
    vaultId: ObjectId;
    withdrawAmount: Balance;
    recipientAddress?: SuiAddress;
    txKind?: SerializedTransaction;
}
/**
 * Response for owner-fee withdrawal transactions.
 */
interface ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse {
    txKind: SerializedTransaction;
    sponsorSignature?: string;
    coinOutArg: TransactionObjectArgument | undefined;
}
/**
 * Request body for fetching all withdrawal requests for specific vaults.
 */
interface ApiPerpetualsVaultsWithdrawRequestsBody {
    vaultIds: ObjectId[];
}
/**
 * Response payload listing withdrawal requests for the requested vaults.
 *
 * Depending on backend behavior, this may include all queued requests across
 * all specified vaults.
 */
interface ApiPerpetualsVaultsWithdrawRequestsResponse {
    withdrawRequests: PerpetualsVaultWithdrawRequest[];
}
/**
 * Request body for fetching withdrawal requests for a given wallet across
 * its vault positions.
 */
interface ApiPerpetualsVaultOwnedWithdrawRequestsBody {
    walletAddress: SuiAddress;
}
/**
 * Response payload listing withdrawal requests created by `walletAddress`.
 */
interface ApiPerpetualsVaultOwnedWithdrawRequestsResponse {
    ownedWithdrawRequests: PerpetualsVaultWithdrawRequest[];
}
/**
 * API body for creating a single withdraw request from a vault.
 */
interface ApiPerpetualsVaultCreateWithdrawRequestTxBody {
    vaultId: ObjectId;
    walletAddress: SuiAddress;
    lpWithdrawAmount: Balance;
    minCollateralAmountOut: Balance;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * API body for withdrawing collateral from a vault as owner.
 */
interface ApiPerpetualsVaultOwnerWithdrawCollateralTxBody {
    vaultId: ObjectId;
    lpWithdrawAmount: Balance;
    minCollateralAmountOut: Balance;
    recipientAddress?: SuiAddress;
    txKind?: SerializedTransaction;
}
/**
 * Response body for vault owner withdraw-collateral transactions.
 *
 * The SDK typically uses `txKind` to reconstruct a transaction locally.
 */
interface ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse {
    txKind: SerializedTransaction;
    sponsorSignature?: string;
    coinOutArg: TransactionObjectArgument | undefined;
}
/**
 * API body for withdrawing the vault owner's locked liquidity.
 */
interface ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxBody {
    vaultId: ObjectId;
    amount: Balance;
    minCollateralAmountOut: Balance;
    recipientAddress?: SuiAddress;
    txKind?: SerializedTransaction;
}
/**
 * Response body for vault owner withdraw-locked-liquidity transactions.
 */
interface ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse {
    txKind: SerializedTransaction;
    coinOutArg: TransactionObjectArgument | undefined;
}
/**
 * API body for canceling withdrawal requests across vaults for a wallet.
 */
interface ApiPerpetualsVaultCancelWithdrawRequestTxBody {
    vaultId: ObjectId;
    walletAddress: SuiAddress;
    txKind?: SerializedTransaction;
    sponsor?: PerpetualsSponsorConfig;
}
/**
 * Request body for depositing into a vault.
 *
 * Deposit can be specified as a numeric amount or as an existing coin object.
 */
type ApiPerpetualsVaultDepositTxBody = {
    vaultId: ObjectId;
    walletAddress: SuiAddress;
    minLpAmountOut: Balance;
    txKind?: SerializedTransaction;
    isSponsoredTx?: boolean;
    sponsor?: PerpetualsSponsorConfig;
} & ({
    depositAmount: Balance;
    collateralCoinType: CoinType;
} | {
    depositCoinArg: TransactionObjectArgument;
});
/**
 * Request body for previewing a vault withdrawal request.
 */
interface ApiPerpetualsVaultPreviewCreateWithdrawRequestBody {
    vaultId: ObjectId;
    walletAddress: SuiAddress;
    lpWithdrawAmount: Balance;
}
/**
 * Response body for vault withdrawal preview.
 */
type ApiPerpetualsVaultPreviewCreateWithdrawRequestResponse = {
    error: string;
} | {
    collateralAmountOut: Balance;
    collateralPrice: number;
};
/**
 * Request body for previewing a vault owner collateral withdrawal.
 */
interface ApiPerpetualsVaultPreviewOwnerWithdrawCollateralBody {
    vaultId: ObjectId;
    lpWithdrawAmount: Balance;
}
/**
 * Response body for vault owner collateral withdrawal preview.
 */
type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse = {
    error: string;
} | {
    collateralAmountOut: Balance;
    collateralPrice: number;
};
/**
 * Request body for previewing a vault owner locked liquidity withdrawal.
 */
interface ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityBody {
    vaultId: ObjectId;
    amount: Balance;
}
/**
 * Response body for vault owner locked liquidity withdrawal preview.
 */
type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityResponse = {
    error: string;
} | {
    collateralAmountOut: Balance;
    collateralPrice: number;
};
/**
 * Request body for previewing a vault deposit.
 */
interface ApiPerpetualsVaultPreviewDepositBody {
    vaultId: ObjectId;
    depositAmount: Balance;
}
/**
 * Response body for vault deposit preview.
 */
type ApiPerpetualsVaultPreviewDepositResponse = {
    error: string;
} | {
    lpAmountOut: Balance;
    collateralPrice: number;
    depositedAmountUsd: number;
};
/**
 * Request body for previewing forced withdraw processing for a vault.
 */
interface ApiPerpetualsVaultPreviewProcessForceWithdrawRequestBody {
    vaultId: ObjectId;
    walletAddress: SuiAddress;
}
/**
 * Response body for forced withdraw processing preview.
 */
type ApiPerpetualsVaultPreviewProcessForceWithdrawRequestResponse = {
    error: string;
} | {
    collateralAmountOut: Balance;
    collateralPrice: number;
    sizesToClose: Record<PerpetualsMarketId, bigint>;
    priceImpact: Percentage;
    performanceFeesChargedUsd: number;
    isWithinWithdrawRequestSlippage: boolean;
    minCollateralAmountOut: Balance;
};
interface ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestBody {
    vaultId: ObjectId;
    walletAddress: SuiAddress;
}
type ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestResponse = {
    error: string;
} | {
    isPausable: boolean;
    minNextPauseTimestamp: bigint;
};
/**
 * Request body for previewing normal withdraw requests processing for a vault.
 */
interface ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsBody {
    vaultId: ObjectId;
    userAddresses: SuiAddress[];
}
/**
 * Response body for previewing normal withdraw requests processing.
 */
type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsResponse = {
    error: string;
} | {
    userPreviews: {
        userAddress: SuiAddress;
        collateralAmountOut: Balance;
    }[];
    collateralPrice: number;
};
/**
 * Request body for previewing maximum performance fees withdrawable from a vault.
 */
interface ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesBody {
    vaultId: ObjectId;
}
/**
 * Response body for previewing vault performance fee withdrawal.
 */
type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesResponse = {
    error: string;
} | {
    maxFeesToWithdraw: Balance;
    feeCoinType: CoinType;
};
/**
 * Request body for calculating rewards and rebates for perpetuals accounts.
 *
 * This corresponds to `POST /api/perpetuals/rebates/rewards`.
 *
 * Given maker and taker reward pools and a list of accounts, computes
 * per-account reward allocations and fee-tier rebates.
 * When `accountIds` is omitted or empty, all eligible accounts are included.
 *
 * **Note:** All data returned is for the current epoch only.
 */
interface ApiPerpetualsCurrentRebateRewardsBody {
    accountIds?: PerpetualsAccountId[];
    /** Total maker reward pool to distribute among eligible market makers. */
    totalMakerRewards: number;
    /** Total taker reward pool to distribute among eligible takers. */
    totalTakerRewards: number;
    /** Coefficients used to compute Q-scores and taker shares. */
    calculationVariables: PerpetualsCalculationVariables;
}
/**
 * Coefficients used when computing Q-scores and taker shares for the rebate
 * rewards calculation. Each is a weighting exponent applied to a corresponding
 * per-account metric.
 */
interface PerpetualsCalculationVariables {
    /** Exponent applied to the raw Q-score component. */
    qScoreCoefficient: number;
    /** Exponent applied to the uptime component. */
    uptimeCoefficient: number;
    /** Exponent applied to the maker volume component. */
    mmVolumeCoefficient: number;
    /** Exponent applied to the taker volume component. */
    takerVolumeCoefficient: number;
    /** Exponent applied to the taker open-interest component. */
    takerOiCoefficient: number;
}
/**
 * Maker reward and rebate breakdown for a single account.
 */
interface PerpetualsMakerData {
    /** Normalized Q-score: raw cross-market sum averaged over snapshot count. */
    qScore: number;
    /** Final score: `qScore^coeff * uptime^coeff * volume^coeff`. */
    qScoreFinal: number;
    /** Share of total `qScoreFinal` across all eligible accounts (between 0 and 1). */
    qScoreFinalShare: number;
    /** Cross-market uptime count (number of snapshots with qualifying orders). */
    uptime: number;
    /** Q-score-based rewards from the maker reward pool. */
    rewards: number;
    /** Cross-market maker volume in USD. */
    volume: number;
    /** Share of total maker volume across all eligible accounts (between 0 and 1). */
    volumeShare: number;
    /** Volume-share tier rebate: `tierRate * volume`. */
    volumeRebate: number;
    /** Total maker fees paid across all markets. */
    feesPaid: number;
    /** Fee tier rebate: `max(0, feesPaid - discountedFees)`. */
    feeRebate: number;
}
/**
 * Taker reward and rebate breakdown for a single account.
 */
interface PerpetualsTakerData {
    /** Volume-share-based rewards from the taker reward pool. */
    rewards: number;
    /** Cross-market taker volume in USD. */
    volume: number;
    /** Share of total taker volume across all eligible accounts (between 0 and 1). */
    volumeShare: number;
    /** Total taker fees paid across all markets. */
    feesPaid: number;
    /** Fee tier rebate: `max(0, feesPaid - discountedFees)`. */
    feeRebate: number;
}
/**
 * Combined reward and rebate data for a single account.
 */
interface PerpetualsRewardData {
    accountId: PerpetualsAccountId;
    /** Maker-side reward and rebate metrics. */
    maker: PerpetualsMakerData;
    /** Taker-side reward and rebate metrics. */
    taker: PerpetualsTakerData;
}
/**
 * Response body for the rewards and rebates calculation.
 */
interface ApiPerpetualsCurrentRebateRewardsResponse {
    /** Sum of all final quality scores across eligible makers. */
    totalQScoreFinal: number;
    /** Total estimated gas cost for order management across all accounts (decimal SUI). */
    totalEstimatedGasCost: number;
    /** Per-account reward and rebate breakdown. */
    rewards: PerpetualsRewardData[];
}
/**
 * Request body for generating a CSV-formatted rebate report.
 *
 * This corresponds to `POST /api/perpetuals/rebates/create-csv-rebates`.
 *
 * Produces a CSV string containing per-account rebate and reward data.
 * When `accountIds` is omitted or empty, all eligible accounts are included.
 */
interface ApiPerpetualsCreateCsvRebatesBody extends ApiPerpetualsCurrentRebateRewardsBody {
    /**
     * When true, aggregate rewards by owner address instead of per-account.
     * Defaults to false when omitted.
     */
    aggregated?: boolean;
}
/**
 * Response body for the CSV rebate report.
 */
interface ApiPerpetualsCreateCsvRebatesResponse {
    /** The CSV-formatted rebate data as a string. */
    csv: string;
}
/**
 * Request body for generating a referral rebate CSV report.
 *
 * This corresponds to `POST /api/perpetuals/rebates/create-referral-csv-rebates`.
 *
 * Calculates referrer commissions and referee discounts based on trading
 * fees within the specified epoch.
 */
interface ApiPerpetualsCreateReferralCsvRebatesBody {
    /** Epoch start timestamp in milliseconds. */
    epochStartTimestampMs: Timestamp;
    /** Epoch end timestamp in milliseconds. */
    epochEndTimestampMs: Timestamp;
}
/**
 * Response body for the referral rebate CSV report.
 */
interface ApiPerpetualsCreateReferralCsvRebatesResponse {
    /** The CSV-formatted referral rebate data as a string. */
    csv: string;
}
/**
 * SDK-level inputs for placing a market order from a client.
 *
 * This omits server-managed fields like `accountId`, `hasPosition`,
 * and serialized `txKind`, and exposes a client-friendly `slTp` wrapper.
 */
type SdkPerpetualsPlaceMarketOrderInputs = Omit<ApiPerpetualsMarketOrderBody, "accountId" | "txKind" | "slTp" | "walletAddress"> & {
    tx?: Transaction;
    slTp?: {
        gasCoinArg?: TransactionObjectArgument;
        isSponsoredTx?: boolean;
        size?: bigint;
        stopLossIndexPrice?: number;
        takeProfitIndexPrice?: number;
    };
};
/**
 * SDK-level inputs for placing a limit order from a client.
 */
type SdkPerpetualsPlaceLimitOrderInputs = Omit<ApiPerpetualsLimitOrderBody, "accountId" | "txKind" | "slTp" | "walletAddress"> & {
    tx?: Transaction;
    slTp?: {
        gasCoinArg?: TransactionObjectArgument;
        isSponsoredTx?: boolean;
        size?: bigint;
        stopLossIndexPrice?: number;
        takeProfitIndexPrice?: number;
    };
};
/**
 * SDK-level inputs for previewing a market order.
 */
type SdkPerpetualsPlaceMarketOrderPreviewInputs = Omit<ApiPerpetualsPreviewPlaceMarketOrderBody, "collateralCoinType" | "accountId">;
/**
 * SDK-level inputs for previewing a limit order.
 */
type SdkPerpetualsPlaceLimitOrderPreviewInputs = Omit<ApiPerpetualsPreviewPlaceLimitOrderBody, "collateralCoinType" | "accountId">;
/**
 * SDK-level inputs for placing a scale order from a client.
 */
type SdkPerpetualsPlaceScaleOrderInputs = Omit<ApiPerpetualsScaleOrderBody, "accountId" | "txKind" | "walletAddress"> & {
    tx?: Transaction;
};
/**
 * SDK-level inputs for previewing a scale order.
 */
type SdkPerpetualsPlaceScaleOrderPreviewInputs = Omit<ApiPerpetualsPreviewPlaceScaleOrderBody, "collateralCoinType" | "accountId">;
/**
 * SDK-level inputs for building a cancel-and-place-orders transaction.
 */
type SdkPerpetualsCancelAndPlaceOrdersInputs = Omit<ApiPerpetualsCancelAndPlaceOrdersBody, "accountId" | "txKind" | "walletAddress"> & {
    tx?: Transaction;
};
/**
 * SDK-level inputs for previewing order cancellations.
 */
type SdkPerpetualsCancelOrdersPreviewInputs = Omit<ApiPerpetualsPreviewCancelOrdersBody, "collateralCoinType" | "accountId">;
/**
 * Action for websocket subscription messages.
 */
type PerpetualsWsUpdatesSubscriptionAction = "subscribe" | "unsubscribe";
/**
 * Websocket subscription payload for subscribing to a specific market's
 * updates (orderbook, prices, etc.).
 */
interface PerpetualsWsUpdatesMarketSubscriptionType {
    market: {
        marketId: PerpetualsMarketId;
    };
}
/**
 * Websocket subscription payload for subscribing to user/account updates,
 * optionally including stop-order data (via signature).
 */
interface PerpetualsWsUpdatesUserSubscriptionType {
    user: {
        accountId: PerpetualsAccountId;
        withStopOrders: {
            walletAddress: SuiAddress;
            bytes: string;
            signature: string;
        } | undefined;
    };
}
/**
 * Websocket subscription payload for market oracle price updates.
 */
interface PerpetualsWsUpdatesOracleSubscriptionType {
    oracle: {
        marketId: PerpetualsMarketId;
    };
}
/**
 * Websocket subscription payload for orderbook updates.
 */
interface PerpetualsWsUpdatesOrderbookSubscriptionType {
    orderbook: {
        marketId: PerpetualsMarketId;
    };
}
/**
 * Websocket subscription payload for market orders stream.
 */
interface PerpetualsWsUpdatesMarketOrdersSubscriptionType {
    marketOrders: {
        marketId: PerpetualsMarketId;
    };
}
/**
 * Websocket subscription payload for user-specific order updates.
 */
interface PerpetualsWsUpdatesUserOrdersSubscriptionType {
    userOrders: {
        accountId: PerpetualsAccountId;
    };
}
/**
 * Websocket subscription payload for user-specific collateral changes.
 */
interface PerpetualsWsUpdatesUserCollateralChangesSubscriptionType {
    userCollateralChanges: {
        accountId: PerpetualsAccountId;
    };
}
/**
 * Websocket subscription payload for bucketed orderbook snapshots
 * (top of orderbook) for a specific market.
 */
interface PerpetualsWsUpdatesTopOfOrderbookSubscriptionType {
    topOfOrderbook: {
        marketId: PerpetualsMarketId;
        priceBucketSize: number;
        bucketsNumber: number;
    };
}
/**
 * Union of all websocket subscription types for perpetuals updates.
 */
type PerpetualsWsUpdatesSubscriptionType = PerpetualsWsUpdatesMarketSubscriptionType | PerpetualsWsUpdatesUserSubscriptionType | PerpetualsWsUpdatesOracleSubscriptionType | PerpetualsWsUpdatesOrderbookSubscriptionType | PerpetualsWsUpdatesMarketOrdersSubscriptionType | PerpetualsWsUpdatesUserOrdersSubscriptionType | PerpetualsWsUpdatesUserCollateralChangesSubscriptionType | PerpetualsWsUpdatesTopOfOrderbookSubscriptionType;
/**
 * Websocket payload for oracle price updates.
 */
interface PerpetualsWsUpdatesOraclePayload {
    marketId: PerpetualsMarketId;
    basePrice: number;
    collateralPrice: number;
}
/**
 * Websocket payload for market orders stream.
 */
interface PerpetualsWsUpdatesMarketOrdersPayload {
    marketId: PerpetualsMarketId;
    orders: PerpetualsMarketOrderHistoryData[];
}
/**
 * Websocket payload for user-specific orders stream.
 */
interface PerpetualsWsUpdatesUserOrdersPayload {
    accountId: PerpetualsAccountId;
    orders: PerpetualsAccountOrderHistoryData[];
}
/**
 * Websocket payload for user-specific collateral changes.
 */
interface PerpetualsWsUpdatesUserCollateralChangesPayload {
    accountId: PerpetualsAccountId;
    collateralChanges: PerpetualsAccountCollateralChange[];
}
/**
 * Websocket payload for incremental orderbook updates.
 */
interface PerpetualsWsUpdatesOrderbookPayload {
    marketId: PerpetualsMarketId;
    orderbookDeltas: PerpetualsOrderbookDeltas;
}
/**
 * A single data point in the bucketed (top of) orderbook.
 */
interface PerpetualsTopOfOrderbookDataPoint {
    price: number;
    size: number;
    totalSize: number;
    sizeUsd: number;
    totalSizeUsd: number;
}
/**
 * Bucketed orderbook state for top-of-orderbook updates.
 */
interface PerpetualsTopOfOrderbook {
    bids: PerpetualsTopOfOrderbookDataPoint[];
    asks: PerpetualsTopOfOrderbookDataPoint[];
    minAskPrice: number | undefined;
    maxBidPrice: number | undefined;
}
/**
 * Websocket payload for bucketed orderbook (top of orderbook) updates.
 */
interface PerpetualsWsUpdatesTopOfOrderbookPayload {
    marketId: PerpetualsMarketId;
    bids: PerpetualsTopOfOrderbookDataPoint[];
    asks: PerpetualsTopOfOrderbookDataPoint[];
    minAskPrice: number | undefined;
    maxBidPrice: number | undefined;
}
/**
 * Websocket payload for user account and stop-order updates.
 */
interface PerpetualsWsUpdatesUserPayload {
    account: PerpetualsAccountObject;
    stopOrders: PerpetualsStopOrderData[] | undefined;
}
/**
 * Websocket subscription message format sent by clients to manage
 * their subscriptions.
 */
interface PerpetualsWsUpdatesSubscriptionMessage {
    action: PerpetualsWsUpdatesSubscriptionAction;
    subscriptionType: PerpetualsWsUpdatesSubscriptionType;
}
/**
 * Websocket response message for `/perpetuals/ws/updates`.
 *
 * Each response includes exactly one of the following discriminated unions.
 */
type PerpetualsWsUpdatesResponseMessage = {
    market: PerpetualsMarketData;
} | {
    user: PerpetualsWsUpdatesUserPayload;
} | {
    oracle: PerpetualsWsUpdatesOraclePayload;
} | {
    orderbook: PerpetualsWsUpdatesOrderbookPayload;
} | {
    marketOrders: PerpetualsWsUpdatesMarketOrdersPayload;
} | {
    userOrders: PerpetualsWsUpdatesUserOrdersPayload;
} | {
    userCollateralChanges: PerpetualsWsUpdatesUserCollateralChangesPayload;
} | {
    topOfOrderbook: PerpetualsWsUpdatesTopOfOrderbookPayload;
};
/**
 * Websocket response message carrying the last candle for a given market
 * and interval.
 */
interface PerpetualsWsCandleResponseMessage {
    marketId: PerpetualsMarketId;
    lastCandle: PerpetualsMarketCandleDataPoint | undefined;
}

interface ApiGasPoolBody {
    walletAddress: SuiAddress;
}
interface ApiGasPoolResponse {
    walletAddress: SuiAddress;
    gasPoolId: ObjectId | undefined;
    balance: Balance;
    whitelistedAddresses: SuiAddress[];
}
interface ApiGasPoolCreateBody {
    walletAddress: SuiAddress;
    initialDepositAmount?: Balance;
    txKind?: SerializedTransaction;
    deferShare?: boolean;
}
interface ApiGasPoolCreateResponse {
    txKind: SerializedTransaction;
    gasPoolArg?: TransactionObjectArgument;
    sharePolicyArg?: TransactionObjectArgument;
}
interface ApiGasPoolDepositBody {
    walletAddress: SuiAddress;
    /** Whether to build the transaction for sponsored gas. Defaults to false. */
    isSponsoredTx?: boolean;
    /** Coin type of the deposit token. Defaults to SUI if omitted.
     * When set to a non-SUI type, the endpoint swaps to SUI before depositing. */
    coinType?: CoinType;
    /** Amount of the input coin to deposit (or swap, for non-SUI). */
    amount?: Balance;
    /** PTB coin argument to use as the input coin. If omitted, sourced from wallet. */
    coinArg?: TransactionObjectArgument;
    /** Slippage tolerance for non-SUI swaps (0.0–1.0). Defaults to 0.01. */
    slippage?: Slippage;
    txKind?: SerializedTransaction;
    gasPoolArg?: TransactionObjectArgument;
}
interface ApiGasPoolWithdrawBody {
    walletAddress: SuiAddress;
    amount: Balance;
    recipientAddress?: SuiAddress;
    /** When true, the withdrawn coin is not transferred; its arg is returned instead. */
    deferTransfer?: boolean;
    txKind?: SerializedTransaction;
    gasPoolArg?: TransactionObjectArgument;
}
interface ApiGasPoolWithdrawResponse {
    txKind: SerializedTransaction;
    /** PTB argument for the withdrawn coin (only set when `deferTransfer = true`). */
    withdrawnCoinArg?: TransactionObjectArgument;
}
interface ApiGasPoolSponsorBody {
    walletAddress: SuiAddress;
    amount: Balance;
    txKind?: SerializedTransaction;
}
interface ApiGasPoolGrantBody {
    walletAddress: SuiAddress;
    targetWalletAddress: SuiAddress;
    txKind?: SerializedTransaction;
    gasPoolArg?: TransactionObjectArgument;
}
interface ApiGasPoolRevokeBody {
    walletAddress: SuiAddress;
    targetWalletAddress: SuiAddress;
    txKind?: SerializedTransaction;
}
interface ApiGasPoolShareBody {
    gasPoolArg: TransactionObjectArgument;
    sharePolicyArg: TransactionObjectArgument;
    txKind?: SerializedTransaction;
}

/**
 * A unique identifier, typically used to track items or route segments.
 */
type UniqueId = string;
/**
 * **Deprecated**. Please use `ExternalFee` instead.
 *
 * Fee info for third party packages wanting to fee route transactions.
 */
type RouterExternalFee = ExternalFee;
/**
 * All possible DEX protocols that the `Router` can use to swap coins.
 */
type RouterProtocolName = "Aftermath" | "BlueMove" | "Cetus" | "DeepBook" | "DeepBookV3" | "DoubleUpPump" | "FlowX" | "FlowXClmm" | "FullSail" | "HopFun" | "Kriya" | "KriyaClmm" | "Magma" | "Metastable" | "Momentum" | "MovePump" | "Obric" | "SuiSwap" | "Turbos" | "SpringSui" | "Steamm" | "SuiAi" | "Bluefin" | "TurbosFun" | "BlastFun" | "Bolt";
/**
 * Represents a complete trade route object. Includes all relevant information
 * for executing a trade from `coinIn` to `coinOut` through one or more protocols.
 */
type RouterCompleteTradeRoute = RouterTradeInfo & {
    /**
     * An array of sub-routes, each representing a path or series of swaps.
     */
    routes: RouterTradeRoute[];
    /**
     * The total trade fee percentage across all routes.
     * @remarks 0.01 = 1%
     */
    netTradeFeePercentage: Percentage;
    /**
     * Optional referrer address, if using a referral mechanism.
     */
    referrer?: SuiAddress;
    /**
     * Optional external fee information, if a third party is collecting fees.
     */
    externalFee?: ExternalFee;
    /**
     * Slippage tolerance for the trade, expressed as a decimal (0.01 = 1%).
     */
    slippage?: Slippage;
};
/**
 * **Deprecated**. Please use `RouterCompleteTradeRoute` instead.
 *
 * Represents a complete trade route object, including fee info.
 */
type RouterCompleteTradeRouteWithFee = RouterCompleteTradeRoute;
/**
 * Represents a sub-route of a complete trade, describing the portion
 * and the paths used. Each sub-route may involve one or more specific pools.
 */
type RouterTradeRoute = RouterTradeInfo & {
    /**
     * An array of paths that this route will take to execute the trade.
     */
    paths: RouterTradePath[];
    /**
     * The portion of the total trade allocated to this route, expressed as an IFixed value.
     */
    portion: IFixed;
};
/**
 * Represents an individual path within a route. Typically corresponds to
 * a specific DEX pool and the swap details in that pool.
 */
type RouterTradePath = RouterTradeInfo & {
    /**
     * The name of the DEX protocol used for this path (e.g., "Cetus").
     */
    protocolName: RouterProtocolName;
    /**
     * The pool ID (object on-chain) where the swap is performed.
     */
    poolId: ObjectId;
    /**
     * Additional pool metadata, which can vary by DEX protocol.
     */
    poolMetadata: any;
};
/**
 * Base interface shared by routes and paths, describing the coin in/out details and spot price.
 */
interface RouterTradeInfo {
    /**
     * Input coin details, including type, amount, and any trade fee.
     */
    coinIn: RouterTradeCoin;
    /**
     * Output coin details, including type, amount, and any trade fee.
     */
    coinOut: RouterTradeCoin;
    /**
     * The spot price used in this route/path for calculating output from input.
     */
    spotPrice: number;
}
/**
 * Represents a coin and the associated amount and trade fee for a route or path.
 */
interface RouterTradeCoin {
    /**
     * The coin type used in a route or path.
     */
    type: CoinType;
    /**
     * The amount of the coin, typically expressed as the smallest unit (bigint).
     */
    amount: Balance;
    /**
     * The trade fee paid in this coin, expressed as a bigint.
     */
    tradeFee: Balance;
}
/**
 * Event that occurs when a user executes a trade route via the router.
 */
interface RouterTradeEvent extends Event$1 {
    /**
     * The Sui address of the trader.
     */
    trader: SuiAddress;
    /**
     * The coin type input by the trader.
     */
    coinInType: AnyObjectType;
    /**
     * The amount of coin input by the trader.
     */
    coinInAmount: Balance;
    /**
     * The coin type output to the trader.
     */
    coinOutType: AnyObjectType;
    /**
     * The amount of coin output to the trader.
     */
    coinOutAmount: Balance;
}
/**
 * Basic body for partial router route construction, specifying coin types
 * and optional third-party fee or referral info.
 */
type ApiRouterPartialCompleteTradeRouteBody = {
    /**
     * The coin type that the user wants to swap out.
     */
    coinInType: CoinType;
    /**
     * The coin type that the user wants to receive.
     */
    coinOutType: CoinType;
    /**
     * An optional referrer address for the route creator.
     */
    referrer?: SuiAddress;
    /**
     * Optional third-party fee details.
     */
    externalFee?: ExternalFee;
} & ({
    /**
     * Optionally exclude certain protocols from routing.
     */
    protocolBlacklist?: RouterProtocolName[];
} | {
    /**
     * Optionally include only certain protocols in routing.
     */
    protocolWhitelist?: RouterProtocolName[];
}) & ({
    /**
     * Optionally exclude certain pools from routing.
     */
    poolBlacklist?: ObjectId[];
} | {
    /**
     * Optionally include only certain pools in routing.
     */
    poolWhitelist?: ObjectId[];
});
/**
 * Full body for router route construction. Either `coinInAmount` or `coinOutAmount`
 * must be specified, not both. If `coinOutAmount` is given, `slippage` is required.
 */
type ApiRouterCompleteTradeRouteBody = ApiRouterPartialCompleteTradeRouteBody & ({
    /**
     * The amount of coin that the user wants to swap out.
     */
    coinInAmount: Balance;
} | {
    /**
     * The target output amount that the user wants to receive.
     */
    coinOutAmount: Balance;
    /**
     * The user’s slippage tolerance (e.g., 0.01 = 1%).
     */
    slippage: Slippage;
});
/**
 * Represents the information needed to create a transaction for a complete trade route.
 */
interface ApiRouterTransactionForCompleteTradeRouteBody {
    /**
     * The Sui address initiating the trade.
     */
    walletAddress: SuiAddress;
    /**
     * The complete route object, typically returned by the route construction API.
     */
    completeRoute: RouterCompleteTradeRoute;
    /**
     * The allowable slippage tolerance for the entire route.
     */
    slippage: Slippage;
    /**
     * If `true`, indicates that the transaction fees may be sponsored by a third party.
     */
    isSponsoredTx?: boolean;
    /**
     * If specified, the traded output coins will be sent to this address.
     */
    customRecipient?: SuiAddress;
}
/**
 * Extended body that includes a serialized transaction for building a new
 * transaction with a trade route appended.
 */
type ApiRouterAddTransactionForCompleteTradeRouteBody = ApiRouterTransactionForCompleteTradeRouteBody & {
    /**
     * The already-serialized transaction to which the router instructions will be added.
     */
    serializedTx: SerializedTransaction;
    /**
     * Optional coin input ID if you are managing coin objects yourself.
     */
    coinInId?: TransactionObjectArgument;
};
/**
 * The response returned after adding a trade route to an existing transaction.
 */
interface ApiRouterAddTransactionForCompleteTradeRouteResponse {
    /**
     * The updated serialized transaction.
     */
    tx: SerializedTransaction;
    /**
     * A reference to the output coin after the swap. May be undefined if not applicable.
     */
    coinOutId: TransactionObjectArgument | undefined;
}
/**
 * Body type used for retrieving router trade events for a particular user
 * from the indexer, with pagination.
 */
type ApiRouterTradeEventsBody = ApiIndexerEventsBody & {
    /**
     * The wallet address whose trade events you want to retrieve.
     */
    walletAddress: SuiAddress;
};
/**
 * Represents data needed for dynamically estimating gas costs for a router trade,
 * including the coin type for gas, the coin amount out, sender address, and
 * an optional referrer or sponsor address.
 */
interface ApiRouterDynamicGasBody {
    /**
     * The transaction bytes for the intended trade.
     */
    txKindBytes: TxBytes;
    /**
     * The coin type to be used for gas (e.g., "0x2::sui::SUI").
     */
    gasCoinType: CoinType;
    /**
     * The coin data specifying the gas coin or a partial reference to it.
     */
    gasCoinData: ServiceCoinData;
    /**
     * The amount of coin that the user expects to receive out of the trade, in string form for BigInt.
     */
    coinOutAmount: BigIntAsString;
    /**
     * The address of the sender who is initiating the transaction.
     */
    senderAddress: SuiAddress;
    /**
     * The address of a sponsor for the transaction, if applicable.
     */
    sponsorAddress: SuiAddress;
    /**
     * Optional referrer address, if a referral mechanism is in place.
     */
    referrer?: SuiAddress;
}

/**
 * Name or label used to identify a pool. e.g., "My Stable Pool" or "SUI-COIN LP".
 */
type PoolName = string;
/**
 * Represents a coin's weight in a weighted pool, stored as a bigint for
 * 1e9 or 1e18 style scaling.
 */
type PoolWeight = bigint;
/**
 * Represents the trade fee for a coin in the pool, stored as a bigint
 * in a scaled format (e.g. 1 = 1e9).
 */
type PoolTradeFee = bigint;
/**
 * Represents the deposit fee for a coin in the pool, stored as a bigint
 * in a scaled format.
 */
type PoolDepositFee = bigint;
/**
 * Represents the withdrawal fee for a coin in the pool, stored as a bigint
 * in a scaled format.
 */
type PoolWithdrawFee = bigint;
/**
 * Represents "flatness" in a pool, used for certain advanced pool calculations
 * or invariants. Often 0 or 1, depending on stable vs. uncorrelated logic.
 */
type PoolFlatness = bigint;
/**
 * Represents a normalized balance in the pool, often used for
 * internal calculations to standardize coin decimals.
 */
type NormalizedBalance = bigint;
/**
 * A big integer scalar used for decimals conversion (1e9 or 1e18, etc.).
 */
type DecimalsScalar = bigint;
/**
 * A record mapping `CoinType` => a `PoolCoin` structure, describing
 * each coin's weight, balance, fees, and decimal scaling within a pool.
 */
type PoolCoins = Record<CoinType, PoolCoin>;
/**
 * Details about a coin in the pool, including the on-chain balance,
 * trade fees (in/out), deposit/withdraw fees, and decimal scaling factors.
 */
interface PoolCoin {
    /**
     * The coin's weight in the pool (e.g., for a weight-based AMM).
     */
    weight: PoolWeight;
    /**
     * The on-chain balance of this coin in the pool.
     */
    balance: Balance;
    /**
     * The inbound trade fee (scaled) for this coin.
     */
    tradeFeeIn: PoolTradeFee;
    /**
     * The outbound trade fee (scaled) for this coin.
     */
    tradeFeeOut: PoolTradeFee;
    /**
     * The deposit fee (scaled) for adding this coin into the pool.
     */
    depositFee: PoolDepositFee;
    /**
     * The withdrawal fee (scaled) for removing this coin from the pool.
     */
    withdrawFee: PoolWithdrawFee;
    /**
     * A scaling factor (like 1e9 or 1e18) used to unify coin decimals
     * for internal math.
     */
    decimalsScalar: DecimalsScalar;
    /**
     * The "normalized" balance, factoring in `decimalsScalar`.
     */
    normalizedBalance: NormalizedBalance;
    /**
     * The displayed decimals for user-facing reference (e.g., 6, 9, 18).
     */
    decimals?: CoinDecimal;
}
/**
 * The primary pool object structure stored on-chain.
 * `lpCoinType` is the minted LP token, `coins` is a record of coin data.
 */
interface PoolObject extends Object$1 {
    /**
     * The human-readable name of the pool (e.g., "My Weighted Pool").
     */
    name: PoolName;
    /**
     * The address of the pool's creator.
     */
    creator: SuiAddress;
    /**
     * The LP coin type for this pool, e.g., "0x<...>::af_lp::AF_LP_xyz".
     */
    lpCoinType: CoinType;
    /**
     * The total supply of LP tokens currently minted.
     */
    lpCoinSupply: Balance;
    /**
     * The amount of LP tokens that are illiquid (locked for some reason).
     */
    illiquidLpCoinSupply: Balance;
    /**
     * A "flatness" parameter used for stable vs. uncorrelated logic. 0 or 1 typically.
     */
    flatness: PoolFlatness;
    /**
     * A record of coin data for each coin type in the pool.
     */
    coins: PoolCoins;
    /**
     * The decimals used by the LP coin.
     */
    lpCoinDecimals: CoinDecimal;
    /**
     * An optional DAO fee object, if the pool is configured to support a fee for a DAO or treasury.
     */
    daoFeePoolObject?: DaoFeePoolObject;
}
/**
 * Minimal information about a user's LP coin in a specific pool,
 * including the pool ID and balance of that LP coin type.
 */
interface PoolLpInfo {
    lpCoinType: CoinType;
    poolId: ObjectId;
    balance: Balance;
}
/**
 * An on-chain object representing DAO fee configuration for a pool:
 * it stores the fee basis points and the fee recipient address.
 */
interface DaoFeePoolObject extends Object$1 {
    /**
     * The fee in basis points, e.g., 100 => 1%.
     */
    feeBps: bigint;
    /**
     * The Sui address receiving the fee portion from trades or other actions.
     */
    feeRecipient: SuiAddress;
}
/**
 * A capability object indicating ownership of a `DaoFeePoolObject`.
 * Whomever holds this can update the fee parameters or recipient.
 */
interface DaoFeePoolOwnerCapObject extends Object$1 {
    /**
     * The `DaoFeePoolObject` ID this cap is associated with.
     */
    daoFeePoolId: ObjectId;
}
/**
 * Represents a trade event within a pool, indicating coins in/out,
 * final amounts, etc.
 */
interface PoolTradeEvent extends Event$1 {
    poolId: ObjectId;
    trader: SuiAddress;
    /**
     * The array of coin types that were spent in the trade.
     */
    typesIn: CoinType[];
    /**
     * The amounts of each coin type that were spent.
     */
    amountsIn: Balance[];
    /**
     * The coin types that were received.
     */
    typesOut: CoinType[];
    /**
     * The amounts of each output coin.
     */
    amountsOut: Balance[];
}
/**
 * Represents a deposit event where a user adds liquidity to a pool,
 * receiving minted LP tokens in return.
 */
interface PoolDepositEvent extends Event$1 {
    poolId: ObjectId;
    /**
     * The address that deposited into the pool.
     */
    depositor: SuiAddress;
    /**
     * The coin types that were deposited.
     */
    types: CoinType[];
    /**
     * The amounts for each deposited coin type.
     */
    deposits: Balance[];
    /**
     * The amount of LP minted for the depositor.
     */
    lpMinted: Balance;
}
/**
 * Represents a withdrawal event where a user removes liquidity from a pool,
 * burning LP tokens and receiving coin amounts in return.
 */
interface PoolWithdrawEvent extends Event$1 {
    poolId: ObjectId;
    /**
     * The user who withdrew from the pool.
     */
    withdrawer: SuiAddress;
    /**
     * The coin types that were returned upon withdrawal.
     */
    types: CoinType[];
    /**
     * The amounts for each returned coin type.
     */
    withdrawn: Balance[];
    /**
     * The amount of LP burned in exchange for these outputs.
     */
    lpBurned: Balance;
}
/**
 * Fired when a new DAO fee pool is created for a specific internal pool.
 */
interface CreatedDaoFeePoolEvent extends Event$1 {
    daoFeePoolId: ObjectId;
    innerPoolId: ObjectId;
    feeBps: bigint;
    feeRecipient: SuiAddress;
}
/**
 * Fired when the fee basis points in a `DaoFeePoolObject` are updated.
 */
interface UpdatedFeeBpsEvent extends Event$1 {
    daoFeePoolId: ObjectId;
    oldFeeBps: bigint;
    newFeeBps: bigint;
}
/**
 * Fired when the fee recipient address in a `DaoFeePoolObject` changes.
 */
interface UpdatedFeeRecipientEvent extends Event$1 {
    daoFeePoolId: ObjectId;
    oldFeeAddress: SuiAddress;
    newFeeAddress: SuiAddress;
}
/**
 * Basic statistical data about a pool, including volume, TVL, supply per LPS,
 * fees, and APR.
 */
interface PoolStats {
    /**
     * The 24-hour volume or some aggregated volume metric for the pool.
     */
    volume: number;
    /**
     * The total value locked in the pool, often in USD or stablecoin value.
     */
    tvl: number;
    /**
     * A representation of the distribution of supply among liquidity providers,
     * e.g., how many tokens each user holds. May be used for advanced UI.
     */
    supplyPerLps: number[];
    /**
     * The price of 1 LP token in reference to a stable baseline (USD).
     */
    lpPrice: number;
    /**
     * The total fees generated by the pool in a given period (often 24h or 7d).
     */
    fees: number;
    /**
     * The approximate annual percentage rate (yield) derived from fees, volume, or
     * other data. This can be used to estimate LP profits or compare pools.
     */
    apr: number;
}
/**
 * Represents a data point for pool analytics, including a Unix timestamp (in ms)
 * and a numeric value (e.g., volume or fee data).
 */
interface PoolDataPoint {
    time: Timestamp;
    value: number;
}
/**
 * Supported timeframes for graphing or fetching historical data:
 * 1 day, 1 week, 1 month, 3 months, 6 months, or 1 year.
 */
type PoolGraphDataTimeframeKey = "1D" | "1W" | "1M" | "3M" | "6M" | "1Y";
/**
 * Unit of time used to describe a timeframe window (e.g. "day", "week").
 *
 * Mirrors dayjs's `ManipulateType` surface (long, plural, and short forms)
 * so consumers upgrading from pre-2.0 keep compiling.
 */
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";
/**
 * An optional object or approach to define timeframe windows.
 * Not always used directly.
 */
interface PoolGraphDataTimeframe {
    time: Timestamp;
    timeUnit: PoolGraphDataTimeUnit;
}
/**
 * An object describing how each coin in a newly created pool is configured,
 * including initial deposit, weight, and fees.
 */
interface PoolCreationCoinInfo {
    coinType: CoinType;
    weight: PoolWeight;
    decimals?: CoinDecimal;
    tradeFeeIn: PoolTradeFee;
    tradeFeeOut: PoolTradeFee;
    depositFee: PoolDepositFee;
    withdrawFee: PoolWithdrawFee;
    initialDeposit: Balance;
}
/**
 * Metadata for the newly published LP coin, specifying name, symbol, and optional icon URL.
 */
interface PoolCreationLpCoinMetadata {
    name: string;
    symbol: string;
    iconUrl?: Url;
}
/**
 * A data structure used for integration with CoinGecko, representing
 * an aggregated ticker ID, base/target coins, price, volumes, and liquidity.
 */
interface CoinGeckoTickerData {
    ticker_id: UniqueId;
    base_currency: CoinType;
    target_currency: CoinType;
    pool_id: ObjectId;
    last_price: number;
    base_volume: number;
    target_volume: number;
    liquidity_in_usd: number;
}
/**
 * Represents a historical trade record for integration with CoinGecko,
 * storing a trade ID, price, volumes, timestamp, and buy/sell type.
 */
interface CoinGeckoHistoricalTradeData {
    trade_id: UniqueId;
    price: number;
    base_volume: number;
    target_volume: number;
    trade_timestamp: Timestamp;
    type: "buy" | "sell";
}
/**
 * Request body for a user trade, specifying which coin to send in and how much,
 * which coin to receive, plus slippage and optional referral info.
 */
interface ApiPoolTradeBody {
    walletAddress: SuiAddress;
    coinInType: CoinType;
    coinInAmount: Balance;
    coinOutType: CoinType;
    slippage: Slippage;
    referrer?: SuiAddress;
    isSponsoredTx?: boolean;
}
/**
 * Request body for depositing liquidity into a pool, specifying the amounts in,
 * slippage, and optional referral or sponsorship data.
 */
interface ApiPoolDepositBody {
    walletAddress: SuiAddress;
    amountsIn: CoinsToBalance;
    slippage: Slippage;
    referrer?: SuiAddress;
    isSponsoredTx?: boolean;
}
/**
 * Request body for withdrawing specific amounts from the pool, specifying
 * which coins to remove, how much LP is burned, slippage, etc.
 */
interface ApiPoolWithdrawBody {
    walletAddress: SuiAddress;
    amountsOutDirection: CoinsToBalance;
    lpCoinAmount: Balance;
    slippage: Slippage;
    referrer?: SuiAddress;
}
/**
 * Request body for withdrawing all coin types from a pool using a single
 * ratio or entire LP amount, simplifying the multi-coin approach.
 */
interface ApiPoolAllCoinWithdrawBody {
    walletAddress: SuiAddress;
    lpCoinAmount: Balance;
    referrer?: SuiAddress;
}
/**
 * Request body for publishing a new LP coin on-chain,
 * typically specifying the coin's decimals.
 */
interface ApiPublishLpCoinBody {
    walletAddress: SuiAddress;
    lpCoinDecimals: number;
}
/**
 * Request body for creating a new pool, specifying coin information,
 * the LP coin metadata, and optional DAO fee info.
 */
interface ApiCreatePoolBody {
    walletAddress: SuiAddress;
    lpCoinType: CoinType;
    lpCoinMetadata: PoolCreationLpCoinMetadata;
    coinsInfo: {
        coinType: CoinType;
        weight: Percentage;
        decimals?: number;
        tradeFeeIn: Percentage;
        initialDeposit: Balance;
    }[];
    poolName: PoolName;
    poolFlatness: 0 | 1;
    createPoolCapId: ObjectId;
    respectDecimals: boolean;
    forceLpDecimals?: CoinDecimal;
    isSponsoredTx?: boolean;
    burnLpCoin?: boolean;
    daoFeeInfo?: {
        feePercentage: Percentage;
        feeRecipient: SuiAddress;
    };
}
/**
 * For retrieving the spot price of a pool, specifying coin in/out.
 * Not always used directly, but present in certain route building contexts.
 */
interface ApiPoolSpotPriceBody {
    coinInType: CoinType;
    coinOutType: CoinType;
}
/**
 * Request body for obtaining a pool object ID from an LP coin type.
 * Useful to confirm if a coin is indeed an LP token and which pool it references.
 */
interface ApiPoolObjectIdForLpCoinTypeBody {
    lpCoinTypes: CoinType[];
}
/**
 * Request body for fetching statistics about one or more pools.
 */
interface ApiPoolsStatsBody {
    poolIds: ObjectId[];
}
/**
 * Request body for listing the owned DAO fee pool owner caps,
 * letting a user see if they can update fees/recipients in certain pools.
 */
interface ApiPoolsOwnedDaoFeePoolOwnerCapsBody {
    walletAddress: SuiAddress;
}

interface ReferralsRefereeInfo {
    /**
     *  The wallet address of the referee
     */
    walletAddress: SuiAddress;
    /**
     *  When the referee joined via this ref link
     */
    joinedAt: Timestamp;
}
interface ApiReferralsGetRefCodeBody {
    /**
     *  The wallet address to get referral code of
     */
    walletAddress: SuiAddress;
    /**
     * The bytes of the message signed by the user's wallet. Required for authentication.
     */
    bytes: string;
    /**
     * The signature of the message signed by the user's wallet. Required for authentication.
     */
    signature: string;
}
interface ApiReferralsGetRefCodeResponse {
    /**
     *  The wallet address queried
     */
    address: SuiAddress;
    /**
     * The referral code of queried wallet address
     */
    refCode: string | undefined;
}
interface ApiReferralsGetLinkedRefCodeBody {
    /**
     *  The wallet address to get linked referral code of
     */
    walletAddress: SuiAddress;
    /**
     * The bytes of the message signed by the user's wallet. Required for authentication.
     */
    bytes: string;
    /**
     * The signature of the message signed by the user's wallet. Required for authentication.
     */
    signature: string;
}
interface ApiReferralsGetLinkedRefCodeResponse {
    /**
     *  The wallet address queried
     */
    address: SuiAddress;
    /**
     * The referral code linked to the queried wallet address
     */
    linkedRefCode: string | undefined;
    /**
     * Timestamp when the referral link was created (None if not linked)
     */
    linkedAt: Timestamp | undefined;
}
interface ApiReferralsGetRefereesBody {
    /**
     * Ref code to get referees for
     */
    refCode: string;
    limit?: number;
    offset?: number;
}
interface ApiReferralsGetRefereesResponse {
    /**
     * The referral code queried
     */
    refCode: string;
    /**
     * List of referees
     */
    referees: ReferralsRefereeInfo[];
    /**
     * Total number of referees (before pagination)
     */
    totalCount: number;
}
interface ApiReferralsIsRefCodeTakenBody {
    /**
     * The referral code queried if taken
     */
    refCode: string;
}
interface ApiReferralsIsRefCodeTakenResponse {
    /**
     * The referral code that was checked
     */
    refCode: string;
    /**
     * Whether this ref code is available for use (true = available, false = taken)
     */
    isAvailable: boolean;
}
interface ApiReferralsCreateReferralLinkBody {
    /**
     * The wallet address of the user creating the ref link. Required for authentication.
     */
    walletAddress: SuiAddress;
    /**
     * The bytes of the message signed by the user's wallet. Required for authentication.
     */
    bytes: string;
    /**
     * The signature of the message signed by the user's wallet. Required for authentication.
     */
    signature: string;
}
interface ApiReferralsCreateReferralLinkResponse {
    /**
     * The unique referral code/ID
     */
    refCode: string;
    /**
     * The wallet address of the referrer
     */
    walletAddress: SuiAddress;
    /**
     * Timestamp when the ref link was created
     */
    createdAt: Timestamp;
    /**
     * Status of the creation
     */
    status: string;
}
interface ApiReferralsSetReferrerBody {
    /**
     * The wallet address of the referee. Required for authentication.
     */
    walletAddress: SuiAddress;
    /**
     * The bytes of the message signed by the referee's wallet. Required for authentication.
     */
    bytes: string;
    /**
     * The signature of the message signed by the referee's wallet. Required for authentication.
     */
    signature: string;
}
interface ApiReferralsSetReferrerResponse {
    /**
     * The wallet address of the referee
     */
    refereeAddress: SuiAddress;
    /**
     * The referral code used
     */
    refCode: string;
    /**
     * Timestamp when the referral relationship was established
     */
    createdAt: Timestamp;
    /**
     * Status of the operation
     */
    status: string;
}

/**
 * Request body for fetching a user's total accumulated reward points.
 * Uses a pre-signed message (bytes + signature) for authentication.
 */
interface ApiRewardsGetPointsBody {
    /**
     * Sui wallet address to query total points for.
     */
    walletAddress: SuiAddress;
    /**
     * The message bytes (base64 encoded) that the user previously signed.
     * Can be reused from other signed messages (e.g., Terms and Conditions).
     */
    bytes: string;
    /**
     * The signature corresponding to the signed message bytes.
     */
    signature: string;
}
/**
 * Response containing the user's total accumulated reward points.
 */
interface ApiRewardsGetPointsResponse {
    /**
     * Total accumulated points for this wallet across all epochs and domains.
     */
    totalPoints: number;
}
/**
 * Request body for fetching a user's rewards history.
 * Uses a pre-signed message (bytes + signature) for authentication.
 */
interface ApiRewardsGetHistoryBody {
    /**
     * Sui wallet address to query history for.
     */
    walletAddress: SuiAddress;
    /**
     * The message bytes (base64 encoded) that the user previously signed.
     * Can be reused from other signed messages (e.g., Terms and Conditions).
     */
    bytes: string;
    /**
     * The signature corresponding to the signed message bytes.
     */
    signature: string;
    /**
     * Optional domain filter (e.g., "referrals", "perpetuals").
     * If omitted, returns all domains.
     */
    domain?: string;
    /**
     * Maximum number of entries to return. Default: 20, max: 100.
     */
    limit?: number;
    /**
     * Cursor for fetching next page.
     */
    cursor?: number;
}
/**
 * Response containing the user's rewards history.
 */
interface ApiRewardsGetHistoryResponse {
    /**
     * Array of historical reward entries.
     */
    history: RewardsHistoryEntry[];
    /**
     * Pagination info.
     */
    pagination: RewardsPaginationInfo;
}
/**
 * Event type for a rewards history entry.
 */
type RewardsHistoryEventType = "deposit" | "withdraw" | "points";
/**
 * A single historical reward entry.
 */
interface RewardsHistoryEntry {
    /**
     * Vault ID where the event occurred.
     */
    vaultId: ObjectId;
    /**
     * Fully-qualified Coin type (e.g., "0x2::sui::SUI"), or "points" for point entries.
     */
    coinType: "points" | (CoinType & {});
    /**
     * Reward amount in base units.
     */
    amount: Balance;
    /**
     * Domain identifier (e.g., "referrals", "perpetuals").
     */
    domain: string;
    /**
     * Epoch start timestamp in milliseconds.
     */
    epochStartTimestampMs: Timestamp;
    /**
     * Epoch end timestamp in milliseconds.
     */
    epochEndTimestampMs: Timestamp;
    /**
     * Transaction digest for this event, if available.
     */
    txDigest?: TransactionDigest;
    /**
     * Event type: "deposit", "withdraw", or "points".
     */
    eventType: RewardsHistoryEventType;
}
/**
 * Pagination information for paginated reward queries.
 */
interface RewardsPaginationInfo {
    /**
     * True if more results exist beyond the returned set.
     */
    hasMore: boolean;
    /**
     * Cursor for fetching the next page. Undefined if no more results.
     */
    nextCursor?: number;
}
/**
 * Request body for fetching a user's claimable rewards.
 */
interface ApiRewardsGetClaimableBody {
    /**
     * Sui wallet address to query claimable rewards for.
     */
    walletAddress: SuiAddress;
}
/**
 * Response containing the user's claimable rewards.
 */
interface ApiRewardsGetClaimableResponse {
    /**
     * Array of claimable reward entries, one per coin type.
     * Empty array if no rewards are claimable.
     */
    rewards: RewardsClaimableReward[];
}
/**
 * A single claimable reward entry.
 */
interface RewardsClaimableReward {
    /**
     * Full Sui coin type (e.g., "0x2::sui::SUI").
     */
    coinType: CoinType;
    /**
     * Claimable amount in base units.
     */
    amount: Balance;
}
/**
 * Request body for claiming rewards for a user's wallet address.
 */
interface ApiRewardsClaimRequestTxBody {
    /**
     * The user's Sui wallet address.
     */
    walletAddress: SuiAddress;
    /**
     * Optional list of coin types to claim.
     * If omitted, claims all available rewards.
     */
    coinTypes?: CoinType[];
    /**
     * Optional recipient address for the claimed rewards.
     * Defaults to walletAddress if not provided.
     */
    recipientAddress?: SuiAddress;
    /**
     * Optional serialized (base64) Sui `TransactionKind` to extend.
     */
    txKind?: SerializedTransaction;
}
interface ApiRewardsClaimRequestTxResponse {
    txKind: SerializedTransaction;
}

/**
 * Represents a validator's configuration object, including its Sui address,
 * operation cap ID, and fee percentage.
 */
interface ValidatorConfigObject extends Object$1 {
    /**
     * The Sui address of the validator.
     */
    suiAddress: SuiAddress;
    /**
     * The on-chain object ID referencing this validator's operation cap.
     */
    operationCapId: ObjectId;
    /**
     * The current fee percentage for this validator (0.01 = 1%).
     */
    fee: Percentage;
}
/**
 * Represents a validator's operation cap object, which authorizes changes to
 * validator settings like fees.
 */
interface ValidatorOperationCapObject extends Object$1 {
    /**
     * The validator address authorized by this operation cap.
     */
    authorizerValidatorAddress: SuiAddress;
}
/**
 * Represents the on-chain state of the stakedSui vault, which tracks liquidity
 * for atomic unstakes, total SUI amounts, rewards, and fees.
 */
interface StakedSuiVaultStateObject extends Object$1 {
    /**
     * The target size for atomic unstake SUI reserves.
     */
    atomicUnstakeSuiReservesTargetValue: Balance;
    /**
     * The current size of the SUI reserves for atomic unstakes.
     */
    atomicUnstakeSuiReserves: Balance;
    /**
     * The minimum fee for atomic unstakes, expressed as a BigInt-based percentage
     * (e.g., 50000000n = 5% if using 1e9-based decimals).
     */
    minAtomicUnstakeFee: bigint;
    /**
     * The maximum fee for atomic unstakes.
     */
    maxAtomicUnstakeFee: bigint;
    /**
     * The total amount of SUI rewards accumulated in the vault.
     */
    totalRewardsAmount: Balance;
    /**
     * The total amount of SUI staked in the vault.
     */
    totalSuiAmount: Balance;
    /**
     * The current epoch number, as a BigInt.
     */
    activeEpoch: bigint;
}
/**
 * Represents a dynamic field holding a stake balance. Useful for tracking
 * on-chain data related to a specific stake or delegator.
 */
interface StakeBalanceDynamicField {
    /**
     * The on-chain object ID of this stake balance record.
     */
    objectId: ObjectId;
    /**
     * The amount of SUI (or afSUI) represented by this field, expressed as a bigint.
     */
    value: Balance;
}
/**
 * Enumerates the possible states of a delegated stake on the Sui network.
 *
 * - **Active**: The stake is actively earning rewards.
 * - **Pending**: The stake has been requested but not yet activated.
 * - **Unstaked**: The stake has been removed or the SUI is no longer earning rewards.
 */
type SuiDelegatedStakeState = "Active" | "Pending" | "Unstaked";
/**
 * Represents a delegated stake object in the Sui network. Unlike local
 * Aftermath-specific stake positions, this is a more general Sui system stake
 * that can earn protocol-level rewards.
 */
interface SuiDelegatedStake {
    /**
     * The current state of the delegated stake (e.g., Active, Pending, Unstaked).
     */
    status: SuiDelegatedStakeState;
    /**
     * The on-chain ID representing this stake position.
     */
    stakedSuiId: ObjectId;
    /**
     * The epoch in which this stake request was made.
     */
    stakeRequestEpoch: bigint;
    /**
     * The epoch in which this stake became (or will become) active.
     */
    stakeActiveEpoch: bigint;
    /**
     * The principal amount of SUI delegated.
     */
    principal: Balance;
    /**
     * The estimated rewards accumulated for this stake, if available.
     */
    estimatedReward?: Balance | undefined;
    /**
     * The validator to which this stake is delegated.
     */
    validatorAddress: SuiAddress;
    /**
     * The staking pool on-chain object that manages this stake.
     */
    stakingPool: SuiAddress;
}
/**
 * A type guard utility function to check if a position is a native Sui delegated stake
 * (`SuiDelegatedStake`) rather than an Aftermath-specific `StakingPosition`.
 *
 * @param stake - An object that could be either a `StakingPosition` or a `SuiDelegatedStake`.
 * @returns True if the object matches the shape of `SuiDelegatedStake`; otherwise, false.
 */
declare const isSuiDelegatedStake: (stake: StakingPosition | SuiDelegatedStake) => stake is SuiDelegatedStake;
/**
 * Represents a single entry in the historical APY data, including a Unix
 * timestamp and an APY value.
 */
interface StakingApyDataPoint {
    /**
     * The Unix timestamp (in milliseconds or seconds) of the data point.
     */
    timestamp: Timestamp;
    /**
     * The APY value recorded at that time (e.g., 0.045 = 4.5%).
     */
    apy: number;
}
/**
 * Enumerates the timeframes available for retrieving historical APY data,
 * such as `"1W"`, `"1M"`, `"1Y"`, etc.
 */
type StakingApyTimeframeKey = "1W" | "1M" | "3M" | "6M" | "1Y" | "ALL";
/**
 * Represents an event when SUI has been staked, either newly or restaked.
 */
interface StakedEvent extends Event$1 {
    /**
     * The on-chain object ID referencing the newly created staked SUI object.
     */
    stakedSuiId: ObjectId;
    /**
     * The original SUI coin ID used for staking.
     */
    suiId: ObjectId;
    /**
     * The address of the user who performed the staking.
     */
    staker: SuiAddress;
    /**
     * The validator address to which the user staked.
     */
    validatorAddress: SuiAddress;
    /**
     * The epoch in which staking took place.
     */
    epoch: bigint;
    /**
     * The amount of SUI staked.
     */
    suiStakeAmount: Balance;
    /**
     * The validator fee percentage for this stake (0.01 = 1%).
     */
    validatorFee: number;
    /**
     * Indicates whether this stake is a restake of an already staked position.
     */
    isRestaked: boolean;
    /**
     * The on-chain ID of the afSUI object received in exchange for staking.
     */
    afSuiId: ObjectId;
    /**
     * The amount of afSUI received.
     */
    afSuiAmount: Balance;
    /**
     * (Optional) Referrer address for the stake.
     */
    referrer?: SuiAddress;
}
/**
 * Represents an event when a user initiates an unstake request, converting
 * afSUI back into SUI.
 */
interface UnstakeRequestedEvent extends Event$1 {
    /**
     * The afSUI ID being provided to unstake.
     */
    afSuiId: ObjectId;
    /**
     * The amount of afSUI provided by the user.
     */
    providedAfSuiAmount: Balance;
    /**
     * The address requesting the unstake.
     */
    requester: SuiAddress;
    /**
     * The epoch in which the unstake was requested.
     */
    epoch: bigint;
}
/**
 * Represents an event after an unstake has fully processed and SUI has
 * been returned to the user.
 */
interface UnstakedEvent extends Event$1 {
    /**
     * The afSUI ID that was burned or converted during the unstake.
     */
    afSuiId: ObjectId;
    /**
     * The amount of afSUI provided.
     */
    providedAfSuiAmount: Balance;
    /**
     * The resulting SUI coin ID received by the user.
     */
    suiId: ObjectId;
    /**
     * The amount of SUI returned.
     */
    returnedSuiAmount: Balance;
    /**
     * The address that initiated the unstake.
     */
    requester: SuiAddress;
    /**
     * The epoch in which the unstake finalized.
     */
    epoch: bigint;
}
/**
 * Represents a union type covering all possible unstake events, either
 * requested or finalized.
 */
type UnstakeEvent = UnstakeRequestedEvent | UnstakedEvent;
/**
 * Type guard to check if an event is a `StakedEvent`.
 */
declare const isStakeEvent: (event: StakeEvent | UnstakeEvent) => event is StakeEvent;
/**
 * Type guard to check if an event is an `UnstakeEvent`.
 */
declare const isUnstakeEvent: (event: StakeEvent | UnstakeEvent) => event is UnstakeEvent;
/**
 * Represents an event that indicates the epoch has changed, generally used
 * for distributing rewards and updating positions.
 */
interface EpochWasChangedEvent extends Event$1 {
    /**
     * The new active epoch as a BigInt.
     */
    activeEpoch: bigint;
    /**
     * The total amount of afSUI in circulation.
     */
    totalAfSuiSupply: Balance;
    /**
     * The total amount of SUI rewards accrued in the system.
     */
    totalSuiRewardsAmount: Balance;
    /**
     * The total amount of SUI staked in the system.
     */
    totalSuiAmount: Balance;
}
/**
 * Union type for stake events, which can represent any variant of staking.
 */
type StakeEvent = StakedEvent;
/**
 * Represents a user's staking position, which could be either a `StakePosition`
 * or an `UnstakePosition`.
 */
type StakingPosition = StakePosition | UnstakePosition;
/**
 * Indicates a stake position, typically representing active or restaked SUI,
 * along with its associated `afSuiAmount`.
 */
interface StakePosition {
    /**
     * The staked SUI object ID referencing this position.
     */
    stakedSuiId: ObjectId;
    /**
     * The original SUI coin ID.
     */
    suiId: ObjectId;
    /**
     * The address of the staker.
     */
    staker: SuiAddress;
    /**
     * The address of the validator to which SUI was staked.
     */
    validatorAddress: SuiAddress;
    /**
     * The epoch in which the stake was established.
     */
    epoch: bigint;
    /**
     * The amount of SUI staked.
     */
    suiStakeAmount: Balance;
    /**
     * The validator fee percentage (0.01 = 1%).
     */
    validatorFee: number;
    /**
     * Indicates if this stake is a restake operation.
     */
    isRestaked: boolean;
    /**
     * The afSUI object ID generated from staking.
     */
    afSuiId: ObjectId;
    /**
     * The amount of afSUI issued to the user.
     */
    afSuiAmount: Balance;
    /**
     * The timestamp when the stake was recorded.
     */
    timestamp: Timestamp | undefined;
    /**
     * The transaction digest where the stake operation occurred.
     */
    txnDigest: TransactionDigest;
}
/**
 * Indicates a position related to an unstake operation, either requested or
 * finalized, with optional references to the returned SUI coin and amount.
 */
interface UnstakePosition {
    /**
     * The state of the unstake operation: `REQUEST` (in progress) or
     * `SUI_MINTED` (finalized).
     */
    state: UnstakePositionState;
    /**
     * The afSUI object ID being burned or converted.
     */
    afSuiId: ObjectId;
    /**
     * The amount of afSUI used to initiate the unstake.
     */
    providedAfSuiAmount: Balance;
    /**
     * The address of the requester.
     */
    requester: SuiAddress;
    /**
     * The epoch in which the unstake was requested or finalized.
     */
    epoch: bigint;
    /**
     * The SUI object ID returned to the user, if unstake has finalized.
     */
    suiId?: ObjectId;
    /**
     * The amount of SUI returned to the user, if unstake has finalized.
     */
    returnedSuiAmount?: Balance;
    /**
     * The timestamp when the unstake request was recorded or completed.
     */
    timestamp: Timestamp | undefined;
    /**
     * The transaction digest where the unstake operation occurred.
     */
    txnDigest: TransactionDigest;
}
/**
 * Enumerates the possible states of an unstake operation.
 */
type UnstakePositionState = "REQUEST" | "SUI_MINTED";
/**
 * Type guard that checks whether a given `StakingPosition` is a stake position.
 */
declare const isStakePosition: (position: StakingPosition) => position is StakePosition;
/**
 * Type guard that checks whether a given `StakingPosition` is an unstake position.
 */
declare const isUnstakePosition: (position: StakingPosition) => position is UnstakePosition;
/**
 * Body payload for staking SUI.
 */
interface ApiStakeBody {
    /**
     * The address performing the stake.
     */
    walletAddress: SuiAddress;
    /**
     * The amount of SUI to be staked.
     */
    suiStakeAmount: Balance;
    /**
     * The validator address to stake with.
     */
    validatorAddress: SuiAddress;
    /**
     * Optional address indicating a referrer.
     */
    referrer?: SuiAddress;
    /**
     * Optional external fee object. Must not exceed `maxExternalFeePercentage`.
     */
    externalFee?: ExternalFee;
    /**
     * Indicates whether the transaction should be sponsored.
     */
    isSponsoredTx?: boolean;
}
/**
 * Body payload for unstaking SUI (afSUI -> SUI).
 */
interface ApiUnstakeBody {
    /**
     * The address performing the unstake.
     */
    walletAddress: SuiAddress;
    /**
     * The amount of afSUI to be unstaked.
     */
    afSuiUnstakeAmount: Balance;
    /**
     * If true, the unstake is done atomically if possible, using liquidity reserves.
     */
    isAtomic: boolean;
    /**
     * Optional address indicating a referrer.
     */
    referrer?: SuiAddress;
    /**
     * Optional external fee object. Must not exceed `maxExternalFeePercentage`.
     */
    externalFee?: ExternalFee;
    /**
     * Indicates whether the transaction should be sponsored.
     */
    isSponsoredTx?: boolean;
}
/**
 * Body payload for staking stakedSUI objects (re-staking).
 */
interface ApiStakeStakedSuiBody {
    /**
     * The address performing the re-stake.
     */
    walletAddress: SuiAddress;
    /**
     * An array of stakedSui object IDs to re-stake.
     */
    stakedSuiIds: ObjectId[];
    /**
     * The validator address to stake with.
     */
    validatorAddress: SuiAddress;
    /**
     * Optional address indicating a referrer.
     */
    referrer?: SuiAddress;
    /**
     * Indicates whether the transaction should be sponsored.
     */
    isSponsoredTx?: boolean;
}
/**
 * Body payload for updating a validator's fee settings.
 */
interface ApiUpdateValidatorFeeBody {
    /**
     * The address submitting the update transaction.
     */
    walletAddress: SuiAddress;
    /**
     * The operation cap object ID that authorizes changes to this validator.
     */
    validatorOperationCapId: ObjectId;
    /**
     * The new fee percentage to be set (0.01 = 1%).
     */
    newFeePercentage: Percentage;
    /**
     * Indicates whether the transaction should be sponsored.
     */
    isSponsoredTx?: boolean;
}
/**
 * Body payload for retrieving staking positions, including pagination.
 */
interface ApiStakingPositionsBody {
    /**
     * The address whose staking positions are being queried.
     */
    walletAddress: SuiAddress;
    /**
     * Optional cursor for pagination.
     */
    cursor?: number;
    /**
     * Optional limit on the number of positions returned.
     */
    limit?: number;
}
/**
 * Body payload for retrieving delegated stakes, given a wallet address.
 */
interface ApiDelegatedStakesBody {
    /**
     * The address whose delegated stakes are being queried.
     */
    walletAddress: SuiAddress;
}
/**
 * Body payload for retrieving validator operation caps, given a wallet address.
 */
interface ApiValidatorOperationCapsBody {
    /**
     * The address whose validator operation caps are being queried.
     */
    walletAddress: SuiAddress;
}
/**
 * Body payload for retrieving staking-related events, including pagination.
 */
type ApiStakingEventsBody = ApiEventsBody & {
    /**
     * The address whose events are being queried.
     */
    walletAddress: SuiAddress;
};
/**
 * Extends the `StakedSuiVaultStateObject` with additional fields relevant
 * to the router pool. This includes the coin type for afSUI, the configured
 * validator address, and the current exchange rate.
 */
type AfSuiRouterPoolObject = StakedSuiVaultStateObject & {
    /**
     * The coin type string for afSUI (e.g., "0x<package>::afSUI::AFSUI").
     */
    afSuiCoinType: CoinType;
    /**
     * The official Aftermath validator address.
     */
    aftermathValidatorAddress: SuiAddress;
    /**
     * The current exchange rate from afSUI to SUI.
     */
    afSuiToSuiExchangeRate: number;
};

type SuiFrenAccessoryType = string;
type SuiFrenAccessoryName = string;
interface CapyLabsAppObject extends Object$1 {
    mixingLimit: bigint;
    coolDownPeriodEpochs: bigint;
    mixingPrice: Balance;
    suiProfits: Balance;
}
interface SuiFrenObject extends Object$1 {
    generation: bigint;
    birthdate: Timestamp;
    cohort: bigint;
    genes: bigint[];
    attributes: SuiFrenAttributes;
    birthLocation: string;
    mixLimit?: bigint;
    lastEpochMixed?: bigint;
    display: {
        link: Url;
        imageUrl: Url;
        description: string;
        projectUrl: Url;
    };
}
type PartialSuiFrenObject = Omit<SuiFrenObject, "mixLimit" | "lastEpochMixed">;
type SuiFrenAttributes = {
    skin: "stripes" | "cheetah";
    main: "6FBBEE";
    secondary: "CF9696";
    expression: "bigSmile";
    ears: "ear1";
};
declare enum SuiFrensSortOption {
    PriceLowToHigh = "Price (low to high)",
    PriceHighToLow = "Price (high to low)"
}
interface StakedSuiFrenInfo {
    suiFren: SuiFrenObject;
    metadata: StakedSuiFrenMetadataV1Object;
    position?: StakedSuiFrenPositionObject;
}
interface StakedSuiFrenPositionObject extends Object$1 {
    suiFrenId: ObjectId;
}
interface StakedSuiFrenMetadataV1Object extends Object$1 {
    suiFrenId: ObjectId;
    collectedFees: Balance;
    autoStakeFees: boolean;
    mixFee: Balance;
    feeIncrementPerMix: Balance;
    minRemainingMixesToKeep: bigint;
}
interface SuiFrenVaultStateV1Object extends Object$1 {
    stakedSuiFrens: bigint;
    totalMixes: bigint;
}
interface SuiFrenAccessoryObject extends Object$1 {
    name: SuiFrenAccessoryName;
    type: SuiFrenAccessoryType;
    imageUrl: Url;
}
interface HarvestSuiFrenFeesEvent extends Event$1 {
    harvester: SuiAddress;
    fees: bigint;
}
interface StakeSuiFrenEvent extends Event$1 {
    staker: SuiAddress;
    suiFrenId: ObjectId;
}
interface UnstakeSuiFrenEvent extends Event$1 {
    unstaker: SuiAddress;
    suiFrenId: ObjectId;
    fees: Balance;
}
interface MixSuiFrensEvent extends Event$1 {
    mixer: SuiAddress;
    parentOneId: ObjectId;
    parentTwoId: ObjectId;
    childId: ObjectId;
    fee: Balance;
}
interface SuiFrenStats {
    totalMixes: bigint;
    currentTotalStaked: bigint;
    mixingFees24hr: Balance;
    mixingVolume24hr: number;
}
interface ApiStakeSuiFrenBody {
    suiFrenId: ObjectId;
    baseFee: Balance;
    feeIncrementPerMix: Balance;
    minRemainingMixesToKeep: bigint;
    suiFrenType: AnyObjectType;
    walletAddress: SuiAddress;
}
interface ApiUnstakeSuiFrenBody {
    stakedPositionId: ObjectId;
    suiFrenType: AnyObjectType;
    walletAddress: SuiAddress;
}
interface ApiMixSuiFrensBody {
    suiFrenParentOne: {
        objectId: ObjectId;
        mixFee: Balance | undefined;
    };
    suiFrenParentTwo: {
        objectId: ObjectId;
        mixFee: Balance | undefined;
    };
    baseFee: Balance;
    suiFrenType: AnyObjectType;
    walletAddress: SuiAddress;
    isSponsoredTx?: boolean;
}
interface ApiHarvestSuiFrenFeesBody {
    stakedPositionIds: ObjectId[];
    walletAddress: SuiAddress;
}
interface ApiAddSuiFrenAccessoryBody {
    suiFrenId: ObjectId;
    accessoryId: ObjectId;
    isOwned: boolean;
    suiFrenType: AnyObjectType;
    walletAddress: SuiAddress;
}
type ApiRemoveSuiFrenAccessoryBody = {
    accessoryType: SuiFrenAccessoryType;
    suiFrenType: AnyObjectType;
    walletAddress: SuiAddress;
} & ({
    suiFrenId: ObjectId;
} | {
    stakedPositionId: ObjectId;
});
interface ApiAccessoriesForSuiFrenBody {
    suiFrenId: ObjectId;
}
interface ApiOwnedSuiFrenAccessoriesBody {
    walletAddress: SuiAddress;
}
interface ApiOwnedSuiFrensBody {
    walletAddress: SuiAddress;
}
interface ApiOwnedStakedSuiFrensBody {
    walletAddress: SuiAddress;
}

interface ResponseWithTxKind {
    txKind: SerializedTransaction;
    sponsorSignature?: string;
}
declare class Caller {
    protected readonly apiBaseUrl?: Url;
    protected readonly apiEndpoint: Url;
    config: CallerConfig;
    private readonly apiUrlPrefix;
    constructor(config?: CallerConfig, apiUrlPrefix?: Url);
    private static fetchResponseToType;
    private static readonly TRAILING_SLASHES_REGEX;
    private static readonly HTTP_PROTOCOL_REGEX;
    private static readonly NETWORK_API_BASE_URLS;
    private static readonly NETWORK_FULLNODE_URLS;
    /**
     * Resolves the canonical Aftermath API base URL for a given network.
     * To target a non-canonical host (custom deployment, local backend, etc.)
     * pass `baseUrl` on `CallerConfig` instead.
     */
    static apiBaseUrlForNetwork(network: SuiNetwork): Url;
    /**
     * Resolves the canonical Sui fullnode URL for a given network. Falls back
     * to the mainnet fullnode when `network` is undefined.
     */
    static defaultFullnodeUrl(network: SuiNetwork | undefined): Url;
    private readonly urlForApiCall;
    protected fetchApi<Output, BodyType = undefined>(url: Url, body?: BodyType, signal?: AbortSignal, options?: {
        disableBigIntJsonParsing?: boolean;
    }): Promise<Output>;
    protected fetchApiTransaction<BodyType = undefined>(url: Url, body?: BodyType & {
        walletAddress?: SuiAddress;
    }, signal?: AbortSignal, options?: {
        disableBigIntJsonParsing?: boolean;
        txKind?: boolean;
    }): Promise<Transaction>;
    protected fetchApiTxObject<BodyType extends object, OutputType extends ResponseWithTxKind>(url: Url, body?: BodyType & {
        walletAddress?: SuiAddress;
    }, signal?: AbortSignal, options?: {
        disableBigIntJsonParsing?: boolean;
        txKind?: boolean;
    }): Promise<Omit<Extract<OutputType, ResponseWithTxKind>, "txKind"> & {
        tx: Transaction;
    }>;
    protected fetchApiEvents<EventType, BodyType = ApiEventsBody>(url: Url, body: BodyType, signal?: AbortSignal, options?: {
        disableBigIntJsonParsing?: boolean;
    }): Promise<EventsWithCursor<EventType>>;
    protected fetchApiIndexerEvents<EventType, BodyType extends ApiIndexerEventsBody>(url: Url, body: BodyType, signal?: AbortSignal, options?: {
        disableBigIntJsonParsing?: boolean;
    }): Promise<IndexerEventsWithCursor<EventType>>;
    protected setAccessToken: (accessToken: UniqueId) => void;
    /**
     * Open a generic websocket stream.
     * - Automatically parses inbound JSON via `Helpers.parseJsonWithBigint`.
     * - Automatically enables BigInt -> "123n" serialization (same one-liner as `fetchApi`).
     */
    protected openWsStream<WsRequestMessage, WsResponseMessage>(args: {
        path: Url;
        onMessage: (message: WsResponseMessage) => void;
        onOpen?: (ev: Event) => void;
        onError?: (ev: Event) => void;
        onClose?: (ev: CloseEvent) => void;
    }): {
        ws: WebSocket;
        send: (value: WsRequestMessage) => void;
        close: () => void;
    };
}

/**
 * The `Auth` class manages creation and refreshing of access tokens
 * to obtain higher rate limits on the Aftermath API. It includes methods
 * to initialize authorization either by a direct callback-based approach
 * or by importing a local Sui keystore. Optionally, administrative functions
 * are provided for creating specialized auth accounts.
 *
 * @example
 * ```typescript
 * const auth = new Auth();
 * const stopAuth = await auth.init({
 *   walletAddress: "0x<address>",
 *   signMessageCallback: async ({ message }) => {
 *     // sign message
 *   },
 * });
 * // ... make authenticated requests ...
 * stopAuth(); // stop auto refresh
 * ```
 */
declare class Auth extends Caller {
    /**
     * Holds the timer reference for scheduled token refreshes.
     */
    private refreshTimer;
    /**
     * Indicates whether the user has canceled auto token refresh.
     */
    private isCanceled;
    /**
     * Creates a new `Auth` instance for token-based rate limit increases.
     *
     * @param config - Optional caller configuration, including network and access token.
     */
    constructor(config?: CallerConfig);
    /**
     * Initializes the auth system by fetching an access token for the provided wallet address.
     * After obtaining the token, it automatically schedules periodic refresh calls until stopped.
     *
     * @param inputs - An object containing the user's `walletAddress` and a `signMessageCallback` function
     *  for cryptographically signing messages.
     *
     * @returns A function that, when called, cancels further token refresh attempts.
     *
     * @example
     * ```typescript
     * const auth = new Auth();
     * const stopAuth = await auth.init({
     *   walletAddress: "0x<address>",
     *   signMessageCallback: async ({ message }) => {
     *     // sign the message with your private key / keypair
     *   },
     * });
     *
     * // ... make authorized calls ...
     *
     * stopAuth(); // Cancel further token refreshes
     * ```
     */
    init(inputs: {
        walletAddress: SuiAddress;
        signMessageCallback: SignMessageCallback;
    }): Promise<() => void>;
    /**
     * Initializes the auth system by reading a local Sui keystore file (on the server side),
     * using the private keys matching a provided address to sign messages for token creation.
     * After the token is obtained, it automatically schedules periodic refresh calls until stopped.
     *
     * @param inputs - An object containing the target `walletAddress` and an optional path to the `.keystore`.
     *  If `path` is not provided, it defaults to `~/.sui/sui_config/sui.keystore`.
     * @returns A function that, when called, cancels further token refresh attempts.
     *
     * @throws If this method is called in a browser environment (client-side).
     *
     * @example
     * ```typescript
     * // On server:
     * const stopAuth = await auth.initFromSuiKeystore({
     *   walletAddress: "0x<address>",
     *   path: "/custom/path/to/keystore.json",
     * });
     * // authorized calls...
     * stopAuth();
     * ```
     */
    /**
     * **Admin-only**: Creates a new auth account with specific rate limits for a given
     * `accountWalletAddress`. The `walletAddress` performing this action must have
     * admin privileges, or the call will fail. Use this to create custom sub-accounts
     * with limited scope or usage rates.
     *
     * @param inputs - Contains:
     *  - `walletAddress`: The admin's wallet address
     *  - `signMessageCallback`: The admin's signing callback
     *  - `accountName`: A short name or identifier for the account
     *  - `accountWalletAddress`: The Sui address representing this sub-account
     *  - `rateLimits`: An array specifying the rate limits (method-based) for the sub-account
     * @returns A promise resolving to `true` if successful, otherwise throws or returns `false`.
     */
    adminCreateAuthAccount(inputs: {
        walletAddress: SuiAddress;
        signMessageCallback: SignMessageCallback;
        accountName: string;
        accountWalletAddress: SuiAddress;
        rateLimits: RateLimit[];
    }): Promise<boolean>;
    /**
     * Requests a new access token from the API by sending a signed message
     * indicating the user wants a token.
     *
     * @param inputs - Contains the user's `walletAddress` and `signMessageCallback`.
     * @returns A response object that includes the `accessToken` and an `expirationTimestamp`.
     */
    private getAccessToken;
    /**
     * Creates a JSON string with a standard format:
     * ```json
     * {
     *   "date": <epoch-seconds>,
     *   "nonce": <random_number>,
     *   "method": <method_string>,
     *   "value": <passed_value>
     * }
     * ```
     *
     * @param method - A short method name describing the action ("GetAccessToken", "AccountCreate", etc.).
     * @param value - The data object to embed under the `value` field.
     * @returns A JSON-serialized string for signing.
     */
    private static createSerializedJson;
}

/**
 * The `Coin` class provides functionality to manage and inspect coin types,
 * retrieve metadata and prices, and convert balances with respect to coin decimals.
 * It can be instantiated with or without a specific `coinType` for convenience.
 *
 * @example
 * ```typescript
 *
 * const afSdk = await Aftermath.create({ network: "MAINNET" });
 *
 * const coin = afSdk.Coin("0x2::sui::SUI");
 *
 * const metadata = await coin.getCoinMetadata(); // fetch metadata for SUI coin
 * ```
 */
declare class Coin extends Caller {
    readonly coinType: CoinType | undefined;
    readonly api?: AftermathApi | undefined;
    /**
     * Static configuration and defaults for Sui coin types, including the standard
     * SUI coin type, default decimals, and coin object type path.
     */
    static readonly constants: {
        /**
         * The canonical coin type string for SUI.
         */
        suiCoinType: string;
        /**
         * The default number of decimals for SUI (9).
         */
        suiCoinDecimals: number;
        /**
         * The canonical coin object type path for Sui's Move module, used in verifying coin objects.
         */
        coinObjectType: string;
        /**
         * The maximum number of decimals
         */
        maxCoinDecimals: number;
        /**
         * Default decimals for various blockchains or ecosystems. For instance,
         * "sui" => 9, "evm" => 18, etc.
         */
        defaultCoinDecimals: {
            sui: number;
            evm: number;
            svm: number;
        };
    };
    /**
     * The Move package name portion of this coin type, e.g. the middle "module" from "0x2::sui::SUI".
     * Will be empty if no `coinType` is provided.
     */
    readonly coinTypePackageName: string;
    /**
     * The final part of the coin type (the "symbol" or short name) from "0x2::sui::SUI".
     * Will be empty if no `coinType` is provided.
     */
    readonly coinTypeSymbol: string;
    /**
     * If the coin type includes a generic argument (like `Coin<0x...>`), this is extracted. Else empty.
     * E.g. "0x5::coin::Coin<0x2::sui::SUI>" => "0x2::sui::SUI".
     */
    readonly innerCoinType: string;
    /**
     * An optional cached coin metadata object retrieved by `getCoinMetadata`.
     */
    metadata: CoinMetadaWithInfo | undefined;
    /**
     * An optional cached price info object retrieved by `getPrice`.
     */
    priceInfo: CoinPriceInfo | undefined;
    /**
     * Creates a new instance of `Coin`.
     *
     * @param coinType - The coin's type string (e.g., "0x2::sui::SUI"). If omitted, methods that require a type will need it passed in manually.
     * @param config - Optional caller configuration (network, access token).
     * @param api - An optional `AftermathApi` instance for coin-specific API calls.
     */
    constructor(coinType?: CoinType | undefined, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Retrieves the decimals for multiple coins by calling the Aftermath API for metadata
     * and extracting the `decimals` property.
     *
     * @param inputs - An object containing an array of coin types.
     * @returns An object mapping each coin type to a numeric decimal count.
     *
     * @example
     * ```typescript
     * const decimals = await coin.getCoinsToDecimals({ coins: ["0x2::sui::SUI", "0x<...>"] });
     * console.log(decimals); // { "0x2::sui::SUI": 9, "0x<...>": 6 }
     * ```
     */
    getCoinsToDecimals(inputs: {
        coins: CoinType[];
    }): Promise<CoinsToDecimals>;
    /**
     * Fetches the metadata (name, symbol, decimals) for this coin type or a provided one,
     * caching it if already requested.
     *
     * @param coin - Optionally override the constructor coinType.
     * @returns The `CoinMetadaWithInfo` object containing metadata and optional external references.
     * @throws If neither constructor nor argument coinType is available.
     *
     * @example
     * ```typescript
     * const metadata = await coin.getCoinMetadata("0x2::sui::SUI");
     * console.log(metadata.name, metadata.symbol, metadata.decimals);
     * ```
     */
    getCoinMetadata(coin?: CoinType): Promise<CoinMetadaWithInfo>;
    /**
     * Fetches metadata for multiple coins at once, returning an array in the same order
     * as the coin types requested.
     *
     * @param inputs - An object with `coins`, an array of coin types.
     * @returns An array of `CoinMetadaWithInfo` with length matching `coins`.
     *
     * @example
     * ```typescript
     * const metas = await coin.getCoinMetadatas({
     *   coins: ["0x2::sui::SUI", "0x<custom::TOKEN>"]
     * });
     * console.log(metas[0].symbol, metas[1].symbol);
     * ```
     */
    getCoinMetadatas(inputs: {
        coins: CoinType[];
    }): Promise<CoinMetadaWithInfo[]>;
    /**
     * Manually sets the metadata in this Coin instance, storing it in `this.metadata`.
     *
     * @param metadata - A `CoinMetadaWithInfo` object to cache in this instance.
     */
    setCoinMetadata(metadata: CoinMetadaWithInfo): void;
    /**
     * Retrieves price information (including current price and 24h change) for this coin or a provided coin.
     * If already fetched, it returns the cached data.
     *
     * @param coin - Optionally override the constructor coinType.
     * @returns A `CoinPriceInfo` with `price` and `priceChange24HoursPercentage`.
     * @throws If no valid coin type is present.
     *
     * @example
     * ```typescript
     * const priceInfo = await coin.getPrice("0x2::sui::SUI");
     * console.log(priceInfo.price, priceInfo.priceChange24HoursPercentage);
     * ```
     */
    getPrice(coin?: CoinType): Promise<CoinPriceInfo>;
    /**
     * Manually sets the price info in this Coin instance, storing it in `this.priceInfo`.
     *
     * @param priceInfo - A `CoinPriceInfo` object to cache in this instance.
     */
    setPriceInfo(priceInfo: CoinPriceInfo): void;
    /**
     * Fetches a list of "verified" coin types from the Aftermath backend. Verified coins
     * typically pass certain safety or liquidity checks.
     *
     * @returns An array of `CoinType` strings that are considered verified.
     *
     * @example
     * ```typescript
     * const verified = await coin.getVerifiedCoins();
     * console.log(verified); // e.g. ["0x2::sui::SUI", "0x...::MYCOIN", ...]
     * ```
     */
    getVerifiedCoins(): Promise<string[]>;
    /**
     * Extracts the Move package name portion from a coin type string.
     * E.g., "0x2::sui::SUI" => "sui".
     *
     * @param coin - The coin type string (e.g., "0x2::sui::SUI").
     * @returns The middle segment of the type or empty string if not parseable.
     */
    static getCoinTypePackageName: (coin: CoinType) => string;
    /**
     * Extracts the final part of the coin type (the symbol or short name).
     * For example, "0x2::sui::SUI" => "SUI".
     *
     * @param coin - The coin type string.
     * @returns The extracted symbol or empty string if not found.
     */
    static getCoinTypeSymbol: (coin: CoinType) => string;
    /**
     * Extracts the inner generic argument of a coin type if present. E.g.,
     * "0x2::coin::Coin<0x2::sui::SUI>" => "0x2::sui::SUI".
     *
     * @param coin - The coin type with a possible `<...>` suffix.
     * @returns The inner type or an empty string if not found.
     */
    static getInnerCoinType: (coin: CoinType) => string;
    /**
     * If a `KeyType` string references a type in angle brackets, extracts the type
     * inside. Typically for "0x2::coin::Coin<0x2::mycoin::MYCOIN>" -> "0x2::mycoin::MYCOIN".
     *
     * @param keyType - The key type string to parse.
     * @returns The substring inside `<...>` or the original if no brackets found.
     */
    static coinTypeFromKeyType: (keyType: KeyType) => string;
    /**
     * Checks if a coin type string corresponds to the canonical SUI coin.
     *
     * @param coin - A coin type string.
     * @returns `true` if it matches "0x2::sui::SUI", otherwise `false`.
     */
    static isSuiCoin: (coin: CoinType) => boolean;
    /**
     * Checks if an object type string is a `Coin<...>` object from the standard Sui Move module.
     *
     * @param objectType - The object type to test.
     * @returns `true` if it matches "0x2::coin::Coin<...>", otherwise `false`.
     */
    static isCoinObjectType: (objectType: AnyObjectType) => boolean;
    /**
     * Given a record of coin types => numeric amounts, filters out those
     * with zero or negative amounts, returning only the positive pairs.
     *
     * @param coinAmounts - A record mapping coin types to numeric amounts.
     * @returns An object with `coins` array and `amounts` array in matching indexes.
     */
    static coinsAndAmountsOverZero: (coinAmounts: Record<CoinType, number>) => {
        coins: string[];
        amounts: number[];
    };
    /**
     * Given a record of coin types => bigint balances, filters out those with zero
     * or negative balances, returning only the positive pairs.
     *
     * @param coinsToBalance - A record mapping coin types to bigints.
     * @returns An object with `coins` array and `balances` array in matching indexes.
     */
    static coinsAndBalancesOverZero: (coinsToBalance: CoinsToBalance) => {
        coins: string[];
        balances: bigint[];
    };
    /**
     * Filters a list of `coinTypes` by a textual query, matching against both zero-padded
     * and non-padded forms as well as substring checks.
     *
     * @param inputs - Contains `filter` (the search string) and `coinTypes`.
     * @returns An array of coin types that match the filter in either raw or zero-padded form.
     *
     * @example
     * ```typescript
     * const filtered = Coin.filterCoinsByType({
     *   filter: "sui",
     *   coinTypes: ["0x2::sui::SUI", "0x<...>"]
     * });
     * ```
     */
    static filterCoinsByType: (inputs: {
        filter: string;
        coinTypes: CoinType[];
    }) => CoinType[];
    /**
     * Filters a record of coin metadata by a textual query, matching both the coin type
     * and the metadata's name/symbol fields.
     *
     * @param inputs - An object containing `filter` and a record of `coinMetadatas`.
     * @returns An array of coin types that match the search criteria.
     */
    static filterCoinsByMetadata: (inputs: {
        filter: string;
        coinMetadatas: Record<CoinType, CoinMetadata>;
    }) => CoinType[];
    /**
     * Converts a user-friendly decimal number (e.g., 1.5) to a raw on-chain
     * integer representation by scaling with the given coin decimals.
     * For example, `1.5` with `decimals = 9` => `1500000000n`.
     *
     * @param balance - The user-friendly balance as a number.
     * @param decimals - Number of decimal places for this coin.
     * @returns A bigint representing the raw on-chain balance.
     */
    static normalizeBalance: (balance: number, decimals: CoinDecimal) => Balance;
    /**
     * Scales a raw bigint or numeric `amount` down by `decimals` to get a display-friendly float.
     * For example, `1500000000n` with `decimals = 9` => `1.5`.
     *
     * @param amount - The raw on-chain amount as `bigint` or `number`.
     * @param decimals - Number of decimal places for this coin.
     * @returns The resulting float as an easily readable balance.
     */
    static balanceWithDecimals: (amount: bigint | number, decimals: number) => number;
    /**
     * Scales a raw `amount` down by `decimals` and multiplies by a `price` in USD,
     * returning a final USD value. E.g., `1500000000n`, `decimals=9`, `price=2.0` => `3.0`.
     *
     * @param amount - The raw balance as bigint or number.
     * @param decimals - The coin decimals.
     * @param price - The coin's price in USD.
     * @returns The computed float in USD.
     */
    static balanceWithDecimalsUsd: (amount: bigint | number, decimals: number, price: number) => number;
    /**
     * Looks up a coin's symbol if it is known in a provided `coinSymbolToCoinTypes`
     * record. For instance, if "SUI" => `["0x2::sui::SUI"]`, we can find "SUI" from
     * the coin type "0x2::sui::SUI".
     *
     * @param inputs - An object with `coinType` and `coinSymbolToCoinTypes`.
     * @returns The coin symbol string or `undefined` if not found.
     */
    static coinSymbolForCoinType: (inputs: {
        coinType: CoinType;
        coinSymbolToCoinTypes: CoinSymbolToCoinTypes;
    }) => CoinSymbol | undefined;
}

/**
 * The `FarmsStakingPool` class represents a staking pool (also referred
 * to as a "vault" in some contexts). It allows reading details about
 * emission schedules, reward tokens, stake coin type, and lock durations,
 * as well as constructing transactions to stake, harvest, and mutate the
 * pool parameters if the user has the correct admin privileges.
 */
declare class FarmsStakingPool extends Caller {
    stakingPool: FarmsStakingPoolObject;
    readonly api?: AftermathApi | undefined;
    /**
     * Creates a `FarmsStakingPool` instance based on on-chain pool data.
     *
     * @param stakingPool - The on-chain data object describing the pool.
     * @param config - An optional `CallerConfig` for network settings.
     * @param api - An optional `AftermathApi` for transaction building.
     */
    constructor(stakingPool: FarmsStakingPoolObject, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetches the total value locked (TVL) for this staking pool alone.
     *
     * @returns A `number` representing this pool's TVL in USD (or another currency).
     *
     * @example
     * ```typescript
     * const poolTvl = await someFarmsPool.getTVL();
     * console.log(poolTvl);
     * ```
     */
    getTVL(): Promise<number>;
    /**
     * Fetches the total value locked (TVL) of the reward coins in this specific staking pool.
     *
     * @returns A `number` representing this pool's reward TVL.
     *
     * @example
     * ```typescript
     * const rewardTvl = await someFarmsPool.getRewardsTVL();
     * console.log(rewardTvl);
     * ```
     */
    getRewardsTVL(): Promise<number>;
    /**
     * Retrieves the version of this staking pool (1 or 2).
     */
    version: () => FarmsVersion;
    /**
     * Returns whether this pool uses strict lock enforcement.
     * Strict: positions must be unlocked before any principal can be withdrawn.
     */
    isStrictLockEnforcement: () => boolean;
    /**
     * Returns whether this pool uses relaxed lock enforcement.
     * Relaxed: positions can withdraw principal while locked, forfeiting pro-rata locked rewards.
     */
    isRelaxedLockEnforcement: () => boolean;
    /**
     * Lists all reward coin types offered by this staking pool.
     *
     * @returns An array of `CoinType` strings.
     */
    rewardCoinTypes: () => CoinType[];
    /**
     * Lists all reward coin types for which this pool currently has a non-zero actual reward balance.
     *
     * @returns An array of `CoinType` strings that have > 0 actual rewards.
     */
    nonZeroRewardCoinTypes: () => CoinType[];
    /**
     * Retrieves the on-chain record for a specific reward coin type in this pool.
     *
     * @param inputs - Contains the `coinType` to look up.
     * @throws If the specified coinType is not found in `rewardCoins`.
     * @returns A `FarmsStakingPoolRewardCoin` object.
     */
    rewardCoin: (inputs: {
        coinType: CoinType;
    }) => FarmsStakingPoolRewardCoin;
    /**
     * Computes the maximum lock duration (in ms) that remains valid in this staking pool,
     * factoring in the current time and the pool's emission end.
     *
     * @returns The maximum possible lock duration in milliseconds, or 0 if the pool is effectively closed.
     */
    maxLockDurationMs: () => number;
    /**
     * Calculates and applies newly emitted rewards for each reward coin in this pool,
     * updating the `rewardsAccumulatedPerShare`. This simulates the on-chain
     * `emitRewards` logic.
     *
     * @example
     * ```typescript
     * someFarmsPool.emitRewards();
     * // The pool's rewardsAccumulatedPerShare fields are now updated.
     * ```
     */
    emitRewards: () => void;
    /**
     * Computes an approximate APR for a specific reward coin, based on the current
     * emission rate, coin price, pool TVL, and the lock multiplier range. This assumes
     * maximum lock multiplier for the final APR result.
     *
     * @param inputs - Includes the `coinType`, its `price` and `decimals`, plus the total `tvlUsd` in the pool.
     * @returns A numeric APR (0.05 = 5%).
     */
    calcApr: (inputs: {
        coinType: CoinType;
        price: number;
        decimals: number;
        tvlUsd: number;
    }) => Apr;
    /**
     * Computes the total APR contributed by all reward coin types in this pool, summing
     * up the individual APR for each coin type. This also assumes max lock multiplier.
     *
     * @param inputs - Contains price data (`coinsToPrice`), decimal data (`coinsToDecimals`), and the total TVL in USD.
     * @returns The sum of all coin APRs (0.10 = 10%).
     */
    calcTotalApr: (inputs: {
        coinsToPrice: CoinsToPrice;
        coinsToDecimals: CoinsToDecimals;
        tvlUsd: number;
    }) => Apr;
    /**
     * Given a lock duration in ms, calculates the lock multiplier to be used by staked positions.
     * This function clamps the input duration between the pool's `minLockDurationMs` and
     * `maxLockDurationMs`.
     *
     * @param inputs - An object containing the `lockDurationMs` for which to calculate a multiplier.
     * @returns A `FarmsMultiplier` (bigint) representing the scaled factor (1.0 = 1e9 if using fixedOneB).
     */
    calcMultiplier: (inputs: {
        lockDurationMs: number;
    }) => FarmsMultiplier;
    /**
     * Builds a transaction to stake tokens into this pool, optionally locking them.
     *
     * @param inputs - Contains `stakeAmount`, `lockDurationMs`, `walletAddress`, and optional sponsorship.
     * @returns A transaction object (or bytes) that can be signed and executed to create a staked position.
     */
    getStakeTransaction(inputs: {
        stakeAmount: Balance;
        lockDurationMs: Timestamp;
        walletAddress: SuiAddress;
        isSponsoredTx?: boolean;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to harvest rewards from multiple staked positions in this pool.
     *
     * @param inputs - Contains `stakedPositionIds`, the `walletAddress`, and optionally any others.
     * @returns A transaction that can be signed and executed to claim rewards from multiple positions.
     */
    getHarvestRewardsTransaction(inputs: {
        stakedPositionIds: ObjectId[];
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to increase the emission rate (or schedule) for specific reward coins.
     *
     * @param inputs - Contains the `ownerCapId` that authorizes changes, plus an array of `rewards` with new emission details.
     * @returns A transaction to be signed and executed by the owner cap holder.
     */
    getIncreaseRewardsEmissionsTransaction(inputs: {
        ownerCapId: ObjectId;
        rewards: {
            rewardCoinType: CoinType;
            emissionScheduleMs: Timestamp;
            emissionRate: bigint;
        }[];
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to update the pool's minimum stake amount, only authorized by the `ownerCapId`.
     *
     * @param inputs - Contains the new `minStakeAmount`, the `ownerCapId`, and the calling `walletAddress`.
     * @returns A transaction that can be signed and executed to change the minimum stake requirement.
     */
    getUpdateMinStakeAmountTransaction(inputs: {
        ownerCapId: ObjectId;
        minStakeAmount: bigint;
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction granting a one-time admin cap to another address, allowing them to perform specific
     * one-time administrative actions (like initializing a reward).
     *
     * @param inputs - Body containing the `ownerCapId`, the `recipientAddress`, and the `rewardCoinType`.
     * @returns A transaction to be executed by the current pool owner.
     */
    getGrantOneTimeAdminCapTransaction(inputs: ApiFarmsGrantOneTimeAdminCapBody): _mysten_sui_transactions.Transaction;
    /**
     * Builds a transaction to initialize a new reward coin in this pool, specifying the amount, emission rate,
     * and schedule parameters. This can be done by either the `ownerCapId` or a `oneTimeAdminCapId`.
     *
     * @param inputs - Contains emission info (rate, schedule) and which cap is used (`ownerCapId` or `oneTimeAdminCapId`).
     * @returns A transaction object for the reward initialization.
     */
    getInitializeRewardTransaction(inputs: {
        rewardAmount: Balance;
        emissionScheduleMs: Timestamp;
        emissionRate: bigint;
        emissionDelayTimestampMs: Timestamp;
        rewardCoinType: CoinType;
        walletAddress: SuiAddress;
        isSponsoredTx?: boolean;
    } & FarmOwnerOrOneTimeAdminCap): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to add more reward coins (top-up) to an existing reward
     * coin configuration, either as the owner or via a one-time admin cap.
     *
     * @param inputs - Contains an array of reward objects, each specifying amount and coin type.
     * @returns A transaction that can be signed and executed to increase the reward distribution pool.
     */
    getTopUpRewardsTransaction(inputs: {
        rewards: {
            rewardAmount: Balance;
            rewardCoinType: CoinType;
        }[];
        walletAddress: SuiAddress;
        isSponsoredTx?: boolean;
    } & FarmOwnerOrOneTimeAdminCap): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to **remove (withdraw) undistributed reward coins** from the
     * staking pool for **one or more reward coin types** in a single call.
     *
     * Only the **pool owner** (via `ownerCapId`) can remove rewards. One-time admin caps
     * are **not** permitted for removals. This operation reduces the pool’s remaining
     * undistributed reward balances; it does **not** affect rewards already accrued/claimed
     * by stakers.
     *
     * Versioning:
     * - V1 → calls `buildRemoveStakingPoolRewardTxV1`
     * - V2 → calls `buildRemoveStakingPoolRewardTxV2`
     *
     * Notes:
     * - The effective `stakingPoolId` and `stakeCoinType` are taken from this instance’s
     *   `this.stakingPool` and override any values passed in `inputs`.
     *
     * @param inputs Parameters for reward removal.
     * @param inputs.rewards Array of removal entries. Each entry specifies:
     *   - `rewardCoinType`: Coin type to withdraw.
     *   - `rewardAmount`: Amount to withdraw (base units).
     * @param inputs.ownerCapId Object ID of the pool OwnerCap that authorizes the removal.
     * @param inputs.walletAddress Address that will sign/submit the transaction.
     * @returns A transaction object ready to sign and execute that removes the specified
     *          undistributed rewards for each entry in `inputs.rewards`.
     */
    getRemoveRewardsTransaction(inputs: {
        rewards: {
            rewardCoinType: CoinType;
            rewardAmount: Balance;
        }[];
        ownerCapId: ObjectId;
        walletAddress: SuiAddress;
    }): _mysten_sui_transactions.Transaction;
    /**
     * Updates `rewardsAccumulatedPerShare` by distributing `rewardsToEmit` among
     * the total staked amount with multiplier. This mimics on-chain distribution logic.
     *
     * @param inputs - Contains the `rewardsToEmit` and which `rewardCoinIndex` to update.
     */
    private increaseRewardsAccumulatedPerShare;
    /**
     * Computes how many rewards to emit based on the time since `lastRewardTimestamp` and
     * the pool's emission schedule, clamped by the total `rewardsRemaining`.
     */
    private calcRewardsToEmit;
    /**
     * Calculates how many tokens were emitted between two timestamps (Tm and Tn) for a given reward coin,
     * based on the discrete `emissionRate` and `emissionSchedulesMs`.
     *
     * @param inputs - Contains `timestampTm`, `timestampTn`, and the relevant `rewardCoin`.
     * @returns The total number of tokens emitted in that time window.
     */
    private calcRewardsEmittedFromTimeTmToTn;
    /**
     * Provides access to the farm-specific provider methods for building transactions.
     */
    private readonly farmsApi;
}

/**
 * The `FarmsStakedPosition` class represents a user's individual staked position
 * in a particular staking pool. It provides methods to query position details,
 * calculate potential rewards, lock/unlock stake, and build transactions
 * for depositing, unstaking, or harvesting rewards.
 */
declare class FarmsStakedPosition extends Caller {
    stakedPosition: FarmsStakedPositionObject;
    readonly api?: AftermathApi | undefined;
    /**
     * The timestamp (in ms) when rewards were last harvested for this position, possibly overriding the
     * on-chain data if provided in the constructor.
     */
    readonly trueLastHarvestRewardsTimestamp: Timestamp;
    /**
     * Creates a `FarmsStakedPosition` instance for a user's staked position in a farm.
     *
     * @param stakedPosition - The on-chain data object representing the user's staked position.
     * @param trueLastHarvestRewardsTimestamp - Optionally overrides the last harvest time from the on-chain data.
     * @param config - Optional configuration for the underlying `Caller`.
     * @param api - Optional `AftermathApi` instance for transaction building.
     */
    constructor(stakedPosition: FarmsStakedPositionObject, trueLastHarvestRewardsTimestamp?: Timestamp | undefined, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Returns the version of the farm system that this position belongs to (1 or 2).
     */
    version: () => FarmsVersion;
    /**
     * Checks whether the position is still locked, based on the current time and the lock parameters.
     *
     * @param inputs - Contains a `FarmsStakingPool` instance to check for system constraints.
     * @returns `true` if the position is locked; otherwise, `false`.
     */
    isLocked: (inputs: {
        stakingPool: FarmsStakingPool;
    }) => boolean;
    /**
     * Checks if the position is strictly locked, meaning it is currently locked and the pool uses strict lock enforcement.
     *
     * @param inputs - Contains a `FarmsStakingPool` instance to check lock state and enforcement.
     * @returns `true` if locked with strict enforcement; otherwise, `false`.
     */
    isStrictlyLocked: (inputs: {
        stakingPool: FarmsStakingPool;
    }) => boolean;
    /**
     * Checks if the position is relaxed locked, meaning it is currently locked and the pool uses relaxed lock enforcement.
     *
     * @param inputs - Contains a `FarmsStakingPool` instance to check lock state and enforcement.
     * @returns `true` if locked with relaxed enforcement; otherwise, `false`.
     */
    isRelaxedLocked: (inputs: {
        stakingPool: FarmsStakingPool;
    }) => boolean;
    /**
     * Checks whether the position has a non-zero lock duration.
     *
     * @returns `true` if the position was created with a lock duration > 0.
     */
    isLockDuration: () => boolean;
    /**
     * Computes the timestamp (in ms) at which this position's lock will end.
     *
     * @returns The unlock timestamp (lock start + lock duration).
     */
    unlockTimestamp: () => number;
    /**
     * Computes the user's accrued rewards for each reward coin in this position,
     * returned as a `CoinsToBalance` object keyed by coin type.
     *
     * @param inputs - Contains a reference to the `FarmsStakingPool`.
     * @returns A mapping from `coinType` to the amount of earned rewards.
     */
    rewardCoinsToClaimableBalance: (inputs: {
        stakingPool: FarmsStakingPool;
    }) => CoinsToBalance;
    /**
     * Lists all reward coin types associated with this position.
     *
     * @returns An array of `CoinType` strings representing the reward coins.
     */
    rewardCoinTypes: () => CoinType[];
    /**
     * Returns only the reward coin types that currently have a non-zero claimable balance.
     *
     * @param inputs - Contains a reference to the `FarmsStakingPool`.
     * @returns An array of `CoinType` strings that have pending rewards > 0.
     */
    nonZeroRewardCoinTypes: (inputs: {
        stakingPool: FarmsStakingPool;
    }) => CoinType[];
    /**
     * Retrieves the reward coin record for a specific coin type in this position.
     *
     * @param inputs - Must contain a `coinType` string to look up.
     * @throws If the coin type is not found in this position.
     * @returns The reward coin object from the position.
     */
    rewardCoin: (inputs: {
        coinType: CoinType;
    }) => FarmsStakedPositionRewardCoin;
    /**
     * Checks if this position has any claimable rewards across all reward coin types.
     *
     * @param inputs - Contains a reference to the `FarmsStakingPool`.
     * @returns `true` if there are unclaimed rewards; otherwise, `false`.
     */
    hasClaimableRewards: (inputs: {
        stakingPool: FarmsStakingPool;
    }) => boolean;
    /**
     * Calculates the current amount of earned rewards for a specific coin type,
     * factoring in any emission constraints and the pool's actual reward availability.
     *
     * @param inputs - Contains the `coinType` to check and a reference to the `FarmsStakingPool`.
     * @returns The total `BigInt` amount of rewards earned for the specified coin type.
     */
    rewardsEarned: (inputs: {
        coinType: CoinType;
        stakingPool: FarmsStakingPool;
    }) => Balance;
    /**
     * Updates the position's reward calculations based on the pool's current
     * emission state, effectively "syncing" the on-chain logic into this local
     * representation. Also checks if the lock duration has elapsed.
     *
     * @param inputs - Contains a reference to the `FarmsStakingPool`.
     * @remarks This method is typically called before computing `rewardsEarned()`.
     */
    updatePosition: (inputs: {
        stakingPool: FarmsStakingPool;
    }) => void;
    /**
     * Builds a transaction to deposit additional principal into this staked position.
     *
     * @param inputs - Contains `depositAmount`, the `walletAddress` performing the deposit, and optional sponsorship.
     * @returns A transaction object (or bytes) that can be signed and executed to increase stake.
     */
    getDepositPrincipalTransaction(inputs: {
        depositAmount: Balance;
        walletAddress: SuiAddress;
        isSponsoredTx?: boolean;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to unstake this entire position, optionally claiming SUI as afSUI.
     *
     * @param inputs - Contains `walletAddress`, the `FarmsStakingPool` reference, and optional `claimSuiAsAfSui`.
     * @returns A transaction that can be signed and executed to fully withdraw principal and possibly rewards.
     */
    getUnstakeTransaction(inputs: {
        walletAddress: SuiAddress;
        stakingPool: FarmsStakingPool;
        claimSuiAsAfSui?: boolean;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to withdraw a partial amount of principal from this staked position.
     * Unlike `getUnstakeTransaction`, this does NOT destroy the position.
     *
     * @param inputs - Contains `walletAddress`, `withdrawAmount`, and the `FarmsStakingPool` reference.
     * @returns A transaction that can be signed and executed to withdraw principal without destroying the position.
     */
    getWithdrawPrincipalTransaction(inputs: {
        walletAddress: SuiAddress;
        withdrawAmount: Balance;
        stakingPool: FarmsStakingPool;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to lock this position for a specified duration, increasing its lock multiplier (if any).
     *
     * @param inputs - Contains the `lockDurationMs` and the `walletAddress`.
     * @returns A transaction that can be signed and executed to lock the position.
     */
    getLockTransaction(inputs: {
        lockDurationMs: Timestamp;
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to re-lock this position (renew lock duration) at the current multiplier.
     *
     * @param inputs - Contains the `walletAddress`.
     * @returns A transaction that can be signed and executed to extend or refresh the lock.
     */
    getRenewLockTransaction(inputs: {
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to unlock this position, removing any lock-based multiplier.
     *
     * @param inputs - Contains the `walletAddress`.
     * @returns A transaction that can be signed and executed to unlock the position immediately.
     */
    getUnlockTransaction(inputs: {
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to harvest (claim) the rewards from this position,
     * optionally receiving SUI as afSUI.
     *
     * @param inputs - Includes the `walletAddress`, the `FarmsStakingPool`, and optional `claimSuiAsAfSui`.
     * @returns A transaction that can be signed and executed to claim accrued rewards.
     */
    getHarvestRewardsTransaction(inputs: {
        walletAddress: SuiAddress;
        stakingPool: FarmsStakingPool;
        claimSuiAsAfSui?: boolean;
    }): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Calculates the total base + multiplier rewards from time t0 for this position,
     * ensuring that multiplier rewards only apply during the locked period.
     *
     * @param inputs - Contains updated `rewardsAccumulatedPerShare`, the position’s `multiplierRewardsDebt`, and the pool’s `emissionEndTimestamp`.
     * @returns A tuple `[baseRewards, multiplierRewards]`.
     */
    private calcTotalRewardsFromTimeT0;
    /**
     * Determines if this position is unlocked based on the lock end timestamp, the emission end timestamp,
     * or a forced unlock condition in the pool.
     */
    private readonly isUnlocked;
    /**
     * Provides access to the `Farms` provider in the `AftermathApi`.
     */
    private readonly farmsApi;
}

/**
 * The `Farms` class provides high-level methods for interacting with
 * staking pools (farms) on the Sui network. It allows fetching pool
 * details, user staked positions, and building transactions for creating
 * new pools. This class also enables retrieving user interactions (events)
 * with the farming system.
 */
declare class Farms extends Caller {
    readonly api?: AftermathApi | undefined;
    /**
     * Contains constants relevant to farming, including minimum rewards to claim
     * and maximum lock multipliers.
     */
    static readonly constants: {
        /**
         * The minimum number of rewards (in smallest units) that can be claimed.
         */
        minRewardsToClaim: bigint;
        /**
         * The maximum lock multiplier that can be applied when locking a staked position.
         */
        maxLockMultiplier: number;
    };
    /**
     * Creates a new `Farms` instance for fetching staking pool data and building
     * farm-related transactions.
     *
     * @param config - Optional configuration, including network and access token.
     * @param api - An optional `AftermathApi` instance for advanced transaction building.
     */
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetches a single staking pool by its `objectId` from the farm API/indexer.
     *
     * @param inputs - An object containing the `objectId` of the staking pool.
     * @returns A `FarmsStakingPool` object representing the staking pool.
     *
     * @example
     * ```typescript
     * const pool = await farms.getStakingPool({ objectId: "0x<pool_id>" });
     * console.log(pool.stakingPool);
     * ```
     */
    getStakingPool(inputs: {
        objectId: ObjectId;
    }): Promise<FarmsStakingPool>;
    /**
     * Fetches multiple staking pools by their `objectIds`.
     *
     * @param inputs - An object containing an array of `objectIds`.
     * @returns An array of `FarmsStakingPool` instances corresponding to each `objectId`.
     *
     * @example
     * ```typescript
     * const pools = await farms.getStakingPools({
     *   objectIds: ["0x<id1>", "0x<id2>"]
     * });
     * console.log(pools[0].stakingPool, pools[1].stakingPool);
     * ```
     */
    getStakingPools(inputs: {
        objectIds: ObjectId[];
    }): Promise<FarmsStakingPool[]>;
    /**
     * Fetches all existing staking pools registered within the indexer or farm API.
     *
     * @returns An array of `FarmsStakingPool` objects.
     *
     * @example
     * ```typescript
     * const allPools = await farms.getAllStakingPools();
     * console.log(allPools.map(pool => pool.stakingPool));
     * ```
     */
    getAllStakingPools(): Promise<FarmsStakingPool[]>;
    /**
     * Fetches all staked positions owned by a given user.
     *
     * @param inputs - An object containing the user's `walletAddress`.
     * @returns An array of `FarmsStakedPosition` objects representing each of the user's staked positions.
     *
     * @example
     * ```typescript
     * const positions = await farms.getOwnedStakedPositions({
     *   walletAddress: "0x<user_address>"
     * });
     * console.log(positions);
     * ```
     */
    getOwnedStakedPositions(inputs: ApiFarmsOwnedStakedPositionsBody): Promise<FarmsStakedPosition[]>;
    /**
     * Fetches all `StakingPoolOwnerCapObject`s that a given address owns.
     * These caps grant the owner the ability to modify staking pool parameters.
     *
     * @param inputs - An object containing the owner's `walletAddress`.
     * @returns An array of `StakingPoolOwnerCapObject`s.
     *
     * @example
     * ```typescript
     * const ownerCaps = await farms.getOwnedStakingPoolOwnerCaps({
     *   walletAddress: "0x<user_address>"
     * });
     * console.log(ownerCaps);
     * ```
     */
    getOwnedStakingPoolOwnerCaps(inputs: ApiFarmsOwnedStakingPoolOwnerCapsBody): Promise<StakingPoolOwnerCapObject[]>;
    /**
     * Fetches all `StakingPoolOneTimeAdminCapObject`s that a given address owns.
     * These caps grant one-time admin privileges, typically for initializing reward coins.
     *
     * @param inputs - An object containing the admin's `walletAddress`.
     * @returns An array of `StakingPoolOneTimeAdminCapObject`s.
     *
     * @example
     * ```typescript
     * const adminCaps = await farms.getOwnedStakingPoolOneTimeAdminCaps({
     *   walletAddress: "0x<user_address>"
     * });
     * console.log(adminCaps);
     * ```
     */
    getOwnedStakingPoolOneTimeAdminCaps(inputs: ApiFarmsOwnedStakingPoolOneTimeAdminCapsBody): Promise<StakingPoolOneTimeAdminCapObject[]>;
    /**
     * Retrieves the total value locked (TVL) in the specified farm IDs or in all farms if none are specified.
     *
     * @param inputs - An optional object containing an array of `farmIds` to filter TVL by. If not provided, returns global TVL.
     * @returns A promise that resolves to a `number` representing the TVL in USD (or another relevant currency).
     *
     * @example
     * ```typescript
     * const tvl = await farms.getTVL();
     * console.log("All farms' TVL:", tvl);
     *
     * const tvlForSpecificFarm = await farms.getTVL({ farmIds: ["0x<farm_id>"] });
     * console.log("Specific farm's TVL:", tvlForSpecificFarm);
     * ```
     */
    getTVL(inputs?: {
        farmIds?: ObjectId[];
    }): Promise<number>;
    /**
     * Retrieves the total value locked (TVL) of reward coins across specified farm IDs or all farms if none are specified.
     *
     * @param inputs - An optional object containing an array of `farmIds`. If not provided, returns global reward TVL.
     * @returns A promise that resolves to a `number` representing the total rewards TVL in USD (or another relevant currency).
     *
     * @example
     * ```typescript
     * const rewardsTvl = await farms.getRewardsTVL();
     * console.log("All farms' rewards TVL:", rewardsTvl);
     *
     * const singleFarmRewardsTvl = await farms.getRewardsTVL({ farmIds: ["0x<farm_id>"] });
     * console.log("Single farm's rewards TVL:", singleFarmRewardsTvl);
     * ```
     */
    getRewardsTVL(inputs?: {
        farmIds?: ObjectId[];
    }): Promise<number>;
    /**
     * **Deprecated**: Use `getCreateStakingPoolTransactionV2()` instead.
     *
     * Builds a transaction to create a new staking pool (farming vault) on version 1 of the farm system.
     *
     * @param inputs - Contains pool creation parameters such as `minLockDurationMs`, `maxLockDurationMs`, etc.
     * @returns A transaction object (or bytes) that can be signed and submitted.
     *
     * @deprecated Please use `getCreateStakingPoolTransactionV2`.
     */
    getCreateStakingPoolTransactionV1(inputs: ApiFarmsCreateStakingPoolBodyV1): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a transaction to create a new staking pool (farming vault) on version 2 of the farm system.
     *
     * @param inputs - Contains pool creation parameters such as `minLockDurationMs`, `maxLockDurationMs`, etc.
     * @returns A transaction object (or bytes) that can be signed and submitted.
     *
     * @example
     * ```typescript
     * const tx = await farms.getCreateStakingPoolTransactionV2({
     *   minLockDurationMs: 604800000, // 1 week
     *   maxLockDurationMs: 31536000000, // 1 year
     *   maxLockMultiplier: BigInt("2000000000"), // e.g. 2.0x
     *   minStakeAmount: BigInt("1000000"),
     *   stakeCoinType: "0x<coin_type>",
     *   walletAddress: "0x<admin_address>"
     * });
     * // sign and submit the transaction
     * ```
     */
    getCreateStakingPoolTransactionV2(inputs: ApiFarmsCreateStakingPoolBody): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Fetches user-specific farm interaction events (e.g., staked, unlocked, withdrew) with optional pagination.
     *
     * @param inputs - Includes the user's `walletAddress`, along with `cursor` and `limit` for pagination.
     * @returns A paginated set of events of type `FarmUserEvent`.
     *
     * @example
     * ```typescript
     * const userEvents = await farms.getInteractionEvents({
     *   walletAddress: "0x<user_address>",
     *   cursor: 0,
     *   limit: 10
     * });
     * console.log(userEvents);
     * ```
     */
    getInteractionEvents(inputs: ApiIndexerEventsBody & {
        walletAddress: SuiAddress;
    }): Promise<IndexerEventsWithCursor<FarmUserEvent>>;
    /**
     * Retrieves an instance of the `Farms` provider from the passed `AftermathApi`,
     * throwing an error if not available.
     */
    private readonly farmsApi;
}

declare class Faucet extends Caller {
    readonly api?: AftermathApi | undefined;
    static readonly constants: {
        defaultRequestAmountUsd: number;
    };
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    getSupportedCoins(): Promise<CoinType[]>;
    getRequestCoinTransaction(inputs: ApiFaucetRequestBody): Promise<_mysten_sui_transactions.Transaction>;
    getMintSuiFrenTransaction(inputs: ApiFaucetMintSuiFrenBody): Promise<_mysten_sui_transactions.Transaction>;
    private readonly faucetApi;
}

/**
 * The `GasPools` class provides methods for interacting with shared gas pool
 * endpoints on the Aftermath platform. This includes querying pool details
 * and building transactions for creating, depositing into, withdrawing from,
 * sponsoring, granting access to, and revoking access from gas pools.
 *
 * @example
 * ```typescript
 * const gasPools = new GasPools({ network: "MAINNET" });
 *
 * // Get gas pool details
 * const pool = await gasPools.getPool({
 *   walletAddress: "0x..."
 * });
 *
 * // Build a deposit transaction
 * const { tx } = await gasPools.getDepositTx({
 *   walletAddress: "0x...",
 *   depositAmount: 100_000_000n
 * });
 * ```
 */
declare class GasPools extends Caller {
    readonly api?: AftermathApi | undefined;
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetches the gas pool details for a given wallet address.
     *
     * @param inputs - {@link ApiGasPoolBody}
     * @returns {@link ApiGasPoolResponse} containing pool ID, balance, and whitelisted addresses.
     */
    getPool(inputs: ApiGasPoolBody): Promise<ApiGasPoolResponse>;
    /**
     * Builds a transaction to create a new gas pool for the given wallet.
     *
     * When `deferShare` is `true`, the response includes `gasPoolArg` and
     * `sharePolicyArg` so you can compose additional commands (e.g. deposit,
     * grant) before calling {@link getShareTx} to finalize.
     *
     * @param inputs.walletAddress - Wallet address to create the gas pool for.
     * @param inputs.initialDepositAmount - Optional initial deposit amount in MIST.
     * @param inputs.deferShare - When true, returns args without sharing yet.
     * @param inputs.tx - Optional transaction to extend.
     * @returns `tx` plus optional `gasPoolArg` and `sharePolicyArg` when deferred.
     */
    getCreateTx(inputs: Omit<ApiGasPoolCreateBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiGasPoolCreateResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Builds a transaction to deposit into the gas pool.
     *
     * Supports SUI and non-SUI deposits. For non-SUI deposits, the input coin
     * is swapped into SUI via the Aftermath router before depositing.
     *
     * @param inputs.walletAddress - Wallet address submitting the deposit.
     * @param inputs.isSponsoredTx - Whether to build the transaction for sponsored gas. Defaults to false.
     * @param inputs.coinType - Coin type to deposit. Defaults to SUI.
     * @param inputs.amount - Amount to deposit (required when sourcing from wallet or for non-SUI).
     * @param inputs.coinArg - PTB coin argument to use as input (if omitted, sourced from wallet).
     * @param inputs.slippage - Slippage tolerance for non-SUI swaps (defaults to 0.01).
     * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
     * @param inputs.tx - Optional transaction to extend.
     * @returns {@link SdkTransactionResponse} with `tx`.
     */
    getDepositTx(inputs: Omit<ApiGasPoolDepositBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<SdkTransactionResponse>;
    /**
     * Builds a transaction to withdraw SUI from the gas pool.
     *
     * When `deferTransfer` is `true`, the withdrawn coin is not transferred.
     * Instead, `withdrawnCoinArg` is returned for further PTB composition.
     *
     * @param inputs.walletAddress - Wallet address submitting the withdrawal.
     * @param inputs.amount - Amount of SUI to withdraw in MIST.
     * @param inputs.recipientAddress - Optional recipient (defaults to `walletAddress`).
     * @param inputs.deferTransfer - When true, returns the withdrawn coin arg instead of transferring.
     * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
     * @param inputs.tx - Optional transaction to extend.
     * @returns `tx` plus optional `withdrawnCoinArg` when deferred.
     */
    getWithdrawTx(inputs: Omit<ApiGasPoolWithdrawBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiGasPoolWithdrawResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Builds a transaction to sponsor (rebate) the transaction sender
     * using SUI from the gas pool.
     *
     * @param inputs.walletAddress - Wallet address submitting the sponsor transaction.
     * @param inputs.amount - Amount of SUI to rebate in MIST.
     * @param inputs.tx - Optional transaction to extend.
     * @returns {@link SdkTransactionResponse} with `tx`.
     */
    getSponsorTx(inputs: Omit<ApiGasPoolSponsorBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<SdkTransactionResponse>;
    /**
     * Builds a transaction to grant another wallet access to the gas pool.
     *
     * @param inputs.walletAddress - Owner wallet address.
     * @param inputs.targetWalletAddress - Wallet address to grant access to.
     * @param inputs.gasPoolArg - Optional gas pool argument from a previously-built PTB command.
     * @param inputs.tx - Optional transaction to extend.
     * @returns {@link SdkTransactionResponse} with `tx`.
     */
    getGrantTx(inputs: Omit<ApiGasPoolGrantBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<SdkTransactionResponse>;
    /**
     * Builds a transaction to revoke another wallet's access to the gas pool.
     *
     * @param inputs.walletAddress - Owner wallet address.
     * @param inputs.targetWalletAddress - Wallet address to revoke access from.
     * @param inputs.tx - Optional transaction to extend.
     * @returns {@link SdkTransactionResponse} with `tx`.
     */
    getRevokeTx(inputs: Omit<ApiGasPoolRevokeBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<SdkTransactionResponse>;
    /**
     * Builds a transaction to share a gas pool that was created with `deferShare: true`.
     *
     * Use this after composing additional commands (deposit, grant, etc.) with
     * the `gasPoolArg` returned by {@link getCreateTx}.
     *
     * @param inputs.gasPoolArg - Gas pool argument from a deferred create.
     * @param inputs.sharePolicyArg - Share policy argument from a deferred create.
     * @param inputs.tx - Optional transaction to extend.
     * @returns {@link SdkTransactionResponse} with `tx`.
     */
    getShareTx(inputs: Omit<ApiGasPoolShareBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<SdkTransactionResponse>;
}

/**
 * The `Pool` class encapsulates all the functionality needed to interact
 * with a specific AMM pool on the Aftermath platform. It allows you to
 * calculate trade amounts, deposit/withdraw amounts, fetch transactions,
 * and retrieve on-chain statistics and event data.
 *
 * @example
 * ```typescript
 * const afSdk = await Aftermath.create({ network: "MAINNET" });
 *
 * const pools = afSdk.Pools();
 * const pool = await pools.getPool({ objectId: "0x..." });
 *
 * const stats = await pool.getStats();
 * const tradeTx = await pool.getTradeTransaction({
 *   walletAddress: "0x...",
 *   coinInType: "0x2::sui::SUI",
 *   coinInAmount: BigInt(1e9),
 *   coinOutType: "0x<yourCoin>",
 *   slippage: 0.01,
 * });
 * ```
 */
declare class Pool extends Caller {
    readonly pool: PoolObject;
    readonly api?: AftermathApi | undefined;
    /**
     * Internal margin of error used in trade calculations to prevent
     * exceeding maximum allowed percentages of pool balances.
     */
    private static readonly constants;
    /**
     * An optional cached object containing statistical data about the pool
     * (volume, fees, APR, etc.).
     */
    stats: PoolStats | undefined;
    /**
     * Creates a new instance of the `Pool` class for on-chain interaction.
     *
     * @param pool - The fetched `PoolObject` from Aftermath API or on-chain query.
     * @param config - Optional caller configuration (e.g., network, access token).
     * @param api - An optional `AftermathApi` instance for advanced transaction usage.
     */
    constructor(pool: PoolObject, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Builds or fetches a deposit transaction to add liquidity to this pool.
     * The resulting `Transaction` can be signed and submitted by the user.
     *
     * @param inputs - The deposit parameters including coin amounts, slippage, etc.
     * @returns A `Transaction` to deposit funds into the pool.
     *
     * @example
     * ```typescript
     * const depositTx = await pool.getDepositTransaction({
     *   walletAddress: "0x...",
     *   amountsIn: { "0x<coin>": BigInt(1000000) },
     *   slippage: 0.01,
     * });
     * ```
     */
    getDepositTransaction(inputs: ApiPoolDepositBody): Promise<Transaction>;
    /**
     * Builds or fetches a withdrawal transaction to remove liquidity from this pool.
     *
     * @param inputs - The parameters specifying how much LP is burned, desired coins out, slippage, etc.
     * @returns A `Transaction` to withdraw funds from the pool.
     *
     * @example
     * ```typescript
     * const withdrawTx = await pool.getWithdrawTransaction({
     *   walletAddress: "0x...",
     *   amountsOutDirection: {
     *     "0x<coin>": BigInt(500000),
     *   },
     *   lpCoinAmount: BigInt(1000000),
     *   slippage: 0.01,
     * });
     * ```
     */
    getWithdrawTransaction(inputs: ApiPoolWithdrawBody): Promise<Transaction>;
    /**
     * Builds or fetches a transaction to withdraw all coin types from this pool,
     * effectively "burning" an LP position in exchange for multiple coin outputs.
     *
     * @param inputs - The parameters specifying how much LP to burn.
     * @returns A `Transaction` to withdraw all coins from the pool in proportion.
     *
     * @example
     * ```typescript
     * const allCoinWithdrawTx = await pool.getAllCoinWithdrawTransaction({
     *   walletAddress: "0x...",
     *   lpCoinAmount: BigInt(500000),
     * });
     * ```
     */
    getAllCoinWithdrawTransaction(inputs: ApiPoolAllCoinWithdrawBody): Promise<Transaction>;
    /**
     * Builds or fetches a trade transaction to swap between two coin types in this pool.
     *
     * @param inputs - The trade parameters including coin in/out, amounts, slippage, etc.
     * @returns A `Transaction` that can be signed and executed for the swap.
     *
     * @example
     * ```typescript
     * const tradeTx = await pool.getTradeTransaction({
     *   walletAddress: "0x...",
     *   coinInType: "0x<coinA>",
     *   coinInAmount: BigInt(1000000),
     *   coinOutType: "0x<coinB>",
     *   slippage: 0.005,
     * });
     * ```
     */
    getTradeTransaction(inputs: ApiPoolTradeBody): Promise<Transaction>;
    /**
     * Builds a transaction to update the DAO fee percentage for this pool,
     * if it has a DAO fee configured. The user must own the appropriate
     * `daoFeePoolOwnerCap`.
     *
     * @param inputs - Includes user wallet, `daoFeePoolOwnerCapId`, and the new fee percentage.
     * @returns A `Transaction` that can be signed to update the DAO fee on chain.
     * @throws If this pool has no DAO fee configuration.
     *
     * @example
     * ```typescript
     * const tx = await pool.getUpdateDaoFeeTransaction({
     *   walletAddress: "0x...",
     *   daoFeePoolOwnerCapId: "0x<capId>",
     *   newFeePercentage: 0.01, // 1%
     * });
     * ```
     */
    getUpdateDaoFeeTransaction(inputs: {
        walletAddress: SuiAddress;
        daoFeePoolOwnerCapId: ObjectId;
        newFeePercentage: Percentage;
    }): Promise<Transaction>;
    /**
     * Builds a transaction to update the DAO fee recipient for this pool,
     * if it has a DAO fee configured. The user must own the appropriate
     * `daoFeePoolOwnerCap`.
     *
     * @param inputs - Includes user wallet, `daoFeePoolOwnerCapId`, and the new fee recipient.
     * @returns A `Transaction` that can be signed to update the DAO fee recipient on chain.
     * @throws If this pool has no DAO fee configuration.
     *
     * @example
     * ```typescript
     * const tx = await pool.getUpdateDaoFeeRecipientTransaction({
     *   walletAddress: "0x...",
     *   daoFeePoolOwnerCapId: "0x<capId>",
     *   newFeeRecipient: "0x<recipient>",
     * });
     * ```
     */
    getUpdateDaoFeeRecipientTransaction(inputs: {
        walletAddress: SuiAddress;
        daoFeePoolOwnerCapId: ObjectId;
        newFeeRecipient: SuiAddress;
    }): Promise<Transaction>;
    /**
     * Fetches comprehensive pool statistics (volume, TVL, fees, APR, etc.) from the Aftermath API.
     * Also caches the result in `this.stats`.
     *
     * @returns A promise resolving to `PoolStats` object.
     *
     * @example
     * ```typescript
     * const stats = await pool.getStats();
     * console.log(stats.volume, stats.fees, stats.apr);
     * ```
     */
    getStats(): Promise<PoolStats>;
    /**
     * Caches the provided stats object into `this.stats`.
     *
     * @param stats - The `PoolStats` object to store.
     */
    setStats(stats: PoolStats): void;
    /**
     * Fetches an array of volume data points for a specified timeframe.
     * This is often used for charting or historical references.
     *
     * @param inputs - Contains a `timeframe` key, such as `"1D"` or `"1W"`.
     * @returns A promise resolving to an array of `PoolDataPoint`.
     *
     * @example
     * ```typescript
     * const volumeData = await pool.getVolumeData({ timeframe: "1D" });
     * console.log(volumeData); // e.g. [{ time: 1686000000, value: 123.45 }, ...]
     * ```
     */
    getVolumeData(inputs: {
        timeframe: PoolGraphDataTimeframeKey;
    }): Promise<PoolDataPoint[]>;
    /**
     * Fetches an array of fee data points for a specified timeframe.
     *
     * @param inputs - Contains a `timeframe` key, e.g., `"1D"` or `"1W"`.
     * @returns A promise resolving to an array of `PoolDataPoint`.
     *
     * @example
     * ```typescript
     * const feeData = await pool.getFeeData({ timeframe: "1D" });
     * console.log(feeData);
     * ```
     */
    getFeeData(inputs: {
        timeframe: PoolGraphDataTimeframeKey;
    }): Promise<PoolDataPoint[]>;
    /**
     * Retrieves the 24-hour volume for this specific pool.
     *
     * @returns A promise resolving to a number (volume in 24h).
     *
     * @example
     * ```typescript
     * const vol24h = await pool.getVolume24hrs();
     * console.log("Pool 24h Volume:", vol24h);
     * ```
     */
    getVolume24hrs: () => Promise<number>;
    /**
     * Fetches user interaction events (deposit/withdraw) with this pool, optionally paginated.
     *
     * @param inputs - Includes user `walletAddress` and optional pagination fields.
     * @returns A promise that resolves to `PoolDepositEvent | PoolWithdrawEvent` objects with a cursor if more exist.
     *
     * @example
     * ```typescript
     * const events = await pool.getInteractionEvents({ walletAddress: "0x...", limit: 10 });
     * console.log(events.events, events.nextCursor);
     * ```
     */
    getInteractionEvents(inputs: ApiIndexerEventsBody & {
        walletAddress: SuiAddress;
    }): Promise<IndexerEventsWithCursor<PoolDepositEvent | PoolWithdrawEvent>>;
    /**
     * Calculates the instantaneous spot price for swapping from `coinInType`
     * to `coinOutType` within this pool. Optionally includes fees in the price.
     *
     * @param inputs - Object specifying input coin, output coin, and a boolean for `withFees`.
     * @returns The numerical spot price (float).
     *
     * @example
     * ```typescript
     * const price = pool.getSpotPrice({
     *   coinInType: "0x<coinA>",
     *   coinOutType: "0x<coinB>",
     *   withFees: true,
     * });
     * console.log("Spot Price:", price);
     * ```
     */
    getSpotPrice: (inputs: {
        coinInType: CoinType;
        coinOutType: CoinType;
        withFees?: boolean;
    }) => number;
    /**
     * Calculates how much output coin you would receive when trading
     * a given input coin and amount in this pool, factoring in protocol
     * and optional DAO fees.
     *
     * @param inputs - Includes `coinInType`, `coinInAmount`, and `coinOutType`.
     * @returns A bigint representing how many output coins you'd get.
     * @throws Error if the trade amount is too large relative to the pool balance.
     *
     * @example
     * ```typescript
     * const amountOut = pool.getTradeAmountOut({
     *   coinInType: "0x<coinA>",
     *   coinInAmount: BigInt(1000000),
     *   coinOutType: "0x<coinB>",
     * });
     * ```
     */
    getTradeAmountOut: (inputs: {
        coinInType: CoinType;
        coinInAmount: Balance;
        coinOutType: CoinType;
        referral?: boolean;
    }) => Balance;
    /**
     * Calculates how much input coin is required to obtain a certain output coin amount
     * from this pool, factoring in fees.
     *
     * @param inputs - Includes `coinInType`, desired `coinOutAmount`, and `coinOutType`.
     * @returns A bigint representing the needed input amount.
     * @throws Error if the desired output is too large relative to pool balances.
     *
     * @example
     * ```typescript
     * const amountIn = pool.getTradeAmountIn({
     *   coinInType: "0x<coinA>",
     *   coinOutAmount: BigInt(1000000),
     *   coinOutType: "0x<coinB>"
     * });
     * ```
     */
    getTradeAmountIn: (inputs: {
        coinInType: CoinType;
        coinOutAmount: Balance;
        coinOutType: CoinType;
        referral?: boolean;
    }) => Balance;
    /**
     * Calculates how many LP tokens you receive for providing liquidity
     * in specific coin amounts. Also returns a ratio for reference.
     *
     * @param inputs - Contains the amounts in for each coin in the pool.
     * @returns An object with `lpAmountOut` and `lpRatio`.
     *
     * @example
     * ```typescript
     * const depositCalc = pool.getDepositLpAmountOut({
     *   amountsIn: { "0x<coinA>": BigInt(1000000), "0x<coinB>": BigInt(500000) },
     * });
     * console.log(depositCalc.lpAmountOut, depositCalc.lpRatio);
     * ```
     */
    getDepositLpAmountOut: (inputs: {
        amountsIn: CoinsToBalance;
        referral?: boolean;
    }) => {
        lpAmountOut: Balance;
        lpRatio: number;
    };
    /**
     * Calculates how many coins a user will receive when withdrawing a specific ratio or LP amount.
     * This method is used in multi-coin withdrawals where you specify how much of each coin you want.
     *
     * @param inputs - The LP ratio and an object specifying direction amounts for each coin.
     * @returns A `CoinsToBalance` object with final amounts out, factoring in DAO fees.
     *
     * @example
     * ```typescript
     * const outAmounts = pool.getWithdrawAmountsOut({
     *   lpRatio: 0.1,
     *   amountsOutDirection: { "0x<coinA>": BigInt(500000) },
     * });
     * console.log(outAmounts);
     * ```
     */
    getWithdrawAmountsOut: (inputs: {
        lpRatio: number;
        amountsOutDirection: CoinsToBalance;
        referral?: boolean;
    }) => CoinsToBalance;
    /**
     * A simplified multi-coin withdraw approach: calculates all outputs by proportion of the
     * user's LP share among selected coin types. Useful for approximate or "blind" all-coin out logic.
     *
     * @param inputs - Contains the `lpCoinAmountIn` to burn, and which coin types to receive.
     * @returns A record mapping coin type => final amounts out.
     */
    getWithdrawAmountsOutSimple: (inputs: {
        lpCoinAmountIn: Balance;
        coinTypesOut: CoinType[];
        referral?: boolean;
    }) => CoinsToBalance;
    /**
     * Calculates how many coins you get when withdrawing **all** coin types from the pool,
     * given a ratio. This is typically used for proportionate withdrawal.
     *
     * @param inputs - Includes `lpRatio`, the portion of your LP to burn (0 < ratio < 1).
     * @returns A record of coin type => amounts out, after factoring in any fees.
     *
     * @example
     * ```typescript
     * const allOut = pool.getAllCoinWithdrawAmountsOut({ lpRatio: 0.1 });
     * console.log(allOut); // amounts for each coin
     * ```
     */
    getAllCoinWithdrawAmountsOut: (inputs: {
        lpRatio: number;
        referral?: boolean;
    }) => CoinsToBalance;
    /**
     * For multi-coin withdraw, calculates the ratio of how much LP you are burning
     * relative to the total supply. e.g. if user burns 100 of 1000 supply => ratio 0.1.
     *
     * @param inputs - Contains the `lpCoinAmountIn` to burn.
     * @returns A float ratio (0 < ratio < 1).
     */
    getMultiCoinWithdrawLpRatio: (inputs: {
        lpCoinAmountIn: bigint;
    }) => number;
    /**
     * For an all-coin withdraw, calculates the ratio of how much LP is burned
     * relative to total supply. e.g. if user burns 50 of 200 supply => ratio 0.25.
     *
     * @param inputs - Contains the `lpCoinAmountIn`.
     * @returns A float ratio, typically 0 < ratio < 1.
     */
    getAllCoinWithdrawLpRatio: (inputs: {
        lpCoinAmountIn: bigint;
    }) => number;
    /**
     * Returns an array of coin types in ascending lexicographic order
     * for the coins contained in this pool.
     *
     * @returns An array of coin type strings.
     */
    coins: () => CoinType[];
    /**
     * Returns an array of `PoolCoin` objects, one for each coin in this pool,
     * sorted lexicographically by coin type.
     *
     * @returns An array of `PoolCoin`.
     */
    poolCoins: () => PoolCoin[];
    /**
     * Returns an array of `[CoinType, PoolCoin]` pairs, sorted by coin type.
     *
     * @returns An array of coin-type => `PoolCoin` pairs.
     */
    poolCoinEntries: () => [CoinType, PoolCoin][];
    /**
     * Returns the current DAO fee percentage, if configured (0 < fee <= 100%).
     *
     * @returns A decimal fraction representing the fee (e.g., 0.01 = 1%) or `undefined`.
     */
    daoFeePercentage: () => Percentage | undefined;
    /**
     * Returns the Sui address that currently receives the DAO fee portion of
     * pool trades, or `undefined` if no DAO fee is configured.
     *
     * @returns The DAO fee recipient address.
     */
    daoFeeRecipient: () => SuiAddress | undefined;
    /**
     * Applies the DAO fee (if present) to a given `amount`, effectively reducing
     * that amount by the fee fraction. e.g. if fee is 2%, it returns 98% of the input.
     *
     * @param inputs - Contains `amount` as a bigint.
     * @returns The post-fee amount as a bigint.
     */
    private readonly getAmountWithDAOFee;
    /**
     * The inverse operation of `getAmountWithDAOFee`, used in internal calculations
     * when we need to back out how much input was needed prior to the fee cut.
     *
     * @param inputs - Contains `amount` as a bigint.
     * @returns The pre-fee amount as a bigint.
     */
    private readonly getAmountWithoutDAOFee;
    /**
     * Provides an instance of the Pools provider from `AftermathApi`.
     * Throws an error if not defined.
     */
    private readonly poolsApi;
}

/**
 * The `Pools` class provides a high-level interface for interacting with
 * Aftermath Finance liquidity pools. It allows fetching individual or multiple
 * pools, managing liquidity pool tokens (LP tokens), and creating new pools
 * if you have the required privileges.
 *
 * @example
 * ```typescript
 * const afSdk = await Aftermath.create({ network: "MAINNET" });
 *
 * const pools = afSdk.Pools();
 *
 * // Fetch a single pool
 * const pool = await pools.getPool({ objectId: "0x<poolId>" });
 *
 * // Fetch multiple pools
 * const poolArray = await pools.getPools({ objectIds: ["0x<id1>", "0x<id2>"] });
 * ```
 */
declare class Pools extends Caller {
    readonly api?: AftermathApi | undefined;
    /**
     * Static constants relevant to the pool logic, such as protocol fees,
     * referral percentages, and bounds for trading/withdrawal percentages.
     */
    static readonly constants: {
        /**
         * Protocol fee structure: `totalProtocol` is the fraction of trades
         * that is taken as a fee, which is split among `treasury`, `insuranceFund`,
         * and `devWallet` in the given proportions.
         */
        feePercentages: {
            /**
             * The total fraction (as a decimal) of trades charged by the protocol.
             * e.g., 0.00005 => 0.005%.
             */
            totalProtocol: number;
            /**
             * The fraction of `totalProtocol` allocated to the treasury.
             */
            treasury: number;
            /**
             * The fraction of `totalProtocol` allocated to the insurance fund.
             */
            insuranceFund: number;
            /**
             * The fraction of `totalProtocol` allocated to the dev wallet.
             */
            devWallet: number;
        };
        /**
         * Referral fee structures, applying a discount/rebate to the user and
         * referrer, taken from the treasury portion of protocol fees.
         */
        referralPercentages: {
            /**
             * The fraction of the treasury portion that discounts the user's fee.
             */
            discount: number;
            /**
             * The fraction of the treasury portion that acts as a rebate to the referrer.
             */
            rebate: number;
        };
        /**
         * Various bounds used to prevent extreme trades or invalid pool configurations.
         */
        bounds: {
            /**
             * Maximum number of distinct coins allowed in a single pool.
             */
            maxCoinsInPool: number;
            /**
             * Maximum fraction (decimal) of a pool's balance that can be traded at once.
             */
            maxTradePercentageOfPoolBalance: number;
            /**
             * Maximum fraction (decimal) of a pool's balance that can be withdrawn at once.
             */
            maxWithdrawPercentageOfPoolBalance: number;
            /**
             * Minimum and maximum swap fees (0.01% to 10%).
             */
            minSwapFee: number;
            maxSwapFee: number;
            /**
             * Minimum and maximum coin weight for weighted pools (1% to 99%).
             */
            minWeight: number;
            maxWeight: number;
            /**
             * Minimum and maximum DAO fee (0% to 100%).
             */
            minDaoFee: number;
            maxDaoFee: number;
        };
        /**
         * Default parameter(s) used in the absence of explicit user or code settings.
         */
        defaults: {
            /**
             * Default decimals for LP coins if none are specified.
             */
            lpCoinDecimals: number;
        };
    };
    /**
     * Creates a new `Pools` instance for querying and managing AMM pools on Aftermath.
     *
     * @param config - Optional configuration object specifying network or access token.
     * @param api - An optional `AftermathApi` instance providing advanced transaction building.
     */
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetches a single pool by its on-chain `objectId` and returns a new `Pool` instance.
     *
     * @param inputs - An object containing `objectId`.
     * @returns A promise that resolves to a `Pool` instance.
     *
     * @example
     * ```typescript
     * const pool = await pools.getPool({ objectId: "0x<poolId>" });
     * console.log(pool.pool.lpCoinType, pool.pool.name);
     * ```
     */
    getPool(inputs: {
        objectId: ObjectId;
    }): Promise<Pool>;
    /**
     * Fetches multiple pools by their on-chain `objectIds` and returns an array of `Pool` instances.
     *
     * @param inputs - An object containing an array of `objectIds`.
     * @returns A promise that resolves to an array of `Pool` instances.
     *
     * @example
     * ```typescript
     * const poolArray = await pools.getPools({ objectIds: ["0x<id1>", "0x<id2>"] });
     * console.log(poolArray.length);
     * ```
     */
    getPools(inputs: {
        objectIds: ObjectId[];
    }): Promise<Pool[]>;
    /**
     * Retrieves all pools recognized by the Aftermath API, returning an array of `Pool` objects.
     *
     * @returns An array of `Pool` instances.
     *
     * @example
     * ```typescript
     * const allPools = await pools.getAllPools();
     * console.log(allPools.map(p => p.pool.name));
     * ```
     */
    getAllPools(): Promise<Pool[]>;
    /**
     * Fetches information about all owned LP coins for a given wallet address.
     * This indicates the user's liquidity positions across multiple pools.
     *
     * @param inputs - An object containing the `walletAddress`.
     * @returns An array of `PoolLpInfo` objects summarizing the user's LP balances.
     *
     * @example
     * ```typescript
     * const lpCoins = await pools.getOwnedLpCoins({ walletAddress: "0x<address>" });
     * console.log(lpCoins);
     * ```
     */
    getOwnedLpCoins(inputs: {
        walletAddress: SuiAddress;
    }): Promise<PoolLpInfo[]>;
    /**
     * Constructs or fetches a transaction to publish a new LP coin package,
     * typically used by advanced users or devs establishing new liquidity pools.
     *
     * @param inputs - Includes the user `walletAddress` and the `lpCoinDecimals`.
     * @returns A transaction object (or data) that can be signed and published to Sui.
     *
     * @example
     * ```typescript
     * const publishTx = await pools.getPublishLpCoinTransaction({
     *   walletAddress: "0x<address>",
     *   lpCoinDecimals: 9
     * });
     * ```
     */
    getPublishLpCoinTransaction(inputs: ApiPublishLpCoinBody): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Constructs a transaction to create a brand new pool on-chain, given coin types,
     * initial weights, fees, and possible DAO fee info.
     *
     * @param inputs - The body describing how to form the new pool.
     * @returns A transaction object that can be signed and executed.
     *
     * @example
     * ```typescript
     * const createPoolTx = await pools.getCreatePoolTransaction({
     *   walletAddress: "0x<address>",
     *   lpCoinType: "0x<lpCoin>",
     *   lpCoinMetadata: {
     *     name: "MyPool LP",
     *     symbol: "MYPLP"
     *   },
     *   coinsInfo: [
     *     {
     *       coinType: "0x<coinA>",
     *       weight: 0.5,
     *       decimals: 9,
     *       tradeFeeIn: 0.003,
     *       initialDeposit: 1_000_000_000n
     *     },
     *     // ...
     *   ],
     *   poolName: "My Weighted Pool",
     *   createPoolCapId: "0x<capId>",
     *   respectDecimals: true,
     * });
     * ```
     */
    getCreatePoolTransaction(inputs: ApiCreatePoolBody): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Retrieves the on-chain pool object ID corresponding to a specific LP coin type.
     *
     * @param inputs - Contains the `lpCoinType` string.
     * @returns The pool object ID if it exists.
     *
     * @example
     * ```typescript
     * const poolId = await pools.getPoolObjectIdForLpCoinType({
     *   lpCoinType: "0x<lpCoinType>"
     * });
     * console.log(poolId);
     * ```
     */
    getPoolObjectIdForLpCoinType: (inputs: {
        lpCoinType: CoinType;
    }) => Promise<(string | undefined)[]>;
    /**
     * Retrieves multiple pool object IDs given an array of LP coin types.
     * If a given LP coin type has no associated pool, it might return `undefined`.
     *
     * @param inputs - Contains an array of `lpCoinTypes`.
     * @returns An array of `ObjectId | undefined` of matching length.
     *
     * @example
     * ```typescript
     * const poolIds = await pools.getPoolObjectIdsForLpCoinTypes({
     *   lpCoinTypes: ["0x<lpCoinA>", "0x<lpCoinB>"]
     * });
     * console.log(poolIds);
     * ```
     */
    getPoolObjectIdsForLpCoinTypes(inputs: ApiPoolObjectIdForLpCoinTypeBody): Promise<(ObjectId | undefined)[]>;
    /**
     * Checks if a given coin type is recognized as an LP coin.
     * Internally calls `getPoolObjectIdForLpCoinType`.
     *
     * @param inputs - Contains the `lpCoinType` to check.
     * @returns `true` if the coin is an LP token, `false` otherwise.
     */
    isLpCoinType: (inputs: {
        lpCoinType: CoinType;
    }) => Promise<boolean>;
    /**
     * Retrieves the total volume across all pools in the last 24 hours.
     *
     * @returns A promise resolving to a numeric volume (e.g., in USD).
     *
     * @example
     * ```typescript
     * const totalVol24 = await pools.getTotalVolume24hrs();
     * console.log("Protocol-wide 24h volume:", totalVol24);
     * ```
     */
    getTotalVolume24hrs: () => Promise<number>;
    /**
     * Retrieves the total value locked (TVL) across all or specific pool IDs.
     *
     * @param inputs - Optionally provide an array of specific `poolIds`. If omitted, returns global TVL.
     * @returns A promise resolving to a numeric TVL (e.g., in USD).
     *
     * @example
     * ```typescript
     * const allTvl = await pools.getTVL();
     * const subsetTvl = await pools.getTVL({ poolIds: ["0x<id1>", "0x<id2>"] });
     * ```
     */
    getTVL(inputs?: {
        poolIds?: ObjectId[];
    }): Promise<number>;
    /**
     * Fetches an array of `PoolStats` objects for a given set of pools,
     * including volume, fees, TVL, and other metrics.
     *
     * @param inputs - Must include an array of `poolIds`.
     * @returns An array of `PoolStats` in matching order.
     *
     * @example
     * ```typescript
     * const stats = await pools.getPoolsStats({ poolIds: ["0x<id1>", "0x<id2>"] });
     * console.log(stats[0].volume, stats[1].tvl);
     * ```
     */
    getPoolsStats(inputs: ApiPoolsStatsBody): Promise<PoolStats[]>;
    /**
     * Returns all DAO fee pool owner capabilities owned by a particular user.
     * This is used to see which pools' DAO fees the user can update.
     *
     * @param inputs - An object with user `walletAddress`.
     * @returns Data about each `DaoFeePoolOwnerCapObject` the user owns.
     *
     * @example
     * ```typescript
     * const daoCaps = await pools.getOwnedDaoFeePoolOwnerCaps({
     *   walletAddress: "0x<address>"
     * });
     * console.log(daoCaps);
     * ```
     */
    getOwnedDaoFeePoolOwnerCaps(inputs: ApiPoolsOwnedDaoFeePoolOwnerCapsBody): Promise<DaoFeePoolOwnerCapObject[]>;
    /**
     * Fetches user-specific interaction events (deposits, withdrawals) across pools,
     * optionally with pagination.
     *
     * @param inputs - An object containing `walletAddress`, plus optional pagination (`cursor`, `limit`).
     * @returns An event set with a cursor for further queries if available.
     *
     * @example
     * ```typescript
     * const userEvents = await pools.getInteractionEvents({
     *   walletAddress: "0x...",
     *   limit: 10,
     * });
     * console.log(userEvents.events, userEvents.nextCursor);
     * ```
     */
    getInteractionEvents(inputs: ApiIndexerEventsBody & {
        walletAddress: SuiAddress;
    }): Promise<IndexerEventsWithCursor<PoolDepositEvent | PoolWithdrawEvent>>;
    /**
     * Returns how much coin remains **after** applying the protocol fees
     * (and referral discount if `withReferral` is `true`).
     *
     * @param inputs - The original `amount` and an optional referral flag.
     * @returns The post-fee (net) amount as a bigint.
     *
     * @example
     * ```typescript
     * const netAmount = Pools.getAmountWithProtocolFees({ amount: 1_000_000n });
     * ```
     */
    static getAmountWithProtocolFees: (inputs: {
        amount: Balance;
        withReferral?: boolean;
    }) => bigint;
    /**
     * The inverse calculation: given a net amount (post-fees), figure out
     * the original gross amount. Used when we already have fees subtracted
     * but need to restore an original quantity.
     *
     * @param inputs - The net `amount` after fees, plus an optional referral flag.
     * @returns The original gross amount as a bigint.
     */
    static getAmountWithoutProtocolFees: (inputs: {
        amount: Balance;
        withReferral?: boolean;
    }) => bigint;
    /**
     * A helper to transform a user-provided slippage fraction, e.g. 0.01,
     * into a 1 - slippage format, if needed for certain math operations.
     *
     * @param slippage - The decimal fraction of slippage tolerance, e.g. 0.01 => 1%.
     * @returns A big integer representing `1 - slippage` in a fixed context.
     */
    static normalizeInvertSlippage: (slippage: Slippage) => bigint;
    /**
     * Produces a user-friendly string for an LP coin type, e.g. "Sui Coin LP"
     * by analyzing the coin type symbol. Typically used in UIs or logs.
     *
     * @param lpCoinType - The coin type for the LP token.
     * @returns A string representation for display, e.g. "Af_lp_abc" => "Abc LP".
     */
    static displayLpCoinType: (lpCoinType: CoinType) => string;
    /**
     * A quick heuristic check to see if the given `lpCoinType` string
     * might represent an Aftermath LP token. This is not a full on-chain validation.
     *
     * @param inputs - An object containing `lpCoinType`.
     * @returns `true` if it matches a known pattern; otherwise `false`.
     */
    static isPossibleLpCoinType: (inputs: {
        lpCoinType: CoinType;
    }) => boolean;
    /**
     * Provides a typed reference to the `Pools` part of the `AftermathApi`,
     * throwing an error if not defined.
     */
    private readonly poolsApi;
}

declare class NftAmmMarket extends Caller {
    readonly market: NftAmmMarketObject;
    private readonly api?;
    pool: Pool;
    constructor(market: NftAmmMarketObject, config?: CallerConfig, api?: AftermathApi | undefined);
    getNfts(inputs: {
        cursor?: ObjectId;
        limit?: number;
    }): Promise<DynamicFieldObjectsWithCursor<Nft>>;
    getBuyTransaction(inputs: ApiNftAmmBuyBody): Promise<Transaction>;
    getSellTransaction(inputs: ApiNftAmmSellBody): Promise<Transaction>;
    getDepositTransaction(inputs: ApiNftAmmDepositBody): Promise<Transaction>;
    getWithdrawTransaction(inputs: ApiNftAmmWithdrawBody): Promise<Transaction>;
    getNftSpotPriceInAssetCoin: (inputs?: {
        withFees: boolean;
    }) => Balance;
    getFractionalizedCoinToAssetCoinSpotPrice: (inputs?: {
        withFees: boolean;
    }) => number;
    getAssetCoinToFractionalizeCoinSpotPrice: (inputs?: {
        withFees: boolean;
    }) => number;
    getBuyAssetCoinAmountIn: (inputs: {
        nftsCount: number;
        referral?: boolean;
    }) => Balance;
    getSellAssetCoinAmountOut: (inputs: {
        nftsCount: number;
        referral?: boolean;
    }) => Balance;
    getDepositLpCoinAmountOut: (inputs: {
        assetCoinAmountIn: Balance;
        referral?: boolean;
    }) => {
        lpAmountOut: Balance;
        lpRatio: number;
    };
    getWithdrawFractionalizedCoinAmountOut: (inputs: {
        lpCoinAmount: Balance;
        referral?: boolean;
    }) => Balance;
    getWithdrawNftsCountOut: (inputs: {
        lpCoinAmount: Balance;
        referral?: boolean;
    }) => bigint;
    private readonly nftAmmApi;
}

declare class NftAmm extends Caller {
    readonly api?: AftermathApi | undefined;
    static readonly constants: {};
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    getMarket(inputs: {
        objectId: ObjectId;
    }): Promise<NftAmmMarket>;
    getMarkets(inputs: {
        objectIds: ObjectId[];
    }): Promise<NftAmmMarket[]>;
    getAllMarkets(): Promise<NftAmmMarket[]>;
}

/**
 * Note on “refreshing” account state:
 *
 * This class is a thin wrapper around a snapshot of {@link PerpetualsAccountObject}
 * that is typically fetched via {@link Perpetuals.getAccount}. The transaction builders
 * use the current snapshot to derive fields like `hasPosition` and to construct
 * SL/TP helpers that depend on the position side.
 *
 * If your app is long-lived, you may want to periodically re-fetch the account
 * (and recreate this wrapper) to avoid stale local position/order state. For example:
 * - After placing/canceling orders
 * - After fills/liquidations/funding settlements
 * - After switching markets or wallets
 */
/**
 * High-level wrapper around a single Perpetuals account or vault account.
 *
 * This class encapsulates:
 *
 * - Transaction builders for:
 *   - Collateral actions (deposit, withdraw, allocate, deallocate, transfer)
 *   - Orders (market/limit, cancel, stop orders, SL/TP, set leverage)
 * - Read-only account helpers:
 *   - Stop-order message signing
 *   - Order & stop-order metadata
 *   - Collateral & trade history
 * - Convenience helpers to:
 *   - Fetch and categorize SL/TP stop orders
 *   - Resolve account/vault identifiers and owner addresses
 *
 * You typically do not construct `PerpetualsAccount` directly. Instead, use
 * {@link Perpetuals.getAccount} or {@link Perpetuals.getAccounts}, which
 * fetch all required on-chain data and wrap it for you:
 *
 * ```ts
 * const afSdk = await Aftermath.create({ network: "MAINNET" });
 *
 * const perps = afSdk.Perpetuals();
 * const [accountCap] = await perps.getOwnedAccountCaps({
 *   walletAddress: "0x...",
 * });
 *
 * const account = await perps.getAccount({ accountCap });
 *
 * // Build a deposit transaction
 * const depositTx = await account.getDepositCollateralTx({
 *   depositAmount: BigInt("1000000000"),
 * });
 * ```
 */
declare class PerpetualsAccount extends Caller {
    readonly account: PerpetualsAccountObject;
    readonly accountCap: PerpetualsAccountCap | PerpetualsPartialVaultCap;
    readonly api?: AftermathApi | undefined;
    /**
     * If this account is backed by a vault, this holds the vault object ID.
     * Otherwise, `undefined` for "direct" user accounts.
     *
     * This is used primarily to route requests to either:
     * - `/perpetuals/account/...` endpoints, or
     * - `/perpetuals/vault/...` endpoints.
     */
    private readonly vaultId;
    /**
     * Create a new {@link PerpetualsAccount} wrapper.
     *
     * @param account - Raw account object with positions and equity data.
     * @param accountCap - Account cap or partial vault cap object containing
     *   ownership and collateral metadata.
     * @param config - Optional {@link CallerConfig} (network, auth, etc.).
     * @param api - Optional shared {@link AftermathApi} provider instance
     *   used to derive serialized transaction kinds (`txKind`) from
     *   {@link Transaction} objects.
     */
    constructor(account: PerpetualsAccountObject, accountCap: PerpetualsAccountCap | PerpetualsPartialVaultCap, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Build a `deposit-collateral` transaction for this account.
     *
     * For non-vault accounts, this endpoint constructs a transaction that:
     * - Optionally extends an existing {@link Transaction}, and
     * - Deposits collateral into the Perpetuals account.
     *
     * **Note:** Vault accounts are currently not supported and will throw.
     *
     * @param inputs.tx - Optional existing transaction to extend. If omitted,
     *   a new {@link Transaction} is created under the hood.
     * @param inputs.isSponsoredTx - Optional flag indicating whether the
     *   transaction is gas-sponsored.
     * @param inputs.depositAmount - Amount of collateral to deposit, if paying
     *   directly from the wallet.
     * @param inputs.depositCoinArg - Transaction object argument referencing a
     *   coin to deposit (mutually exclusive with `depositAmount`).
     *
     * @returns Transaction response containing a `tx`.
     *
     * @example
     * ```ts
     * const { tx } = await account.getDepositCollateralTx({
     *   depositAmount: BigInt("1000000000"),
     * });
     * ```
     */
    getDepositCollateralTx(inputs: {
        tx?: Transaction;
        isSponsoredTx?: boolean;
        sponsor?: PerpetualsSponsorConfig;
    } & ({
        depositAmount: Balance;
    } | {
        depositCoinArg: TransactionObjectArgument;
    })): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `withdraw-collateral` transaction for this account.
     *
     * For non-vault accounts, this endpoint constructs a transaction to:
     * - Withdraw collateral from the Perpetuals account, and
     * - Optionally transfer it to a `recipientAddress` (otherwise coin is left
     *   as a transaction argument).
     *
     * **Note:** Vault accounts are currently not supported and will throw.
     *
     * @param inputs.withdrawAmount - Amount of collateral to withdraw.
     * @param inputs.recipientAddress - Optional address to receive the withdrawn
     *   coins directly.
     * @param inputs.tx - Optional transaction to extend (defaults to new `Transaction()`).
     *
     * @returns A response containing `tx` and the `coinOutArg` where the
     *   withdrawn coins end up if `recipientAddress` is not used.
     *
     * @example
     * ```ts
     * const { tx, coinOutArg } = await account.getWithdrawCollateralTx({
     *   withdrawAmount: BigInt("1000000000"),
     * });
     * ```
     */
    getWithdrawCollateralTx(inputs: {
        withdrawAmount: Balance;
        recipientAddress?: SuiAddress;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiPerpetualsWithdrawCollateralResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an `allocate-collateral` transaction, moving collateral from this
     * account into a specific market (clearing house).
     *
     * Works for both account-backed and vault-backed accounts.
     *
     * @param inputs.marketId - Market to allocate collateral to.
     * @param inputs.allocateAmount - Amount of collateral to allocate.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing a `tx`.
     */
    getAllocateCollateralTx(inputs: {
        marketId: PerpetualsMarketId;
        allocateAmount: Balance;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `deallocate-collateral` transaction, moving collateral from a
     * specific market back to this account.
     *
     * Works for both account-backed and vault-backed accounts.
     *
     * @param inputs.marketId - Market to deallocate collateral from.
     * @param inputs.deallocateAmount - Amount of collateral to deallocate.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing a `tx`.
     */
    getDeallocateCollateralTx(inputs: {
        marketId: PerpetualsMarketId;
        deallocateAmount: Balance;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `transfer-collateral` transaction between two Perpetuals accounts.
     *
     * Only supported for direct accounts, **not** vault-backed accounts.
     *
     * @param inputs.transferAmount - Amount of collateral to transfer.
     * @param inputs.toAccountId - Destination account ID.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing a `tx`.
     */
    getTransferCollateralTx(inputs: {
        transferAmount: Balance;
        toAccountId: PerpetualsAccountId;
        toAccountCapId?: ObjectId;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `place-market-order` transaction for this account.
     *
     * This is the primary entrypoint for opening/closing positions via market orders.
     * It automatically:
     * - Injects the account/vault identity into the payload.
     * - Derives `hasPosition` based on the current account state for the given market.
     * - Optionally attaches SL/TP stop orders via the `slTp` input.
     *
     * Important behavioral notes:
     * - `hasPosition` is derived from the local {@link PerpetualsAccountObject} snapshot.
     *   If the snapshot is stale, consider re-fetching the account first.
     * - For vault-backed accounts, the API routes to `/perpetuals/vault/...` and uses
     *   `vaultId` as the identity discriminator. For direct accounts, it uses `accountId`.
     *
     * @param inputs - See {@link SdkPerpetualsPlaceMarketOrderInputs} for details.
     *   Notably:
     *   - `marketId`, `side`, `size`, `collateralChange`, `reduceOnly`
     *   - Optional `leverage`
     *   - Optional `slTp` params
     *   - Optional `tx` to extend
     *
     * @returns Transaction response containing `tx`.
     *
     * @example
     * ```ts
     * const { tx } = await account.getPlaceMarketOrderTx({
     *   marketId: "0x...",
     *   side: PerpetualsOrderSide.Bid,
     *   size: BigInt("1000000000"),
     *   collateralChange: 10,
     *   reduceOnly: false,
     * });
     * ```
     */
    getPlaceMarketOrderTx(inputs: SdkPerpetualsPlaceMarketOrderInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `place-limit-order` transaction for this account.
     *
     * Similar to {@link getPlaceMarketOrderTx}, but uses limit order semantics:
     * - Requires `price` and `orderType`.
     * - Supports reduce-only flags, expiry, optional leverage, and SL/TP stop orders.
     *
     * Notes:
     * - `hasPosition` is derived from local account state; refresh the account if needed.
     * - This method does not validate tick/lot sizing locally; the API/on-chain
     *   will enforce market constraints.
     *
     * @param inputs - See {@link SdkPerpetualsPlaceLimitOrderInputs}.
     *
     * @returns Transaction response containing `tx`.
     */
    getPlaceLimitOrderTx(inputs: SdkPerpetualsPlaceLimitOrderInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `place-scale-order` transaction for this account.
     *
     * A scale order distributes a total size across multiple limit orders
     * evenly spaced between a start and end price. An optional `sizeSkew`
     * parameter controls whether the distribution is uniform or weighted.
     *
     * @param inputs - See {@link SdkPerpetualsPlaceScaleOrderInputs}.
     *
     * @returns Transaction response containing `tx`.
     */
    getPlaceScaleOrderTx(inputs: SdkPerpetualsPlaceScaleOrderInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `cancel-and-place-orders` transaction for this account.
     *
     * Atomically cancels existing orders and places new ones in a single
     * transaction. Useful for rebalancing order grids or replacing stale
     * orders without intermediate exposure.
     *
     * @param inputs - See {@link SdkPerpetualsCancelAndPlaceOrdersInputs}.
     *
     * @returns Transaction response containing `tx`.
     */
    getCancelAndPlaceOrdersTx(inputs: SdkPerpetualsCancelAndPlaceOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `cancel-orders` transaction for this account.
     *
     * Each market in `marketIdsToData` supplies:
     * - `orderIds`: the orders to cancel in that market
     * - `collateralChange`: collateral adjustment to apply alongside cancellation
     * - `leverage`: leverage context used for estimating/validating constraints server-side
     *
     * Notes:
     * - Cancels are applied per market; some markets may succeed while others fail
     *   depending on API/on-chain validation (returned as a transaction failure at execution).
     * - If you need to understand the effect prior to building a tx, use
     *   {@link getCancelOrdersPreview}.
     *
     * @param inputs.tx - Optional transaction to extend.
     * @param inputs.marketIdsToData - Mapping from market IDs to cancel payloads.
     *
     * @returns Transaction response containing `tx`.
     */
    getCancelOrdersTx(inputs: {
        tx?: Transaction;
        sponsor?: PerpetualsSponsorConfig;
        marketIdsToData: Record<PerpetualsMarketId, {
            orderIds: PerpetualsOrderId[];
            collateralChange: number;
        }>;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `cancel-stop-orders` transaction for this account.
     *
     * This cancels stop-order *objects/tickets* by their object IDs. These IDs are
     * returned by stop-order query endpoints (see {@link getStopOrderDatas}).
     *
     * @param inputs.tx - Optional transaction to extend.
     * @param inputs.stopOrderIds - Array of stop-order ticket IDs to cancel.
     *
     * @returns Transaction response containing `tx`.
     */
    getCancelStopOrdersTx(inputs: {
        tx?: Transaction;
        sponsor?: PerpetualsSponsorConfig;
        stopOrderIds: ObjectId[];
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `place-stop-orders` transaction for this account.
     *
     * This allows placing one or more stop orders in a single transaction,
     * optionally with a dedicated gas coin and a sponsored gas flag.
     *
     * Typical usage:
     * - Construct stop order payload(s) client-side
     * - Call this method to build a transaction kind
     * - Sign/execute the transaction via Sui
     *
     * @param inputs - See {@link SdkPerpetualsPlaceStopOrdersInputs}.
     *
     * @returns Transaction response containing `tx`.
     */
    getPlaceStopOrdersTx(inputs: SdkPerpetualsPlaceStopOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `place-sl-tp-orders` transaction for this account.
     *
     * This helper constructs SL/TP stop orders for an **existing** position
     * in a given market. If the account has no position for `marketId`, this
     * throws an error.
     *
     * Implementation details:
     * - Determines the current position side from the account snapshot.
     * - Sets `positionSide` for the API so SL/TP orders are bound to closing logic
     *   (i.e. they should trigger on the opposite side of the open position).
     *
     * @param inputs - See {@link SdkPerpetualsPlaceSlTpOrdersInputs}.
     *
     * @returns Transaction response containing `tx`.
     */
    getPlaceSlTpOrdersTx(inputs: SdkPerpetualsPlaceSlTpOrdersInputs): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an `edit-stop-orders` transaction for this account.
     *
     * This endpoint lets you update existing stop orders in batch.
     *
     * Notes:
     * - You must provide the full updated stop-order objects (including object IDs).
     * - This is typically used to adjust trigger prices, sizes, expiries, or the
     *   embedded limit-order parameters.
     *
     * @param inputs.stopOrders - Full updated stop-order payloads to apply.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getEditStopOrdersTx(inputs: Omit<ApiPerpetualsEditStopOrdersBody, "txKind" | "accountObjectId"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `set-leverage` transaction for a given market.
     *
     * This updates the effective leverage for the position (or potential position)
     * in `marketId`, and optionally adjusts collateral in tandem.
     *
     * Notes:
     * - Leverage changes may be constrained by protocol risk limits and current
     *   position state.
     * - If you want to understand the effect first, use {@link getSetLeveragePreview}.
     *
     * @param inputs.tx - Optional transaction to extend.
     * @param inputs.leverage - Target leverage value.
     * @param inputs.collateralChange - Net collateral change to apply alongside
     *   the leverage update.
     * @param inputs.marketId - Market whose leverage to adjust.
     *
     * @returns Transaction response containing `tx`.
     */
    getSetLeverageTx(inputs: {
        tx?: Transaction;
        leverage: number;
        collateralChange: number;
        marketId: PerpetualsMarketId;
        sponsor?: PerpetualsSponsorConfig;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a deterministic message payload to sign when querying stop orders
     * from the backend.
     *
     * This payload is intended to be signed off-chain and then submitted to
     * `getStopOrderDatas` as a proof of account ownership.
     *
     * Important:
     * - The returned payload is *not* a Sui transaction; it is an off-chain
     *   “authentication” message.
     * - The backend expects `account_id` to be a decimal string. This code
     *   normalizes the bigint `accountId` by stripping the trailing `n`.
     *
     * @param inputs.marketIds - Optional list of market IDs to scope the query.
     *
     * @returns An object describing the action and account/market IDs, suitable
     *   for message signing.
     *
     * @example
     * ```ts
     * const message = account.getStopOrdersMessageToSign({ marketIds: ["0x..."] });
     * const { signature } = await wallet.signMessage({
     *   message: new TextEncoder().encode(JSON.stringify(message)),
     * });
     * ```
     */
    getStopOrdersMessageToSign(inputs?: {
        marketIds: PerpetualsMarketId[];
    }): {
        action: string;
        account_id: string;
        clearing_house_ids: string[];
    };
    /**
     * Preview the effects of placing a market order (without building a tx).
     *
     * This is a read-only API call that runs the protocol’s pricing / margin /
     * slippage logic against the current market state and your account/vault context.
     *
     * @param inputs - See {@link SdkPerpetualsPlaceMarketOrderPreviewInputs}.
     * @param abortSignal - Optional `AbortSignal` to cancel the request.
     *
     * @returns Either an error message or a preview including:
     * - `updatedPosition`
     * - `priceSlippage`, `percentSlippage`
     * - `filledSize`, `filledSizeUsd`
     * - `postedSize`, `postedSizeUsd`
     * - `collateralChange`
     * - `executionPrice`
     */
    getPlaceMarketOrderPreview(inputs: SdkPerpetualsPlaceMarketOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
    /**
     * Preview the effects of placing a limit order (without building a tx).
     *
     * The preview simulates:
     * - How much size would execute immediately vs post to the book
     * - Expected slippage and execution price
     * - Resulting position and margin impact
     *
     * @param inputs - See {@link SdkPerpetualsPlaceLimitOrderPreviewInputs}.
     * @param abortSignal - Optional `AbortSignal` to cancel the request.
     *
     * @returns Either an error message or a preview object similar to
     *   {@link getPlaceMarketOrderPreview}.
     */
    getPlaceLimitOrderPreview(inputs: SdkPerpetualsPlaceLimitOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
    /**
     * Preview the effects of placing a scale order (without building a tx).
     *
     * A scale order distributes total size across multiple limit orders
     * spaced between a start and end price. The preview simulates:
     * - How much size would execute immediately vs post to the book
     * - Expected slippage and execution price
     * - Resulting position and margin impact
     *
     * @param inputs - See {@link SdkPerpetualsPlaceScaleOrderPreviewInputs}.
     * @param abortSignal - Optional `AbortSignal` to cancel the request.
     *
     * @returns Either an error message or a preview object similar to
     *   {@link getPlaceMarketOrderPreview}.
     */
    getPlaceScaleOrderPreview(inputs: SdkPerpetualsPlaceScaleOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
    /**
     * Preview the effects of canceling orders across one or more markets.
     *
     * This is commonly used to:
     * - Validate that cancels are allowed under current margin constraints
     * - Estimate how collateral/margin would change after canceling (and applying
     *   the associated `collateralChange` values)
     *
     * If `marketIdsToData` is empty, this returns a trivial preview with:
     * - `marketIdsToData: {}`
     *
     * @param inputs - See {@link SdkPerpetualsCancelOrdersPreviewInputs}.
     * @param abortSignal - Optional `AbortSignal` to cancel the request.
     *
     * @returns Either:
     * - `{ marketIdsToData }`, or
     * - `{ error }`.
     */
    getCancelOrdersPreview(inputs: SdkPerpetualsCancelOrdersPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewCancelOrdersResponse>;
    /**
     * Preview the effects of setting leverage for a given market.
     *
     * The preview returns:
     * - The position after the leverage change (`updatedPosition`)
     * - The collateral delta required/produced (`collateralChange`)
     *
     * @param inputs.marketId - Market whose leverage you want to adjust.
     * @param inputs.leverage - Target leverage value.
     * @param abortSignal - Optional `AbortSignal` to cancel the request.
     *
     * @returns Either:
     * - `{ updatedPosition, collateralChange }`, or
     * - `{ error }`.
     */
    getSetLeveragePreview(inputs: {
        marketId: PerpetualsMarketId;
        leverage: number;
    }, abortSignal?: AbortSignal): Promise<{
        updatedPosition: PerpetualsPosition;
        collateralChange: number;
    } | {
        error: string;
    }>;
    /**
     * Preview the effects of allocating/deallocating collateral for the position in
     * a given market.
     *
     * Semantics:
     * - Positive `collateralChange` previews allocation (moving collateral into the market).
     * - Negative `collateralChange` previews deallocation (moving collateral out of the market).
     *
     * @param inputs.marketId - Market of whose position you want to allocate/deallocate
     * collateral to/from.
     * @param inputs.collateralChange - The target collateral change (a positive number
     * for allocating collateral, negative for deallocating collateral).
     * @param abortSignal - Optional `AbortSignal` to cancel the request.
     *
     * @returns Either:
     * - `{ updatedPosition, collateralChange }`, or
     * - `{ error }`.
     */
    getEditCollateralPreview(inputs: {
        marketId: PerpetualsMarketId;
        collateralChange: Balance;
    }, abortSignal?: AbortSignal): Promise<{
        updatedPosition: PerpetualsPosition;
        collateralChange: number;
    } | {
        error: string;
    }>;
    /**
     * Fetch stop-order ticket data for this account, using an off-chain signed
     * payload.
     *
     * Typical flow:
     * 1) Call {@link getStopOrdersMessageToSign} to construct a deterministic payload
     * 2) Sign the payload with the wallet
     * 3) Provide the signed payload to this method to fetch stop order data
     *
     * @param inputs.bytes - Serialized message that was signed (e.g. JSON string).
     * @param inputs.signature - Signature over `bytes`.
     * @param inputs.marketIds - Optional subset of markets to filter results by.
     *
     * @returns {@link ApiPerpetualsStopOrderDatasResponse} containing `stopOrderDatas`.
     */
    getStopOrderDatas(inputs: {
        bytes: string;
        signature: string;
        marketIds?: PerpetualsMarketId[];
    }): Promise<ApiPerpetualsStopOrderDatasResponse>;
    /**
     * Fetch paginated collateral-change history for this account, including
     * deposits, withdrawals, funding settlements, liquidations, etc.
     *
     * Pagination:
     * - Use `beforeTimestampCursor` to fetch older entries.
     * - The API returns a `nextBeforeTimestampCursor` to continue pagination.
     *
     * @param inputs.beforeTimestampCursor - Optional cursor for pagination.
     * @param inputs.limit - Optional limit per page.
     *
     * @returns {@link ApiPerpetualsAccountCollateralHistoryResponse} containing
     * an array of changes and a `nextBeforeTimestampCursor`.
     */
    getCollateralHistory(inputs: Omit<ApiPerpetualsAccountCollateralHistoryBody, "accountId">): Promise<ApiPerpetualsAccountCollateralHistoryResponse>;
    /**
     * Fetch paginated order history for this account.
     *
     * This endpoint is distinct from {@link getOrderDatas}:
     * - `getOrderDatas` resolves current/pending orders based on the snapshot.
     * - `getOrderHistory` returns historical order events (fills, cancels, etc.)
     *   over time with cursor-based pagination.
     *
     * @param inputs.beforeTimestampCursor - Optional cursor for pagination.
     * @param inputs.limit - Optional limit per page.
     *
     * @returns {@link ApiPerpetualsAccountOrderHistoryResponse} containing a list of
     * orders and a `nextBeforeTimestampCursor`.
     */
    getOrderHistory(inputs: Omit<ApiPerpetualsAccountOrderHistoryBody, "accountId">): Promise<ApiPerpetualsAccountOrderHistoryResponse>;
    /**
     * Fetch historical margin snapshots for this account over a time range.
     *
     * This endpoint returns time-series margin data suitable for charting UI
     * such as equity and available collateral over time.
     *
     * Notes:
     * - This is an account-level view (aggregated across markets).
     *
     * @param inputs - {@link ApiPerpetualsAccountMarginHistoryBody} without `accountId`.
     * @returns {@link ApiPerpetualsAccountMarginHistoryResponse} containing `marginHistoryDatas`.
     */
    getMarginHistory(inputs: Omit<ApiPerpetualsAccountMarginHistoryBody, "accountId">): Promise<ApiPerpetualsAccountMarginHistoryResponse>;
    /**
     * Build a transaction that grants an Agent Wallet (assistant permissions) for this perpetuals account.
     *
     * The returned transaction must be signed and submitted by the **account admin** wallet.
     * After execution, `recipientAddress` can execute supported trading actions on behalf of this account.
     *
     * Agent wallets can perform all supported actions **except**:
     * - withdrawing collateral, and
     * - granting or revoking other agent wallets.
     *
     * @param inputs.recipientAddress Wallet address to receive agent permissions.
     * @param inputs.tx Optional existing {@link Transaction} to append to. If omitted, a new Transaction is used.
     * @throws If this instance represents a vault account (agent wallets are account-only).
     */
    getGrantAgentWalletTx(inputs: {
        recipientAddress: SuiAddress;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a transaction that revokes an Agent Wallet (assistant capability) from this perpetuals account.
     *
     * The returned transaction must be signed and submitted by the **account admin** wallet.
     * After execution, the revoked wallet immediately loses its delegated permissions.
     *
     * @param inputs.accountCapId Object ID of the assistant capability to revoke.
     * @param inputs.tx Optional existing {@link Transaction} to append to. If omitted, a new Transaction is used.
     * @throws If this instance represents a vault account (agent wallets are account-only).
     */
    getRevokeAgentWalletTx(inputs: {
        accountCapId: ObjectId;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Find the current position for a given market ID, if any.
     *
     * @param inputs.marketId - Market ID to search for.
     * @returns {@link PerpetualsPosition} if found, otherwise `undefined`.
     */
    positionForMarketId(inputs: {
        marketId: PerpetualsMarketId;
    }): PerpetualsPosition | undefined;
    /**
     * Filter a list of stop orders to only include non-SL/TP orders.
     *
     * A stop order is considered SL/TP if it appears in the combined set of
     * SL/TP orders across **all** markets (see {@link slTpStopOrderDatas}).
     *
     * Note:
     * - This implementation uses JSON string equality to compare objects.
     *   This is pragmatic but assumes stable field ordering and identical shapes.
     *
     * @param inputs.stopOrderDatas - Full array of stop-order ticket data.
     * @returns An array of non-SL/TP stop orders, or `undefined` if none exist.
     */
    nonSlTpStopOrderDatas(inputs: {
        stopOrderDatas: PerpetualsStopOrderData[];
    }): PerpetualsStopOrderData[] | undefined;
    /**
     * Extract all SL/TP-style stop orders across **all** markets for this
     * account.
     *
     * SL/TP orders are stop orders which:
     * - Have an `slTp` payload, and
     * - Target the opposite side of the current position.
     *
     * This combines:
     * - "Full" SL/TP orders (size >= `i64MaxBigInt`)
     * - "Partial" SL/TP orders (size < `i64MaxBigInt`)
     *
     * The "full vs partial" distinction is a protocol convention: some systems
     * encode “close entire position” using a sentinel max size.
     *
     * @param inputs.stopOrderDatas - Full list of stop-order tickets.
     * @returns Array of SL/TP stop orders, or `undefined` if none exist.
     */
    slTpStopOrderDatas(inputs: {
        stopOrderDatas: PerpetualsStopOrderData[];
    }): PerpetualsStopOrderData[] | undefined;
    /**
     * Filter stop orders for a single market to only include non-SL/TP orders.
     *
     * Uses {@link slTpStopOrderDatasForPosition} under the hood.
     *
     * @param inputs.marketId - Market ID to filter for.
     * @param inputs.stopOrderDatas - Full list of stop orders.
     * @returns Non-SL/TP stop orders for the given market, or `undefined` if none exist.
     */
    nonSlTpStopOrderDatasForPosition(inputs: {
        marketId: PerpetualsMarketId;
        stopOrderDatas: PerpetualsStopOrderData[];
    }): PerpetualsStopOrderData[] | undefined;
    /**
     * Categorize stop orders for a specific market into:
     * - A "full" SL/TP order (size >= `i64MaxBigInt`) if any.
     * - A set of "partial" SL/TP orders (size < `i64MaxBigInt`).
     *
     * SL/TP stop orders are defined as:
     * - Market ID matches the input market.
     * - `slTp` field is present.
     * - Order side is opposite of the position side.
     * - At least a `stopLossIndexPrice` or `takeProfitIndexPrice` is set.
     *
     * Notes on matching:
     * - The side comparison uses the current position side derived from the account snapshot.
     * - If `baseAssetAmount === 0` (no effective position), the method returns no SL/TP orders.
     *
     * @param inputs.marketId - Market to categorize stop orders for.
     * @param inputs.stopOrderDatas - Full list of stop orders.
     *
     * @returns Object containing:
     * - `fullSlTpOrder` (if any)
     * - `partialSlTpOrders` (if any, otherwise `undefined`)
     */
    slTpStopOrderDatasForPosition(inputs: {
        marketId: PerpetualsMarketId;
        stopOrderDatas: PerpetualsStopOrderData[];
    }): {
        fullSlTpOrder: PerpetualsStopOrderData | undefined;
        partialSlTpOrders: PerpetualsStopOrderData[] | undefined;
    };
    slTpStopOrderDatasForLimitOrder(inputs: {
        stopOrderDatas: PerpetualsStopOrderData[];
        limitOrderId: PerpetualsOrderId;
    }): {
        fullSlTpOrder: PerpetualsStopOrderData | undefined;
        partialSlTpOrders: PerpetualsStopOrderData[] | undefined;
    };
    orderDatas(): PerpetualsOrderData[];
    /**
     * Convenience accessor for the account's available collateral (in coin units).
     *
     * This is the amount of collateral not currently locked/allocated across markets,
     * as represented by the backend response.
     *
     * @returns Available collateral as a `number`.
     */
    collateral(): number;
    /**
     * Check whether this {@link PerpetualsAccount} is vault-backed.
     *
     * @returns `true` if the underlying `accountCap` is a vault cap; otherwise `false`.
     */
    isVault(): boolean;
    /**
     * Resolve the owner wallet address of this account or vault.
     *
     * - For direct accounts, returns the cap's `walletAddress` field.
     * - For vault-backed accounts, returns the vault cap's `ownerAddress`.
     *
     * Naming note:
     * - Some types use `walletAddress` for direct ownership. For vault-backed accounts
     *   the analogous field is `ownerAddress`.
     *
     * @returns Owner wallet {@link SuiAddress}.
     */
    ownerAddress(): SuiAddress;
    /**
     * Get the underlying account object ID.
     *
     * This is the on-chain object that holds the account's state and positions.
     *
     * @returns {@link ObjectId} of the account object.
     */
    accountObjectId(): ObjectId;
    /**
     * Get the numeric perpetuals account ID.
     *
     * This is the protocol-level identifier (bigint-derived) used across API calls.
     *
     * @returns {@link PerpetualsAccountId} for this account.
     */
    accountId(): PerpetualsAccountId;
    /**
     * Get the account cap object ID, if this is a direct account.
     *
     * Direct accounts are controlled via an on-chain “cap” object. Vault-backed
     * accounts are controlled via vault caps and do not expose a direct account-cap ID.
     *
     * @throws If called for a vault-backed account.
     *
     * @returns {@link ObjectId} of the account cap.
     */
    accountCapId(): ObjectId;
}

/**
 * High-level wrapper around a single perpetuals market.
 *
 * This class provides:
 *
 * - Lightweight accessors for immutable market properties:
 *   - `marketId`, `indexPrice`, `collateralPrice`, `collateralCoinType`
 *   - `marketParams`, `marketState`
 * - Read endpoints for:
 *   - Orderbook snapshots
 *   - 24h stats and order history
 *   - Market prices and derived funding metrics
 * - Helpers for:
 *   - Order sizing (max size, lot/tick rounding)
 *   - Margin and collateral calculations
 *   - Constructing an “empty” position for a market
 *
 * Typical usage:
 *
 * ```ts
 * const perps = new Perpetuals(config);
 * const { markets } = await perps.getMarkets({ marketIds: ["0x..."] });
 * const market = markets[0];
 *
 * const { orderbook } = await market.getOrderbook();
 * const stats = await market.get24hrStats();
 * const { basePrice, collateralPrice } = await market.getPrices();
 * ```
 */
declare class PerpetualsMarket extends Caller {
    marketData: PerpetualsMarketData;
    readonly api?: AftermathApi | undefined;
    /** Unique identifier for this perpetuals market (object ID on chain). */
    readonly marketId: PerpetualsMarketId;
    /**
     * Current oracle/index price for the market's underlying asset, quoted in
     * the index unit (typically USD).
     */
    readonly indexPrice: number;
    /**
     * Current price of the collateral asset in USD (or the platform's base
     * pricing unit).
     */
    readonly collateralPrice: number;
    /** Sui type of the collateral coin (e.g. `"0x2::sui::SUI"`). */
    readonly collateralCoinType: CoinType;
    /** Static market configuration parameters (lot size, tick size, margins, etc.). */
    readonly marketParams: PerpetualsMarketParams;
    /** Dynamic market state (funding rates, open interest, etc.). */
    readonly marketState: PerpetualsMarketState;
    /**
     * Create a new {@link PerpetualsMarket} wrapper from raw market data.
     *
     * @param marketData - Snapshot of market configuration and state.
     * @param config - Optional {@link CallerConfig} (network, base URL, etc.).
     * @param api - Optional shared {@link AftermathApi} provider instance.
     *
     * @remarks
     * This class extends {@link Caller} with the `"perpetuals"` route prefix, meaning
     * all HTTP requests resolve under `/perpetuals/...`.
     */
    constructor(marketData: PerpetualsMarketData, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetch the 24-hour volume and price change statistics for this market.
     *
     * Under the hood, this calls {@link Perpetuals.getMarkets24hrStats} and
     * returns the first (and only) entry.
     *
     * @returns {@link PerpetualsMarket24hrStats}.
     *
     * @remarks
     * This method creates a new {@link Perpetuals} instance using `this.config`.
     * If you need shared api behavior, prefer calling `perps.getMarkets24hrStats`
     * directly with the same api you initialized.
     */
    get24hrStats(): Promise<PerpetualsMarket24hrStats>;
    /**
     * Fetch the full orderbook snapshot for this market.
     *
     * @returns Object containing `orderbook`.
     *
     * @example
     * ```ts
     * const { orderbook } = await market.getOrderbook();
     * console.log(orderbook.bids[0], orderbook.asks[0]);
     * ```
     */
    getOrderbook(): Promise<{
        orderbook: PerpetualsOrderbook;
    }>;
    /**
     * Compute the maximum order size that can be placed by a given account
     * in this market, under optional leverage and price assumptions.
     *
     * This is a common frontend helper for:
     * - "max size" buttons
     * - input validation against risk limits
     *
     * **Note:** This is routed through the `account` namespace because it depends on
     * the account's collateral and positions.
     *
     * @param inputs.accountId - Perpetuals account ID.
     * @param inputs.side - Order side (Bid/Ask).
     * @param inputs.leverage - Optional assumed leverage.
     * @param inputs.price - Optional assumed price (e.g. for limit orders).
     *
     * @returns `{ maxOrderSize }` in base units (scaled integer as `bigint`).
     *
     * @example
     * ```ts
     * const { maxOrderSize } = await market.getMaxOrderSize({
     *   accountId: 123n,
     *   side: PerpetualsOrderSide.Bid,
     *   leverage: 5,
     * });
     * ```
     */
    getMaxOrderSize: (inputs: Omit<ApiPerpetualsMaxOrderSizeBody, "marketId">) => Promise<{
        maxOrderSize: bigint;
    }>;
    /**
     * Market-level preview of placing a market order.
     *
     * Unlike {@link PerpetualsAccount.getPlaceMarketOrderPreview}, this version:
     * - Calls `account/previews/place-market-order`
     * - Explicitly sets `accountId: undefined`, allowing a “generic” preview that
     *   doesn’t rely on a specific account’s on-chain positions/collateral.
     *
     * @param inputs - {@link SdkPerpetualsPlaceMarketOrderPreviewInputs}.
     * @param abortSignal - Optional abort signal to cancel the request.
     *
     * @returns Either `{ error }` or a preview containing the simulated updated position,
     * slippage, filled/posted sizes, collateral change, and execution price.
     */
    getPlaceMarketOrderPreview(inputs: SdkPerpetualsPlaceMarketOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
    /**
     * Market-level preview of placing a limit order.
     *
     * Similar to {@link getPlaceMarketOrderPreview}, this uses:
     * - `account/previews/place-limit-order`
     * - `accountId: undefined`
     *
     * @param inputs - {@link SdkPerpetualsPlaceLimitOrderPreviewInputs}.
     * @param abortSignal - Optional abort signal to cancel the request.
     *
     * @returns Either `{ error }` or a preview describing the simulated post-order state.
     */
    getPlaceLimitOrderPreview(inputs: SdkPerpetualsPlaceLimitOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
    /**
     * Market-level preview of placing a scale order.
     *
     * Similar to {@link getPlaceLimitOrderPreview}, this uses:
     * - `account/previews/place-scale-order`
     * - `accountId: undefined`
     *
     * @param inputs - {@link SdkPerpetualsPlaceScaleOrderPreviewInputs}.
     * @param abortSignal - Optional abort signal to cancel the request.
     *
     * @returns Either `{ error }` or a preview describing the simulated post-order state.
     */
    getPlaceScaleOrderPreview(inputs: SdkPerpetualsPlaceScaleOrderPreviewInputs, abortSignal?: AbortSignal): Promise<ApiPerpetualsPreviewPlaceOrderResponse>;
    /**
     * Fetch paginated order history for this market.
     *
     * This is market-wide (public) history, not scoped to any account.
     *
     * @param inputs.beforeTimestampCursor - Optional pagination cursor.
     * @param inputs.limit - Optional page size.
     *
     * @returns {@link ApiPerpetualsMarketOrderHistoryResponse} containing:
     * - `orders`
     * - `nextBeforeTimestampCursor`
     */
    getOrderHistory(inputs: Omit<ApiPerpetualsMarketOrderHistoryBody, "marketId">): Promise<ApiPerpetualsMarketOrderHistoryResponse>;
    /**
     * Fetch the current prices for this market.
     *
     * Internally calls {@link Perpetuals.getPrices} and returns the first result.
     *
     * @returns `{ marketId, basePrice, collateralPrice, midPrice, markPrice }`.
     *
     * @remarks
     * This method instantiates a new {@link Perpetuals} client using `this.config`.
     * If you rely on a shared api, call `perps.getPrices(...)` directly instead.
     */
    getPrices(): Promise<{
        marketId: PerpetualsMarketId;
        basePrice: number;
        collateralPrice: number;
        midPrice: number | undefined;
        markPrice: number;
    }>;
    /**
     * Compute the remaining time until the next funding event, in milliseconds.
     *
     * @returns `nextFundingTimeMs() - Date.now()`.
     *
     * @remarks
     * If the next funding timestamp does not fit safely into a JS `number`,
     * {@link nextFundingTimeMs} returns `Number.MAX_SAFE_INTEGER`, and the
     * difference may be very large.
     */
    timeUntilNextFundingMs: () => Timestamp;
    /**
     * Get the scheduled timestamp for the next funding event, in milliseconds.
     *
     * Safety behavior:
     * - If `marketData.nextFundingTimestampMs` exceeds `Number.MAX_SAFE_INTEGER`,
     *   this returns `Number.MAX_SAFE_INTEGER`.
     *
     * @returns Next funding timestamp (ms) as a JS `number`.
     */
    nextFundingTimeMs: () => Timestamp;
    /**
     * Estimated funding rate per period for this market.
     *
     * This is read directly from `marketData.estimatedFundingRate`.
     *
     * @returns Estimated funding rate as a fraction (e.g. `0.01` = 1%).
     */
    estimatedFundingRate: () => Percentage;
    /**
     * Calculate the collateral required to support an order given leverage and prices.
     *
     * The computed collateral is based on the *remaining* unfilled size:
     * `remaining = initialSize - filledSize`.
     *
     * USD requirement:
     * ```text
     * remainingBase * indexPrice * initialMarginRatio
     * ```
     * where `initialMarginRatio = 1 / leverage` (or 1 if leverage is falsy).
     *
     * @param inputs.leverage - Target leverage for the order (>= 1).
     * @param inputs.orderData - Order data containing `initialSize` and `filledSize`.
     * @param inputs.indexPrice - Index/oracle price of the base asset.
     * @param inputs.collateralPrice - Price of the collateral asset.
     *
     * @returns Object with:
     * - `collateralUsd`: required collateral in USD
     * - `collateral`: required collateral in collateral coin units
     */
    calcCollateralUsedForOrder: (inputs: {
        leverage: number;
        orderData: PerpetualsOrderData;
        indexPrice: number;
        collateralPrice: number;
    }) => {
        collateral: number;
        collateralUsd: number;
    };
    /**
     * Get the base-asset lot size for this market as a `number`.
     *
     * Order sizes must be multiples of this lot size.
     *
     * @returns Lot size in base asset units.
     */
    lotSize(): number;
    /**
     * Get the minimal price tick size for this market as a `number`.
     *
     * Limit prices must be multiples of this tick size.
     *
     * @returns Tick size in quote units (e.g. USD).
     */
    tickSize(): number;
    /**
     * Get the maximum theoretical leverage for this market.
     *
     * Computed as:
     * ```ts
     * 1 / marginRatioInitial
     * ```
     *
     * @returns Maximum leverage.
     */
    maxLeverage(): number;
    /**
     * Get the initial margin ratio for this market.
     *
     * This is the minimum margin required when opening a position.
     *
     * @returns Initial margin ratio as a fraction (e.g. 0.05 = 20x).
     */
    initialMarginRatio(): number;
    /**
     * Get the maintenance margin ratio for this market.
     *
     * Falling below this ratio may trigger liquidation.
     *
     * @returns Maintenance margin ratio as a fraction.
     */
    maintenanceMarginRatio(): number;
    /**
     * Round a price to the nearest valid tick for this market.
     *
     * Rounding mode:
     * - `floor: true` => round down
     * - `ceil: true`  => round up
     * - neither       => nearest tick (`Math.round`)
     *
     * @param inputs.price - Raw price to round.
     * @param inputs.floor - Force floor rounding.
     * @param inputs.ceil - Force ceil rounding.
     * @returns Price snapped to the market tick size.
     */
    roundToValidPrice: (inputs: {
        price: number;
        floor?: boolean;
        ceil?: boolean;
    }) => number;
    /**
     * Round a price to the nearest valid tick as a fixed-point `bigint` (1e9 precision).
     *
     * This is helpful when you need the on-chain representation directly
     * (e.g. order price fields stored in 9-decimal fixed).
     *
     * @param inputs.price - Raw price as a JS number.
     * @param inputs.floor - Force floor rounding.
     * @param inputs.ceil - Force ceil rounding.
     * @returns Tick-snapped price scaled by `1e9`.
     */
    roundToValidPriceBigInt: (inputs: {
        price: number;
        floor?: boolean;
        ceil?: boolean;
    }) => bigint;
    /**
     * Round a base-asset size to the nearest valid lot size for this market.
     *
     * Rounding mode:
     * - `floor: true` => round down
     * - `ceil: true`  => round up
     * - neither       => nearest lot (`Math.round`)
     *
     * @param inputs.size - Raw size in base asset units.
     * @param inputs.floor - Force floor rounding.
     * @param inputs.ceil - Force ceil rounding.
     * @returns Size snapped to the market lot size.
     */
    roundToValidSize: (inputs: {
        size: number;
        floor?: boolean;
        ceil?: boolean;
    }) => number;
    /**
     * Round a base-asset size to the nearest valid lot as a fixed-point `bigint` (1e9 precision).
     *
     * @param inputs.size - Raw base size as a JS number.
     * @param inputs.floor - Force floor rounding.
     * @param inputs.ceil - Force ceil rounding.
     * @returns Lot-snapped size scaled by `1e9`.
     */
    roundToValidSizeBigInt: (inputs: {
        size: number;
        floor?: boolean;
        ceil?: boolean;
    }) => bigint;
    /**
     * Construct an "empty" position object for this market.
     *
     * Useful when an account has no open position but downstream UI/calculations
     * expect a {@link PerpetualsPosition}-shaped object.
     *
     * @returns A zeroed-out {@link PerpetualsPosition} for `this.marketId`.
     */
    emptyPosition: () => PerpetualsPosition;
}

/**
 * High-level wrapper around a single Perpetuals vault.
 *
 * A vault is a managed perpetuals account that accepts user deposits (LP),
 * trades across up to a bounded set of markets, and supports withdrawals via
 * a request flow.
 *
 * This class provides:
 *
 * - Transaction builders for:
 *   - User actions (deposit, create/cancel withdraw request, update slippage)
 *   - Force-withdraw processing (close positions and settle a request)
 *   - Owner admin actions (update params, process requests, withdraw fees/collateral)
 * - Read helpers for:
 *   - Vault withdraw requests
 *   - LP token pricing
 *   - Accessing the vault’s underlying perpetuals account
 * - Static validation helpers for LP coin metadata (name/symbol constraints)
 * - A small calculation helper for withdraw-request slippage
 *
 * Typical usage:
 *
 * ```ts
 * const perps = afSdk.Perpetuals();
 * const { vaults } = await perps.getAllVaults();
 * const vault = vaults[0];
 *
 * const { tx } = await vault.getDepositTx({
 *   walletAddress: "0x...",
 *   depositAmount: BigInt("1000000000"),
 *   minLpAmountOut: 0n,
 * });
 * ```
 */
declare class PerpetualsVault extends Caller {
    readonly vaultObject: PerpetualsVaultObject;
    readonly api?: AftermathApi | undefined;
    /**
     * Vault-level protocol limits and UI-friendly constraints.
     *
     * @remarks
     * These are SDK constants (not fetched from chain). They should match the
     * on-chain / backend limits enforced by the vault module.
     */
    static readonly constants: {
        /**
         * Maximum lock period in milliseconds.
         */
        maxLockPeriodMs: number;
        /**
         * Maximum period for force withdraw delay in milliseconds.
         */
        maxForceWithdrawDelayMs: number;
        /**
         * Maximum vault fee (performance fee).
         */
        maxPerformanceFeePercentage: number;
        /**
         * Minimum USD value required for user deposits.
         */
        minDepositUsd: number;
        /**
         * Minimum USD value required to be locked by vault owner during vault creation.
         */
        minOwnerLockUsd: number;
        /**
         * The maximum number of distinct markets (`ClearingHouse`s) the vault can trade.
         */
        maxMarketsInVault: number;
        /**
         * The maximum number of pending orders allowed for a single position in the vault.
         */
        maxPendingOrdersPerPosition: number;
    };
    /**
     * Create a new {@link PerpetualsVault} wrapper.
     *
     * @param vaultObject - Raw on-chain vault object snapshot.
     * @param config - Optional {@link CallerConfig} (network, auth, base URL).
     * @param api - Optional shared {@link AftermathApi} provider. When provided,
     *   transaction builders will serialize {@link Transaction}s into `txKind`.
     */
    constructor(vaultObject: PerpetualsVaultObject, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Build a `process-force-withdraw-request` transaction.
     *
     * Force-withdraw is a mechanism that closes required positions and processes
     * a withdraw request after a delay window (see vault params).
     *
     * @param inputs.walletAddress - User wallet that owns the withdraw request.
     * @param inputs.sizesToClose - Mapping of marketId -> size (base units) to close.
     * @param inputs.recipientAddress - Optional recipient of the withdrawn collateral.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx` (and any additional outputs
     *   provided by the backend response type).
     */
    getProcessForceWithdrawRequestTx(inputs: {
        walletAddress: SuiAddress;
        sizesToClose: Record<PerpetualsMarketId, Balance>;
        recipientAddress?: SuiAddress;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiPerpetualsVaultProcessForceWithdrawRequestTxResponse, "txKind"> & {
        tx: Transaction;
    }>;
    getPauseVaultForForceWithdrawRequestTx(inputs: {
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an `update-withdraw-request-slippage` transaction.
     *
     * This updates the user's minimum acceptable collateral output amount
     * for an existing withdraw request.
     *
     * @param inputs.minCollateralAmountOut - New minimum collateral amount out.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getUpdateWithdrawRequestSlippageTx(inputs: {
        minCollateralAmountOut: Balance;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an owner transaction to update the vault's force withdraw delay.
     *
     * @param inputs.forceWithdrawDelayMs - New delay (ms). Should be <= {@link constants.maxForceWithdrawDelayMs}.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getOwnerUpdateForceWithdrawDelayTx(inputs: {
        forceWithdrawDelayMs: bigint;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an owner transaction to update the vault's lock period.
     *
     * @param inputs.lockPeriodMs - New lock period (ms). Should be <= {@link constants.maxLockPeriodMs}.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getOwnerUpdateLockPeriodTx(inputs: {
        lockPeriodMs: bigint;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an owner transaction to update the vault performance fee.
     *
     * @param inputs.performanceFeePercentage - New fee as a fraction (e.g. `0.2` = 20%).
     *   Should be <= {@link constants.maxPerformanceFeePercentage}.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getOwnerUpdatePerformanceFeeTx(inputs: {
        performanceFeePercentage: number;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an owner transaction to process one or more users' withdraw requests.
     *
     * This is the normal (non-force) processing path for withdrawals. The owner
     * batches users and settles their requests in a single transaction.
     *
     * @param inputs.userAddresses - Users whose requests should be processed.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getOwnerProcessWithdrawRequestsTx(inputs: {
        userAddresses: SuiAddress[];
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an owner transaction to withdraw accrued performance fees.
     *
     * @param inputs.withdrawAmount - Amount of collateral to withdraw as fees.
     * @param inputs.recipientAddress - Optional recipient address for the withdrawn fees.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Response containing `tx` and any extra outputs described by
     * {@link ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse}.
     */
    getOwnerWithdrawPerformanceFeesTx(inputs: {
        withdrawAmount: Balance;
        recipientAddress?: SuiAddress;
        tx?: Transaction;
    }): Promise<Omit<ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an owner transaction to withdraw vault collateral by redeeming LP.
     *
     * @param inputs.lpWithdrawAmount - Amount of LP to redeem.
     * @param inputs.minCollateralAmountOut - Minimum collateral out to protect from slippage.
     * @param inputs.recipientAddress - Optional recipient address for withdrawn collateral.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Response containing `tx` and any extra outputs described by
     * {@link ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse}.
     */
    getOwnerWithdrawCollateralTx(inputs: {
        lpWithdrawAmount: Balance;
        minCollateralAmountOut: Balance;
        recipientAddress?: SuiAddress;
        tx?: Transaction;
    }): Promise<Omit<ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build an owner transaction to withdraw locked liquidity from the vault.
     *
     * Owner-locked liquidity is LP that was locked at vault creation time.
     * This flow allows the owner to withdraw a portion without going through
     * the standard withdraw-request lifecycle. Owner-locked withdrawals are
     * exempt from performance fees.
     *
     * @param inputs.amount - Amount of locked LP to withdraw (native units).
     * @param inputs.minCollateralAmountOut - Minimum collateral out to protect from slippage.
     * @param inputs.recipientAddress - Optional recipient address for withdrawn collateral.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Response containing `tx` and any extra outputs described by
     * {@link ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse}.
     */
    getOwnerWithdrawLockedLiquidityTx(inputs: {
        amount: Balance;
        minCollateralAmountOut: Balance;
        recipientAddress?: SuiAddress;
        tx?: Transaction;
    }): Promise<Omit<ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a user transaction to create a vault withdraw request.
     *
     * Withdrawals are request-based: the user specifies how much LP to redeem
     * and a minimum collateral output amount.
     *
     * @param inputs.walletAddress - Wallet creating the request.
     * @param inputs.lpWithdrawAmount - Amount of LP to withdraw.
     * @param inputs.minCollateralAmountOut - Minimum collateral out (slippage guard).
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getCreateWithdrawRequestTx(inputs: {
        walletAddress: SuiAddress;
        lpWithdrawAmount: Balance;
        minCollateralAmountOut: Balance;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a user transaction to cancel an existing vault withdraw request.
     *
     * @param inputs.walletAddress - Wallet canceling the request.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     */
    getCancelWithdrawRequestTx(inputs: {
        walletAddress: SuiAddress;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a user transaction to deposit collateral into the vault in exchange for LP.
     *
     * You can specify the deposit as:
     * - `depositAmount` (wallet pays directly), OR
     * - `depositCoinArg` (use an existing transaction argument)
     *
     * @param inputs.walletAddress - Depositor wallet.
     * @param inputs.minLpAmountOut - Minimum LP out (slippage guard).
     * @param inputs.isSponsoredTx - Whether the tx is sponsored (gas paid by another party).
     * @param inputs.depositAmount - Amount of collateral to deposit (mutually exclusive with `depositCoinArg`).
     * @param inputs.depositCoinArg - Transaction argument referencing collateral coin.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing `tx`.
     *
     * @example
     * ```ts
     * const { txKind } = await vault.getDepositTx({
     *   walletAddress: "0x...",
     *   depositAmount: 1_000_000_000n,
     *   minLpAmountOut: 0n,
     * });
     * ```
     */
    getDepositTx(inputs: {
        walletAddress: SuiAddress;
        minLpAmountOut: Balance;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
        isSponsoredTx?: boolean;
    } & ({
        depositAmount: Balance;
    } | {
        depositCoinArg: TransactionObjectArgument;
    })): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Fetch all withdraw requests for this vault.
     *
     * @returns {@link ApiPerpetualsVaultsWithdrawRequestsResponse} containing requests
     * scoped to `this.vaultObject.objectId`.
     *
     * @remarks
     * This currently calls the `vaults/withdraw-requests` endpoint with a single vault ID.
     * This may be moved to {@link Perpetuals} as a shared helper.
     */
    getAllWithdrawRequests(): Promise<ApiPerpetualsVaultsWithdrawRequestsResponse>;
    /**
     * Preview the results of an owner processing one or more withdraw requests.
     *
     * @param inputs.userAddresses - Users to process.
     * @returns Preview response with expected effects.
     */
    getPreviewOwnerProcessWithdrawRequests(inputs: {
        userAddresses: SuiAddress[];
    }): Promise<ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsResponse>;
    /**
     * Preview the amount available for the owner to withdraw as performance fees.
     *
     * @returns Preview response including withdrawable fees and related metadata.
     */
    getPreviewOwnerWithdrawPerformanceFees(): Promise<ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesResponse>;
    /**
     * Preview an owner collateral withdrawal (LP redemption).
     *
     * @param inputs.lpWithdrawAmount - LP amount to redeem.
     * @returns Preview response including estimated collateral out.
     */
    getPreviewOwnerWithdrawCollateral(inputs: {
        lpWithdrawAmount: Balance;
    }): Promise<ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse>;
    /**
     * Preview an owner locked liquidity withdrawal.
     *
     * Returns the estimated collateral output for withdrawing a given amount
     * of the owner's locked LP tokens. Owner-locked withdrawals are exempt
     * from performance fees.
     *
     * @param inputs.amount - Amount of locked LP to withdraw (native units).
     * @returns Preview response including estimated collateral out and price.
     */
    getPreviewOwnerWithdrawLockedLiquidity(inputs: {
        amount: Balance;
    }): Promise<ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityResponse>;
    /**
     * Preview creating a withdraw request.
     *
     * @param inputs.walletAddress - Requesting wallet.
     * @param inputs.lpWithdrawAmount - LP amount to withdraw.
     * @returns Preview response including estimated collateral out and constraints.
     */
    getPreviewCreateWithdrawRequest(inputs: {
        walletAddress: SuiAddress;
        lpWithdrawAmount: Balance;
    }): Promise<ApiPerpetualsVaultPreviewCreateWithdrawRequestResponse>;
    /**
     * Preview depositing into the vault.
     *
     * @param inputs.depositAmount - Deposit amount in collateral coin units.
     * @returns Preview response including estimated LP out.
     */
    getPreviewDeposit(inputs: {
        depositAmount: Balance;
    }): Promise<ApiPerpetualsVaultPreviewDepositResponse>;
    /**
     * Preview processing a force withdraw request for a user.
     *
     * This is useful to determine what positions/sizes must be closed or what
     * the expected outputs are prior to building the actual transaction.
     *
     * @param inputs.walletAddress - User wallet with a pending force-withdraw.
     * @returns Preview response describing expected processing effects.
     */
    getPreviewProcessForceWithdrawRequest(inputs: {
        walletAddress: SuiAddress;
    }): Promise<ApiPerpetualsVaultPreviewProcessForceWithdrawRequestResponse>;
    getPreviewPauseVaultForForceWithdrawRequest(inputs: {
        walletAddress: SuiAddress;
    }): Promise<ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestResponse>;
    /**
     * Fetch the current LP coin price for this vault (in collateral units).
     *
     * Internally calls {@link Perpetuals.getLpCoinPrices} and returns the first price.
     *
     * @returns LP coin price as a `number`.
     */
    getLpCoinPrice(): Promise<number>;
    /**
     * Build a lightweight “cap-like” object for the vault’s underlying account.
     *
     * @returns {@link PerpetualsPartialVaultCap} suitable for account fetch helpers
     * such as {@link Perpetuals.getAccount}.
     */
    partialVaultCap(): PerpetualsPartialVaultCap;
    /**
     * Fetch the underlying perpetuals account object for this vault.
     *
     * @returns `{ account }` where `account` is the on-chain {@link PerpetualsAccountObject}.
     */
    getAccountObject(): Promise<{
        account: PerpetualsAccountObject;
    }>;
    /**
     * Fetch a {@link PerpetualsAccount} wrapper for the vault’s underlying account.
     *
     * @returns `{ account }` where `account` is a high-level {@link PerpetualsAccount}.
     */
    getAccount(): Promise<{
        account: PerpetualsAccount;
    }>;
    isPaused(): boolean;
    /**
     * Checks if a string is a valid LP coin name.
     *
     * @param value - The string to check.
     * @returns `true` if `value` can be used as a valid LP coin name, otherwise `false`.
     *
     * @remarks
     * Current rule: ASCII-only. This aligns with many on-chain metadata constraints.
     */
    static isValidLpCoinName: (value: string) => boolean;
    /**
     * Checks if a string is a valid LP coin type symbol.
     *
     * @param value - The string to check.
     * @returns `true` if `value` can be used as a valid LP coin type symbol, otherwise `false`.
     *
     * @remarks
     * Current rule: uppercase A–Z plus underscore.
     */
    static isValidLpCoinTypeSymbol: (value: string) => boolean;
    /**
     * Compute the implied slippage tolerance for a withdraw request.
     *
     * Defined as:
     * ```text
     * (lpAmountInUsd - minCollateralAmountOutUsd) / lpAmountInUsd
     * ```
     *
     * @param inputs.withdrawRequest - Withdraw request to analyze.
     * @returns Slippage fraction (0..1). Returns `0` if `lpAmountInUsd` is missing/zero.
     */
    static calcWithdrawRequestSlippage: (inputs: {
        withdrawRequest: PerpetualsVaultWithdrawRequest;
    }) => number;
}

declare class PerpetualsOrderUtils {
    static orderId: (price: bigint, counter: bigint, side: PerpetualsOrderSide) => PerpetualsOrderId;
    private static orderIdAsk;
    private static orderIdBid;
    static price: (orderId: PerpetualsOrderId) => bigint;
    private static priceAsk;
    private static priceBid;
    static counter: (orderId: PerpetualsOrderId) => bigint;
    static isAsk: (orderId: PerpetualsOrderId) => boolean;
}

/**
 * High-level client for interacting with Aftermath Perpetuals.
 *
 * This class exposes a typed, ergonomic interface over the Perpetuals HTTP API
 * and websocket endpoints, including:
 *
 * - Market discovery (`getAllMarkets`, `getMarkets`, `getMarket`)
 * - Vault discovery (`getAllVaults`, `getVaults`, `getVault`)
 * - Account & position data (`getAccount`, `getAccounts`, `getAccountObjects`)
 * - Ownership queries (`getOwnedAccountCaps`, `getOwnedVaultCaps`)
 * - Historical data & stats (`getMarketCandleHistory`, `getMarkets24hrStats`)
 * - Pricing helpers (`getPrices`, `getLpCoinPrices`)
 * - Transaction builders (`getCreateAccountTx`, `getCreateVaultCapTx`, `getCreateVaultTx`)
 * - Websocket feeds (`openUpdatesWebsocketStream`, `openMarketCandlesWebsocketStream`)
 *
 * Typical usage via the root SDK:
 *
 * ```ts
 * import { Aftermath } from "@aftermath/sdk";
 *
 * const afSdk = await Aftermath.create({ network: "MAINNET" });
 *
 * const perps = afSdk.Perpetuals();
 *
 * // Fetch markets for a given collateral coin type
 * const markets = await perps.getAllMarkets({
 *   collateralCoinType: "0x2::sui::SUI",
 * });
 *
 * // Fetch account + positions for a given account cap
 * const [accountCap] = await perps.getOwnedAccountCaps({
 *   walletAddress: "0x...",
 * });
 *
 * const account = await perps.getAccount({ accountCap });
 *
 * // Build a create-account transaction (not signed or sent)
 * const createAccountTx = await perps.getCreateAccountTx({
 *   walletAddress: "0x...",
 *   collateralCoinType: "0x2::sui::SUI",
 * });
 * ```
 */
declare class Perpetuals extends Caller {
    readonly api?: AftermathApi | undefined;
    /**
     * Helper namespace for order-specific utilities such as parsing order IDs,
     * extracting price bits, etc.
     *
     * This is a direct alias of {@link PerpetualsOrderUtils}.
     */
    static readonly OrderUtils: typeof PerpetualsOrderUtils;
    /**
     * Creates a new Perpetuals client.
     *
     * @param config - Optional caller configuration (network, auth token, etc.).
     * @param api - Optional shared {@link AftermathApi} provider instance. When
     *   provided, transaction-building helpers can derive serialized `txKind`
     *   from a {@link Transaction} object via `api.Transactions().fetchBase64TxKindFromTx`.
     *
     * @remarks
     * This class extends {@link Caller} with the `"perpetuals"` route prefix, meaning:
     * - HTTP calls resolve under `/perpetuals/...`
     * - Websocket calls resolve under `/perpetuals/ws/...`
     */
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetch all perpetual markets for a given collateral coin type.
     *
     * This method returns *wrapped* {@link PerpetualsMarket} instances, not the raw
     * market structs. Each instance provides additional helpers for pricing, margin,
     * and order parsing.
     *
     * @param inputs.collateralCoinType - Coin type used as collateral, e.g. `"0x2::sui::SUI"`.
     * @returns Object containing `markets`.
     *
     * @example
     * ```ts
     * const { markets } = await perps.getAllMarkets({
     *   collateralCoinType: "0x2::sui::SUI",
     * });
     * ```
     */
    getAllMarkets(inputs: {
        collateralCoinType: CoinType;
    }): Promise<{
        markets: PerpetualsMarket[];
    }>;
    /**
     * Fetch a single market by ID.
     *
     * Internally calls {@link getMarkets} and returns the first entry.
     *
     * @param inputs.marketId - The market (clearing house) object ID.
     * @returns Object containing `market`.
     *
     * @throws If the backend returns an empty list for the given `marketId`,
     * this will still attempt to return `markets[0]` (which would be `undefined`).
     * Callers may want to validate the result.
     *
     * @example
     * ```ts
     * const { market } = await perps.getMarket({ marketId: "0x..." });
     * ```
     */
    getMarket(inputs: {
        marketId: PerpetualsMarketId;
    }): Promise<{
        market: PerpetualsMarket;
    }>;
    /**
     * Fetch multiple markets by ID.
     *
     * Backend note:
     * - The API supports returning orderbooks. This SDK currently constructs
     *  {@link PerpetualsMarket} from the returned `marketDatas[].market`.
     *
     * @param inputs.marketIds - Array of market object IDs to fetch.
     * @returns Object containing `markets` in the same order as `marketIds`.
     *
     * @example
     * ```ts
     * const { markets } = await perps.getMarkets({
     *   marketIds: ["0x..A", "0x..B"],
     * });
     * ```
     */
    getMarkets(inputs: {
        marketIds: PerpetualsMarketId[];
    }): Promise<{
        markets: PerpetualsMarket[];
    }>;
    /**
     * Fetch all vaults on the current network.
     *
     * Vaults are managed accounts that can hold positions; LPs deposit collateral
     * and receive an LP coin (see pricing helpers like {@link getLpCoinPrices}).
     *
     * @returns Object containing `vaults`.
     *
     * @example
     * ```ts
     * const { vaults } = await perps.getAllVaults();
     * ```
     */
    getAllVaults(): Promise<{
        vaults: PerpetualsVault[];
    }>;
    /**
     * Fetch a single vault by ID.
     *
     * Internally calls {@link getVaults} and returns the first entry.
     *
     * @param inputs.vaultId - Vault object ID.
     * @returns Object containing `vault`.
     */
    getVault(inputs: {
        vaultId: ObjectId;
    }): Promise<{
        vault: PerpetualsVault;
    }>;
    /**
     * Fetch multiple vaults by ID.
     *
     * @param inputs.vaultIds - Array of vault object IDs.
     * @returns Object containing `vaults` in the same order as `vaultIds`.
     */
    getVaults(inputs: {
        vaultIds: ObjectId[];
    }): Promise<{
        vaults: PerpetualsVault[];
    }>;
    /**
     * Convenience helper to fetch a single account (positions + account object) from an account cap.
     *
     * Internally calls {@link getAccounts} and returns the first entry.
     *
     * @param inputs.accountCap - Account cap or partial vault cap object to derive account metadata from.
     * @param inputs.marketIds - Optional list of markets to filter positions by.
     * @returns Object containing `account`.
     *
     * @example
     * ```ts
     * const [accountCap] = await perps.getOwnedAccountCaps({ walletAddress: "0x..." });
     * const { account } = await perps.getAccount({ accountCap });
     * ```
     */
    getAccount(inputs: {
        accountCap: PerpetualsAccountCap | PerpetualsPartialVaultCap;
        marketIds?: PerpetualsMarketId[];
    }): Promise<{
        account: PerpetualsAccount;
    }>;
    /**
     * Fetch one or more accounts (positions + account objects) from account caps.
     *
     * This composes:
     * 1) {@link getAccountObjects} to fetch {@link PerpetualsAccountObject}s by account ID
     * 2) Local pairing of returned account objects with `accountCaps`
     *
     * The returned {@link PerpetualsAccount} instances encapsulate:
     * - The account snapshot (positions, balances, etc.)
     * - The ownership/cap metadata (accountId, collateral type, vaultId, etc.)
     *
     * @param inputs.accountCaps - Array of account caps or partial vault cap objects.
     * @param inputs.marketIds - Optional list of market IDs to filter positions by.
     * @returns Object containing `accounts` in the same order as `accountCaps`.
     *
     * @remarks
     * If `accountCaps` is empty, this returns `{ accounts: [] }` without making an API call.
     */
    getAccounts(inputs: {
        accountCaps: (PerpetualsAccountCap | PerpetualsPartialVaultCap)[];
        marketIds?: PerpetualsMarketId[];
    }): Promise<{
        accounts: PerpetualsAccount[];
    }>;
    /**
     * Fetch raw account objects (including positions) for one or more account IDs.
     *
     * This is the lower-level primitive used by {@link getAccounts}.
     *
     * @param inputs.accountIds - List of account IDs to query.
     * @param inputs.marketIds - Optional list of market IDs to filter positions by.
     *
     * @returns {@link ApiPerpetualsAccountPositionsResponse} containing `accounts`.
     *
     * @remarks
     * If `accountIds` is empty, this returns `{ accounts: [] }` without making an API call.
     */
    getAccountObjects(inputs: ApiPerpetualsAccountPositionsBody): Promise<ApiPerpetualsAccountPositionsResponse>;
    /**
     * Fetch all account caps (perpetuals accounts) owned by a wallet, optionally
     * filtered by collateral coin types.
     *
     * Returned values are “caps” (ownership objects), not full account snapshots.
     * To fetch account positions, use {@link getAccount} or {@link getAccounts}.
     *
     * @param inputs.walletAddress - Owner wallet address.
     * @param inputs.collateralCoinTypes - Optional list of collateral coin types to filter by.
     * @returns {@link ApiPerpetualsOwnedAccountCapsResponse} containing `accounts`.
     *
     * @example
     * ```ts
     * const { accounts } = await perps.getOwnedAccountCaps({
     *   walletAddress: "0x...",
     *   collateralCoinTypes: ["0x2::sui::SUI"],
     * });
     * ```
     */
    getOwnedAccountCaps(inputs: ApiPerpetualsOwnedAccountCapsBody): Promise<ApiPerpetualsOwnedAccountCapsResponse>;
    /**
     * Fetch all vault caps owned by a wallet.
     *
     * Vault caps represent ownership/administrative authority over a vault.
     *
     * @param inputs.walletAddress - Owner wallet address.
     * @returns {@link ApiPerpetualsOwnedVaultCapsResponse} containing vault caps.
     */
    getOwnedVaultCaps(inputs: ApiPerpetualsOwnedVaultCapsBody): Promise<ApiPerpetualsOwnedVaultCapsResponse>;
    /**
     * Fetch all vault **assistant** caps owned by a wallet.
     *
     * Assistant caps grant a non-owner wallet the ability to operate a vault
     * on behalf of the owner. The returned caps are structurally identical to
     * regular vault caps ({@link PerpetualsVaultCap}) and can be used to
     * construct a {@link PerpetualsAccount} that signs vault transactions with
     * the assistant's wallet.
     *
     * @param inputs.walletAddress - Assistant wallet address.
     * @returns {@link ApiPerpetualsOwnedVaultAssistantCapsResponse} containing
     *   assistant caps.
     */
    getOwnedVaultAssistantCaps(inputs: ApiPerpetualsOwnedVaultAssistantCapsBody): Promise<ApiPerpetualsOwnedVaultAssistantCapsResponse>;
    /**
     * Fetch all pending vault withdrawal requests created by a given wallet.
     *
     * Withdraw requests are typically created when LPs request to exit a vault
     * and may be subject to lock periods / delays depending on vault configuration.
     *
     * @param inputs.walletAddress - Wallet address that created the withdraw requests.
     * @returns {@link ApiPerpetualsVaultOwnedWithdrawRequestsResponse} containing requests.
     */
    getOwnedVaultWithdrawRequests(inputs: ApiPerpetualsVaultOwnedWithdrawRequestsBody): Promise<ApiPerpetualsVaultOwnedWithdrawRequestsResponse>;
    /**
     * Fetch all Perpetuals vault LP coins owned by a wallet.
     *
     * This returns coin objects (or summaries) representing LP token holdings.
     * Use {@link getLpCoinPrices} to value them in collateral units.
     *
     * @param inputs - {@link ApiPerpetualsVaultOwnedLpCoinsBody}.
     * @returns {@link ApiPerpetualsVaultOwnedLpCoinsResponse}.
     */
    getOwnedVaultLpCoins(inputs: ApiPerpetualsVaultOwnedLpCoinsBody): Promise<ApiPerpetualsVaultOwnedLpCoinsResponse>;
    /**
     * Fetch account caps by their account IDs.
     *
     * @param inputs.accountCapIds - List of account IDs.
     * @returns {@link ApiPerpetualsAccountCapsResponse} containing caps.
     */
    getAdminAccountCaps(inputs: ApiPerpetualsAdminAccountCapsBody): Promise<ApiPerpetualsAdminAccountCapsResponse>;
    /**
     * Fetch historical OHLCV candle data for a single market.
     *
     * @param inputs.marketId - Market ID to query.
     * @param inputs.fromTimestamp - Start timestamp (inclusive).
     * @param inputs.toTimestamp - End timestamp (exclusive).
     * @param inputs.intervalMs - Candle interval in milliseconds.
     *
     * @returns {@link ApiPerpetualsMarketCandleHistoryResponse} containing candle points.
     *
     * @remarks
     * This is currently implemented on the Perpetuals root client, but it may be
     * relocated to {@link PerpetualsMarket} in the future.
     */
    getMarketCandleHistory(inputs: ApiPerpetualsMarketCandleHistoryBody): Promise<ApiPerpetualsMarketCandleHistoryResponse>;
    /**
     * Fetch historical funding rate data for a single market.
     *
     * @param inputs.marketId - Market ID to query.
     * @param inputs.fromTimestamp - Start timestamp (inclusive).
     * @param inputs.toTimestamp - End timestamp (exclusive).
     * @param inputs.limit - Optional cap on the number of points returned.
     *
     * @returns {@link ApiPerpetualsMarketFundingHistoryResponse} containing
     * funding history points.
     */
    getMarketFundingHistory(inputs: ApiPerpetualsMarketFundingHistoryBody): Promise<ApiPerpetualsMarketFundingHistoryResponse>;
    /**
     * Fetch 24-hour volume and price change stats for multiple markets.
     *
     * Returns volume, price change, and the latest base, collateral,
     * mid, and mark prices for each requested market.
     *
     * @param inputs.marketIds - Market IDs to query.
     * @returns {@link ApiPerpetualsMarkets24hrStatsResponse}.
     */
    getMarkets24hrStats(inputs: {
        marketIds: PerpetualsMarketId[];
    }): Promise<ApiPerpetualsMarkets24hrStatsResponse>;
    /**
     * Fetch the latest prices for one or more markets.
     *
     * Returns base, collateral, order book mid, and mark prices for each
     * requested market.
     *
     * @param inputs.marketIds - List of market IDs to query.
     * @returns {@link ApiPerpetualsMarketsPricesResponse} containing `marketsPrices`.
     *
     * @remarks
     * If `marketIds` is empty, returns `{ marketsPrices: [] }` without making an API call.
     */
    getPrices(inputs: {
        marketIds: ObjectId[];
    }): Promise<ApiPerpetualsMarketsPricesResponse>;
    /**
     * Fetch LP coin prices (in collateral units) for a set of vaults.
     *
     * @param inputs.vaultIds - List of vault IDs to query.
     * @returns {@link ApiPerpetualsVaultLpCoinPricesResponse} containing `lpCoinPrices`.
     *
     * @remarks
     * If `vaultIds` is empty, returns `{ lpCoinPrices: [] }` without making an API call.
     */
    getLpCoinPrices(inputs: ApiPerpetualsVaultLpCoinPricesBody): Promise<ApiPerpetualsVaultLpCoinPricesResponse>;
    /**
     * Build a transaction to transfer a Perpetuals capability object (cap) to another wallet.
     *
     * Supports two methods:
     * - **Method 1**: Provide `capObjectId` to transfer an existing on-chain object.
     * - **Method 2**: Provide `composed` with the PTB argument and capability type
     *   from a deferred PTB composition (e.g., from `getCreateAccountTx` with `deferShare=true`).
     *
     * @param inputs.recipientAddress - Recipient wallet address that should receive the cap.
     * @param inputs.capObjectId - Object ID of the capability to transfer (Method 1).
     * @param inputs.composed - Composed PTB argument + capability type (Method 2).
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing a `tx`.
     */
    getTransferCapTx(inputs: Omit<ApiPerpetualsTransferCapTxBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `create-account` transaction for Aftermath Perpetuals.
     *
     * When `deferShare` is `true`, the response includes a `deferred` object with
     * `accountArg`, `sharePolicyArg`, `adminCapArg`, and `collateralCoinType` so you
     * can compose additional commands (grant-agent-wallet, transfer-cap) before calling
     * {@link getShareAccountTx} to finalize.
     *
     * @param inputs.walletAddress - Wallet address that will own the new account.
     * @param inputs.collateralCoinType - Collateral coin type used by the account.
     * @param inputs.deferShare - When true, returns `deferred` args without sharing yet.
     * @param inputs.tx - Optional {@link Transaction} to extend.
     * @returns `tx` plus optional `deferred` containing argument references when deferred.
     */
    getCreateAccountTx(inputs: Omit<ApiPerpetualsCreateAccountBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiPerpetualsCreateAccountResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a transaction that grants an Agent Wallet permission on a Perpetuals account.
     *
     * Supports two methods:
     * - **Method 1 (existing account)**: Provide `accountId` to look up an existing shared account.
     * - **Method 2 (composed flow)**: Provide `deferred` with the argument references
     *   from a deferred `getCreateAccountTx` call.
     *
     * @param inputs.recipientAddress - Wallet address to receive agent permissions.
     * @param inputs.accountId - Perpetuals account ID (Method 1).
     * @param inputs.deferred - Deferred account args from `getCreateAccountTx` (Method 2).
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing a `tx`.
     */
    getGrantAgentWalletTx(inputs: Omit<ApiPerpetualsGrantAgentWalletTxBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a transaction to share a Perpetuals account that was created with deferred sharing.
     *
     * This finalizes the account creation flow by consuming the `AccountSharePolicy`
     * and sharing the `Account` object. Call this after composing additional commands
     * (grant-agent-wallet, transfer-cap) with the args returned by {@link getCreateAccountTx}.
     *
     * Pass the deferred fields (`accountArg`, `sharePolicyArg`, `adminCapArg`,
     * `collateralCoinType`) from the `deferred` object returned by `getCreateAccountTx`.
     *
     * @param inputs.accountArg - Account argument from deferred create.
     * @param inputs.sharePolicyArg - Share policy argument from deferred create.
     * @param inputs.adminCapArg - Admin cap argument from deferred create.
     * @param inputs.collateralCoinType - Collateral type for the account.
     * @param inputs.sponsor - Optional sponsorship config.
     * @param inputs.tx - Optional transaction to extend.
     *
     * @returns Transaction response containing a `tx`.
     */
    getShareAccountTx(inputs: Omit<ApiPerpetualsShareAccountBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `create-vault-cap` transaction.
     *
     * A vault cap is an ownership/admin object for interacting with vault management
     * flows. This method returns a transaction kind that mints/creates that cap.
     *
     * @param inputs - {@link ApiPerpetualsCreateVaultCapBody}.
     * @returns {@link SdkTransactionResponse} with `tx`.
     */
    getCreateVaultCapTx(inputs: ApiPerpetualsCreateVaultCapBody): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a `create-vault` transaction.
     *
     * This creates a new vault plus its on-chain metadata and initial LP supply
     * seeded by the initial deposit.
     *
     * Deposit input:
     * - Use `initialDepositAmount` to have the API select/merge coins as needed, OR
     * - Use `initialDepositCoinArg` if you already have a coin argument in a larger tx.
     *
     * Metadata:
     * - Stored on-chain (or in a referenced object) as part of vault creation.
     * - `extraFields` allows forward-compatible additions (e.g. social links).
     *
     * @param inputs.walletAddress - Address of vault owner/curator.
     * @param inputs.metadata - Vault display metadata (name, description, curator info).
     * @param inputs.metadata - Vault display metadata (name, description, curator info).
     * @param inputs.coinMetadataId - Coin metadata object id obtained from create vault cap tx
     * @param inputs.treasuryCapId - Treasury cap object id obtained from create vault cap tx
     * @param inputs.collateralCoinType - Collateral coin type for deposits.
     * @param inputs.lockPeriodMs - Lock-in period for deposits in milliseconds.
     * @param inputs.performanceFeePercentage - Fraction of profits taken as curator fee.
     * @param inputs.forceWithdrawDelayMs - Delay before forced withdrawals can be processed.
     * @param inputs.isSponsoredTx - Whether this tx is sponsored (gas paid by another party).
     * @param inputs.initialDepositAmount - Initial deposit amount (mutually exclusive with `initialDepositCoinArg`).
     * @param inputs.initialDepositCoinArg - Transaction object argument referencing the deposit coin.
     * @param inputs.tx - Optional {@link Transaction} to extend.
     *
     * @returns {@link SdkTransactionResponse} with `tx`.
     */
    getCreateVaultTx(inputs: {
        walletAddress: SuiAddress;
        metadata: {
            /** A human-readable name for the `Vault`. */
            name: string;
            /** A verbose description of the `Vault`. */
            description: string;
            /** The `Vault` curator's name. */
            curatorName?: string;
            /** A url for the `Vault`'s curator. Ideally their website. */
            curatorUrl?: string;
            /** An image url for the `Vault`'s curator. Ideally their logo. */
            curatorLogoUrl?: string;
            /**
             * Extra / optional fields for future extensibility.
             * Recommended keys include: `twitter_url`.
             */
            extraFields?: Record<string, string>;
        };
        coinMetadataId: ObjectId;
        treasuryCapId: ObjectId;
        collateralCoinType: CoinType;
        lockPeriodMs: bigint;
        performanceFeePercentage: Percentage;
        forceWithdrawDelayMs: bigint;
        sponsor?: PerpetualsSponsorConfig;
        tx?: Transaction;
        isSponsoredTx?: boolean;
    } & ({
        initialDepositAmount: Balance;
    } | {
        initialDepositCoinArg: TransactionObjectArgument;
    })): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Calculate rewards and rebates for one or more perpetuals accounts.
     *
     * Computes per-account maker and taker reward allocations, fee-tier rebates,
     * and volume-based metrics. When `accountIds` is omitted or empty, all eligible
     * accounts are included.
     *
     * **Note:** All data returned is for the current epoch only.
     *
     * @param inputs.totalMakerRewards - Total maker reward pool to distribute.
     * @param inputs.totalTakerRewards - Total taker reward pool to distribute.
     * @param inputs.accountIds - Optional list of account IDs.
     * @returns {@link ApiPerpetualsCurrentRebateRewardsResponse} with per-account reward and rebate data.
     *
     * @example
     * ```ts
     * const { totalQScoreFinal, rewards } = await perps.getCurrentRebateRewards({
     *   totalMakerRewards: 10000,
     *   totalTakerRewards: 5000,
     * });
     * ```
     */
    getCurrentRebateRewards(inputs: ApiPerpetualsCurrentRebateRewardsBody): Promise<ApiPerpetualsCurrentRebateRewardsResponse>;
    /**
     * Generate a CSV-formatted rebate report for perpetuals market makers.
     *
     * Computes per-account reward allocations and fee-tier rebate adjustments,
     * returning the result as a CSV string. When `aggregated` is true, the CSV
     * groups rewards by owner address instead of per-account.
     *
     * **Note:** All data returned is for the current epoch only.
     *
     * @param inputs - {@link ApiPerpetualsCreateCsvRebatesBody}.
     * @returns {@link ApiPerpetualsCreateCsvRebatesResponse} containing the CSV string.
     */
    getCsvRebates(inputs: ApiPerpetualsCreateCsvRebatesBody): Promise<ApiPerpetualsCreateCsvRebatesResponse>;
    /**
     * Generate a CSV-formatted referral rebate report.
     *
     * Calculates referrer commissions and referee discounts based on trading
     * fees within the specified epoch, returning the result as a CSV string.
     *
     * @param inputs - {@link ApiPerpetualsCreateReferralCsvRebatesBody}.
     * @returns {@link ApiPerpetualsCreateReferralCsvRebatesResponse} containing the CSV string.
     */
    getReferralCsvRebates(inputs: ApiPerpetualsCreateReferralCsvRebatesBody): Promise<ApiPerpetualsCreateReferralCsvRebatesResponse>;
    /**
     * Build a transaction to create an integrator configuration.
     *
     * This endpoint creates a transaction that allows a user to grant permission to an
     * integrator to receive fees on orders placed on their behalf. The user specifies
     * a maximum taker fee that the integrator can charge. The integrator can then
     * include their address and fee (up to the maximum) when placing orders for the user.
     *
     * The resulting transaction must be signed by the account owner and executed on-chain.
     *
     * @param inputs - {@link ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody}.
     * @returns {@link SdkTransactionResponse} with `tx`.
     *
     * @example
     * ```ts
     * const tx = await perps.getCreateBuilderCodeIntegratorConfigTx({
     *   accountId: 123n,
     *   integratorAddress: "0x...",
     *   maxTakerFee: 0.001, // 0.1% max fee
     * });
     * ```
     */
    getCreateBuilderCodeIntegratorConfigTx(inputs: Omit<ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a transaction to remove an integrator configuration.
     *
     * This endpoint creates a transaction that removes an integrator's approval to
     * collect fees on orders placed on behalf of the user. Once revoked, the integrator
     * will no longer be able to submit orders with integrator fees for this account.
     * The user can re-approve the integrator at any time by calling
     * {@link getCreateIntegratorConfigTx} again.
     *
     * The resulting transaction must be signed by the account owner and executed on-chain.
     *
     * @param inputs - {@link ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody}.
     * @returns {@link SdkTransactionResponse} with `tx`.
     *
     * @example
     * ```ts
     * const tx = await perps.getRemoveBuilderCodeIntegratorConfigTx({
     *   accountId: 123n,
     *   integratorAddress: "0x...",
     * });
     * ```
     */
    getRemoveBuilderCodeIntegratorConfigTx(inputs: Omit<ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a transaction to initialize an integrator fee vault for a specific market.
     *
     * This endpoint creates a transaction that initializes a vault where an integrator's
     * fees will accumulate for a specific market (clearing house). This is a one-time
     * setup operation that must be performed before the integrator can claim fees from
     * that market. Once created, the vault will automatically collect fees as the
     * integrator submits orders on behalf of users in that market.
     *
     * The resulting transaction must be signed by the integrator and executed on-chain.
     *
     * @param inputs - {@link ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody}.
     * @returns {@link SdkTransactionResponse} with `tx`.
     *
     * @example
     * ```ts
     * const tx = await perps.getCreateBuilderCodeIntegratorVaultTx({
     *   marketId: "0x...",
     *   integratorAddress: "0x...",
     * });
     * ```
     */
    getCreateBuilderCodeIntegratorVaultTx(inputs: Omit<ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiTransactionResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Build a transaction to claim accumulated integrator fees from a vault.
     *
     * This endpoint creates a transaction that allows an integrator to claim the fees
     * they have earned from orders placed on behalf of users. Fees accumulate in a vault
     * specific to each market (clearing house) and can be claimed at any moment by the
     * integrator. The fees are proportional to the taker volume generated by the users'
     * orders that the integrator submitted.
     *
     * If a `recipientAddress` is provided, the claimed fees will be automatically
     * transferred to that address. Otherwise, the coin output is exposed as a transaction
     * argument for further use in the transaction.
     *
     * The resulting transaction must be signed by the integrator and executed on-chain.
     *
     * @param inputs - {@link ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody}.
     * @returns {@link ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse} containing
     *   `txKind` and optionally `coinOutArg`.
     *
     * @example
     * ```ts
     * // Claim with automatic transfer to recipient
     * const response = await perps.getClaimBuilderCodeIntegratorVaultFeesTx({
     *   marketId: "0x...",
     *   integratorAddress: "0x...",
     *   recipientAddress: "0x...",
     * });
     *
     * // Claim with coin output for further use
     * const response = await perps.getClaimBuilderCodeIntegratorVaultFeesTx({
     *   marketId: "0x...",
     *   integratorAddress: "0x...",
     * });
     * // response.coinOutArg can be used in subsequent transaction commands
     * ```
     */
    getClaimBuilderCodeIntegratorVaultFeesTx(inputs: Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, "txKind"> & {
        tx?: Transaction;
    }): Promise<Omit<ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, "txKind"> & {
        tx: Transaction;
    }>;
    /**
     * Fetch integrator configuration for a specific account and integrator.
     *
     * This endpoint queries whether an integrator has been approved by an account to collect
     * fees on orders placed on behalf of the account. If approved, it returns the maximum
     * taker fee the integrator is authorized to charge. This information is useful for:
     * - Verifying integrator permissions before placing orders
     * - Displaying authorized integrators and their fee limits in UIs
     * - Validating that an integrator's requested fee doesn't exceed the approved maximum
     *
     * @param inputs - {@link ApiPerpetualsBuilderCodesIntegratorConfigBody}.
     * @returns {@link ApiPerpetualsBuilderCodesIntegratorConfigResponse} containing
     *   `maxTakerFee` and `exists` flag.
     *
     * @example
     * ```ts
     * const config = await perps.getBuilderCodeIntegratorConfig({
     *   accountId: 123n,
     *   integratorAddress: "0x...",
     * });
     *
     * if (config.exists) {
     *   console.log(`Integrator is approved with max fee: ${config.maxTakerFee}`);
     * } else {
     *   console.log("Integrator is not approved for this account");
     * }
     * ```
     */
    getBuilderCodeIntegratorConfig(inputs: ApiPerpetualsBuilderCodesIntegratorConfigBody): Promise<ApiPerpetualsBuilderCodesIntegratorConfigResponse>;
    /**
     * Fetch accumulated integrator vault fees across multiple markets.
     *
     * This endpoint queries the total fees an integrator has earned and accumulated in their
     * vaults across one or more markets (clearing houses). Integrators earn fees proportional
     * to the taker volume generated by orders they submit on behalf of users. These fees
     * accumulate in per-market vaults and can be claimed at any time using
     * {@link getClaimIntegratorVaultFeesTx}.
     *
     * This information is useful for:
     * - Displaying total claimable fees to integrators in dashboards
     * - Monitoring fee accrual across different markets
     * - Determining which markets have fees ready to be claimed
     *
     * @param inputs - {@link ApiPerpetualsBuilderCodesIntegratorVaultsBody}.
     * @returns {@link ApiPerpetualsBuilderCodesIntegratorVaultsResponse} containing
     *   a vector of market vault data with accumulated fees.
     *
     * @example
     * ```ts
     * const vaultFees = await perps.getBuilderCodeIntegratorVaults({
     *   marketIds: ["0x...BTCUSD", "0x...SUIUSD"],
     *   integratorAddress: "0x...",
     * });
     *
     * for (const vault of vaultFees.integratorVaults) {
     *   console.log(`Market ${vault.marketId}: ${vault.fees} collateral units claimable`);
     * }
     *
     * const totalFees = vaultFees.integratorVaults.reduce((sum, vault) => sum + vault.fees, 0);
     * console.log(`Total claimable: ${totalFees}`);
     * ```
     */
    getBuilderCodeIntegratorVaults(inputs: ApiPerpetualsBuilderCodesIntegratorVaultsBody): Promise<ApiPerpetualsBuilderCodesIntegratorVaultsResponse>;
    /**
     * Determine the logical order side (Bid/Ask) from a signed base asset amount.
     *
     * @param inputs.baseAssetAmount - Position base size. Positive/zero => Bid (long), negative => Ask (short).
     * @returns {@link PerpetualsOrderSide}.
     */
    static positionSide(inputs: {
        baseAssetAmount: number;
    }): PerpetualsOrderSide;
    /**
     * Compute the effective trade price from a {@link FilledTakerOrderEvent}.
     *
     * Uses the ratio: `quoteAssetDelta / baseAssetDelta`.
     *
     * @param inputs.orderEvent - Filled taker order event.
     * @returns Trade price.
     */
    static orderPriceFromEvent(inputs: {
        orderEvent: FilledTakerOrderEvent;
    }): number;
    /**
     * Extract the floating-point price from an encoded order ID.
     *
     * Internally uses {@link PerpetualsOrderUtils.price} and converts the fixed-point
     * {@link PerpetualsOrderPrice} into a `number`.
     *
     * @param inputs.orderId - Encoded order ID.
     * @returns Price as a `number`.
     */
    static orderPriceFromOrderId(inputs: {
        orderId: PerpetualsOrderId;
    }): number;
    /**
     * Convert a floating-point price into a fixed-point {@link PerpetualsOrderPrice}
     * using 9 decimal places of precision.
     *
     * @param inputs.price - Price as a float.
     * @returns Fixed-point order price.
     */
    static priceToOrderPrice: (inputs: {
        price: number;
    }) => PerpetualsOrderPrice;
    /**
     * Convert a fixed-point {@link PerpetualsOrderPrice} to a float price.
     *
     * @param inputs.orderPrice - Fixed-point order price.
     * @returns Price as a float.
     */
    static orderPriceToPrice: (inputs: {
        orderPrice: PerpetualsOrderPrice;
    }) => number;
    /**
     * Convert a fixed-point lot/tick size (9 decimals) to a `number`.
     *
     * @param lotOrTickSize - Fixed-point size as `bigint`.
     * @returns Floating-point size.
     */
    static lotOrTickSizeToNumber(lotOrTickSize: bigint): number;
    /**
     * Convert a floating-point lot/tick size to its fixed-point representation (9 decimals).
     *
     * @param lotOrTickSize - Floating-point size.
     * @returns Fixed-point size as `bigint`.
     */
    static lotOrTickSizeToBigInt(lotOrTickSize: number): bigint;
    /**
     * Infer the order side from an encoded order ID.
     *
     * @param orderId - Encoded order ID.
     * @returns {@link PerpetualsOrderSide}.
     */
    static orderIdToSide: (orderId: PerpetualsOrderId) => PerpetualsOrderSide;
    /**
     * Construct a collateral-specialized Move event type string.
     *
     * Many Move events are generic over a collateral coin type. This helper appends
     * `<collateralCoinType>` to a base `eventType`.
     *
     * @param inputs.eventType - Base event type without type parameters.
     * @param inputs.collateralCoinType - Collateral coin type (e.g. `"0x2::sui::SUI"`).
     * @returns Fully-qualified event type string.
     */
    static eventTypeForCollateral: (inputs: {
        eventType: string;
        collateralCoinType: CoinType;
    }) => string;
    /**
     * Open the main updates websocket: `/perpetuals/ws/updates`.
     *
     * The stream emits {@link PerpetualsWsUpdatesResponseMessage} envelopes and supports
     * multiple subscription types. This method returns a small controller with
     * convenience subscribe/unsubscribe functions.
     *
     * Subscription types supported by the controller:
     * - `market`: market state updates
     * - `user`: user account updates (optionally including stop orders)
     * - `oracle`: oracle price updates
     * - `orderbook`: orderbook deltas
     * - `marketOrders`: public market trades/orders
     * - `userOrders`: user trade/order events
     * - `userCollateralChanges`: user collateral change events
     * - `topOfOrderbook`: bucketed orderbook snapshots (top of orderbook)
     *
     * @param args.onMessage - Handler for parsed messages from the websocket.
     * @param args.onOpen - Optional handler for the `open` event.
     * @param args.onError - Optional handler for the `error` event.
     * @param args.onClose - Optional handler for the `close` event.
     *
     * @returns A controller object containing:
     * - `ws`: underlying {@link WebSocket}
     * - subscribe/unsubscribe helpers for each subscription type
     * - `close()`: closes the websocket
     */
    openUpdatesWebsocketStream(args: {
        onMessage: (env: PerpetualsWsUpdatesResponseMessage) => void;
        onOpen?: (ev: Event) => void;
        onError?: (ev: Event) => void;
        onClose?: (ev: CloseEvent) => void;
    }): {
        ws: WebSocket;
        subscribeMarket: ({ marketId }: {
            marketId: PerpetualsMarketId;
        }) => void;
        unsubscribeMarket: ({ marketId, }: {
            marketId: PerpetualsMarketId;
        }) => void;
        subscribeUser: ({ accountId, withStopOrders, }: {
            accountId: PerpetualsAccountId;
            withStopOrders: {
                walletAddress: SuiAddress;
                bytes: string;
                signature: string;
            } | undefined;
        }) => void;
        unsubscribeUser: ({ accountId, withStopOrders, }: {
            accountId: PerpetualsAccountId;
            withStopOrders: {
                walletAddress: SuiAddress;
                bytes: string;
                signature: string;
            } | undefined;
        }) => void;
        subscribeOracle: ({ marketId }: {
            marketId: PerpetualsMarketId;
        }) => void;
        unsubscribeOracle: ({ marketId, }: {
            marketId: PerpetualsMarketId;
        }) => void;
        subscribeOrderbook: ({ marketId, }: {
            marketId: PerpetualsMarketId;
        }) => void;
        unsubscribeOrderbook: ({ marketId, }: {
            marketId: PerpetualsMarketId;
        }) => void;
        subscribeMarketOrders: ({ marketId, }: {
            marketId: PerpetualsMarketId;
        }) => void;
        unsubscribeMarketOrders: ({ marketId, }: {
            marketId: PerpetualsMarketId;
        }) => void;
        subscribeUserOrders: ({ accountId, }: {
            accountId: PerpetualsAccountId;
        }) => void;
        unsubscribeUserOrders: ({ accountId, }: {
            accountId: PerpetualsAccountId;
        }) => void;
        subscribeUserCollateralChanges: ({ accountId, }: {
            accountId: PerpetualsAccountId;
        }) => void;
        unsubscribeUserCollateralChanges: ({ accountId, }: {
            accountId: PerpetualsAccountId;
        }) => void;
        subscribeTopOfOrderbook: ({ marketId, priceBucketSize, bucketsNumber, }: {
            marketId: PerpetualsMarketId;
            priceBucketSize: number;
            bucketsNumber: number;
        }) => void;
        unsubscribeTopOfOrderbook: ({ marketId, priceBucketSize, bucketsNumber, }: {
            marketId: PerpetualsMarketId;
            priceBucketSize: number;
            bucketsNumber: number;
        }) => void;
        close: () => void;
    };
    /**
     * Open a market-candles websocket stream for a single market/interval:
     * `/perpetuals/ws/market-candles/{market_id}/{interval_ms}`.
     *
     * The stream emits {@link PerpetualsWsCandleResponseMessage} messages,
     * typically containing the latest candle for the specified interval.
     *
     * @param args.marketId - Market ID to subscribe to.
     * @param args.intervalMs - Candle interval in milliseconds.
     * @param args.onMessage - Handler for incoming candle updates.
     * @param args.onOpen - Optional hook called when the websocket opens.
     * @param args.onError - Optional hook called on websocket error.
     * @param args.onClose - Optional hook called when the websocket closes.
     *
     * @returns A controller containing the raw websocket and a `close()` helper.
     *
     * @example
     * ```ts
     * const stream = perps.openMarketCandlesWebsocketStream({
     *   marketId: "0x...",
     *   intervalMs: 60_000,
     *   onMessage: ({ lastCandle }) => console.log(lastCandle),
     * });
     * ```
     */
    openMarketCandlesWebsocketStream(args: {
        marketId: PerpetualsMarketId;
        intervalMs: number;
        onMessage: (msg: PerpetualsWsCandleResponseMessage) => void;
        onOpen?: (ev: Event) => void;
        onError?: (ev: Event) => void;
        onClose?: (ev: CloseEvent) => void;
    }): {
        ws: WebSocket;
        close: () => void;
    };
}

/**
 * The `ReferralVault` class provides functionality for querying and managing
 * referral information within the Aftermath protocol. It allows you to look
 * up the referrer for a given address.
 *
 * @deprecated Use `Referral` class instead
 */
declare class ReferralVault extends Caller {
    /**
     * Contains static configuration relevant to the referral system, if any.
     * Currently empty but can be extended for future needs.
     */
    static readonly constants: {};
    /**
     * Creates a new instance of `ReferralVault` to interact with referral-related
     * features in the Aftermath protocol.
     *
     * @deprecated Use `Referral` class instead
     * @param config - Optional caller configuration, including Sui network and access token.
     * @param api - An optional `AftermathApi` provider instance for referral-specific methods.
     */
    constructor(config?: CallerConfig);
    /**
     * Retrieves the referrer address for a specified referee (user).
     *
     * @deprecated Use `Referral` class instead
     * @param inputs - An object containing the `referee` Sui address.
     * @returns A promise that resolves to either the referrer's `SuiAddress` or the string `"None"` if no referrer exists.
     *
     * @example
     * ```typescript
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const referralVault = afSdk.ReferralVault();
     *
     * const referrer = await referralVault.getReferrer({ referee: "0x<user_address>" });
     * console.log("Referrer address:", referrer);
     * ```
     */
    getReferrer(inputs: {
        referee: SuiAddress;
    }): Promise<SuiAddress | "None">;
}

/**
 * The `Router` class provides a collection of methods to interact with Aftermath's
 * smart order routing system on the Sui Network. It handles routing trades through
 * various liquidity pools to achieve the best possible execution price, retrieving
 * trade volume, managing supported coins, and more.
 *
 * @example
 * ```typescript
 * // Create provider
 * const router = (await Aftermath.create({ network: "MAINNET" })).Router();
 * // Retrieve 24h volume
 * const volume24h = await router.getVolume24hrs();
 * // Get supported coins
 * const supportedCoins = await router.getSupportedCoins();
 * ```
 */
declare class Router extends Caller {
    /**
     * Contains static information about the router, such as the maximum
     * allowable external fee percentage.
     */
    static readonly constants: {
        /**
         * The maximum external fee percentage that a third party can charge on router trades.
         * @remarks 0.5 = 50%
         */
        maxExternalFeePercentage: number;
    };
    /**
     * Creates a new `Router` instance to perform router-related calls on the
     * Aftermath platform.
     *
     * @param config - Optional configuration settings, including network and access token.
     * @returns A new `Router` instance.
     *
     * @example
     * ```typescript
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const router = afSdk.Router();
     * ```
     */
    constructor(config?: CallerConfig);
    /**
     * Retrieves the total trading volume in the last 24 hours.
     *
     * @returns A promise that resolves to a `number` representing the total volume in the last 24 hours.
     *
     * @example
     * ```typescript
     * const volume = await router.getVolume24hrs();
     * console.log(volume); // e.g. 1234567.89
     * ```
     */
    getVolume24hrs: () => Promise<number>;
    /**
     * Fetches a list of all coin types that are supported for trading through the router.
     *
     * @returns A promise that resolves to an array of coin types (`CoinType[]`).
     *
     * @example
     * ```typescript
     * const supportedCoins = await router.getSupportedCoins();
     * console.log(supportedCoins); // ["0x2::sui::SUI", "0x<...>::coin::TOKEN", ...]
     * ```
     */
    getSupportedCoins(): Promise<string[]>;
    /**
     * Searches the supported coins by applying a filter string.
     *
     * @param inputs - An object containing a `filter` string to match against supported coins.
     * @param abortSignal - An optional `AbortSignal` to cancel the request if needed.
     * @returns A promise that resolves to an array of coin types matching the filter.
     *
     * @example
     * ```typescript
     * const searchResult = await router.searchSupportedCoins({ filter: "SUI" });
     * console.log(searchResult); // e.g. ["0x2::sui::SUI"]
     * ```
     */
    searchSupportedCoins(inputs: {
        filter: string;
    }, abortSignal?: AbortSignal): Promise<string[]>;
    /**
     * Creates an optimal trade route for a given token input (`coinInType`) with a
     * specified input amount (`coinInAmount`). This route may consist of multiple
     * swaps across different DEX protocols to achieve the best price.
     *
     * @param inputs - Details required to construct the trade route, including `coinInType`, `coinOutType`, and `coinInAmount`.
     * @param abortSignal - An optional signal to abort the request if needed.
     * @returns A promise resolving to a `RouterCompleteTradeRoute` object containing the full route details.
     *
     * @example
     * ```typescript
     * const route = await router.getCompleteTradeRouteGivenAmountIn({
     *   coinInType: "0x2::sui::SUI",
     *   coinOutType: "0x<...>::coin::TOKEN",
     *   coinInAmount: BigInt(10_000_000_000),
     *   // optional fields:
     *   referrer: "0x<referrer_address>",
     *   externalFee: {
     *     recipient: "0x<fee_collector>",
     *     feePercentage: 0.01
     *   },
     *   protocolBlacklist: ["Cetus", "BlueMove"],
     *   poolBlacklist: ["0x<pool_id>"]
     * });
     * console.log(route);
     * ```
     */
    getCompleteTradeRouteGivenAmountIn(inputs: ApiRouterPartialCompleteTradeRouteBody & {
        /**
         * Amount of coin being given away
         */
        coinInAmount: Balance;
    }, abortSignal?: AbortSignal): Promise<RouterCompleteTradeRoute>;
    /**
     * Creates an optimal trade route for a given token output (`coinOutType`) with a
     * specified output amount (`coinOutAmount`). This route may consist of multiple
     * swaps to achieve the target output amount, factoring in slippage.
     *
     * @param inputs - Details required to construct the trade route, including `coinInType`, `coinOutType`, `coinOutAmount`, and `slippage`.
     * @param abortSignal - An optional signal to abort the request if needed.
     * @returns A promise resolving to a `RouterCompleteTradeRoute` object containing the full route details.
     *
     * @example
     * ```typescript
     * const route = await router.getCompleteTradeRouteGivenAmountOut({
     *   coinInType: "0x2::sui::SUI",
     *   coinOutType: "0x<...>::coin::TOKEN",
     *   coinOutAmount: BigInt(20_000_000),
     *   slippage: 0.01, // 1%
     *   protocolWhitelist: ["Aftermath", "Cetus"],
     *   poolWhitelist: ["0x<pool_id>"]
     * });
     * console.log(route);
     * ```
     */
    getCompleteTradeRouteGivenAmountOut(inputs: ApiRouterPartialCompleteTradeRouteBody & {
        /**
         * Amount of coin expected to receive
         */
        coinOutAmount: Balance;
        slippage: Slippage;
    }, abortSignal?: AbortSignal): Promise<RouterCompleteTradeRoute>;
    /**
     * Generates a transaction to execute a previously calculated complete trade route.
     * This transaction can then be signed and executed by the user.
     *
     * @param inputs - An object containing the wallet address, the complete trade route, slippage tolerance, and optional sponsorship settings.
     * @returns A promise resolving to a `Uint8Array` representing the serialized transaction.
     *
     * @example
     * ```typescript
     * const route = await router.getCompleteTradeRouteGivenAmountIn({ ... });
     * const transactionBytes = await router.getTransactionForCompleteTradeRoute({
     *   walletAddress: "0x<your_address>",
     *   completeRoute: route,
     *   slippage: 0.01
     * });
     * // The returned bytes can now be signed and executed using your chosen wallet.
     * ```
     */
    getTransactionForCompleteTradeRoute(inputs: ApiRouterTransactionForCompleteTradeRouteBody): Promise<Transaction>;
    /**
     * Adds a trade route to an existing transaction, allowing you to build complex
     * transactions containing multiple actions (swaps, transfers, etc.) in a single
     * atomic transaction.
     *
     * @param inputs - Includes the existing `Transaction`, a complete route, slippage, wallet address, and an optional `coinInId`.
     * @returns An object containing:
     *  - `tx`: The updated `Transaction` including the route instructions
     *  - `coinOutId`: A `TransactionObjectArgument` referencing the output coin after the swap
     *
     * @example
     * ```typescript
     * // 1) Create a route
     * const route = await router.getCompleteTradeRouteGivenAmountIn({ ... });
     *
     * // 2) Initialize your transaction
     * const tx = new Transaction();
     *
     * // 3) Add router instructions
     * const { tx: updatedTx, coinOutId } =
     *   await router.addTransactionForCompleteTradeRoute({
     *     tx,
     *     completeRoute: route,
     *     slippage: 0.01,
     *     walletAddress: "0x<your_address>"
     * });
     *
     * // 4) Continue building your transaction with the resulting coinOutId, if desired
     * updatedTx.transferObjects([coinOutId!], "0x<your_address>");
     * ```
     */
    addTransactionForCompleteTradeRoute(inputs: Omit<ApiRouterAddTransactionForCompleteTradeRouteBody, "serializedTx"> & {
        tx: Transaction;
    }): Promise<{
        tx: Transaction;
        coinOutId: _mysten_sui_transactions.TransactionObjectArgument | undefined;
    }>;
    /**
     * Retrieves trade events (interactions) for a given user based on router usage.
     *
     * @param inputs - Includes a `walletAddress`, cursor pagination, and limit.
     * @returns A promise resolving to the user's `RouterTradeEvent`s, potentially paginated.
     *
     * @example
     * ```typescript
     * const events = await router.getInteractionEvents({
     *   walletAddress: "0x<your_address>",
     *   cursor: 0,
     *   limit: 10
     * });
     * console.log(events);
     * ```
     */
    getInteractionEvents(inputs: ApiRouterTradeEventsBody): Promise<IndexerEventsWithCursor<RouterTradeEvent>>;
}

/**
 * The `Staking` class provides methods for interacting with Aftermath's
 * staking and unstaking systems for SUI. This includes fetching validator
 * information, creating stake and unstake transactions, and retrieving
 * relevant staking statistics such as TVL and APY.
 *
 * @example
 * ```typescript
 * // Instantiate Staking
 * const sdk = await Aftermath.create({ network: "MAINNET" });
 * const staking = sdk.Staking();
 *
 * // Get active validators
 * const validators = await staking.getActiveValidators();
 *
 * // Create a transaction for staking SUI
 * const stakeTx = await staking.getStakeTransaction({
 *   walletAddress: "0x...",
 *   suiStakeAmount: BigInt("1000000000"),
 *   validatorAddress: "0x..."
 * });
 * ```
 */
declare class Staking extends Caller {
    readonly api?: AftermathApi | undefined;
    /**
     * Contains constants for staking, including protocol fees, default validator
     * fee, and staking/unstaking bounds. Also defines the maximum external fee
     * percentage allowed for third-party fees.
     */
    static readonly constants: {
        /**
         * Configuration for fees related to staking and unstaking operations.
         */
        fees: {
            /**
             * Protocol unstake fee (5%).
             */
            protocolUnstake: number;
            /**
             * Default validator fee (0%).
             */
            defaultValidator: number;
            /**
             * Maximum validator fee (5%).
             */
            maxValidator: number;
        };
        /**
         * Configuration for minimum stake/unstake amounts, and maximum external fee
         * percentage allowed.
         */
        bounds: {
            /**
             * Minimum SUI that can be staked. 1 SUI = 10^9 MIST.
             */
            minStake: bigint;
            /**
             * Minimum afSUI that can be unstaked. 1 afSUI = 10^9 MIST (mirroring SUI decimals).
             */
            minUnstake: bigint;
            /**
             * Maximum external fee percentage that third parties can add on top
             * of protocol fees for staking or unstaking transactions.
             * @remarks 0.5 = 50%
             */
            maxExternalFeePercentage: number;
        };
        /**
         * The default validator fee (0%).
         */
        defaultValidatorFee: number;
    };
    /**
     * Creates a new instance of the `Staking` class for interacting with Aftermath
     * staking contracts.
     *
     * @param config - Optional configuration containing the Sui network and/or access token.
     * @param api - Optional instance of `AftermathApi` for building transactions.
     */
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetches the list of currently active validators on the Sui network.
     *
     * @returns A promise that resolves to an array of `SuiValidatorSummary` objects,
     * each describing a validator's on-chain metadata.
     *
     * @example
     * ```typescript
     * const validators = await staking.getActiveValidators();
     * console.log(validators);
     * ```
     */
    getActiveValidators(): Promise<SuiValidatorSummary[]>;
    /**
     * Fetches the current APYs for all validators, aggregated by the indexer.
     *
     * @returns A promise that resolves to a `ValidatorsApy` object, containing
     * APY data indexed by validator addresses.
     *
     * @example
     * ```typescript
     * const validatorApys = await staking.getValidatorApys();
     * console.log(validatorApys);
     * ```
     */
    getValidatorApys(): Promise<ValidatorsApy>;
    /**
     * Fetches the configuration details for each validator, including fees and
     * operation caps.
     *
     * @returns A promise that resolves to an array of `ValidatorConfigObject`s.
     *
     * @example
     * ```typescript
     * const configs = await staking.getValidatorConfigs();
     * console.log(configs);
     * ```
     */
    getValidatorConfigs(): Promise<ValidatorConfigObject[]>;
    /**
     * Retrieves a list of staking positions for the specified account.
     *
     * @param inputs - Contains the `walletAddress` to query, plus optional cursor
     * and limit for pagination.
     * @returns A promise that resolves to an array of `StakingPosition` objects
     * reflecting the user's active or pending stakes.
     *
     * @example
     * ```typescript
     * const positions = await staking.getStakingPositions({
     *   walletAddress: "0x...",
     *   cursor: 0,
     *   limit: 10
     * });
     * console.log(positions);
     * ```
     */
    getStakingPositions(inputs: ApiStakingPositionsBody): Promise<StakingPosition[]>;
    /**
     * Fetches all delegated stakes for a specific wallet address. Delegated
     * stakes typically represent user funds staked to one or more validators.
     *
     * @param inputs - Contains the `walletAddress` for which to fetch delegated stakes.
     * @returns A promise resolving to an array of `SuiDelegatedStake` objects.
     *
     * @example
     * ```typescript
     * const delegatedStakes = await staking.getDelegatedStakes({
     *   walletAddress: "0x..."
     * });
     * console.log(delegatedStakes);
     * ```
     */
    getDelegatedStakes(inputs: ApiDelegatedStakesBody): Promise<SuiDelegatedStake[]>;
    /**
     * Retrieves validator operation caps for a specified address. Operation caps
     * typically govern who is authorized to adjust validator fees and settings.
     *
     * @param inputs - Contains the `walletAddress` for which to fetch validator
     * operation caps, plus optional pagination.
     * @returns A promise resolving to an array of `ValidatorOperationCapObject`s.
     *
     * @example
     * ```typescript
     * const caps = await staking.getValidatorOperationCaps({
     *   walletAddress: "0x...",
     *   cursor: 0,
     *   limit: 5
     * });
     * console.log(caps);
     * ```
     */
    getValidatorOperationCaps(inputs: ApiValidatorOperationCapsBody): Promise<ValidatorOperationCapObject[]>;
    /**
     * Builds or fetches a staking transaction object, which can then be signed
     * and submitted to the network.
     *
     * @param inputs - Includes the `walletAddress`, the amount of SUI to stake, and
     * the validator address to stake with. Optionally includes a `referrer`, `externalFee`,
     * and a sponsored transaction flag.
     * @returns A promise resolving to a transaction that can be signed and executed.
     *
     * @example
     * ```typescript
     * const stakeTx = await staking.getStakeTransaction({
     *   walletAddress: "0x...",
     *   suiStakeAmount: BigInt("1000000000"), // 1 SUI
     *   validatorAddress: "0x..."
     * });
     * // sign and execute this transaction using your preferred Sui wallet
     * ```
     */
    getStakeTransaction(inputs: ApiStakeBody): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds or fetches an unstaking transaction object, allowing a user to
     * convert their afSUI back into SUI (either atomically or via partial
     * liquidity).
     *
     * @param inputs - Contains the `walletAddress`, the afSUI amount to unstake,
     * and whether it's an atomic operation. Optionally includes a `referrer`,
     * `externalFee`, and a sponsored transaction flag.
     * @returns A promise resolving to a transaction that can be signed and executed.
     *
     * @example
     * ```typescript
     * const unstakeTx = await staking.getUnstakeTransaction({
     *   walletAddress: "0x...",
     *   afSuiUnstakeAmount: BigInt("1000000000"), // 1 afSUI
     *   isAtomic: true
     * });
     * // sign and execute this transaction to receive SUI
     * ```
     */
    getUnstakeTransaction(inputs: ApiUnstakeBody): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds or fetches a transaction to stake an existing stakedSUI object
     * (e.g., re-staking funds that were already staked under a different
     * validator).
     *
     * @param inputs - Contains the `walletAddress`, an array of `stakedSuiIds`
     * to be re-staked, and the new `validatorAddress`. Optionally includes
     * a `referrer` and a sponsored transaction flag.
     * @returns A promise resolving to a transaction object that can be signed
     * and executed.
     *
     * @example
     * ```typescript
     * const stakeStakedTx = await staking.getStakeStakedSuiTransaction({
     *   walletAddress: "0x...",
     *   stakedSuiIds: ["0x<stakedSuiId1>", "0x<stakedSuiId2>"],
     *   validatorAddress: "0x..."
     * });
     * // sign and execute this transaction
     * ```
     */
    getStakeStakedSuiTransaction(inputs: ApiStakeStakedSuiBody): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds or fetches a transaction to update the validator fee for a
     * validator in which the user has operation cap privileges.
     *
     * @param inputs - Contains the `walletAddress`, `validatorOperationCapId`,
     * and `newFeePercentage`. Optionally includes a sponsored transaction flag.
     * @returns A transaction object that can be signed and executed to
     * update the validator's fee on-chain.
     *
     * @example
     * ```typescript
     * const updateFeeTx = await staking.getUpdateValidatorFeeTransaction({
     *   walletAddress: "0x...",
     *   validatorOperationCapId: "0x...",
     *   newFeePercentage: 0.01,
     *   isSponsoredTx: false
     * });
     * // sign and execute to update the validator fee
     * ```
     */
    getUpdateValidatorFeeTransaction(inputs: ApiUpdateValidatorFeeBody): Promise<_mysten_sui_transactions.Transaction>;
    /**
     * Builds a "crank" transaction to update the epoch for afSUI. This can
     * trigger certain internal processes within the Aftermath protocol,
     * such as distributing rewards or rebalancing.
     *
     * @param inputs - Contains the `walletAddress` to sign the transaction.
     * @returns A transaction object that can be signed and submitted to
     * trigger an epoch update.
     *
     * @example
     * ```typescript
     * const crankTx = await staking.getCrankAfSuiTransaction({
     *   walletAddress: "0x..."
     * });
     * // sign and execute transaction
     * ```
     */
    getCrankAfSuiTransaction(inputs: {
        walletAddress: SuiAddress;
    }): _mysten_sui_transactions.Transaction;
    /**
     * Retrieves the total value locked (TVL) in SUI across the Aftermath
     * staking systems.
     *
     * @returns A promise that resolves to a `Balance` representing the total
     * staked SUI in the protocol.
     *
     * @example
     * ```typescript
     * const tvl = await staking.getSuiTvl();
     * console.log("Total value locked in SUI:", tvl);
     * ```
     */
    getSuiTvl(): Promise<Balance>;
    /**
     * Retrieves the current exchange rate between afSUI and SUI. This rate
     * is used to determine how much SUI a single afSUI token is worth.
     *
     * @returns A promise that resolves to a `number` representing the
     * afSUI-to-SUI rate.
     *
     * @example
     * ```typescript
     * const rate = await staking.getAfSuiToSuiExchangeRate();
     * console.log("1 afSUI =", rate, "SUI");
     * ```
     */
    getAfSuiToSuiExchangeRate(): Promise<number>;
    /**
     * Retrieves the stakedSui vault state from the protocol, which holds
     * important values for calculating fees, reserves, and total active
     * stake.
     *
     * @returns A promise that resolves to a `StakedSuiVaultStateObject`,
     * containing details like atomic unstake reserves, fees, and total SUI.
     *
     * @example
     * ```typescript
     * const vaultState = await staking.getStakedSuiVaultState();
     * console.log("Vault State:", vaultState);
     * ```
     */
    getStakedSuiVaultState(): Promise<StakedSuiVaultStateObject>;
    /**
     * Retrieves the current APY (Annual Percentage Yield) for staking SUI
     * through Aftermath.
     *
     * @returns A promise that resolves to a `number` representing the APY.
     *
     * @example
     * ```typescript
     * const apy = await staking.getApy();
     * console.log("Current staking APY:", apy);
     * ```
     */
    getApy(): Promise<number>;
    /**
     * Retrieves historical APY data points over a specified timeframe.
     *
     * @param inputs - Contains a `timeframe` key, such as `"1W"`, `"1M"`, `"1Y"`, etc.
     * @returns A promise resolving to an array of `StakingApyDataPoint` objects,
     * each containing a timestamp and an APY value.
     *
     * @example
     * ```typescript
     * const historicalApy = await staking.getHistoricalApy({ timeframe: "1M" });
     * console.log(historicalApy); // e.g. [{ timestamp: 1686000000, apy: 0.045 }, ...]
     * ```
     */
    getHistoricalApy(inputs: {
        timeframe: StakingApyTimeframeKey;
    }): Promise<StakingApyDataPoint[]>;
    /**
     * Calculates the atomic unstake fee based on the current vault state. If
     * the `atomicUnstakeSuiReserves` remain above the target, the minimum fee
     * applies; otherwise, the fee adjusts proportionally up to the maximum
     * possible fee.
     *
     * @param inputs - Contains the `stakedSuiVaultState`, which holds data on
     * liquidity reserves, target values, and min/max fees.
     * @returns A `Percentage` representing the resulting fee (0.01 = 1%).
     *
     * @example
     * ```typescript
     * const vaultState = await staking.getStakedSuiVaultState();
     * const fee = Staking.calcAtomicUnstakeFee({ stakedSuiVaultState: vaultState });
     * console.log("Current atomic unstake fee:", fee);
     * ```
     */
    static calcAtomicUnstakeFee(inputs: {
        stakedSuiVaultState: StakedSuiVaultStateObject;
    }): Percentage;
    /**
     * Returns a provider instance for building transactions. Throws an error
     * if `api` is not defined.
     *
     * @returns An instance of `AftermathApi.Staking`.
     * @throws Will throw if the `api` is undefined.
     */
    private readonly stakingApi;
}

/**
 * The `Sui` class provides utilities to fetch core Sui chain information,
 * such as the system state. It also exposes a set of constant addresses
 * related to the Sui network package IDs.
 */
declare class Sui extends Caller {
    readonly api?: AftermathApi | undefined;
    /**
     * Static constants containing important addresses on the Sui network:
     *  - `zero`: The zero address (commonly used as a null placeholder).
     *  - `suiPackageId`: The package ID for the Sui system package.
     *  - `suiSystemStateId`: The object ID for the Sui system state.
     *  - `suiClockId`: The object ID for the Sui on-chain clock.
     */
    static readonly constants: {
        addresses: {
            zero: string;
            suiPackageId: string;
            suiSystemStateId: string;
            suiClockId: string;
        };
    };
    /**
     * Creates a new instance of the `Sui` class for fetching chain-level info.
     *
     * @param config - Optional configuration, including the Sui network and an access token.
     * @param api - An optional `AftermathApi` instance for advanced transaction building or data fetching.
     */
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetches the Sui system state summary object, which contains details
     * about the current epoch, validator set, and other protocol-level data.
     *
     * @returns A promise that resolves to a `SuiSystemStateSummary` instance.
     *
     * @example
     * ```typescript
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const sui = afSdk.Sui();
     *
     * const systemState = await sui.getSystemState();
     * console.log(systemState.epoch, systemState.validators);
     * ```
     */
    getSystemState(): Promise<SuiSystemStateSummary>;
}

declare class SuiFren extends Caller {
    readonly suiFren: SuiFrenObject;
    readonly isStaked: boolean;
    readonly isOwned: boolean;
    readonly api?: AftermathApi | undefined;
    constructor(suiFren: SuiFrenObject, config?: CallerConfig, isStaked?: boolean, isOwned?: boolean, api?: AftermathApi | undefined);
    suiFrenType(): AnyObjectType;
    properties(): Record<string, string>;
    dynamicFields(): Record<string, string>;
    displayNumber(): string;
    clone(): SuiFren;
    getAccessories(): Promise<SuiFrenAccessoryObject[]>;
    getStakeTransaction(inputs: {
        baseFee: Balance;
        feeIncrementPerMix: Balance;
        minRemainingMixesToKeep: bigint;
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    getAddAccessoryTransaction(inputs: {
        accessoryId: ObjectId;
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    getRemoveAccessoryTransaction(inputs: {
        accessoryType: SuiFrenAccessoryType;
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    private suiFrensApi;
}

declare class StakedSuiFren extends Caller {
    readonly info: StakedSuiFrenInfo;
    readonly isOwned: boolean;
    readonly api?: AftermathApi | undefined;
    readonly suiFren: SuiFren;
    constructor(info: StakedSuiFrenInfo, config?: CallerConfig, isOwned?: boolean, api?: AftermathApi | undefined);
    mixFee(): Balance;
    suiFrenId(): ObjectId;
    clone(): StakedSuiFren;
    getAccessories(): Promise<SuiFrenAccessoryObject[]>;
    getUnstakeTransaction(inputs: {
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    getHarvestFeesTransaction(inputs: {
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    getAddAccessoryTransaction(inputs: {
        accessoryId: ObjectId;
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    getRemoveAccessoryTransaction(inputs: {
        accessoryType: SuiFrenAccessoryType;
        walletAddress: SuiAddress;
    }): Promise<_mysten_sui_transactions.Transaction>;
    private suiFrensApi;
}

declare class SuiFrens extends Caller {
    readonly api?: AftermathApi | undefined;
    static readonly constants: {
        mixingFeeCoinType: string;
        protocolFees: {
            mint: bigint;
            mixOwned: bigint;
            minMixStaked: bigint;
            mixStakedPercentage: number;
        };
        suifrenFees: {
            mint: bigint;
        };
    };
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    static calcTotalInternalMixFee(inputs: {
        mixFee1: Balance | undefined;
        mixFee2: Balance | undefined;
    }): Balance;
    private static calcMixFeeForStakedSuiFren;
    getSuiFren(inputs: {
        suiFrenObjectId: ObjectId;
    }): Promise<SuiFren>;
    getSuiFrens(inputs: {
        suiFrenObjectIds: ObjectId[];
    }): Promise<SuiFren[]>;
    getOwnedSuiFrens(inputs: ApiOwnedSuiFrensBody): Promise<SuiFren[]>;
    getOwnedStakedSuiFrens(inputs: ApiOwnedStakedSuiFrensBody): Promise<StakedSuiFren[]>;
    getAllStakedSuiFrens(inputs: {
        attributes: Partial<SuiFrenAttributes>;
        sortBy?: SuiFrensSortOption;
    } & DynamicFieldsInputs): Promise<DynamicFieldObjectsWithCursor<StakedSuiFren>>;
    getStakedSuiFrens(inputs: {
        stakedSuiFrenIds: ObjectId[];
    }): Promise<StakedSuiFren[]>;
    getCapyLabsApp(): Promise<CapyLabsAppObject>;
    getOwnedAccessories(inputs: ApiOwnedSuiFrenAccessoriesBody): Promise<SuiFrenAccessoryObject[]>;
    getHarvestFeesEvents(inputs: EventsInputs): Promise<EventsWithCursor<HarvestSuiFrenFeesEvent>>;
    getMixEvents(inputs: EventsInputs): Promise<EventsWithCursor<MixSuiFrensEvent>>;
    getStakeEvents(inputs: EventsInputs): Promise<EventsWithCursor<StakeSuiFrenEvent>>;
    getUnstakeEvents(inputs: EventsInputs): Promise<EventsWithCursor<UnstakeSuiFrenEvent>>;
    getMixTransaction(inputs: ApiMixSuiFrensBody): Promise<_mysten_sui_transactions.Transaction>;
    getHarvestFeesTransaction(inputs: ApiHarvestSuiFrenFeesBody): Promise<_mysten_sui_transactions.Transaction>;
    getStats(): Promise<SuiFrenStats>;
    static suiFren(suiFren: SuiFren | StakedSuiFren | undefined): SuiFren | undefined;
    static suiFrenId(suiFren: SuiFren | StakedSuiFren | undefined): ObjectId | undefined;
    static mixFee(suiFren: SuiFren | StakedSuiFren | undefined): Balance | undefined;
    private static createStakedSuiFrensQueryString;
    private suiFrensApi;
}

/**
 * Describes an optional integrator fee configuration for advanced usage,
 * allowing a portion of DCA trades to be collected by a third party.
 */
interface DcaIntegratorFeeData {
    /**
     * The fee in basis points (bps). e.g., 100 => 1%.
     */
    feeBps: number;
    /**
     * The Sui address that will receive the fee portion.
     */
    feeRecipient: SuiAddress;
}
/**
 * Optional DCA order strategy parameters, typically bounding min & max
 * acceptable prices for the trades.
 */
interface DcaOrderStrategyData {
    /**
     * The minimum acceptable spot price for the trade, as a bigint scaled by 1e9 or 1e18 depending on usage.
     */
    minPrice: Balance;
    /**
     * The maximum acceptable spot price for the trade, similarly scaled.
     */
    maxPrice: Balance;
}
/**
 * The inputs required to create a new DCA order. This includes all relevant
 * coin types, amounts, frequency, trade count, etc.
 */
interface ApiDcaTransactionForCreateOrderBody {
    /**
     * The user's address that owns & initiates the DCA order.
     */
    walletAddress: SuiAddress;
    /**
     * The coin type from which funds will be allocated (sold).
     */
    allocateCoinType: CoinType;
    /**
     * The total amount of the allocate coin to be used across trades.
     */
    allocateCoinAmount: Balance;
    /**
     * The coin type that will be purchased periodically.
     */
    buyCoinType: CoinType;
    /**
     * The frequency (in ms) at which trades occur, e.g. every hour => 3600000.
     */
    frequencyMs: Timestamp;
    /**
     * The total number of trades to execute before concluding the DCA plan.
     */
    tradesAmount: number;
    /**
     * An optional bounding strategy specifying min & max acceptable prices.
     */
    strategy?: DcaOrderStrategyData;
    /**
     * If `true`, indicates a partially or fully sponsored transaction, removing gas burden from the user.
     */
    isSponsoredTx?: boolean;
    /**
     * A delay (in ms) before the first trade executes. If `0`, it starts immediately.
     */
    delayTimeMs: Timestamp;
    /**
     * The maximum allowable slippage (in basis points) for each trade, e.g. 100 => 1%.
     */
    maxAllowableSlippageBps: number;
    /**
     * The per-trade amount of `allocateCoinType` to be used, e.g. each trade uses 2 SUI if this is `2e9`.
     */
    coinPerTradeAmount: Balance;
    /**
     * An optional alternate address to receive the purchased coin. Defaults to `walletAddress` if undefined.
     */
    customRecipient?: SuiAddress;
    /**
     * Optional integrator fee data. If provided, a portion of each trade is allocated to the integrator.
     */
    integratorFee?: DcaIntegratorFeeData;
}
/**
 * The request body for closing a DCA order, typically requiring a signature
 * over a JSON message specifying which orders to cancel.
 */
interface ApiDcaTransactionForCloseOrderBody {
    /**
     * The user's address initiating the close/cancel action.
     */
    walletAddress: SuiAddress;
    /**
     * The signed bytes of the cancellation message.
     */
    bytes: string;
    /**
     * The user's signature corresponding to `bytes`.
     */
    signature: string;
}
/**
 * Enumerates reasons that a DCA trade might fail, e.g., the price was out of bounds
 * or the user lacked enough gas.
 */
type DcaFailedTradeReason = "INTERNAL" | "STRATEGY" | "GAS_CAP" | "UNKNOWN_USER" | "SLIPPAGE";
/**
 * Represents data for a successful trade that occurred in a DCA sequence,
 * including the amounts of allocated/buy coins, the final transaction info, etc.
 */
interface DcaOrderTradeObject {
    /**
     * The coin & amount that was spent in this trade (e.g., SUI).
     */
    allocatedCoin: {
        coin: CoinType;
        amount: Balance;
    };
    /**
     * The coin & amount that was purchased (e.g., USDC).
     */
    buyCoin: {
        coin: CoinType;
        amount: Balance;
    };
    /**
     * The final transaction digest for this trade. (Deprecated field `tnxDigest` also present.)
     */
    txnDigest: TransactionDigest;
    /** @deprecated use `txnDigest` instead */
    tnxDigest: TransactionDigest;
    /**
     * The timestamp (in ms) when this trade was executed. (Deprecated field `tnxDate` also present.)
     */
    txnTimestamp: Timestamp;
    /** @deprecated use `txnTimestamp` instead */
    tnxDate: Timestamp;
    /**
     * The effective rate of the trade, if available, e.g. "0.95" or "1.10".
     */
    rate: number | undefined;
}
/**
 * Represents a failed trade attempt in a DCA sequence, including time
 * of failure and the reason code.
 */
interface DcaOrderFailedTradeObject {
    timestamp: number;
    reason: DcaFailedTradeReason | undefined;
}
/**
 * Summarizes the main details of a DCA order, including how much coin is allocated
 * and how many trades remain.
 */
interface DcaOrderOverviewObject {
    /**
     * The coin & amount the user allocated for the entire DCA cycle.
     */
    allocatedCoin: {
        coin: CoinType;
        amount: Balance;
    };
    /**
     * The coin & amount that is being purchased in each periodic trade.
     */
    buyCoin: {
        coin: CoinType;
        amount: Balance;
    };
    /**
     * The total amount of allocateCoin actually spent so far.
     */
    totalSpent: Balance;
    /**
     * The interval (in ms) between each trade, e.g., every hour => 3600000.
     */
    intervalMs: Timestamp;
    /**
     * The total number of trades that were planned.
     */
    totalTrades: number;
    /**
     * The number of remaining trades that have not yet executed.
     */
    tradesRemaining: number;
    /**
     * The maximum slippage (bps) allowed for each trade.
     */
    maxSlippageBps: number;
    /**
     * Optional bounding strategy with min/max acceptable prices.
     */
    strategy?: DcaOrderStrategyData;
    /**
     * The address to receive the purchased coin. Defaults to the DCA owner's address if unspecified.
     */
    recipient: SuiAddress;
    /**
     * Represents how far along the DCA has progressed, typically out of `totalTrades`.
     */
    progress: number;
    /**
     * Details about when & how the DCA was created. Contains timestamps and transaction references.
     */
    created: {
        timestamp: Timestamp;
        /** @deprecated use `timestamp` instead */
        time: Timestamp;
        txnDigest: TransactionDigest;
        /** @deprecated use `txnDigest` instead */
        tnxDigest: TransactionDigest;
    };
    /**
     * If the next trade is scheduled in the future, indicates when that trade will occur.
     */
    nextTrade?: {
        timestamp: Timestamp;
        /** @deprecated use `timestamp` instead */
        time: Timestamp;
        txnDigest: TransactionDigest;
        /** @deprecated use `txnDigest` instead */
        tnxDigest: TransactionDigest;
    };
    /**
     * If at least one trade has already executed, shows when & how the last one occurred.
     */
    lastExecutedTrade?: {
        timestamp: Timestamp;
        /** @deprecated use `timestamp` instead */
        time: Timestamp;
        txnDigest: TransactionDigest;
        /** @deprecated use `txnDigest` instead */
        tnxDigest: TransactionDigest;
    };
    /**
     * Optional integrator fee settings that might apply to each trade.
     */
    integratorFee?: DcaIntegratorFeeData;
}
/**
 * Represents a single DCA order, including overview data, all successful trades, and all failed trades.
 */
interface DcaOrderObject {
    /**
     * The on-chain object ID representing this DCA order.
     */
    objectId: ObjectId;
    /**
     * Summary of the DCA (allocated amounts, trades remaining, etc.).
     */
    overview: DcaOrderOverviewObject;
    /**
     * An array of all completed trades.
     */
    trades: DcaOrderTradeObject[];
    /**
     * An array of attempted trades that failed, along with reasons/timestamps.
     */
    failed: DcaOrderFailedTradeObject[];
}
/**
 * Represents a grouping of DCA orders, typically used in the older or combined approach.
 * Contains both `active` and `past` arrays.
 */
interface DcaOrdersObject {
    /**
     * Active DCA orders.
     */
    active: DcaOrderObject[];
    /**
     * Past (completed or canceled) DCA orders.
     */
    past: DcaOrderObject[];
}
/**
 * **Deprecated**. Body for creating a user public key in the old DCA system.
 * Use `ApiUserDataCreateUserBody` from `userData` package instead.
 */
interface ApiDcaCreateUserBody {
    /**
     * The Sui address of the user.
     */
    walletAddress: SuiAddress;
    /**
     * The message bytes that the user is signing (in hex or base64).
     */
    bytes: string;
    /**
     * The resulting signature from signing `bytes`.
     */
    signature: string;
}
/**
 * **Deprecated**. Body for fetching the DCA orders owned by a specific user.
 * Use separate `getActiveDcaOrders` and `getPastDcaOrders` calls instead.
 */
interface ApiDCAsOwnedBody {
    /**
     * The user's Sui address whose DCA orders should be fetched.
     */
    walletAddress: SuiAddress;
}

/**
 * The `Dca` class provides functionality for automating Dollar-Cost Averaging
 * (DCA) strategies on the Aftermath platform. It allows you to create, query,
 * and close DCA orders that execute periodic trades based on user-defined
 * parameters.
 *
 * @example
 * ```typescript
 * const afSdk = await Aftermath.create({ network: "MAINNET" });
 *
 * const dca = afSdk.Dca();
 * ```
 */
declare class Dca extends Caller {
    /**
     * Contains static values related to DCA on the Aftermath platform, such as
     * default gas usage for DCA transactions.
     */
    static readonly constants: {
        /**
         * The default gas budget for DCA-related transactions (50 SUI).
         */
        gasAmount: bigint;
    };
    /**
     * Creates a new instance of the `Dca` class, responsible for
     * managing DCA orders (querying, creating, closing).
     *
     * @param config - Optional caller configuration, such as network and access token.
     */
    constructor(config?: CallerConfig);
    /**
     * **Deprecated**. Fetches both active and past DCA orders for a given user in one response.
     * Use `getActiveDcaOrders` and `getPastDcaOrders` for a more explicit approach.
     *
     * @param inputs - Object containing the user's `walletAddress`.
     * @returns A `DcaOrdersObject` grouping active and past orders.
     *
     * @deprecated Please use `getActiveDcaOrders` & `getPastDcaOrders` instead.
     * @example
     * ```typescript
     * // Old usage:
     * const allOrders = await dca.getAllDcaOrders({ walletAddress: "0x..." });
     * console.log(allOrders.active, allOrders.past);
     * ```
     */
    getAllDcaOrders(inputs: ApiDCAsOwnedBody): Promise<DcaOrdersObject>;
    /**
     * Retrieves the currently active DCA orders for a specific user.
     *
     * @param inputs - An object containing the user's `walletAddress`.
     * @returns A promise that resolves to an array of `DcaOrderObject` for the active orders.
     *
     * @example
     * ```typescript
     * const activeOrders = await dca.getActiveDcaOrders({ walletAddress: "0x..." });
     * console.log(activeOrders); // Array of active DCA orders
     * ```
     */
    getActiveDcaOrders(inputs: {
        walletAddress: SuiAddress;
    }): Promise<DcaOrderObject[]>;
    /**
     * Retrieves the past (completed or canceled) DCA orders for a specific user.
     *
     * @param inputs - An object containing the user's `walletAddress`.
     * @returns A promise that resolves to an array of `DcaOrderObject` for the past orders.
     *
     * @example
     * ```typescript
     * const pastOrders = await dca.getPastDcaOrders({ walletAddress: "0x..." });
     * console.log(pastOrders); // Array of past DCA orders
     * ```
     */
    getPastDcaOrders(inputs: {
        walletAddress: SuiAddress;
    }): Promise<DcaOrderObject[]>;
    /**
     * Builds a transaction block on the Aftermath API to create a new DCA order.
     * The resulting `Transaction` can then be signed and executed by the user.
     *
     * @param inputs - The parameters describing the DCA order (coin types, amounts, frequency, etc.).
     * @returns A `Transaction` object that can be signed and submitted to the Sui network.
     *
     * @example
     * ```typescript
     * const createOrderTx = await dca.getCreateDcaOrderTx({
     *   walletAddress: "0x<user>",
     *   allocateCoinType: "0x2::sui::SUI",
     *   allocateCoinAmount: BigInt(1_000_000_000),
     *   buyCoinType: "0x<coin>",
     *   frequencyMs: 3600000, // Every hour
     *   tradesAmount: 5,
     *   // ...other fields...
     * });
     * // sign & send the transaction
     * ```
     */
    getCreateDcaOrderTx(inputs: ApiDcaTransactionForCreateOrderBody): Promise<Transaction>;
    /**
     * Closes (cancels) an existing DCA order by sending a transaction with user signature.
     * Typically used after generating a message to sign with `closeDcaOrdersMessageToSign`.
     *
     * @param inputs - Contains the user's `walletAddress`, plus the `bytes` and `signature` from message signing.
     * @returns A boolean indicating success or failure (true if canceled).
     *
     * @example
     * ```typescript
     * const success = await dca.closeDcaOrder({
     *   walletAddress: "0x...",
     *   bytes: "0x<signed_bytes>",
     *   signature: "0x<signature>",
     * });
     * ```
     */
    closeDcaOrder(inputs: ApiDcaTransactionForCloseOrderBody): Promise<boolean>;
    /**
     * Generates a JSON object representing the message to sign for canceling one or more DCA orders.
     * The user can sign this message (converted to bytes) locally, then submit the signature to
     * `closeDcaOrder`.
     *
     * @param inputs - An object containing `orderIds`, an array of order object IDs to cancel.
     * @returns An object with `action: "CANCEL_DCA_ORDERS"` and the `order_object_ids`.
     *
     * @example
     * ```typescript
     * const msg = dca.closeDcaOrdersMessageToSign({ orderIds: ["0x<order1>", "0x<order2>"] });
     * console.log(msg);
     * // sign this as JSON or string-encode, then pass to closeDcaOrder
     * ```
     */
    closeDcaOrdersMessageToSign(inputs: {
        orderIds: ObjectId[];
    }): {
        action: string;
        order_object_ids: string[];
    };
    /**
     * **Deprecated**. Generates a message object used in older flows to create
     * a DCA user account. Use the `userData` package for user key storage or account creation.
     *
     * @deprecated Please use method from `userData` package instead.
     * @returns An object with `action: "CREATE_DCA_ACCOUNT"`.
     */
    createUserAccountMessageToSign(): {
        action: string;
    };
    /**
     * **Deprecated**. Fetches the user's public key from the older DCA system.
     * Please use `getUserPublicKey` from the `userData` package instead.
     *
     * @deprecated Use `userData` package method instead
     * @param inputs - Contains the user's `walletAddress`.
     * @returns The public key as a string or `undefined`.
     */
    getUserPublicKey(inputs: {
        walletAddress: SuiAddress;
    }): Promise<string | undefined>;
    /**
     * **Deprecated**. Creates the user's public key in the older DCA system.
     * Please use `createUserPublicKey` from the `userData` package instead.
     *
     * @deprecated Use `userData` package method instead
     * @param inputs - Body containing the user address, bytes, and signature.
     * @returns `true` if the public key was successfully stored, otherwise `false`.
     */
    createUserPublicKey(inputs: ApiDcaCreateUserBody): Promise<boolean>;
}

/**
 * Describes an optional integrator fee structure for advanced usage,
 * allowing a portion of limit orders to be allocated to a third party.
 */
interface LimitOrdersIntegratorFeeData {
    /**
     * The integrator fee percentage in basis points (bps), e.g., 100 => 1%.
     */
    feeBps: number;
    /**
     * The recipient address for fee collection.
     */
    feeRecipient: SuiAddress;
}
/**
 * Defines the body required to create a new limit order transaction. This includes
 * coin types, amounts, expiry settings, and optional integrator fees.
 */
interface ApiLimitOrdersCreateOrderTransactionBody {
    /**
     * The user address creating the limit order.
     */
    walletAddress: SuiAddress;
    /**
     * The coin type to be allocated/sold in the order.
     */
    allocateCoinType: CoinType;
    /**
     * The total amount of the allocateCoin to be reserved for this order.
     */
    allocateCoinAmount: Balance;
    /**
     * The coin type to be purchased when price conditions are met.
     */
    buyCoinType: CoinType;
    /**
     * Optionally specify a custom recipient of the purchased coin, defaulting to `walletAddress`.
     */
    customRecipient?: SuiAddress;
    /**
     * The duration (in ms) after which the limit order expires and becomes invalid.
     * If `0`, there's effectively no set expiry.
     */
    expiryDurationMs: number;
    /**
     * Indicates whether the transaction is sponsored, potentially reducing user gas fees.
     */
    isSponsoredTx?: boolean;
    /**
     * Optional integrator fee details for advanced usage.
     */
    integratorFee?: LimitOrdersIntegratorFeeData;
    /**
     * The "take-profit" exchange rate from `buyCoinType` to `allocateCoinType`.
     * For example, if `outputToInputExchangeRate` is 0.5, it means 1 buyCoin can be sold for 0.5 allocateCoin.
     */
    outputToInputExchangeRate: number;
    /**
     * Optional "stop-loss" exchange rate. If the market moves such that the trade
     * would invert beyond this rate, the order might close early or fail, depending on logic.
     */
    outputToInputStopLossExchangeRate?: number;
}
/**
 * Body required to cancel an existing limit order, typically including the
 * user's signature of a JSON message referencing order IDs.
 */
interface ApiLimitOrdersCancelOrderTransactionBody {
    /**
     * The Sui address of the user who owns the order(s).
     */
    walletAddress: SuiAddress;
    /**
     * The signed bytes of the cancellation message.
     */
    bytes: string;
    /**
     * The signature over those bytes, verifying user intent.
     */
    signature: string;
}
/**
 * Enumerates all possible statuses for a limit order on Aftermath.
 */
type LimitOrdersOrderStatus = "Active" | "Canceled" | "Failed" | "Filled" | "Expired" | "StopLossTriggered";
/**
 * Represents the on-chain data structure for a single limit order, including
 * allocated coin amounts, buy coin details, creation/finalization times, etc.
 */
interface LimitOrderObject {
    /**
     * The on-chain object ID referencing this limit order.
     */
    objectId: ObjectId;
    /**
     * The coin & amount allocated for potential trading.
     */
    allocatedCoin: {
        coin: CoinType;
        amount: Balance;
    };
    /**
     * The coin & amount to be acquired if/when the order conditions are met.
     */
    buyCoin: {
        coin: CoinType;
        amount: Balance;
    };
    /**
     * Tracks how much of the allocated coin has actually been used (sold).
     */
    currentAmountSold: Balance;
    /**
     * Tracks how much of the buy coin has actually been purchased.
     */
    currentAmountBought: Balance;
    /**
     * The address that will receive the bought coin, often the same as `walletAddress`.
     */
    recipient: SuiAddress;
    /**
     * Contains timestamps and transaction references for order creation.
     */
    created: {
        timestamp: Timestamp;
        txnDigest: TransactionDigest;
    };
    /**
     * If the order has finished, indicates when and via which transaction it concluded.
     */
    finished?: {
        timestamp: Timestamp;
        txnDigest: TransactionDigest;
    };
    /**
     * The UNIX timestamp (ms) after which the order is considered expired.
     */
    expiryTimestamp: Timestamp;
    /**
     * The current status of the order (Active, Canceled, etc.).
     */
    status: LimitOrdersOrderStatus;
    /**
     * If the order ended or failed with an error, this might contain a reason or message.
     */
    error?: string;
    /**
     * Optional integrator fee data for advanced usage.
     */
    integratorFee?: LimitOrdersIntegratorFeeData;
    /**
     * Optional stop-loss exchange rate; if triggered, the order might end or convert differently.
     */
    outputToInputStopLossExchangeRate?: number;
}
/**
 * Body for fetching active limit orders of a user, requiring user signature data for identification.
 */
interface ApiLimitOrdersActiveOrdersOwnedBody {
    /**
     * The Sui address of the user.
     */
    walletAddress: SuiAddress;
    /**
     * Signed bytes of a message verifying user identity.
     */
    bytes: string;
    /**
     * Signature over the `bytes`.
     */
    signature: string;
}

/**
 * The `LimitOrders` class manages creation, cancellation, and querying of
 * limit orders on the Aftermath platform. Limit orders allow you to buy or
 * sell at a specified price, giving more control over your trades compared
 * to market execution.
 *
 * @example
 * ```typescript
 * const afSdk = await Aftermath.create({ network: "MAINNET" });
 *
 * const limitOrders = afSdk.LimitOrders();
 * ```
 */
declare class LimitOrders extends Caller {
    /**
     * Static configuration constants, including a default gas amount for
     * limit order transactions (50 SUI).
     */
    static readonly constants: {
        /**
         * The default gas budget for limit orders. This may be subject to change.
         */
        gasAmount: bigint;
    };
    /**
     * Creates a new `LimitOrders` instance for interacting with limit order functionality
     * on Aftermath.
     *
     * @param config - Optional configuration, including network and access token.
     */
    constructor(config?: CallerConfig);
    /**
     * Fetches the list of **active** limit orders for a given user. The user must
     * provide a signature for identification.
     *
     * @param inputs - Contains the `walletAddress`, as well as `bytes` and `signature` if needed for auth.
     * @returns A promise resolving to an array of `LimitOrderObject`, representing the active orders.
     *
     * @example
     * ```typescript
     * const activeOrders = await limitOrders.getActiveLimitOrders({
     *   walletAddress: "0x<address>",
     *   bytes: "0x<signed_bytes>",
     *   signature: "0x<signature>"
     * });
     * ```
     */
    getActiveLimitOrders(inputs: ApiLimitOrdersActiveOrdersOwnedBody): Promise<LimitOrderObject[]>;
    /**
     * Fetches the list of **past** limit orders for a given user (e.g., completed, canceled, or expired).
     *
     * @param inputs - An object containing the `walletAddress`.
     * @returns A promise resolving to an array of `LimitOrderObject` representing past orders.
     *
     * @example
     * ```typescript
     * const pastOrders = await limitOrders.getPastLimitOrders({
     *   walletAddress: "0x<address>",
     * });
     * ```
     */
    getPastLimitOrders(inputs: {
        walletAddress: SuiAddress;
    }): Promise<LimitOrderObject[]>;
    /**
     * Constructs a limit order creation transaction on the Aftermath API, returning a `Transaction`
     * object that can be signed and submitted to the network.
     *
     * @param inputs - The limit order details, including coin types, amounts, expiry, etc.
     * @returns A promise resolving to a `Transaction` that can be locally signed and executed.
     *
     * @example
     * ```typescript
     * const tx = await limitOrders.getCreateLimitOrderTx({
     *   walletAddress: "0x<address>",
     *   allocateCoinType: "0x<coin>",
     *   allocateCoinAmount: BigInt(1000),
     *   buyCoinType: "0x<other_coin>",
     *   expiryDurationMs: 3600000, // 1 hour
     *   outputToInputExchangeRate: 0.5,
     * });
     * // sign and execute the transaction
     * ```
     */
    getCreateLimitOrderTx(inputs: ApiLimitOrdersCreateOrderTransactionBody): Promise<Transaction>;
    /**
     * Cancels an existing limit order by sending a request to the Aftermath API
     * with the user's signed cancellation message.
     *
     * @param inputs - Contains the user's `walletAddress`, plus `bytes` and `signature`.
     * @returns A boolean indicating whether the cancellation was successful.
     *
     * @example
     * ```typescript
     * const success = await limitOrders.cancelLimitOrder({
     *   walletAddress: "0x<address>",
     *   bytes: "0x<signed_bytes>",
     *   signature: "0x<signature>",
     * });
     * ```
     */
    cancelLimitOrder(inputs: ApiLimitOrdersCancelOrderTransactionBody): Promise<boolean>;
    /**
     * Generates the JSON message needed to cancel one or more limit orders. The user
     * signs this message (converted to bytes), and the resulting signature is passed
     * to `cancelLimitOrder`.
     *
     * @param inputs - Object with `orderIds`, an array of order object IDs to cancel.
     * @returns A JSON structure with the action and order IDs to be canceled.
     *
     * @example
     * ```typescript
     * const msg = limitOrders.cancelLimitOrdersMessageToSign({
     *   orderIds: ["0x<order1>", "0x<order2>"]
     * });
     * // user signs this JSON
     * ```
     */
    cancelLimitOrdersMessageToSign(inputs: {
        orderIds: ObjectId[];
    }): {
        action: string;
        order_object_ids: string[];
    };
    /**
     * Retrieves the minimum allowable order size (in USD) for limit orders on Aftermath.
     *
     * @returns A promise resolving to a `number` (USD value) or `undefined` if not configured.
     *
     * @example
     * ```typescript
     * const minSize = await limitOrders.getMinOrderSizeUsd();
     * console.log("Minimum order size in USD:", minSize);
     * ```
     */
    getMinOrderSizeUsd(): Promise<number | undefined>;
}

/**
 * Represents the body needed to request a multisig setup for a user by sending
 * their single public key in the correct byte format.
 */
interface ApiMultisigUserBody {
    /**
     * The user's single public key in a `Uint8Array` byte format.
     */
    userPublicKey: Uint8Array;
}
/**
 * Represents the response data for a multisig retrieval, containing the multisig
 * public key structure and its corresponding Sui address.
 */
interface MultisigData {
    /**
     * The structured multisig public key object.
     */
    publicKey: MultiSigPublicKey;
    /**
     * The resulting multisig address string.
     */
    address: string;
}

/**
 * The `Multisig` class provides methods to interact with multisig-related functionality,
 * such as retrieving a multisig address and associated public key for a user.
 */
declare class Multisig extends Caller {
    readonly api?: AftermathApi | undefined;
    /**
     * Creates a new instance of `Multisig`.
     *
     * @param config - Optional configuration for the `Caller`, including network and access token.
     * @param api - An optional instance of `AftermathApi` to build or fetch multisig data.
     */
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Retrieves a multisig address and corresponding public key for a user based on their
     * provided single public key.
     *
     * @param inputs - An object implementing `ApiMultisigUserBody`, containing the user's public key as a `Uint8Array`.
     * @returns A promise that resolves to an object containing both the multisig address and its public key.
     *
     * @example
     * ```typescript
     *
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const multisig = afSdk.Multisig();
     *
     * const data = await multisig.getMultisigForUser({
     *   userPublicKey: myPublicKeyBytes
     * });
     * console.log(data.address, data.publicKey);
     * ```
     */
    getMultisigForUser(inputs: ApiMultisigUserBody): MultisigData;
    /**
     * Internal helper to get the configured `Multisig` provider from `AftermathApi`.
     * Throws an error if the provider is not available.
     */
    private readonly multisigApi;
}

declare class Referrals extends Caller {
    static readonly constants: {};
    constructor(config?: CallerConfig);
    getRefCode(inputs: ApiReferralsGetRefCodeBody): Promise<ApiReferralsGetRefCodeResponse>;
    getLinkedRefCode(inputs: ApiReferralsGetLinkedRefCodeBody): Promise<ApiReferralsGetLinkedRefCodeResponse>;
    getReferees(inputs: ApiReferralsGetRefereesBody): Promise<ApiReferralsGetRefereesResponse>;
    isRefCodeTaken(inputs: ApiReferralsIsRefCodeTakenBody): Promise<ApiReferralsIsRefCodeTakenResponse>;
    createReferralLink(inputs: ApiReferralsCreateReferralLinkBody): Promise<ApiReferralsCreateReferralLinkResponse>;
    setReferrer(inputs: ApiReferralsSetReferrerBody): Promise<ApiReferralsSetReferrerResponse>;
    createReferralLinkMessageToSign(inputs: {
        refCode: string;
    }): {
        action: string;
        ref_code: string;
        date: number;
    };
    setReferrerMessageToSign(inputs: {
        refCode: string;
    }): {
        action: string;
        ref_code: string;
        date: number;
    };
}

declare class Rewards extends Caller {
    readonly api?: AftermathApi | undefined;
    constructor(config?: CallerConfig, api?: AftermathApi | undefined);
    getPoints(inputs: ApiRewardsGetPointsBody): Promise<ApiRewardsGetPointsResponse>;
    getHistory(inputs: ApiRewardsGetHistoryBody): Promise<ApiRewardsGetHistoryResponse>;
    getClaimable(inputs: ApiRewardsGetClaimableBody): Promise<ApiRewardsGetClaimableResponse>;
    getClaimTransaction(inputs: {
        walletAddress: SuiAddress;
        coinTypes?: CoinType[];
        recipientAddress?: SuiAddress;
        tx?: Transaction;
    }): Promise<Omit<ApiRewardsClaimRequestTxResponse, "txKind"> & {
        tx: Transaction;
    }>;
}

/**
 * Request body for creating or registering a user’s public key in Aftermath’s backend.
 * It typically includes proof of ownership by having the user sign a specific message.
 */
interface ApiUserDataCreateUserBody {
    /**
     * The user's Sui wallet address (e.g., "0x<address>").
     */
    walletAddress: SuiAddress;
    /**
     * The message bytes (in hex string form) that the user signed.
     */
    bytes: string;
    /**
     * The signature (in hex string form) created by signing `bytes`.
     */
    signature: string;
}
/**
 * Request body for fetching a user’s public key by their wallet address.
 */
interface ApiUserDataPublicKeyBody {
    /**
     * The user's Sui wallet address.
     */
    walletAddress: SuiAddress;
}

/**
 * The `UserData` class provides functionality for managing user-specific
 * information in the Aftermath system. It enables creating and retrieving
 * user public keys, as well as generating messages for signing.
 */
declare class UserData extends Caller {
    /**
     * Creates a new instance of the `UserData` class for interacting with user data endpoints.
     *
     * @param config - Optional configuration for the `Caller`, including network and access token.
     */
    constructor(config?: CallerConfig);
    /**
     * Retrieves the stored user public key (if any) for a given wallet address.
     *
     * @param inputs - An object implementing `ApiUserDataPublicKeyBody`, containing the user's wallet address.
     * @returns A promise that resolves to a string representation of the user's public key, or `undefined` if none is found.
     *
     * @example
     * ```typescript
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const userData = afSdk.UserData();
     *
     * const pubkey = await userData.getUserPublicKey({
     *   walletAddress: "0x<address>"
     * });
     * console.log(pubkey); // "0x<hex_public_key>" or undefined
     * ```
     */
    getUserPublicKey(inputs: ApiUserDataPublicKeyBody): Promise<string | undefined>;
    /**
     * Creates (or updates) the stored public key for a user on the backend, linking
     * it to their wallet address.
     *
     * @param inputs - Details required to create or update the user's public key, including signature data.
     * @returns A promise that resolves to `true` if the public key was successfully created/updated, otherwise `false` or an error.
     *
     * @example
     * ```typescript
     * const created = await userData.createUserPublicKey({
     *   walletAddress: "0x<address>",
     *   bytes: "0x<message_as_bytes>",
     *   signature: "0x<signature>"
     * });
     * console.log("Was public key created?", created);
     * ```
     */
    createUserPublicKey(inputs: ApiUserDataCreateUserBody): Promise<boolean>;
    /**
     * Generates a simple message object that the user should sign to prove their
     * intention to create or link an account in the Aftermath system.
     *
     * @returns An object with an `action` property, used as the data to sign.
     *
     * @example
     * ```typescript
     * const userData = new UserData();
     * const msgToSign = userData.createUserAccountMessageToSign();
     * console.log(msgToSign.action); // "CREATE_USER_ACCOUNT"
     * // The user can then sign msgToSign with their private key.
     * ```
     */
    createUserAccountMessageToSign(): {
        action: string;
    };
    /**
     * Generates a simple message object that the user should sign to confirm their agreement
     * with the Terms and Conditions of the service.
     *
     * @returns An object with an `action` property set to "SIGN_TERMS_AND_CONDITIONS".
     *
     * @example
     * ```typescript
     * const userData = new UserData();
     * const termsMsg = userData.createSignTermsAndConditionsMessageToSign();
     * console.log(termsMsg.action); // "SIGN_TERMS_AND_CONDITIONS"
     * // The user can sign this to show acceptance of the T&C.
     * ```
     */
    createSignTermsAndConditionsMessageToSign(): {
        action: string;
    };
}

/**
 * The `DynamicGas` class provides functionality for dynamically determining
 * or attaching a suitable gas payment object to a transaction. This allows
 * for more flexible transaction building when exact gas objects are not
 * predetermined.
 */
declare class DynamicGas extends Caller {
    /**
     * Creates a new `DynamicGas` instance for interacting with dynamic gas endpoints.
     *
     * @param config - Optional caller config, including the Sui network and an access token.
     */
    constructor(config?: CallerConfig);
    /**
     * Requests the dynamic gas service to set up a transaction with an appropriate gas coin,
     * or sponsor signature if needed, based on the user's wallet and coin type preference.
     *
     * @param inputs - An object containing the `Transaction` to be adjusted, the `walletAddress`, and `gasCoinType`.
     * @returns A promise that resolves to an `ApiDynamicGasResponse`, which includes the new transaction bytes
     *  (`txBytes`) and possibly a `sponsoredSignature`.
     *
     * @example
     * ```typescript
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const dynamicGas = afSdk.DynamicGas();
     *
     * const updatedTx = await dynamicGas.getUseDynamicGasForTx({
     *   tx: transactionBlock,
     *   walletAddress: "0x<user_address>",
     *   gasCoinType: "0x2::sui::SUI"
     * });
     * // updatedTx.txBytes and updatedTx.sponsoredSignature can now be used for signing/execution
     * ```
     */
    getUseDynamicGasForTx(inputs: {
        tx: Transaction;
        walletAddress: SuiAddress;
        gasCoinType: CoinType;
    }): Promise<ApiDynamicGasResponse>;
}

/**
 * The `Prices` class provides methods for fetching price information for various
 * coins on the Sui network, including single-coin or multi-coin queries.
 */
declare class Prices extends Caller {
    /**
     * Creates a new `Prices` instance for retrieving coin price data from
     * Aftermath's backend or other data sources.
     *
     * @param config - Optional configuration, including network and access token.
     */
    constructor(config?: CallerConfig);
    /**
     * Retrieves detailed price information (including current price and 24h change)
     * for a single coin.
     *
     * @param inputs - Contains the `coin` type (e.g., "0x2::sui::SUI").
     * @returns A promise resolving to a `CoinPriceInfo` object.
     *
     * @example
     * ```typescript
     *
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const prices = afSdk.Prices();
     *
     * const suiPriceInfo = await prices.getCoinPriceInfo({
     *   coin: "0x2::sui::SUI"
     * });
     * console.log(suiPriceInfo.price, suiPriceInfo.priceChange24HoursPercentage);
     * ```
     */
    getCoinPriceInfo(inputs: {
        coin: CoinType;
    }): Promise<CoinPriceInfo>;
    /**
     * Retrieves detailed price information for multiple coins simultaneously,
     * returning a record keyed by `CoinType`.
     *
     * @param inputs - An object containing an array of `coins`.
     * @returns A promise resolving to a `CoinsToPriceInfo` mapping each coin type to its price info.
     *
     * @example
     * ```typescript
     * const prices = new Prices();
     * const info = await prices.getCoinsToPriceInfo({
     *   coins: ["0x2::sui::SUI", "0x<some_other_coin>"]
     * });
     * console.log(info);
     * ```
     */
    getCoinsToPriceInfo(inputs: {
        coins: CoinType[];
    }): Promise<CoinsToPriceInfo>;
    /**
     * Fetches only the current price in USD for a single coin.
     *
     * @param inputs - Contains the `coin` type.
     * @returns A promise resolving to a `number` representing the price in USD.
     *
     * @example
     * ```typescript
     * const prices = new Prices();
     * const suiPrice = await prices.getCoinPrice({ coin: "0x2::sui::SUI" });
     * console.log("SUI price in USD:", suiPrice);
     * ```
     */
    getCoinPrice(inputs: {
        coin: CoinType;
    }): Promise<number>;
    /**
     * Fetches current prices in USD for multiple coins, returning a record keyed by `CoinType`.
     *
     * @param inputs - Contains an array of `coins`.
     * @returns A promise resolving to a `CoinsToPrice` object mapping coin types to their prices in USD.
     *
     * @example
     * ```typescript
     * const prices = new Prices();
     * const multiPrices = await prices.getCoinsToPrice({ coins: ["0x2::sui::SUI", "0x<other>"] });
     * console.log(multiPrices["0x2::sui::SUI"]); // e.g. 1.23
     * ```
     */
    getCoinsToPrice(inputs: {
        coins: CoinType[];
    }): Promise<CoinsToPrice>;
}

interface EventOnChain<Fields> {
    id: {
        txDigest: TransactionDigest;
        eventSeq: BigIntAsString;
    };
    packageId: ObjectId;
    transactionModule: ModuleName;
    sender: SuiAddress;
    type: AnyObjectType;
    parsedJson: Fields;
    bcs: string;
    timestampMs: number | string | undefined;
}
interface WrappedEventOnChain<Fields> {
    id: {
        txDigest: TransactionDigest;
        eventSeq: BigIntAsString;
    };
    packageId: ObjectId;
    transactionModule: ModuleName;
    sender: SuiAddress;
    type: AnyObjectType;
    parsedJson: {
        pos0: Fields;
    };
    bcs: string;
    timestampMs: number | string | undefined;
}
interface SupplyOnChain {
    type: AnyObjectType;
    fields: {
        value: BigIntAsString;
    };
}

type FarmsAddedRewardEventOnChainV1 = EventOnChain<{
    vault_id: ObjectId;
    reward_type: CoinType;
    reward_amount: BigIntAsString;
}>;
type FarmsAddedRewardEventOnChainV2 = WrappedEventOnChain<{
    vault_id: ObjectId;
    reward_type: CoinType;
    reward_amount: BigIntAsString;
}>;
type FarmsCreatedVaultEventOnChainV1 = EventOnChain<{
    vault_id: ObjectId;
    stake_type: CoinType;
    min_lock_duration_ms: BigIntAsString;
    max_lock_duration_ms: BigIntAsString;
    max_lock_multiplier: BigIntAsString;
    min_stake_amount: BigIntAsString;
}>;
type FarmsCreatedVaultEventOnChainV2 = WrappedEventOnChain<{
    vault_id: ObjectId;
    stake_type: CoinType;
    min_lock_duration_ms: BigIntAsString;
    max_lock_duration_ms: BigIntAsString;
    max_lock_multiplier: BigIntAsString;
    min_stake_amount: BigIntAsString;
}>;
type FarmsDepositedPrincipalEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    amount: BigIntAsString;
    stake_type: CoinType;
}>;
type FarmsDepositedPrincipalEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    amount: BigIntAsString;
    stake_type: CoinType;
}>;
type FarmsDestroyedStakedPositionEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
}>;
type FarmsDestroyedStakedPositionEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
}>;
type FarmsHarvestedRewardsEventOnChainV1 = EventOnChain<{
    afterburner_vault_id: ObjectId;
    reward_types: CoinType[];
    reward_amounts: BigIntAsString[];
}>;
type FarmsHarvestedRewardsEventOnChainV2 = WrappedEventOnChain<{
    afterburner_vault_id: ObjectId;
    reward_types: CoinType[];
    reward_amounts: BigIntAsString[];
}>;
type FarmsIncreasedEmissionsEventOnChainV1 = EventOnChain<{
    vault_id: ObjectId;
    reward_type: CoinType;
    emission_schedule_ms: BigIntAsString;
    emission_rate: BigIntAsString;
}>;
type FarmsUpdatedEmissionsEventOnChainV2 = WrappedEventOnChain<{
    vault_id: ObjectId;
    reward_type: CoinType;
    emission_schedule_ms: BigIntAsString;
    emission_rate: BigIntAsString;
}>;
type FarmsInitializedRewardEventOnChainV1 = EventOnChain<{
    vault_id: ObjectId;
    reward_type: CoinType;
    reward_amount: BigIntAsString;
    emission_rate: BigIntAsString;
    emission_start_ms: BigIntAsString;
}>;
type FarmsInitializedRewardEventOnChainV2 = WrappedEventOnChain<{
    vault_id: ObjectId;
    reward_type: CoinType;
    reward_amount: BigIntAsString;
    emission_rate: BigIntAsString;
    emission_start_ms: BigIntAsString;
}>;
type FarmsJoinedEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    other_staked_position_id: ObjectId;
}>;
type FarmsJoinedEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
    other_staked_position_id: ObjectId;
}>;
type FarmsLockedEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    staked_type: CoinType;
    staked_amount: BigIntAsString;
    lock_start_timestamp_ms: BigIntAsString;
    lock_duration_ms: BigIntAsString;
    lock_multiplier: BigIntAsString;
}>;
type FarmsLockedEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    staked_type: CoinType;
    staked_amount: BigIntAsString;
    lock_start_timestamp_ms: BigIntAsString;
    lock_duration_ms: BigIntAsString;
    lock_multiplier: BigIntAsString;
}>;
type FarmsSplitEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    split_staked_position_id: ObjectId;
}>;
type FarmsSplitEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
    split_staked_position_id: ObjectId;
}>;
type FarmsStakedEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    staked_type: CoinType;
    staked_amount: BigIntAsString;
    multiplied_staked_amount: BigIntAsString;
    lock_start_timestamp_ms: BigIntAsString;
    lock_duration_ms: BigIntAsString;
    lock_multiplier: BigIntAsString;
}>;
type FarmsStakedEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    staked_type: CoinType;
    staked_amount: BigIntAsString;
    multiplier_staked_amount: BigIntAsString;
    lock_start_timestamp_ms: BigIntAsString;
    lock_duration_ms: BigIntAsString;
    lock_multiplier: BigIntAsString;
}>;
type FarmsStakedRelaxedEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    staked_type: CoinType;
    staked_amount: BigIntAsString;
    lock_start_timestamp_ms: BigIntAsString;
    lock_end_timestamp_ms: BigIntAsString;
}>;
type FarmsUnlockedEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    staked_type: CoinType;
    staked_amount: BigIntAsString;
}>;
type FarmsUnlockedEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    staked_type: CoinType;
    staked_amount: BigIntAsString;
}>;
type FarmsWithdrewPrincipalEventOnChainV1 = EventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    amount: BigIntAsString;
    stake_type: CoinType;
}>;
type FarmsWithdrewPrincipalEventOnChainV2 = WrappedEventOnChain<{
    staked_position_id: ObjectId;
    vault_id: ObjectId;
    amount: BigIntAsString;
    stake_type: CoinType;
}>;

declare class FarmsApiCasting {
    static partialStakedPositionObjectFromSuiObjectResponseV1: (data: SuiObjectResponse) => PartialFarmsStakedPositionObject;
    static partialStakedPositionObjectFromSuiObjectResponseV2: (data: SuiObjectResponse) => PartialFarmsStakedPositionObject;
    static stakingPoolOwnerCapObjectFromSuiObjectResponseV1: (data: SuiObjectResponse) => StakingPoolOwnerCapObject;
    static stakingPoolOwnerCapObjectFromSuiObjectResponseV2: (data: SuiObjectResponse) => StakingPoolOwnerCapObject;
    static stakingPoolOneTimeAdminCapObjectFromSuiObjectResponseV1: (data: SuiObjectResponse) => StakingPoolOneTimeAdminCapObject;
    static stakingPoolOneTimeAdminCapObjectFromSuiObjectResponseV2: (data: SuiObjectResponse) => StakingPoolOneTimeAdminCapObject;
    static addedRewardEventFromOnChainV1: (eventOnChain: FarmsAddedRewardEventOnChainV1) => FarmsAddedRewardEvent;
    static addedRewardEventFromOnChainV2: (eventOnChain: FarmsAddedRewardEventOnChainV2) => FarmsAddedRewardEvent;
    static createdVaultEventFromOnChainV1: (eventOnChain: FarmsCreatedVaultEventOnChainV1) => FarmsCreatedVaultEvent;
    static createdVaultEventFromOnChainV2: (eventOnChain: FarmsCreatedVaultEventOnChainV2) => FarmsCreatedVaultEvent;
    static depositedPrincipalEventFromOnChainV1: (eventOnChain: FarmsDepositedPrincipalEventOnChainV1) => FarmsDepositedPrincipalEvent;
    static depositedPrincipalEventFromOnChainV2: (eventOnChain: FarmsDepositedPrincipalEventOnChainV2) => FarmsDepositedPrincipalEvent;
    static destroyedStakedPositionEventFromOnChainV1: (eventOnChain: FarmsDestroyedStakedPositionEventOnChainV1) => FarmsDestroyedStakedPositionEvent;
    static destroyedStakedPositionEventFromOnChainV2: (eventOnChain: FarmsDestroyedStakedPositionEventOnChainV2) => FarmsDestroyedStakedPositionEvent;
    static harvestedRewardsEventFromOnChainV1: (eventOnChain: FarmsHarvestedRewardsEventOnChainV1) => FarmsHarvestedRewardsEvent;
    static harvestedRewardsEventFromOnChainV2: (eventOnChain: FarmsHarvestedRewardsEventOnChainV2) => FarmsHarvestedRewardsEvent;
    static increasedEmissionsEventFromOnChainV1: (eventOnChain: FarmsIncreasedEmissionsEventOnChainV1) => FarmsIncreasedEmissionsEvent;
    static updatedEmissionsEventFromOnChainV2: (eventOnChain: FarmsUpdatedEmissionsEventOnChainV2) => FarmsIncreasedEmissionsEvent;
    static initializedRewardEventFromOnChainV1: (eventOnChain: FarmsInitializedRewardEventOnChainV1) => FarmsInitializedRewardEvent;
    static initializedRewardEventFromOnChainV2: (eventOnChain: FarmsInitializedRewardEventOnChainV2) => FarmsInitializedRewardEvent;
    static joinedEventFromOnChainV1: (eventOnChain: FarmsJoinedEventOnChainV1) => FarmsJoinedEvent;
    static joinedEventFromOnChainV2: (eventOnChain: FarmsJoinedEventOnChainV2) => FarmsJoinedEvent;
    static lockedEventFromOnChainV1: (eventOnChain: FarmsLockedEventOnChainV1) => FarmsLockedEvent;
    static lockedEventFromOnChainV2: (eventOnChain: FarmsLockedEventOnChainV2) => FarmsLockedEvent;
    static splitEventFromOnChainV1: (eventOnChain: FarmsSplitEventOnChainV1) => FarmsSplitEvent;
    static splitEventFromOnChainV2: (eventOnChain: FarmsSplitEventOnChainV2) => FarmsSplitEvent;
    static stakedEventFromOnChainV1: (eventOnChain: FarmsStakedEventOnChainV1) => FarmsStakedEvent;
    static stakedEventFromOnChainV2: (eventOnChain: FarmsStakedEventOnChainV2) => FarmsStakedEvent;
    static stakedRelaxedEventFromOnChainV1: (eventOnChain: FarmsStakedRelaxedEventOnChainV1) => FarmsStakedRelaxedEvent;
    static unlockedEventFromOnChainV1: (eventOnChain: FarmsUnlockedEventOnChainV1) => FarmsUnlockedEvent;
    static unlockedEventFromOnChainV2: (eventOnChain: FarmsUnlockedEventOnChainV2) => FarmsUnlockedEvent;
    static withdrewPrincipalEventFromOnChainV1: (eventOnChain: FarmsWithdrewPrincipalEventOnChainV1) => FarmsWithdrewPrincipalEvent;
    static withdrewPrincipalEventFromOnChainV2: (eventOnChain: FarmsWithdrewPrincipalEventOnChainV2) => FarmsWithdrewPrincipalEvent;
}

type FaucetMintCoinEventOnChain = EventOnChain<{
    amount: BigIntAsString;
    user: SuiAddress;
}>;
type FaucetAddCoinEventOnChain = EventOnChain<{
    default_mint_amount: BigIntAsString;
}>;

declare class FaucetApiCasting {
    static faucetMintCoinEventFromOnChain: (eventOnChain: FaucetMintCoinEventOnChain) => FaucetMintCoinEvent;
    static faucetAddCoinEventFromOnChain: (eventOnChain: FaucetAddCoinEventOnChain) => FaucetAddCoinEvent;
}

declare class NftAmmApiCasting {
    static marketObjectFromSuiObject: (suiObject: SuiObjectResponse) => NftAmmMarketObject;
}

type UpdatedMarketVersionEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    version: BigIntAsString;
}>;
type WithdrewCollateralEventOnChain = EventOnChain<{
    account_id: BigIntAsString;
    collateral: BigIntAsString;
}>;
type DepositedCollateralEventOnChain = EventOnChain<{
    account_id: BigIntAsString;
    collateral: BigIntAsString;
}>;
type AllocatedCollateralEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    account_id: BigIntAsString;
    collateral: BigIntAsString;
}>;
type DeallocatedCollateralEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    account_id: BigIntAsString;
    collateral: BigIntAsString;
}>;
type SettledFundingEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    account_id: BigIntAsString;
    collateral_change_usd: IFixedAsString;
    mkt_funding_rate_long: IFixedAsString;
    mkt_funding_rate_short: IFixedAsString;
}>;
type LiquidatedEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    liqee_account_id: BigIntAsString;
    liqor_account_id: BigIntAsString;
    is_liqee_long: boolean;
    base_liquidated: IFixedAsString;
    quote_liquidated: IFixedAsString;
    liqee_pnl: IFixedAsString;
    liquidation_fees: IFixedAsString;
    force_cancel_fees: IFixedAsString;
    insurance_fund_fees: IFixedAsString;
    bad_debt: IFixedAsString;
}>;
type CreatedAccountEventOnChain = EventOnChain<{
    user: SuiAddress;
    account_id: BigIntAsString;
}>;
type SetPositionInitialMarginRatioEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    account_id: BigIntAsString;
    initial_margin_ratio: IFixedAsString;
}>;
type CanceledOrderEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    account_id: BigIntAsString;
    size: BigIntAsString;
    order_id: BigIntAsString;
}>;
type FilledMakerOrdersEventOnChain = EventOnChain<{
    events: {
        ch_id: ObjectId;
        maker_account_id: BigIntAsString;
        taker_account_id: BigIntAsString;
        fees: IFixedAsString;
        filled_size: BigIntAsString;
        order_id: BigIntAsString;
        pnl: IFixedAsString;
        remaining_size: BigIntAsString;
        canceled_size: BigIntAsString;
    }[];
}>;
type FilledTakerOrderEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    taker_account_id: BigIntAsString;
    taker_pnl: IFixedAsString;
    taker_fees: IFixedAsString;
    base_asset_delta_ask: IFixedAsString;
    quote_asset_delta_ask: IFixedAsString;
    base_asset_delta_bid: IFixedAsString;
    quote_asset_delta_bid: IFixedAsString;
}>;
type PostedOrderEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    account_id: BigIntAsString;
    order_id: BigIntAsString;
    order_size: BigIntAsString;
    reduce_only: boolean;
    expiration_timestamp_ms: BigIntAsString | null;
}>;
type ReducedOrderEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    account_id: BigIntAsString;
    size_change: BigIntAsString;
    order_id: BigIntAsString;
}>;
type CreatedStopOrderTicketEventOnChain = EventOnChain<{
    ticket_id: ObjectId;
    account_id: BigIntAsString;
    subaccount_id: BigIntAsString | null;
    executors: SuiAddress[];
    gas: BigIntAsString;
    stop_order_type: BigIntAsString;
    encrypted_details: Byte[];
}>;
type ExecutedStopOrderTicketEventOnChain = EventOnChain<{
    ticket_id: ObjectId;
    account_id: BigIntAsString;
    executor: SuiAddress;
}>;
type DeletedStopOrderTicketEventOnChain = EventOnChain<{
    ticket_id: ObjectId;
    account_id: BigIntAsString;
    subaccount_id: ObjectId | null;
    executor: SuiAddress;
}>;
type EditedStopOrderTicketDetailsEventOnChain = EventOnChain<{
    ticket_id: ObjectId;
    account_id: BigIntAsString;
    subaccount_id: ObjectId | null;
    stop_order_type: BigIntAsString;
    encrypted_details: Byte[];
}>;
type EditedStopOrderTicketExecutorEventOnChain = EventOnChain<{
    ticket_id: ObjectId;
    account_id: BigIntAsString;
    subaccount_id: ObjectId | null;
    executors: SuiAddress[];
}>;
type UpdatedPremiumTwapEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    index_price: IFixedAsString;
    book_price: IFixedAsString;
    premium_twap: IFixedAsString;
    premium_twap_last_upd_ms: BigIntAsString;
}>;
type UpdatedSpreadTwapEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    book_price: IFixedAsString;
    index_price: IFixedAsString;
    spread_twap: IFixedAsString;
    spread_twap_last_upd_ms: BigIntAsString;
}>;
type UpdatedFundingEventOnChain = EventOnChain<{
    ch_id: ObjectId;
    cum_funding_rate_long: IFixedAsString;
    cum_funding_rate_short: IFixedAsString;
    funding_last_upd_ms: BigIntAsString;
}>;

declare class PerpetualsApiCasting {
    static UpdatedMarketVersionEventFromOnChain: (eventOnChain: UpdatedMarketVersionEventOnChain) => UpdatedMarketVersionEvent;
    static withdrewCollateralEventFromOnChain: (eventOnChain: WithdrewCollateralEventOnChain) => WithdrewCollateralEvent;
    static depositedCollateralEventFromOnChain: (eventOnChain: DepositedCollateralEventOnChain) => DepositedCollateralEvent;
    static settledFundingEventFromOnChain: (eventOnChain: SettledFundingEventOnChain) => SettledFundingEvent;
    static allocatedCollateralEventFromOnChain: (eventOnChain: AllocatedCollateralEventOnChain) => AllocatedCollateralEvent;
    static deallocatedCollateralEventFromOnChain: (eventOnChain: DeallocatedCollateralEventOnChain) => DeallocatedCollateralEvent;
    static liquidatedEventFromOnChain: (eventOnChain: LiquidatedEventOnChain) => LiquidatedEvent;
    static createdAccountEventFromOnChain: (eventOnChain: CreatedAccountEventOnChain) => CreatedAccountEvent;
    static SetPositionInitialMarginRatioEventFromOnChain: (eventOnChain: SetPositionInitialMarginRatioEventOnChain) => SetPositionInitialMarginRatioEvent;
    static canceledOrderEventFromOnChain: (eventOnChain: CanceledOrderEventOnChain) => CanceledOrderEvent;
    static filledMakerOrdersEventFromOnChain: (eventOnChain: FilledMakerOrdersEventOnChain) => FilledMakerOrdersEvent;
    static filledTakerOrderEventFromOnChain: (eventOnChain: FilledTakerOrderEventOnChain) => FilledTakerOrderEvent;
    static postedOrderEventFromOnChain: (eventOnChain: PostedOrderEventOnChain) => PostedOrderEvent;
    static reducedOrderEventFromOnChain: (eventOnChain: ReducedOrderEventOnChain) => ReducedOrderEvent;
    static createdStopOrderTicketEventFromOnChain: (eventOnChain: CreatedStopOrderTicketEventOnChain) => CreatedStopOrderTicketEvent;
    static executedStopOrderTicketEventFromOnChain: (eventOnChain: ExecutedStopOrderTicketEventOnChain) => ExecutedStopOrderTicketEvent;
    static deletedStopOrderTicketEventFromOnChain: (eventOnChain: DeletedStopOrderTicketEventOnChain) => DeletedStopOrderTicketEvent;
    static editedStopOrderTicketDetailsEventFromOnChain: (eventOnChain: EditedStopOrderTicketDetailsEventOnChain) => EditedStopOrderTicketDetailsEvent;
    static editedStopOrderTicketExecutorEventFromOnChain: (eventOnChain: EditedStopOrderTicketExecutorEventOnChain) => EditedStopOrderTicketExecutorEvent;
    static updatedPremiumTwapEventFromOnChain: (eventOnChain: UpdatedPremiumTwapEventOnChain) => UpdatedPremiumTwapEvent;
    static updatedSpreadTwapEventFromOnChain: (eventOnChain: UpdatedSpreadTwapEventOnChain) => UpdatedSpreadTwapEvent;
    static updatedFundingEventFromOnChain: (eventOnChain: UpdatedFundingEventOnChain) => UpdatedFundingEvent;
}

interface PoolFieldsOnChain {
    name: PoolName;
    creator: SuiAddress;
    lp_supply: SupplyOnChain;
    illiquid_lp_supply: BigIntAsString;
    type_names: CoinType[];
    normalized_balances: BigIntAsString[];
    weights: BigIntAsString[];
    flatness: BigIntAsString;
    fees_swap_in: BigIntAsString[];
    fees_swap_out: BigIntAsString[];
    fees_deposit: BigIntAsString[];
    fees_withdraw: BigIntAsString[];
    decimal_scalars: BigIntAsString[];
    lp_decimals: BigIntAsString;
    lp_decimal_scalar: BigIntAsString;
    coin_decimals?: BigIntAsString[];
}
type PoolCreateEventOnChain = EventOnChain<{
    pool_id: ObjectId;
    lp_type: CoinType;
} & PoolFieldsOnChain>;
interface PoolTradeEventOnChainFields {
    pool_id: ObjectId;
    issuer: SuiAddress;
    types_in: CoinType[];
    amounts_in: BigIntAsString[];
    types_out: CoinType[];
    amounts_out: BigIntAsString[];
}
interface PoolDepositEventFieldsOnChain {
    pool_id: ObjectId;
    issuer: SuiAddress;
    types: CoinType[];
    deposits: BigIntAsString[];
    lp_coins_minted: BigIntAsString;
}
interface PoolWithdrawEventFieldsOnChain {
    pool_id: ObjectId;
    issuer: SuiAddress;
    types: CoinType[];
    withdrawn: BigIntAsString[];
    lp_coins_burned: BigIntAsString;
}
type PoolTradeEventOnChain = EventOnChain<PoolTradeEventOnChainFields>;
type PoolDepositEventOnChain = EventOnChain<PoolDepositEventFieldsOnChain>;
type PoolWithdrawEventOnChain = EventOnChain<PoolWithdrawEventFieldsOnChain>;

declare class PoolsApiCasting {
    static poolObjectFromSuiObject: (suiObject: SuiObjectResponse) => PoolObject;
    static daoFeePoolOwnerCapObjectFromSuiObjectResponse: (data: SuiObjectResponse) => DaoFeePoolOwnerCapObject;
    static poolObjectIdfromPoolCreateEventOnChain: (eventOnChain: PoolCreateEventOnChain) => ObjectId;
    static poolTradeEventFromOnChain: (eventOnChain: PoolTradeEventOnChain) => PoolTradeEvent;
    static poolDepositEventFromOnChain: (eventOnChain: PoolDepositEventOnChain) => PoolDepositEvent;
    static poolWithdrawEventFromOnChain: (eventOnChain: PoolWithdrawEventOnChain) => PoolWithdrawEvent;
}

type RouterTradeEventOnChain = EventOnChain<{
    swapper: SuiAddress;
    type_in: CoinType;
    amount_in: BigIntAsString;
    type_out: CoinType;
    amount_out: BigIntAsString;
    router_fee: BigIntAsString;
    router_fee_recipient: SuiAddress;
}>;

declare class RouterApiCasting {
    static routerTradeEventFromOnChain: (eventOnChain: RouterTradeEventOnChain) => RouterTradeEvent;
}

interface StakedEventOnChainFields {
    staker: SuiAddress;
    validator: SuiAddress;
    staked_sui_id: ObjectId;
    sui_id: ObjectId;
    sui_amount: BigIntAsString;
    afsui_id: ObjectId;
    afsui_amount: BigIntAsString;
    validator_fee: BigIntAsString;
    referrer: SuiAddress | null;
    epoch: BigIntAsString;
    is_restaked: boolean;
}
interface UnstakedEventOnChainFields {
    afsui_id: ObjectId;
    provided_afsui_amount: BigIntAsString;
    sui_id: ObjectId;
    returned_sui_amount: BigIntAsString;
    requester: SuiAddress;
    epoch: BigIntAsString;
}
interface UnstakeRequestedEventOnChainFields {
    afsui_id: ObjectId;
    provided_afsui_amount: BigIntAsString;
    requester: SuiAddress;
    epoch: BigIntAsString;
}
type StakedEventOnChain = EventOnChain<StakedEventOnChainFields>;
type UnstakedEventOnChain = EventOnChain<UnstakedEventOnChainFields>;
type UnstakeRequestedEventOnChain = EventOnChain<UnstakeRequestedEventOnChainFields>;

declare class StakingApiCasting {
    static validatorOperationCapObjectFromSuiObjectResponse: (data: SuiObjectResponse) => ValidatorOperationCapObject;
    static stakedSuiVaultStateObjectFromSuiObjectResponse: (data: SuiObjectResponse) => StakedSuiVaultStateObject;
    static stakedEventFromOnChain: (eventOnChain: StakedEventOnChain) => StakedEvent;
    static unstakedEventFromOnChain: (eventOnChain: UnstakedEventOnChain) => UnstakedEvent;
    static unstakeRequestedEventFromOnChain: (eventOnChain: UnstakeRequestedEventOnChain) => UnstakeRequestedEvent;
}

type HarvestSuiFrenFeesEventOnChain = EventOnChain<{
    issuer: SuiAddress;
    fees: BigIntAsString;
}>;
type StakeSuiFrenEventOnChain = EventOnChain<{
    issuer: SuiAddress;
    suifren_id: ObjectId;
}>;
type UnstakeSuiFrenEventOnChain = EventOnChain<{
    issuer: SuiAddress;
    suifren_id: ObjectId;
    fees: BigIntAsString;
}>;
type MixSuiFrensEventOnChain = EventOnChain<{
    issuer: SuiAddress;
    suifren_id: ObjectId;
    parent_one_id: ObjectId;
    parent_two_id: ObjectId;
    fee: BigIntAsString;
}>;

declare class SuiFrensApiCasting {
    static capyLabsAppObjectFromSuiObjectResponse: (data: SuiObjectResponse) => CapyLabsAppObject;
    static partialSuiFrenObjectFromSuiObjectResponse: (data: SuiObjectResponse) => PartialSuiFrenObject;
    static partialSuiFrenObjectFromStakedSuiFrenMetadataV1ObjectSuiObjectResponse: (data: SuiObjectResponse) => PartialSuiFrenObject;
    static stakedSuiFrenMetadataV1ObjectFromSuiObjectResponse: (data: SuiObjectResponse) => StakedSuiFrenMetadataV1Object;
    static partialSuiFrenAndStakedSuiFrenMetadataV1ObjectFromSuiObjectResponse: (data: SuiObjectResponse) => {
        stakedSuiFrenMetadata: StakedSuiFrenMetadataV1Object;
        partialSuiFren: PartialSuiFrenObject;
    };
    static stakedSuiFrenPositionFromSuiObjectResponse: (data: SuiObjectResponse) => StakedSuiFrenPositionObject;
    static suiFrenVaultStateV1ObjectFromSuiObjectResponse: (data: SuiObjectResponse) => SuiFrenVaultStateV1Object;
    static accessoryObjectFromSuiObjectResponse: (data: SuiObjectResponse) => SuiFrenAccessoryObject;
    static harvestSuiFrenFeesEventFromOnChain: (eventOnChain: HarvestSuiFrenFeesEventOnChain) => HarvestSuiFrenFeesEvent;
    static mixSuiFrensEventFromOnChain: (eventOnChain: MixSuiFrensEventOnChain) => MixSuiFrensEvent;
    static stakeSuiFrenEventFromOnChain: (eventOnChain: StakeSuiFrenEventOnChain) => StakeSuiFrenEvent;
    static unstakeSuiFrenEventFromOnChain: (eventOnChain: UnstakeSuiFrenEventOnChain) => UnstakeSuiFrenEvent;
}

declare class NftsApiCasting {
    static nftsFromSuiObjects: (objects: SuiObjectResponse[]) => Nft[];
    static nftFromSuiObject: (object: SuiObjectResponse) => Nft;
    static kioskOwnerCapFromSuiObject: (object: SuiObjectResponse) => KioskOwnerCapObject;
    static kioskOwnerCapFromPersonalKioskCapSuiObject: (object: SuiObjectResponse) => KioskOwnerCapObject;
    private static nftInfoFromSuiObject;
    private static nftDisplayFromDisplayFields;
}

/**
 * The `FixedUtils` class provides utilities for fixed-point arithmetic
 * with a standard 18-decimal precision, along with some convenience
 * methods for normalizing/un-normalizing amounts based on token decimals.
 */
declare class FixedUtils {
    /**
     * Represents 1.0 in 18-decimal fixed math as a float: 1_000_000_000_000_000_000.
     */
    static readonly fixedOneN: number;
    /**
     * Represents 1.0 in 18-decimal fixed math as a bigint: 1000000000000000000n.
     */
    static readonly fixedOneB: bigint;
    /**
     * Represents 1.0 in 9-decimal fixed math as a float: 1_000_000_000.
     */
    static readonly fixedOneN9 = 1000000000;
    /**
     * Represents 1.0 in 9-decimal fixed math as a bigint: 1000000000n.
     */
    static readonly fixedOneB9: bigint;
    /**
     * Directly convert an on-chain `u64` (stored as a bigint) into a float, effectively no scaling.
     *
     * @param n - The on-chain number as a bigint.
     * @returns The converted number as a float.
     */
    static readonly convertFromInt: (n: OnChainNumber) => LocalNumber;
    /**
     * Convert a floating number back to an on-chain integer (bigint),
     * truncating decimals.
     *
     * @param n - The local float.
     * @returns The truncated bigint.
     */
    static readonly convertToInt: (n: LocalNumber) => OnChainNumber;
    /**
     * Converts a fixed-18 on-chain number to a floating local number by dividing by `fixedOneN`.
     *
     * @param n - The on-chain 18-decimal fixed number (as a bigint).
     * @returns A float representing the unscaled value.
     */
    static readonly directCast: (n: OnChainNumber) => LocalNumber;
    /**
     * Converts a floating local number to an on-chain 18-decimal fixed bigint by multiplying by `fixedOneN`.
     *
     * @param n - The local float to be scaled.
     * @returns The scaled 18-decimal fixed as a bigint.
     */
    static readonly directUncast: (n: LocalNumber) => OnChainNumber;
    /**
     * Returns the complement of the number in `[0,1]`, i.e., `1 - n`.
     * If `n` is negative, it's treated as zero; if `n` > 1, also treated as zero for the complement.
     *
     * @param n - The local float in [0,1].
     * @returns The complement of `n` in [0,1].
     */
    static readonly complement: (n: LocalNumber) => number;
    /**
     * Multiplies a raw integer `amount` by a `decimalsScalar` to produce
     * a "normalized" form. E.g., if decimals = 9, we store it as 10^9 scale.
     *
     * @param decimalsScalar - The scale factor for the coin (e.g., 1e9).
     * @param amount - The raw integer (balance) to be scaled.
     * @returns The scaled (normalized) amount as a `number`.
     */
    static readonly normalizeAmount: (decimalsScalar: DecimalsScalar, amount: Balance) => NormalizedBalance;
    /**
     * Divides a normalized amount by the `decimalsScalar` to get back the
     * raw on-chain integer. This is typically used after floating computations.
     *
     * @param decimalsScalar - The scale factor for the coin (e.g., 1e9).
     * @param normalizedAmount - The scaled amount to reduce.
     * @returns The raw integer balance.
     */
    static readonly unnormalizeAmount: (decimalsScalar: DecimalsScalar, normalizedAmount: NormalizedBalance) => Balance;
    /**
     * Directly cast a `Balance` to an 18-decimal float, factoring in token decimals.
     *
     * @param decimalsScalar - The token's decimal scale factor.
     * @param amount - The raw integer `Balance`.
     * @returns A float representing the 18-decimal scale cast.
     */
    static readonly castAndNormalize: (decimalsScalar: DecimalsScalar, amount: Balance) => LocalNumber;
    /**
     * Reverse the cast of a normalized float back to a raw `Balance`,
     * factoring in the token decimals.
     *
     * @param decimalsScalar - The token's decimal scale factor.
     * @param normalizedAmount - A local float in 18-decimal domain.
     * @returns A raw integer `Balance`.
     */
    static readonly uncastAndUnnormalize: (decimalsScalar: DecimalsScalar, normalizedAmount: LocalNumber) => Balance;
}
/**
 * A numeric type used on chain, typically fixed 18 decimals or direct u64.
 */
type OnChainNumber = bigint;
/**
 * A local floating value for user calculations or UI representation.
 */
type LocalNumber = number;

/**
 * The `IFixedUtils` class provides support for signed 18-decimal fixed math,
 * referred to as "IFixed" in the Aftermath codebase. An `IFixed` value
 * is a bigint that includes sign bit manipulation.
 */
declare class IFixedUtils {
    /**
     * The representation of 1.0 in the IFixed format, i.e. 1e18.
     */
    static readonly ONE: IFixed;
    /**
     * The greatest bit in a 256-bit representation. This is used to indicate negative values in some approaches.
     */
    static readonly GREATEST_BIT: IFixed;
    /**
     * A mask that can be used to flip or remove the greatest bit in a 256-bit number.
     */
    static readonly NOT_GREATEST_BIT: IFixed;
    /**
     * Converts an IFixed bigint into a floating-point number, extracting both the integer
     * and decimal portions. For negative values, the sign bit is checked and value is negated.
     *
     * @param value - The IFixed value (signed 18-decimal) as a bigint.
     * @returns A standard JavaScript number with fractional parts intact.
     */
    static numberFromIFixed: (value: IFixed) => number;
    /**
     * Converts a floating-point number into an IFixed bigint with 18 decimals of precision.
     * Negative numbers have the sign bit set.
     *
     * @param value - The JavaScript number to convert.
     * @returns The resulting IFixed bigint in on-chain-compatible format.
     */
    static iFixedFromNumber: (value: number) => IFixed;
    /**
     * Returns the absolute value of an IFixed number. If the value is negative,
     * it's converted to its positive counterpart by flipping bits.
     *
     * @param value - The signed IFixed number as a bigint.
     * @returns The absolute value in IFixed.
     */
    static abs: (value: IFixed) => IFixed;
    /**
     * Determines the sign of an IFixed number.
     * - If >= GREATEST_BIT, it's negative (-1).
     * - If exactly 0, sign is 0.
     * - Otherwise, sign is +1.
     *
     * @param value - The IFixed number to check.
     * @returns `-1`, `0`, or `1` based on the sign.
     */
    static sign: (value: IFixed) => number;
    /**
     * Negates an IFixed number by flipping bits. This effectively does `-value` for the signed 18-dec representation.
     *
     * @param value - The IFixed number to negate.
     * @returns The negated IFixed number as a bigint.
     */
    static neg: (value: IFixed) => IFixed;
    /**
     * Constructs an IFixed number from an array of bytes in little-endian format.
     * The sign bit might be set if the top bit is `1`.
     *
     * @param bytes - The byte array representing the IFixed number.
     * @returns The IFixed bigint.
     */
    static iFixedFromBytes: (bytes: Byte[]) => IFixed;
    /**
     * Constructs an IFixed number from an array of stringified bytes,
     * each representing a decimal numeric value (e.g., `"255"`, `"0"`).
     *
     * @param bytes - An array of string bytes.
     * @returns The IFixed bigint.
     */
    static iFixedFromStringBytes: (bytes: string[]) => IFixed;
}

/**
 * A central utility class for casting and conversion routines across
 * different Aftermath modules. Provides both direct numeric transformations
 * (e.g., fixed-point arithmetic) and advanced BCS-based object deserialization.
 */
declare class Casting {
    /**
     * Casting utilities for pools-related data (AMM pools, liquidity, etc.).
     */
    static pools: typeof PoolsApiCasting;
    /**
     * Casting utilities for SuiFrens-related data or objects.
     */
    static suiFrens: typeof SuiFrensApiCasting;
    /**
     * Casting utilities for faucet-related data, typically for devnet or testnet tokens.
     */
    static faucet: typeof FaucetApiCasting;
    /**
     * Casting utilities for staking-related data (positions, pools, etc.).
     */
    static staking: typeof StakingApiCasting;
    /**
     * Casting utilities for NFT AMM objects and events.
     */
    static nftAmm: typeof NftAmmApiCasting;
    /**
     * Casting utilities for router-based data, such as trade routes and DEX interactions.
     */
    static router: typeof RouterApiCasting;
    /**
     * Casting utilities for perpetuals/futures data.
     */
    static perpetuals: typeof PerpetualsApiCasting;
    /**
     * Casting utilities for farming data (yield farms, locked positions, etc.).
     */
    static farms: typeof FarmsApiCasting;
    /**
     * Casting utilities for NFT structures and data retrieval logic.
     */
    static nfts: typeof NftsApiCasting;
    /**
     * Reference to the standard fixed-point arithmetic utilities (18 decimals).
     */
    static Fixed: typeof FixedUtils;
    /**
     * Reference to the intermediate fixed type (signed 18 decimals).
     */
    static IFixed: typeof IFixedUtils;
    /**
     * The maximum unsigned 64-bit integer value as a bigint (0xFFFFFFFFFFFFFFFF).
     */
    static u64MaxBigInt: bigint;
    /**
     * The maximum signed 64-bit integer value as a bigint.
     */
    static i64MaxBigInt: bigint;
    /**
     * Converts a floating-point number to a fixed bigint with 18 decimals.
     * For example, `1.23` => `1230000000000000000n` if we consider 18 decimals.
     *
     * @param a - The number to convert.
     * @returns A bigint representing the number in 18-decimal fixed format.
     */
    static numberToFixedBigInt: (a: number) => bigint;
    /**
     * Converts an 18-decimal fixed bigint to a floating-point number.
     * For example, `1230000000000000000n` => `1.23`.
     *
     * @param a - The fixed bigint to convert.
     * @returns A floating-point representation of the 18-decimal fixed value.
     */
    static bigIntToFixedNumber: (a: bigint) => number;
    /**
     * Scales a bigint by a floating-point scalar. For instance, a scalar of 0.5
     * and a bigint of 100 => 50n.
     *
     * @param scalar - The floating-point multiplier (e.g., 0.5).
     * @param int - The bigint to be scaled.
     * @returns A bigint result after scaling.
     */
    static scaleNumberByBigInt: (scalar: number, int: bigint) => bigint;
    /**
     * Converts a decimal percentage into basis points (bps), returned as a bigint.
     * For example, 0.05 => 500 bps.
     *
     * @param percentage - The decimal percentage to convert (e.g., 0.05 for 5%).
     * @returns A bigint representing basis points.
     */
    static percentageToBps(percentage: Percentage): bigint;
    /**
     * Converts a bigint basis points value back to a decimal percentage.
     * For example, 500n => 0.05 (5%).
     *
     * @param bps - The bigint basis points to convert (e.g., 500n).
     * @returns The decimal percentage (0.05).
     */
    static bpsToPercentage(bps: bigint): Percentage;
    /**
     * Converts an array of bytes into a string by interpreting each byte as a character code.
     *
     * @param bytes - An array of bytes to convert.
     * @returns The resulting ASCII string.
     */
    static stringFromBytes: (bytes: Byte[]) => string;
    /**
     * Interprets an array of bytes as a little-endian hex string, converting
     * that string into a bigint. For example, `[0x01, 0x02]` => `0x0201` => `513n`.
     *
     * @param bytes - An array of bytes.
     * @returns The resulting bigint from the hex.
     */
    static bigIntFromBytes: (bytes: Byte[]) => bigint;
    /**
     * Converts BCS-encoded address bytes into a SuiAddress (0x...) string,
     * preserving any needed leading zeroes.
     *
     * @param bytes - The address bytes in BCS-encoded form.
     * @returns A normalized Sui address string (e.g., "0x000123...").
     */
    static addressFromBcsBytes: (bytes: Byte[]) => SuiAddress;
    /**
     * Converts an array of bytes directly to a Sui address string in "0x..." format,
     * adding any leading zeros if needed.
     *
     * @param bytes - The raw bytes for the address.
     * @returns A normalized Sui address.
     */
    static addressFromBytes: (bytes: Byte[]) => SuiAddress;
    /**
     * Converts an array of hex string bytes into a Sui address. Each element of
     * the array is a string representing a byte (e.g., `["255", "0", ...]`).
     *
     * @param bytes - An array of stringified bytes to convert.
     * @returns A normalized Sui address.
     */
    static addressFromStringBytes: (bytes: string[]) => SuiAddress;
    /**
     * Converts an array of decimal-encoded string bytes (e.g., `["255", "0"]`)
     * into a numeric `Byte[]` array.
     *
     * @param bytes - The string array representing decimal values.
     * @returns A numeric array of bytes.
     */
    static bytesFromStringBytes: (bytes: string[]) => Byte[];
    /**
     * Unwraps a deserialized "Option" type from the BCS, returning its contents
     * if present, or `undefined` if not.
     *
     * @param deserializedData - The BCS-deserialized structure that might contain `{ Some: value }` or `{ None: true }`.
     * @returns The unwrapped data if present, or `undefined`.
     */
    static unwrapDeserializedOption: (deserializedData: any) => any | undefined;
    /**
     * Encodes a JavaScript string into a UTF-8 `Uint8Array`, suitable for
     * on-chain usage or hashing.
     *
     * @param str - The string to encode.
     * @returns An array of numeric bytes representing the UTF-8 encoded string.
     */
    static u8VectorFromString: (str: string) => number[];
    /**
     * Normalizes a user-provided slippage tolerance from an integer percentage
     * into a decimal fraction. E.g., `1 => 0.01`.
     *
     * @param slippageTolerance - The slippage in integer percent form (e.g., 1 for 1%).
     * @returns A decimal fraction (e.g., 0.01).
     */
    static normalizeSlippageTolerance: (slippageTolerance: number) => number;
    /**
     * Deserializes a `SuiObjectResponse`'s BCS bytes into an object of type `T` using
     * a specified `bcsType`. Typically used for on-chain object decoding.
     *
     * @param inputs - The inputs including `suiObjectResponse`, `bcsType`, and a `fromDeserialized` transform function.
     * @returns The transformed object of type `T` after BCS deserialization.
     * @throws If no BCS bytes are found in the object.
     */
    static castObjectBcs: <T, U>(inputs: {
        suiObjectResponse: SuiObjectResponse;
        bcsType: BcsType<U>;
        fromDeserialized: (deserialized: U) => T;
    }) => T;
    /**
     * Extracts base64 BCS bytes from a `SuiObjectResponse` if present. Throws an error otherwise.
     *
     * @param suiObjectResponse - The Sui object response containing `bcsBytes`.
     * @returns A base64 string representing the object's BCS data.
     * @throws If the object response does not contain `bcsBytes`.
     */
    static bcsBytesFromSuiObjectResponse(suiObjectResponse: SuiObjectResponse): string;
}

declare class CoinApi {
    private readonly api;
    constructor(api: AftermathApi);
    fetchCoinWithAmountTx: (inputs: {
        tx: Transaction;
        walletAddress: SuiAddress;
        coinType: CoinType;
        coinAmount: Balance;
        isSponsoredTx?: boolean;
    }) => Promise<TransactionObjectArgument>;
    fetchCoinsWithAmountTx: (inputs: {
        tx: Transaction;
        walletAddress: SuiAddress;
        coinTypes: CoinType[];
        coinAmounts: Balance[];
        isSponsoredTx?: boolean;
    }) => Promise<TransactionObjectArgument[]>;
    fetchCoinsWithAtLeastAmount: (inputs: {
        walletAddress: SuiAddress;
        coinType: CoinType;
        coinAmount: Balance;
    }) => Promise<CoinStruct[]>;
    fetchAllCoins: (inputs: {
        walletAddress: SuiAddress;
        coinType: CoinType;
    }) => Promise<CoinStruct[]>;
    private static coinWithAmountTx;
}

declare class DcaApi {
    private readonly api;
    private static readonly constants;
    readonly addresses: DcaAddresses;
    readonly eventTypes: {
        createdOrder: AnyObjectType;
        createdOrderV2: AnyObjectType;
        closedOrder: AnyObjectType;
        executedTrade: AnyObjectType;
    };
    constructor(api: AftermathApi);
    createCloseOrderTx: (inputs: {
        tx: Transaction;
        allocateCoinType: CoinType;
        buyCoinType: CoinType;
        orderId: ObjectId | TransactionArgument;
    }) => _mysten_sui_transactions.TransactionResult;
    private readonly createdOrderEventType;
    private readonly createdOrderEventTypeV2;
    private readonly closedOrderEventType;
    private readonly executedOrderEventType;
}

declare class FarmsApi implements MoveErrorsInterface {
    private readonly api;
    private static readonly constants;
    readonly addresses: FarmsAddresses;
    readonly objectTypes: {
        stakedPositionV1: AnyObjectType;
        stakingPoolOwnerCapV1: AnyObjectType;
        stakingPoolOneTimeAdminCapV1: AnyObjectType;
        stakedPositionV2: AnyObjectType;
        stakingPoolOwnerCapV2: AnyObjectType;
        stakingPoolOneTimeAdminCapV2: AnyObjectType;
    };
    readonly eventTypes: {
        createdVaultV1: AnyObjectType;
        initializedRewardV1: AnyObjectType;
        addedRewardV1: AnyObjectType;
        increasedEmissionsV1: AnyObjectType;
        stakedV1: AnyObjectType;
        stakedRelaxedV1: AnyObjectType;
        lockedV1: AnyObjectType;
        unlockedV1: AnyObjectType;
        depositedPrincipalV1: AnyObjectType;
        withdrewPrincipalV1: AnyObjectType;
        harvestedRewardsV1: AnyObjectType;
        createdVaultV2: AnyObjectType;
        initializedRewardV2: AnyObjectType;
        addedRewardV2: AnyObjectType;
        updatedEmissionsV2: AnyObjectType;
        stakedV2: AnyObjectType;
        lockedV2: AnyObjectType;
        unlockedV2: AnyObjectType;
        depositedPrincipalV2: AnyObjectType;
        withdrewPrincipalV2: AnyObjectType;
        harvestedRewardsV2: AnyObjectType;
    };
    readonly moveErrors: MoveErrors;
    /**
     * Constructor for FarmsApi
     * @param api The AftermathApi provider instance
     * @throws Error if not all required addresses have been set in provider
     */
    constructor(api: AftermathApi);
    /**
     * @deprecated Use the new API method in Farms class instead.
     * Fetches the owner caps for staking pools owned by a specific wallet address
     * @param inputs Object containing wallet address
     * @returns Array of StakingPoolOwnerCapObject
     */
    fetchOwnedStakingPoolOwnerCaps: (inputs: ApiFarmsOwnedStakingPoolOwnerCapsBody) => Promise<StakingPoolOwnerCapObject[]>;
    /**
     * @deprecated Use the new API method in Farms class instead.
     * Fetches the one-time admin caps for staking pools owned by a specific wallet address
     * @param inputs Object containing wallet address
     * @returns Array of StakingPoolOneTimeAdminCapObject
     */
    fetchOwnedStakingPoolOneTimeAdminCaps: (inputs: ApiFarmsOwnedStakingPoolOwnerCapsBody) => Promise<StakingPoolOneTimeAdminCapObject[]>;
    /**
     * @deprecated Use `getOwnedStakedPositions` method in Farms class instead.
     * Fetches partial staked positions owned by a specific wallet address
     * @param inputs Object containing wallet address
     * @returns Array of PartialFarmsStakedPositionObject
     */
    fetchOwnedPartialStakedPositions: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<PartialFarmsStakedPositionObject[]>;
    /**
     * @deprecated use stakeTxV2 instead
     * Creates a transaction to stake coins in a staking pool (original version)
     * @param inputs Staking parameters including transaction, pool ID, coin ID, lock duration, and coin type
     * @returns Transaction object argument for StakedPosition
     */
    stakeTxV1: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        stakeCoinId: ObjectId | TransactionArgument;
        lockDurationMs: Timestamp;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to stake coins in a staking pool
     * @param inputs Staking parameters including transaction, pool ID, coin ID, lock duration, lock enforcement, and coin type
     * @returns Transaction object argument for StakedPosition
     */
    stakeTxV2: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        stakeCoinId: ObjectId | TransactionArgument;
        lockDurationMs: Timestamp;
        lockEnforcement: FarmsLockEnforcement;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use depositPrincipalTxV2 instead
     * Creates a transaction to deposit additional principal to a staked position (original version)
     * @param inputs Deposit parameters including transaction, position ID, pool ID, coin ID, and coin type
     * @returns Transaction command to deposit principal
     */
    depositPrincipalTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinId: ObjectId | TransactionArgument;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to deposit additional principal to a staked position
     * @param inputs Deposit parameters including transaction, position ID, pool ID, coin ID, and coin type
     * @returns Transaction command to deposit principal
     */
    depositPrincipalTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinId: ObjectId | TransactionArgument;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use withdrawPrincipalTxV2 instead
     * Creates a transaction to withdraw principal from a staked position (original version)
     * @param inputs Withdrawal parameters including transaction, position ID, pool ID, amount, and coin type
     * @returns Transaction object argument for the withdrawn Coin
     */
    withdrawPrincipalTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        withdrawAmount: Balance;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to withdraw principal from a staked position
     * @param inputs Withdrawal parameters including transaction, position ID, pool ID, amount, and coin type
     * @returns Transaction object argument for the withdrawn Coin
     */
    withdrawPrincipalTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        withdrawAmount: Balance;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use destroyStakedPositionTxV2 instead
     * Creates a transaction to destroy a staked position (original version)
     * @param inputs Destroy parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction command to destroy the position
     */
    destroyStakedPositionTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to destroy a staked position
     * @param inputs Destroy parameters including transaction, position ID, and coin type
     * @returns Transaction command to destroy the position
     */
    destroyStakedPositionTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use updatePositionTxV2 instead
     * Creates a transaction to update a staked position, recalculating rewards (original version)
     * @param inputs Update parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction command to update the position
     */
    updatePositionTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to update a staked position, recalculating rewards
     * @param inputs Update parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction command to update the position
     */
    updatePositionTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use lockTxV2 instead
     * Creates a transaction to lock a staked position for a specific duration (original version)
     * @param inputs Lock parameters including transaction, position ID, pool ID, lock duration, and coin type
     * @returns Transaction command to lock the position
     */
    lockTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        lockDurationMs: Timestamp;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to lock a staked position for a specific duration
     * @param inputs Lock parameters including transaction, position ID, pool ID, lock duration, and coin type
     * @returns Transaction command to lock the position
     */
    lockTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        lockDurationMs: Timestamp;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use renewLockTxV2 instead
     * Creates a transaction to renew the lock on a staked position (original version)
     * @param inputs Renew lock parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction command to renew the lock
     */
    renewLockTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to renew the lock on a staked position
     * @param inputs Renew lock parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction command to renew the lock
     */
    renewLockTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use unlockTxV2 instead
     * Creates a transaction to unlock a staked position (original version)
     * @param inputs Unlock parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction command to unlock the position
     */
    unlockTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to unlock a staked position
     * @param inputs Unlock parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction command to unlock the position
     */
    unlockTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use beginHarvestTxV2 instead
     * Creates a transaction to begin the reward harvesting process (original version)
     * @param inputs Begin harvest parameters including transaction, pool ID, and coin type
     * @returns Transaction object argument for the harvest metadata
     */
    beginHarvestTxV1: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to begin the reward harvesting process
     * @param inputs Begin harvest parameters including transaction, position ID, pool ID, and coin type
     * @returns Transaction object argument for the harvest cap
     */
    beginHarvestTxV2: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use harvestRewardsTxV2 instead
     * Creates a transaction to harvest rewards from a staked position (original version)
     * @param inputs Harvest parameters including transaction, position ID, pool ID, harvest metadata, stake coin type, and reward coin type
     * @returns Transaction object argument for the harvested rewards
     */
    harvestRewardsTxV1: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        harvestedRewardsEventMetadataId: ObjectId | TransactionArgument;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to harvest rewards from a staked position
     * @param inputs Harvest parameters including transaction, harvest cap, position ID, pool ID, stake coin type, and reward coin type
     * @returns Transaction object argument for the harvested rewards
     */
    harvestRewardsTxV2: (inputs: {
        tx: Transaction;
        harvestRewardsCap: ObjectId | TransactionArgument;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use endHarvestTxV2 instead
     * Creates a transaction to end the reward harvesting process (original version)
     * @param inputs End harvest parameters including transaction and harvest metadata
     * @returns Transaction command to end the harvest
     */
    endHarvestTxV1: (inputs: {
        tx: Transaction;
        harvestedRewardsEventMetadataId: ObjectId | TransactionArgument;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to end the reward harvesting process
     * @param inputs End harvest parameters including transaction and harvest cap
     * @returns Transaction command to end the harvest
     */
    endHarvestTxV2: (inputs: {
        tx: Transaction;
        harvestRewardsCap: ObjectId | TransactionArgument;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use newStakingPoolTxV2 instead
     * Creates a transaction for the deprecated version of staking pool creation
     * @param inputs Pool creation parameters including transaction, lock enforcement, durations, multiplier, stake amount, and coin type
     * @returns Transaction objects for the vault and owner cap
     */
    newStakingPoolTxV1: (inputs: {
        tx: Transaction;
        lockEnforcement: FarmsLockEnforcement;
        minLockDurationMs: Timestamp;
        maxLockDurationMs: Timestamp;
        maxLockMultiplier: FarmsMultiplier;
        minStakeAmount: Balance;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction for the current version of staking pool creation
     * @param inputs Pool creation parameters including transaction, lock enforcements array, durations, multiplier, stake amount, and coin type
     * @returns Transaction objects for the vault and authority cap
     */
    newStakingPoolTxV2: (inputs: {
        tx: Transaction;
        lockEnforcements: FarmsLockEnforcement[];
        minLockDurationMs: Timestamp;
        maxLockDurationMs: Timestamp;
        maxLockMultiplier: FarmsMultiplier;
        minStakeAmount: Balance;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use shareStakingPoolTxV2 instead
     * Creates a transaction to share a staking pool, making it public
     * @param inputs Share pool parameters including transaction, pool ID, and coin type
     * @returns Transaction command to share the pool
     */
    shareStakingPoolTxV1: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId | TransactionArgument;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to share a staking pool, making it public
     * @param inputs Share pool parameters including transaction, pool ID, and coin type
     * @returns Transaction command to share the pool
     */
    shareStakingPoolTxV2: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId | TransactionArgument;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use transferOwnerCapTxV2 instead
     * Creates a transaction to transfer ownership of a staking pool
     * @param inputs Transfer parameters including transaction, owner cap ID, and recipient address
     * @returns Transaction command to transfer the owner cap
     */
    transferOwnerCapTxV1: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId | TransactionArgument;
        recipientAddress: SuiAddress;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use grantOneTimeAdminCapTxV2 instead
     * Creates a transaction to grant a one-time admin capability for a staking pool (original version)
     * @param inputs Grant parameters including transaction, owner cap ID, recipient address, and reward coin type
     * @returns Transaction command to grant the one-time admin cap
     */
    grantOneTimeAdminCapTxV1: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId | TransactionArgument;
        recipientAddress: SuiAddress;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to grant a one-time admin capability for a staking pool
     * @param inputs Grant parameters including transaction, owner cap ID, recipient address, and reward coin type
     * @returns Transaction command to grant the one-time admin cap
     */
    grantOneTimeAdminCapTxV2: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId | TransactionArgument;
        recipientAddress: SuiAddress;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use initializeStakingPoolRewardTxV2 instead
     * Creates a transaction to initialize rewards for a staking pool (original version)
     * @param inputs Initialize reward parameters including transaction, pool ID, reward coin ID, emission parameters, stake coin type, and reward coin type
     * @returns Transaction command to initialize the reward
     */
    initializeStakingPoolRewardTxV1: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        rewardCoinId: ObjectId | TransactionArgument;
        emissionScheduleMs: Timestamp;
        emissionRate: bigint;
        emissionDelayTimestampMs: Timestamp;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    } & FarmOwnerOrOneTimeAdminCap) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to initialize rewards for a staking pool
     * @param inputs Initialize reward parameters including transaction, pool ID, reward coin ID, emission parameters, stake coin type, and reward coin type
     * @returns Transaction command to initialize the reward
     */
    initializeStakingPoolRewardTxV2: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        rewardCoinId: ObjectId | TransactionArgument;
        emissionScheduleMs: Timestamp;
        emissionRate: bigint;
        emissionDelayTimestampMs: Timestamp;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    } & FarmOwnerOrOneTimeAdminCap) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use topUpStakingPoolRewardTxV2 instead
     * Creates a transaction to add more rewards to a staking pool (original version)
     * @param inputs Top up parameters including transaction, pool ID, reward coin ID, stake coin type, and reward coin type
     * @returns Transaction command to add rewards
     */
    topUpStakingPoolRewardTxV1: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        rewardCoinId: ObjectId | TransactionArgument;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    } & FarmOwnerOrOneTimeAdminCap) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to add more rewards to a staking pool
     * @param inputs Top up parameters including transaction, pool ID, reward coin ID, stake coin type, and reward coin type
     * @returns Transaction command to add rewards
     */
    topUpStakingPoolRewardTxV2: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        rewardCoinId: ObjectId | TransactionArgument;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    } & FarmOwnerOrOneTimeAdminCap) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use increaseStakingPoolRewardEmissionsTxV2 instead
     * Creates a transaction to increase the emission rate for a staking pool reward (original version)
     * @param inputs Increase emissions parameters including transaction, owner cap ID, pool ID, emission parameters, stake coin type, and reward coin type
     * @returns Transaction command to update emissions
     */
    increaseStakingPoolRewardEmissionsTxV1: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        emissionScheduleMs: Timestamp;
        emissionRate: bigint;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to increase the emission rate for a staking pool reward
     * @param inputs Increase emissions parameters including transaction, owner cap ID, pool ID, emission parameters, stake coin type, and reward coin type
     * @returns Transaction command to update emissions
     */
    increaseStakingPoolRewardEmissionsTxV2: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        emissionScheduleMs: Timestamp;
        emissionRate: bigint;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use setStakingPoolMinStakeAmountTxV2 instead
     * Creates a transaction to set the minimum stake amount for a staking pool (original version)
     * @param inputs Min stake amount parameters including transaction, owner cap ID, pool ID, minimum amount, and stake coin type
     * @returns Transaction command to set the minimum stake amount
     */
    setStakingPoolMinStakeAmountTxV1: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        minStakeAmount: bigint;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to set the minimum stake amount for a staking pool
     * @param inputs Min stake amount parameters including transaction, owner cap ID, pool ID, minimum amount, and stake coin type
     * @returns Transaction command to set the minimum stake amount
     */
    setStakingPoolMinStakeAmountTxV2: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        minStakeAmount: bigint;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a Move call (V1) to **remove undistributed reward coins** from a staking pool.
     * Only callable by the pool **owner** (validated via `ownerCapId`). This does not claw back
     * rewards already accrued/claimed by stakers—only reduces the remaining reward balance
     * for the specified `rewardCoinType`.
     *
     * @param inputs Transaction assembly parameters
     * @param inputs.tx Transaction instance to append the command to
     * @param inputs.ownerCapId OwnerCap object ID authorizing the removal
     * @param inputs.stakingPoolId The staking pool (vault) object ID
     * @param inputs.rewardAmount Amount to remove (base units, encoded as u64)
     * @param inputs.stakeCoinType Stake coin type argument for the vault module
     * @param inputs.rewardCoinType Reward coin type to be removed
     * @returns The transaction command added to `tx`
     */
    removeStakingPoolRewardTxV1: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        rewardAmount: Balance;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a Move call (V2) to **remove undistributed reward coins** from a staking pool.
     * Only callable by the pool **owner** (validated via `ownerCapId`). Includes the protocol
     * `version` object as required by V2 modules.
     *
     * @param inputs Transaction assembly parameters
     * @param inputs.tx Transaction instance to append the command to
     * @param inputs.ownerCapId OwnerCap object ID authorizing the removal
     * @param inputs.stakingPoolId The staking pool (vault) object ID
     * @param inputs.rewardAmount Amount to remove (base units, encoded as u64)
     * @param inputs.stakeCoinType Stake coin type argument for the vault module
     * @param inputs.rewardCoinType Reward coin type to be removed
     * @returns The transaction command added to `tx`
     */
    removeStakingPoolRewardTxV2: (inputs: {
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        rewardAmount: Balance;
        stakeCoinType: CoinType;
        rewardCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to check if a staking pool is unlocked
     * @param inputs Check parameters including transaction, pool ID, and coin type
     * @returns Transaction object argument for the boolean result
     */
    isVaultUnlockedTxV1: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to get the remaining rewards for a staking pool
     * @param inputs Remaining rewards parameters including transaction, pool ID, and coin type
     * @returns Transaction object argument for the vector of remaining rewards
     */
    remainingRewardsTxV1: (inputs: {
        tx: Transaction;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * @deprecated use fetchBuildStakeTxV2 instead
     * Builds a complete transaction for staking coins
     * @param inputs Staking parameters including wallet address, lock enforcement, stake amount, pool ID, lock duration, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildStakeTxV1: (inputs: ApiFarmsStakeBodyV1) => Promise<Transaction>;
    /**
     * Builds a complete transaction for staking coins
     * @param inputs Staking parameters including wallet address, lock enforcement, stake amount, pool ID, lock duration, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildStakeTxV2: (inputs: ApiFarmsStakeBody) => Promise<Transaction>;
    /**
     * @deprecated use fetchBuildDepositPrincipalTxV2 instead
     * Builds a complete transaction for depositing additional principal to a staked position
     * @param inputs Deposit parameters including wallet address, position ID, pool ID, deposit amount, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildDepositPrincipalTxV1: (inputs: ApiFarmsDepositPrincipalBody) => Promise<Transaction>;
    /**
     * Builds a complete transaction for depositing additional principal to a staked position
     * @param inputs Deposit parameters including wallet address, position ID, pool ID, deposit amount, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildDepositPrincipalTxV2: (inputs: ApiFarmsDepositPrincipalBody) => Promise<Transaction>;
    /**
     * @deprecated use buildWithdrawPrincipalTxV2 instead
     * Builds a complete transaction for withdrawing principal from a staked position
     * @param inputs Withdraw parameters including wallet address, position ID, pool ID, withdraw amount, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildWithdrawPrincipalTxV1: (inputs: {
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        withdrawAmount: Balance;
        stakeCoinType: CoinType;
        walletAddress: SuiAddress;
    }) => Transaction;
    /**
     * Builds a complete transaction for withdrawing principal from a staked position
     * @param inputs Withdraw parameters including wallet address, position ID, pool ID, withdraw amount, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildWithdrawPrincipalTxV2: (inputs: {
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        withdrawAmount: Balance;
        stakeCoinType: CoinType;
        walletAddress: SuiAddress;
    }) => Transaction;
    /**
     * @deprecated use buildUnstakeTxV2 instead
     * Builds a complete transaction for unstaking (withdrawing and destroying a position)
     * @param inputs Unstake parameters including wallet address, position ID, pool ID, reward coin types, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildUnstakeTxV1: (inputs: ApiFarmsUnstakeBody) => Transaction;
    /**
     * Builds a complete transaction for unstaking (withdrawing and destroying a position)
     * @param inputs Unstake parameters including wallet address, position ID, pool ID, reward coin types, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildUnstakeTxV2: (inputs: ApiFarmsUnstakeBody) => Transaction;
    /**
     * @deprecated use buildUpdatePositionTxV2 instead
     * Builds a transaction for updating a staked position
     * @param parameters for updatePositionTx
     * @returns Complete transaction ready for signing and execution
     */
    buildUpdatePositionTxV1: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * Builds a transaction for updating a staked position
     * @param parameters for updatePositionTx
     * @returns Complete transaction ready for signing and execution
     */
    buildUpdatePositionTx2: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * @deprecated use buildLockTxV2 instead
     * Builds a transaction for locking a staked position
     * @param parameters for lockTx
     * @returns Complete transaction ready for signing and execution
     */
    buildLockTxV1: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        lockDurationMs: Timestamp;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * Builds a transaction for locking a staked position
     * @param parameters for lockTx
     * @returns Complete transaction ready for signing and execution
     */
    buildLockTxV2: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        lockDurationMs: Timestamp;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * @deprecated use buildRenewLockTxV2 instead
     * Builds a transaction for renewing the lock on a staked position
     * @param parameters for renewLockTx
     * @returns Complete transaction ready for signing and execution
     */
    buildRenewLockTxV1: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * Builds a transaction for renewing the lock on a staked position
     * @param parameters for renewLockTx
     * @returns Complete transaction ready for signing and execution
     */
    buildRenewLockTxV2: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * @deprecated use buildUnlockTxV2 instead
     * Builds a transaction for unlocking a staked position
     * @param parameters for unlockTx
     * @returns Complete transaction ready for signing and execution
     */
    buildUnlockTxV1: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * Builds a transaction for unlocking a staked position
     * @param parameters for unlockTx
     * @returns Complete transaction ready for signing and execution
     */
    buildUnlockTxV2: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * @deprecated use buildHarvestRewardsTxV2 instead
     * Builds a complete transaction for harvesting rewards from staked positions
     * @param inputs Harvest parameters including wallet address, position IDs, pool ID, reward coin types, and optional claim as AfSui flag
     * @returns Complete transaction ready for signing and execution
     */
    buildHarvestRewardsTxV1: (inputs: ApiHarvestFarmsRewardsBody & {
        tx?: Transaction;
    }) => Transaction;
    /**
     * Builds a complete transaction for harvesting rewards from staked positions
     * @param inputs Harvest parameters including wallet address, position IDs, pool ID, reward coin types, and optional claim as AfSui flag
     * @returns Complete transaction ready for signing and execution
     */
    buildHarvestRewardsTxV2: (inputs: ApiHarvestFarmsRewardsBody & {
        tx?: Transaction;
    }) => Transaction;
    /**
     * @deprecated use buildCreateStakingPoolTxV2 instead
     * Builds a complete transaction for creating a new staking pool
     * @param inputs Pool creation parameters including wallet address, lock enforcements, durations, multiplier, stake amount, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildCreateStakingPoolTxV1: (inputs: ApiFarmsCreateStakingPoolBodyV1) => Transaction;
    /**
     * Builds a complete transaction for creating a new staking pool
     * @param inputs Pool creation parameters including wallet address, lock enforcements, durations, multiplier, stake amount, and coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildCreateStakingPoolTxV2: (inputs: ApiFarmsCreateStakingPoolBody) => Transaction;
    /**
     * @deprecated use fetchBuildInitializeStakingPoolRewardTxV2 instead
     * Builds a complete transaction for initializing rewards for a staking pool
     * @param inputs Initialize rewards parameters including wallet address, owner cap ID, pool ID, reward amount, emission parameters, stake coin type, and reward coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildInitializeStakingPoolRewardTxV1: (inputs: ApiFarmsInitializeStakingPoolRewardBody) => Promise<Transaction>;
    /**
     * Builds a complete transaction for initializing rewards for a staking pool
     * @param inputs Initialize rewards parameters including wallet address, owner cap ID, pool ID, reward amount, emission parameters, stake coin type, and reward coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildInitializeStakingPoolRewardTxV2: (inputs: ApiFarmsInitializeStakingPoolRewardBody) => Promise<Transaction>;
    /**
     * @deprecated use fetchBuildTopUpStakingPoolRewardsTxV2 instead
     * Builds a complete transaction for adding more rewards to a staking pool
     * @param inputs Top up rewards parameters including wallet address, owner cap ID, pool ID, rewards array with amounts and coin types, and stake coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildTopUpStakingPoolRewardsTxV1: (inputs: ApiFarmsTopUpStakingPoolRewardsBody) => Promise<Transaction>;
    /**
     * Builds a complete transaction for adding more rewards to a staking pool
     * @param inputs Top up rewards parameters including wallet address, owner cap ID, pool ID, rewards array with amounts and coin types, and stake coin type
     * @returns Complete transaction ready for signing and execution
     */
    fetchBuildTopUpStakingPoolRewardsTxV2: (inputs: ApiFarmsTopUpStakingPoolRewardsBody) => Promise<Transaction>;
    /**
     * @deprecated use buildIncreaseStakingPoolRewardsEmissionsTxV2 instead
     * Builds a complete transaction for increasing the emission rate of rewards for a staking pool
     * @param inputs Increase emissions parameters including wallet address, owner cap ID, pool ID, rewards array with emission parameters and coin types, and stake coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildIncreaseStakingPoolRewardsEmissionsTxV1: (inputs: ApiFarmsIncreaseStakingPoolRewardsEmissionsBody) => Transaction;
    /**
     * Builds a complete transaction for increasing the emission rate of rewards for a staking pool
     * @param inputs Increase emissions parameters including wallet address, owner cap ID, pool ID, rewards array with emission parameters and coin types, and stake coin type
     * @returns Complete transaction ready for signing and execution
     */
    buildIncreaseStakingPoolRewardsEmissionsTxV2: (inputs: ApiFarmsIncreaseStakingPoolRewardsEmissionsBody) => Transaction;
    /**
     * @deprecated use buildSetStakingPoolMinStakeAmountTxV2 instead
     * Builds a transaction for setting the minimum stake amount for a staking pool
     * @param parameters for setStakingPoolMinStakeAmountTx
     * @returns Complete transaction ready for signing and execution
     */
    buildSetStakingPoolMinStakeAmountTxV1: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        minStakeAmount: bigint;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * Builds a transaction for setting the minimum stake amount for a staking pool
     * @param parameters for setStakingPoolMinStakeAmountTx
     * @returns Complete transaction ready for signing and execution
     */
    buildSetStakingPoolMinStakeAmountTxV2: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        minStakeAmount: bigint;
        stakeCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * Builds a transaction for **removing undistributed reward coins** from a staking pool (V1).
     * Requires the pool **OwnerCap**. The removal is specific to a `rewardCoinType`.
     *
     * @param parameters Inputs accepted by `removeStakingPoolRewardTxV1`
     * @returns Complete transaction ready for signing and execution
     */
    buildRemoveStakingPoolRewardTxV1: (inputs: {
        rewards: {
            rewardCoinType: CoinType;
            rewardAmount: Balance;
        }[];
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
        walletAddress: SuiAddress;
    }) => Transaction;
    /**
     * Builds a transaction for **removing undistributed reward coins** from a staking pool (V2).
     * Requires the pool **OwnerCap** and includes the on-chain **version object**.
     *
     * @param parameters Inputs accepted by `removeStakingPoolRewardTxV2`
     * @returns Complete transaction ready for signing and execution
     */
    buildRemoveStakingPoolRewardTxV2: (inputs: {
        rewards: {
            rewardCoinType: CoinType;
            rewardAmount: Balance;
        }[];
        ownerCapId: ObjectId;
        stakingPoolId: ObjectId;
        stakeCoinType: CoinType;
        walletAddress: SuiAddress;
    }) => Transaction;
    /**
     * @deprecated use buildGrantOneTimeAdminCapTxV2 instead
     * Builds a transaction for granting a one-time admin capability for a staking pool
     * @param parameters for grantOneTimeAdminCapTx
     * @returns Complete transaction ready for signing and execution
     */
    buildGrantOneTimeAdminCapTxV1: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        ownerCapId: ObjectId | TransactionArgument;
        recipientAddress: SuiAddress;
        rewardCoinType: CoinType;
    }, "tx">) => Transaction;
    /**
     * Builds a transaction for granting a one-time admin capability for a staking pool
     * @param parameters for grantOneTimeAdminCapTx
     * @returns Complete transaction ready for signing and execution
     */
    buildGrantOneTimeAdminCapTxV2: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        ownerCapId: ObjectId | TransactionArgument;
        recipientAddress: SuiAddress;
        rewardCoinType: CoinType;
    }, "tx">) => Transaction;
    private readonly eventWrapperType;
    /**
     * Creates the event type for vault creation events
     * @returns Fully qualified event type string
     */
    private readonly createdVaultEventType;
    /**
     * Creates the event type for reward initialization events
     * @returns Fully qualified event type string
     */
    private readonly initializedRewardEventType;
    /**
     * Creates the event type for reward addition events
     * @returns Fully qualified event type string
     */
    private readonly addedRewardEventType;
    /**
     * Creates the event type for emission increase events
     * @returns Fully qualified event type string
     */
    private readonly increasedEmissionsEventType;
    /**
     * Creates the event type for emission update events
     * @returns Fully qualified event type string
     */
    private readonly updatedEmissionsEventType;
    /**
     * Creates the event type for strict staking events
     * @returns Fully qualified event type string
     */
    private readonly stakedEventType;
    /**
     * Creates the event type for relaxed staking events
     * @returns Fully qualified event type string
     */
    private readonly stakedRelaxedEventType;
    /**
     * Creates the event type for position locking events
     * @returns Fully qualified event type string
     */
    private readonly lockedEventType;
    /**
     * Creates the event type for position unlocking events
     * @returns Fully qualified event type string
     */
    private readonly unlockedEventType;
    /**
     * Creates the event type for principal deposit events
     * @returns Fully qualified event type string
     */
    private readonly depositedPrincipalEventType;
    /**
     * Creates the event type for principal withdrawal events
     * @returns Fully qualified event type string
     */
    private readonly withdrewPrincipalEventType;
    /**
     * Creates the event type for reward harvesting events
     * @returns Fully qualified event type string
     */
    private readonly harvestedRewardsEventType;
    /**
     * Checks if the input contains a one-time admin cap ID
     * @param inputs FarmOwnerOrOneTimeAdminCap object
     * @returns True if the input contains a one-time admin cap ID
     */
    private static isFarmOneTimeAdminCapId;
    /**
     * Gets the appropriate cap ID from the input
     * @param inputs FarmOwnerOrOneTimeAdminCap object
     * @returns Either the owner cap ID or one-time admin cap ID
     */
    private static farmCapId;
}

declare class FaucetApi {
    private readonly api;
    private static readonly constants;
    readonly addresses: FaucetAddresses;
    readonly eventTypes: {
        mintCoin: AnyObjectType;
        addCoin: AnyObjectType;
    };
    constructor(api: AftermathApi);
    fetchSupportedCoins: () => Promise<CoinType[]>;
    requestCoinTx: (inputs: {
        tx: Transaction;
        coinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    mintSuiFrenTx: (inputs: {
        tx: Transaction;
        suiPaymentCoinId: ObjectId | TransactionArgument;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    buildRequestCoinTx: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        coinType: CoinType;
    }, "tx">) => Transaction;
    fetchBuildMintSuiFrenTx: (inputs: ApiFaucetMintSuiFrenBody) => Promise<Transaction>;
    fetchMintCoinEvents: (inputs: EventsInputs) => Promise<EventsWithCursor<FaucetMintCoinEvent>>;
    fetchAddCoinEvents: (inputs: EventsInputs) => Promise<EventsWithCursor<FaucetAddCoinEvent>>;
    private readonly mintCoinEventType;
    private readonly addCoinEventType;
}

declare class LimitOrdersApi {
    private readonly api;
    readonly addresses: LimitAddresses;
    readonly eventTypes: {
        createdOrder: AnyObjectType;
    };
    constructor(api: AftermathApi);
    private readonly createdOrderEventType;
}

declare class MultisigApi {
    private readonly api;
    readonly sharedCustodyAddresses: SharedCustodyAddresses;
    constructor(api: AftermathApi);
    getMultisigForUser(inputs: ApiMultisigUserBody): MultisigData;
}

declare class NftAmmApi {
    private readonly api;
    private static readonly constants;
    readonly addresses: NftAmmAddresses;
    constructor(api: AftermathApi);
    fetchNftsInMarketTable: (inputs: {
        marketTableObjectId: ObjectId;
        cursor?: ObjectId;
        limit?: number;
    }) => Promise<DynamicFieldObjectsWithCursor<Nft>>;
    fetchMarket: (inputs: {
        objectId: ObjectId;
    }) => Promise<NftAmmMarketObject>;
    fetchMarkets: (inputs: {
        objectIds: ObjectId[];
    }) => Promise<NftAmmMarketObject[]>;
    fetchBuildBuyTx: (inputs: {
        market: NftAmmMarket;
        walletAddress: SuiAddress;
        nftObjectIds: ObjectId[];
        slippage: Slippage;
        referrer?: SuiAddress;
    }) => Promise<Transaction>;
    fetchBuildSellTx: (inputs: {
        market: NftAmmMarket;
        walletAddress: SuiAddress;
        nftObjectIds: ObjectId[];
        slippage: Slippage;
        referrer?: SuiAddress;
    }) => Promise<Transaction>;
    fetchBuildDepositTx: (inputs: {
        market: NftAmmMarket;
        walletAddress: SuiAddress;
        assetCoinAmountIn: Balance;
        nfts: (ObjectId | TransactionArgument)[];
        slippage: Slippage;
        referrer?: SuiAddress;
    }) => Promise<Transaction>;
    fetchBuildWithdrawTx: (inputs: {
        market: NftAmmMarket;
        walletAddress: SuiAddress;
        lpCoinAmount: Balance;
        nftObjectIds: ObjectId[];
        slippage: Slippage;
        referrer?: SuiAddress;
    }) => Promise<Transaction>;
    buyTx: (inputs: {
        tx: Transaction;
        marketObjectId: ObjectId;
        assetCoin: ObjectId | TransactionArgument;
        nftObjectIds: ObjectId[];
        expectedAssetCoinAmountIn: Balance;
        genericTypes: NftAmmInterfaceGenericTypes;
        slippage: Slippage;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    sellTx: (inputs: {
        tx: Transaction;
        marketObjectId: ObjectId;
        nfts: (ObjectId | TransactionArgument)[];
        expectedAssetCoinAmountOut: Balance;
        genericTypes: NftAmmInterfaceGenericTypes;
        slippage: Slippage;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    depositTx: (inputs: {
        tx: Transaction;
        marketObjectId: ObjectId;
        assetCoin: ObjectId | TransactionArgument;
        nfts: (ObjectId | TransactionArgument)[];
        expectedLpRatio: bigint;
        genericTypes: NftAmmInterfaceGenericTypes;
        slippage: Slippage;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    addWithdrawCommandToTransaction: (inputs: {
        tx: Transaction;
        marketObjectId: ObjectId;
        lpCoin: ObjectId | TransactionArgument;
        nftObjectIds: ObjectId[];
        expectedAssetCoinAmountOut: Balance;
        genericTypes: NftAmmInterfaceGenericTypes;
        slippage: Slippage;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    private static genericTypesForMarket;
}

declare class PerpetualsApi implements MoveErrorsInterface {
    private readonly api;
    private static readonly constants;
    readonly addresses: PerpetualsAddresses;
    readonly eventTypes: {
        withdrewCollateral: AnyObjectType;
        depositedCollateral: AnyObjectType;
        settledFunding: AnyObjectType;
        allocatedCollateral: AnyObjectType;
        deallocatedCollateral: AnyObjectType;
        liquidated: AnyObjectType;
        createdAccount: AnyObjectType;
        canceledOrder: AnyObjectType;
        postedOrder: AnyObjectType;
        filledMakerOrders: AnyObjectType;
        filledMakerOrder: AnyObjectType;
        filledTakerOrder: AnyObjectType;
        updatedPremiumTwap: AnyObjectType;
        updatedSpreadTwap: AnyObjectType;
        updatedFunding: AnyObjectType;
        updatedMarketVersion: AnyObjectType;
        createdStopOrderTicket: AnyObjectType;
        deletedStopOrderTicket: AnyObjectType;
        editedStopOrderTicketExecutor: AnyObjectType;
        addedStopOrderTicketCollateral: AnyObjectType;
        removedStopOrderTicketCollateral: AnyObjectType;
        editedStopOrderTicketDetails: AnyObjectType;
        executedStopOrderTicket: AnyObjectType;
        filledTakerOrderLiquidator: AnyObjectType;
        performedLiquidation: AnyObjectType;
        reducedOrder: AnyObjectType;
        performedAdl: AnyObjectType;
    };
    readonly moveErrors: MoveErrors;
    constructor(api: AftermathApi);
    getAccountCapType: (inputs: {
        collateralCoinType: CoinType;
    }) => string;
    private readonly eventType;
}

/**
 * This file contains the implementation of the PoolsApi class, which provides methods for interacting with the Aftermath protocol's pools.
 * @packageDocumentation
 */
/**
 * Provides methods to interact with the Pools API.
 */
declare class PoolsApi implements MoveErrorsInterface {
    private readonly api;
    /**
     * Constants used in the pools API.
     */
    private static readonly constants;
    /**
     * Object containing the addresses of various contracts.
     */
    readonly addresses: {
        pools: PoolsAddresses;
        referralVault: ReferralVaultAddresses;
        daoFeePools?: DaoFeePoolsAddresses;
    };
    readonly objectTypes: {
        pool: AnyObjectType;
        daoFeePool?: AnyObjectType;
        daoFeePoolOwnerCap?: AnyObjectType;
    };
    readonly eventTypes: {
        trade: AnyObjectType;
        deposit: AnyObjectType;
        withdraw: AnyObjectType;
        tradeV2: AnyObjectType;
        depositV2: AnyObjectType;
        withdrawV2: AnyObjectType;
    };
    readonly moveErrors: MoveErrors;
    /**
     * Creates an instance of PoolsApi.
     * @param {AftermathApi} api - An instance of AftermathApi.
     * @throws {Error} Throws an error if not all required addresses have been set in AfSdk
     */
    constructor(api: AftermathApi);
    fetchOwnedDaoFeePoolOwnerCaps: (inputs: ApiPoolsOwnedDaoFeePoolOwnerCapsBody) => Promise<DaoFeePoolOwnerCapObject[]>;
    /**
     * Executes a trade transaction on the specified pool.
     * @param inputs An object containing the necessary inputs for the trade transaction.
     * @returns A `TransactionObjectArgument` representing the trade transaction.
     */
    tradeTx: (inputs: {
        tx: Transaction;
        poolId: ObjectId;
        coinInId: ObjectId | TransactionObjectArgument;
        coinInType: CoinType;
        expectedCoinOutAmount: Balance;
        coinOutType: CoinType;
        lpCoinType: CoinType;
        slippage: Slippage;
        withTransfer?: boolean;
    }) => TransactionObjectArgument;
    /**
     * Creates a transaction object argument for depositing multiple coins into a pool.
     *
     * @param inputs - An object containing the necessary parameters for the deposit transaction.
     * @returns A transaction object argument representing the deposit transaction.
     */
    multiCoinDepositTx: (inputs: {
        tx: Transaction;
        poolId: ObjectId;
        coinIds: ObjectId[] | TransactionObjectArgument[];
        coinTypes: CoinType[];
        expectedLpRatio: bigint;
        lpCoinType: CoinType;
        slippage: Slippage;
        withTransfer?: boolean;
    }) => TransactionObjectArgument;
    /**
     * Withdraws multiple coins from a pool.
     * @param inputs An object containing the necessary parameters for the transaction.
     * @returns A TransactionObjectArgument representing the transaction.
     */
    multiCoinWithdrawTx: (inputs: {
        tx: Transaction;
        poolId: ObjectId;
        lpCoinId: ObjectId | TransactionObjectArgument;
        lpCoinType: CoinType;
        expectedAmountsOut: Balance[];
        coinTypes: CoinType[];
        slippage: Slippage;
        withTransfer?: boolean;
    }) => TransactionObjectArgument;
    /**
     * Withdraws all coins from a liquidity pool.
     * @param inputs - The inputs required for the transaction.
     * @param inputs.tx - The transaction block.
     * @param inputs.poolId - The ID of the liquidity pool.
     * @param inputs.lpCoinId - The ID of the LP coin.
     * @param inputs.lpCoinType - The type of the LP coin.
     * @param inputs.coinTypes - An array of coin types.
     * @param inputs.withTransfer - Whether or not to include a transfer.
     * @returns An array of transaction objects.
     */
    allCoinWithdrawTx: (inputs: {
        tx: Transaction;
        poolId: ObjectId;
        lpCoinId: ObjectId | TransactionObjectArgument;
        lpCoinType: CoinType;
        coinTypes: CoinType[];
        withTransfer?: boolean;
    }) => TransactionObjectArgument[];
    /**
     * Publishes a transaction block for creating a liquidity pool coin.
     * @param inputs An object containing the transaction block and the decimal value of the liquidity pool coin.
     * @returns A promise that resolves to the result of the transaction publishing.
     */
    publishLpCoinTx: (inputs: {
        tx: Transaction;
        lpCoinDecimals: CoinDecimal;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Creates a transaction to create a new pool.
     * @param inputs - An object containing the necessary inputs to create the pool.
     * @returns A transaction block to create the pool.
     */
    createPoolTx: (inputs: {
        tx: Transaction;
        lpCoinType: CoinType;
        coinsInfo: {
            coinId: ObjectId | TransactionObjectArgument;
            coinType: CoinType;
            weight: PoolWeight;
            decimals?: CoinDecimal;
            tradeFeeIn: PoolTradeFee;
            tradeFeeOut: PoolTradeFee;
            depositFee: PoolDepositFee;
            withdrawFee: PoolWithdrawFee;
        }[];
        lpCoinMetadata: PoolCreationLpCoinMetadata;
        lpCoinIconUrl: Url;
        createPoolCapId: ObjectId | TransactionObjectArgument;
        poolName: PoolName;
        poolFlatness: PoolFlatness;
        lpCoinDescription: string;
        respectDecimals: boolean;
        forceLpDecimals?: CoinDecimal;
        withTransfer?: boolean;
    }) => TransactionObjectArgument[];
    /**
     * Returns the pool object ID for a given LP coin type transaction.
     * @param inputs - An object containing the transaction block and LP coin type.
     * @returns The pool object ID.
     */
    poolObjectIdForLpCoinTypeTx: (inputs: {
        tx: Transaction;
        lpCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    daoFeePoolNewTx: (inputs: {
        tx: Transaction;
        poolId: ObjectId | TransactionObjectArgument;
        feeBps: bigint;
        feeRecipient: SuiAddress;
        lpCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    daoFeePoolUpdateFeeBpsTx: (inputs: {
        tx: Transaction;
        daoFeePoolOwnerCapId: ObjectId;
        daoFeePoolId: ObjectId;
        newFeeBps: bigint;
        lpCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    daoFeePoolUpdateFeeRecipientTx: (inputs: {
        tx: Transaction;
        daoFeePoolOwnerCapId: ObjectId;
        daoFeePoolId: ObjectId;
        newFeeRecipient: SuiAddress;
        lpCoinType: CoinType;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Executes a trade transaction on the specified pool.
     * @param inputs An object containing the necessary inputs for the trade transaction.
     * @returns A `TransactionObjectArgument` representing the trade transaction.
     */
    daoFeePoolTradeTx: (inputs: {
        tx: Transaction;
        daoFeePoolId: ObjectId;
        coinInId: ObjectId | TransactionObjectArgument;
        coinInType: CoinType;
        expectedCoinOutAmount: Balance;
        coinOutType: CoinType;
        lpCoinType: CoinType;
        slippage: Slippage;
    }) => TransactionObjectArgument;
    /**
     * Creates a transaction object argument for depositing multiple coins into a pool.
     *
     * @param inputs - An object containing the necessary parameters for the deposit transaction.
     * @returns A transaction object argument representing the deposit transaction.
     */
    daoFeePoolMultiCoinDepositTx: (inputs: {
        tx: Transaction;
        daoFeePoolId: ObjectId;
        coinIds: ObjectId[] | TransactionObjectArgument[];
        coinTypes: CoinType[];
        expectedLpRatio: bigint;
        lpCoinType: CoinType;
        slippage: Slippage;
    }) => TransactionObjectArgument;
    /**
     * Withdraws all coins from a liquidity pool.
     * @param inputs - The inputs required for the transaction.
     * @param inputs.tx - The transaction block.
     * @param inputs.poolId - The ID of the liquidity pool.
     * @param inputs.lpCoinId - The ID of the LP coin.
     * @param inputs.lpCoinType - The type of the LP coin.
     * @param inputs.coinTypes - An array of coin types.
     * @returns An array of transaction objects.
     */
    daoFeePoolAllCoinWithdrawTx: (inputs: {
        tx: Transaction;
        daoFeePoolId: ObjectId;
        lpCoinId: ObjectId | TransactionObjectArgument;
        lpCoinType: CoinType;
        coinTypes: CoinType[];
    }) => TransactionObjectArgument[];
    /**
     * Fetches a transaction block for trading in a pool.
     * @async
     * @param {SuiAddress} inputs.walletAddress - The wallet address of the user trading in the pool.
     * @param {Pool} inputs.pool - The pool to trade in.
     * @param {CoinType} inputs.coinInType - The coin type of the coin being traded in.
     * @param {Balance} inputs.coinInAmount - The amount of the coin being traded in.
     * @param {CoinType} inputs.coinOutType - The coin type of the coin being traded out.
     * @param {Slippage} inputs.slippage - The slippage of the trade.
     * @param {SuiAddress} [inputs.referrer] - The referrer of the trade.
     * @param {boolean} [inputs.isSponsoredTx] - Whether the transaction is sponsored.
     * @returns {Promise<Transaction>} A promise that resolves to the fetched transaction block.
     */
    fetchBuildTradeTx: (inputs: {
        walletAddress: SuiAddress;
        pool: Pool;
        coinInType: CoinType;
        coinInAmount: Balance;
        coinOutType: CoinType;
        slippage: Slippage;
        referrer?: SuiAddress;
        isSponsoredTx?: boolean;
    }) => Promise<Transaction>;
    fetchAddTradeTx: (inputs: {
        tx: Transaction;
        coinInId: ObjectId | TransactionObjectArgument;
        coinInType: CoinType;
        coinInAmount: Balance;
        coinOutType: CoinType;
        slippage: Slippage;
        pool: Pool;
        referrer?: SuiAddress;
    }) => TransactionObjectArgument;
    /**
     * Fetches a transaction block for depositing in a pool.
     * @async
     * @param {SuiAddress} inputs.walletAddress - The wallet address of the user depositing in the pool.
     * @param {Pool} inputs.pool - The pool to deposit in.
     * @param {CoinsToBalance} inputs.amountsIn - The amounts of coins being deposited.
     * @param {Slippage} inputs.slippage - The slippage of the deposit.
     * @param {SuiAddress} [inputs.referrer] - The referrer of the deposit.
     * @param {boolean} [inputs.isSponsoredTx] - Whether the transaction is sponsored.
     * @returns {Promise<Transaction>} A promise that resolves to the fetched transaction block.
     */
    fetchBuildDepositTx: (inputs: {
        walletAddress: SuiAddress;
        pool: Pool;
        amountsIn: CoinsToBalance;
        slippage: Slippage;
        referrer?: SuiAddress;
        isSponsoredTx?: boolean;
    }) => Promise<Transaction>;
    /**
     * Fetches a transaction block for withdrawing from a pool.
     * @async
     * @param {SuiAddress} inputs.walletAddress - The wallet address of the user withdrawing from the pool.
     * @param {Pool} inputs.pool - The pool to withdraw from.
     * @param {CoinsToBalance} inputs.amountsOutDirection - The amounts of coins being withdrawn.
     * @param {Balance} inputs.lpCoinAmount - The amount of LP tokens being withdrawn.
     * @param {Slippage} inputs.slippage - The slippage of the withdrawal.
     * @param {SuiAddress} [inputs.referrer] - The referrer of the withdrawal.
     * @returns {Promise<Transaction>} A promise that resolves to the fetched transaction block.
     */
    fetchBuildWithdrawTx: (inputs: {
        walletAddress: SuiAddress;
        pool: Pool;
        amountsOutDirection: CoinsToBalance;
        lpCoinAmount: Balance;
        slippage: Slippage;
        referrer?: SuiAddress;
    }) => Promise<Transaction>;
    /**
     * Fetches a transaction block that withdraws all coins from a pool in exchange for the corresponding LP tokens.
     * @param inputs An object containing the wallet address, pool, LP coin amount, and optional referrer.
     * @returns A promise that resolves to a Transaction object.
     */
    fetchBuildAllCoinWithdrawTx: (inputs: {
        walletAddress: SuiAddress;
        pool: Pool;
        lpCoinAmount: Balance;
        referrer?: SuiAddress;
    }) => Promise<Transaction>;
    /**
     * Builds a transaction block for publishing an LP coin.
     * @param inputs - The input parameters for the transaction.
     * @returns The built transaction block.
     */
    buildPublishLpCoinTx: (inputs: ApiPublishLpCoinBody) => Transaction;
    buildDaoFeePoolUpdateFeeBpsTx: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        daoFeePoolOwnerCapId: ObjectId;
        daoFeePoolId: ObjectId;
        newFeeBps: bigint;
        lpCoinType: CoinType;
    }, "tx">) => Transaction;
    buildDaoFeePoolUpdateFeeRecipientTx: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        daoFeePoolOwnerCapId: ObjectId;
        daoFeePoolId: ObjectId;
        newFeeRecipient: SuiAddress;
        lpCoinType: CoinType;
    }, "tx">) => Transaction;
    private readonly tradeEventType;
    private readonly depositEventType;
    private readonly withdrawEventType;
    private readonly tradeV2EventType;
    private readonly depositV2EventType;
    private readonly withdrawV2EventType;
}

declare class ReferralVaultApi {
    private readonly api;
    private static readonly constants;
    readonly addresses: ReferralVaultAddresses;
    constructor(api: AftermathApi);
    updateReferrerTx: (inputs: {
        tx: Transaction;
        referrer: SuiAddress;
    }) => _mysten_sui_transactions.TransactionResult | undefined;
    withdrawRebateTx: (inputs: {
        tx: Transaction;
        coinType: CoinType;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    balanceOfRebateTx: (inputs: {
        tx: Transaction;
        coinType: CoinType;
        referrer: SuiAddress;
    }) => _mysten_sui_transactions.TransactionResult;
    referrerForTx: (inputs: {
        tx: Transaction;
        referee: SuiAddress;
    }) => _mysten_sui_transactions.TransactionResult;
    hasReffererTx: (inputs: {
        tx: Transaction;
        referee: SuiAddress;
    }) => _mysten_sui_transactions.TransactionResult;
    fetchBalanceOfRebate: (inputs: {
        coinType: CoinType;
        referrer: SuiAddress;
    }) => Promise<Balance>;
    fetchReferrer: (inputs: {
        referee: SuiAddress;
    }) => Promise<SuiAddress | undefined>;
}

/**
 * RouterApi class provides methods for interacting with the Aftermath Router API.
 * @class
 */
declare class RouterApi implements MoveErrorsInterface {
    private readonly api;
    static readonly constants: {
        moduleNames: {
            router: string;
            events: string;
            protocolFee: string;
            version: string;
            admin: string;
        };
        eventNames: {
            routerTrade: string;
        };
    };
    readonly addresses: RouterAddresses;
    readonly eventTypes: {
        routerTrade: AnyObjectType;
    };
    readonly moveErrors: MoveErrors;
    /**
     * Creates an instance of RouterApi.
     * @constructor
     * @param {AftermathApi} api - The Aftermath API instance.
     */
    constructor(api: AftermathApi);
    private readonly routerTradeEventType;
}

declare class StakingApi implements MoveErrorsInterface {
    private readonly api;
    private static readonly constants;
    readonly addresses: StakingAddresses;
    readonly eventTypes: {
        staked: AnyObjectType;
        unstakeRequested: AnyObjectType;
        unstaked: AnyObjectType;
        epochWasChanged: AnyObjectType;
    };
    readonly coinTypes: {
        afSui: CoinType;
    };
    readonly objectTypes: {
        unverifiedValidatorOperationCap: AnyObjectType;
    };
    readonly moveErrors: MoveErrors;
    constructor(api: AftermathApi);
    /**
     * Adds move call to tx for liquid staking of SUI for afSUI.
     *
     * @returns `Coin<AFSUI>` if `withTransfer` is `undefined` or `false`
     */
    stakeTx: (inputs: {
        tx: Transaction;
        suiCoin: ObjectId | TransactionArgument;
        validatorAddress: SuiAddress;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Adds move call to tx for liquid unstaking of afSUI for SUI that will be
     * processed at start of next epoch (end of current epoch).
     *
     * @returns ()
     */
    unstakeTx: (inputs: {
        tx: Transaction;
        afSuiCoin: ObjectId | TransactionArgument;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Adds move call to tx for liquid unstaking of afSUI for SUI that will be
     * processed immedietly.
     *
     * @returns `Coin<SUI>` if `withTransfer` is `undefined` or `false`
     */
    atomicUnstakeTx: (inputs: {
        tx: Transaction;
        afSuiCoin: ObjectId | TransactionArgument;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Adds move call to tx for liquid staking of currently staked (non-liquid)
     * SUI objects for afSUI.
     *
     * @returns `Coin<AFSUI>` if `withTransfer` is `undefined` or `false`
     */
    requestStakeStakedSuiVecTx: (inputs: {
        tx: Transaction;
        stakedSuiIds: ObjectId[];
        validatorAddress: SuiAddress;
        withTransfer?: boolean;
    }) => _mysten_sui_transactions.TransactionResult;
    epochWasChangedTx: (inputs: {
        tx: Transaction;
    }) => _mysten_sui_transactions.TransactionResult;
    afSuiToSuiExchangeRateTx: (inputs: {
        tx: Transaction;
    }) => _mysten_sui_transactions.TransactionResult;
    suiToAfSuiExchangeRateTx: (inputs: {
        tx: Transaction;
    }) => _mysten_sui_transactions.TransactionResult;
    totalSuiAmountTx: (inputs: {
        tx: Transaction;
    }) => _mysten_sui_transactions.TransactionResult;
    afSuiToSuiTx: (inputs: {
        tx: Transaction;
        afSuiAmount: Balance;
    }) => _mysten_sui_transactions.TransactionResult;
    suiToAfSuiTx: (inputs: {
        tx: Transaction;
        suiAmount: Balance;
    }) => _mysten_sui_transactions.TransactionResult;
    updateValidatorFeeTx: (inputs: {
        tx: Transaction;
        validatorOperationCapId: ObjectId;
        newFee: bigint;
    }) => _mysten_sui_transactions.TransactionResult;
    /**
     * Builds complete PTB for liquid staking of SUI for afSUI.
     *
     * @returns Transaction Block ready for execution
     */
    fetchBuildStakeTx: (inputs: ApiStakeBody) => Promise<Transaction>;
    /**
     * Builds complete PTB for liquid unstaking of afSUI for SUI.
     *
     * @returns Transaction Block ready for execution
     */
    fetchBuildUnstakeTx: (inputs: ApiUnstakeBody) => Promise<Transaction>;
    /**
     * Builds complete PTB for liquid staking of currently staked (non-liquid)
     * SUI objects for afSUI.
     *
     * @returns Transaction Block ready for execution
     */
    fetchBuildStakeStakedSuiTx: (inputs: ApiStakeStakedSuiBody) => Promise<Transaction>;
    buildUpdateValidatorFeeTx: (inputs: ApiUpdateValidatorFeeBody) => Promise<Transaction>;
    buildEpochWasChangedTx: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
    }, "tx">) => Transaction;
    private readonly stakedEventType;
    private readonly unstakeRequestedEventType;
    private readonly unstakedEventType;
    private readonly epochWasChangedEventType;
    static updateStakingPositionsFromEvent: (inputs: {
        stakingPositions: StakingPosition[];
        event: StakeEvent | UnstakeEvent;
    }) => StakingPosition[];
    private static assertValidExternalFee;
    private static updateUnstakePositionsFromEvent;
}

declare class SuiApi {
    private readonly api;
    constructor(api: AftermathApi);
    /**
     * @deprecated Use `getSystemState()` method instead.
     * This method will be removed in a future release.
     * @example
     * ```typescript
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const sui = afSdk.Sui();
     *
     * const systemState = await sui.getSystemState();
     * console.log(systemState.epoch, systemState.validators);
     */
    fetchSystemState: () => Promise<SuiSystemStateSummary>;
}

declare class SuiFrensApi {
    private readonly api;
    private static readonly constants;
    readonly addresses: SuiFrensAddresses;
    readonly objectTypes: {
        suiFren: AnyObjectType;
        capy: AnyObjectType;
        bullshark: AnyObjectType;
        suiFrenAccessory: AnyObjectType;
        stakedSuiFrenPosition: AnyObjectType;
        stakedSuiFrenMetadataV1: AnyObjectType;
    };
    readonly eventTypes: {
        harvestSuiFrenFees: AnyObjectType;
        mixSuiFrens: AnyObjectType;
        stakeSuiFren: AnyObjectType;
        unstakeSuiFren: AnyObjectType;
    };
    constructor(api: AftermathApi);
    fetchMixingLimitsAndLastEpochMixeds: (inputs: {
        suiFrenIds: ObjectId[];
        suiFrenType: AnyObjectType;
    }) => Promise<{
        mixLimit: bigint | undefined;
        lastEpochMixed: bigint | undefined;
    }[]>;
    fetchMixingLimit: (inputs: {
        suiFrenId: ObjectId;
        suiFrenType: AnyObjectType;
    }) => Promise<bigint | undefined>;
    fetchLastEpochMixed: (inputs: {
        suiFrenId: ObjectId;
        suiFrenType: AnyObjectType;
    }) => Promise<bigint | undefined>;
    fetchStakedSuiFrenMetadataIds: (inputs: {
        suiFrenIds: ObjectId[];
    }) => Promise<ObjectId[]>;
    fetchHarvestSuiFrenFeesEvents: (inputs: EventsInputs) => Promise<EventsWithCursor<HarvestSuiFrenFeesEvent>>;
    fetchMixSuiFrensEvents: (inputs: EventsInputs) => Promise<EventsWithCursor<MixSuiFrensEvent>>;
    fetchStakeSuiFrenEvents: (inputs: EventsInputs) => Promise<EventsWithCursor<StakeSuiFrenEvent>>;
    fetchUnstakeSuiFrenEvents: (inputs: EventsInputs) => Promise<EventsWithCursor<UnstakeSuiFrenEvent>>;
    fetchCapyLabsApp: () => Promise<CapyLabsAppObject>;
    fetchSuiFrenVaultStateV1Object: () => Promise<SuiFrenVaultStateV1Object>;
    fetchSuiFrens: (inputs: {
        suiFrenIds: ObjectId[];
    }) => Promise<SuiFrenObject[]>;
    fetchOwnedSuiFrens: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<SuiFrenObject[]>;
    fetchStakedSuiFrens: (inputs: {
        stakedSuiFrenIds: ObjectId[];
    }) => Promise<StakedSuiFrenInfo[]>;
    fetchStakedSuiFrensDynamicFields: (inputs: DynamicFieldsInputs) => Promise<DynamicFieldObjectsWithCursor<StakedSuiFrenInfo>>;
    fetchAccessoriesForSuiFren: (inputs: {
        suiFrenId: ObjectId;
    }) => Promise<SuiFrenAccessoryObject[]>;
    fetchOwnedAccessories: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<SuiFrenAccessoryObject[]>;
    fetchAccessories: (inputs: {
        objectIds: ObjectId[];
    }) => Promise<SuiFrenAccessoryObject[]>;
    fetchStakedSuiFrensDynamicFieldsWithFilters: (inputs: {
        attributes: Partial<SuiFrenAttributes>;
        sortBy?: SuiFrensSortOption;
        limit?: number;
        limitStepSize?: number;
        cursor?: ObjectId;
    }) => Promise<DynamicFieldObjectsWithCursor<StakedSuiFrenInfo>>;
    fetchOwnedStakedSuiFrens: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<StakedSuiFrenInfo[]>;
    devInspectMetadataObjectIdMulTx: (inputs: {
        tx: Transaction;
        suiFrenIds: ObjectId[];
    }) => _mysten_sui_transactions.TransactionResult;
    devInspectMixLimitAndLastEpochMixedMulTx: (inputs: {
        tx: Transaction;
        suiFrenIds: ObjectId[];
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    mixingLimitTx: (inputs: {
        tx: Transaction;
        suiFrenId: ObjectId;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    lastEpochMixedTx: (inputs: {
        tx: Transaction;
        suiFrenId: ObjectId;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    mixAndKeepTx: (inputs: {
        tx: Transaction;
        parentOneId: ObjectId;
        parentTwoId: ObjectId;
        suiPaymentCoinId: ObjectId | TransactionArgument;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    mixWithStakedAndKeepTx: (inputs: {
        tx: Transaction;
        nonStakedParentId: ObjectId;
        stakedParentId: ObjectId;
        suiPaymentCoinId: ObjectId | TransactionArgument;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    mixStakedWithStakedAndKeepTx: (inputs: {
        tx: Transaction;
        parentOneId: ObjectId;
        parentTwoId: ObjectId;
        suiPaymentCoinId: ObjectId | TransactionArgument;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    stakeAndKeepTx: (inputs: {
        tx: Transaction;
        suiFrenId: ObjectId;
        autoStakeFees: boolean;
        baseFee: Balance;
        feeIncrementPerMix: Balance;
        minRemainingMixesToKeep: bigint;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    unstakeAndKeepTx: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    beginHarvestTx: (inputs: {
        tx: Transaction;
    }) => _mysten_sui_transactions.TransactionResult;
    harvestTx: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        harvestFeesEventMetadataId: ObjectId | TransactionArgument;
    }) => _mysten_sui_transactions.TransactionResult;
    endHarvestTx: (inputs: {
        tx: Transaction;
        harvestFeesEventMetadataId: ObjectId | TransactionArgument;
    }) => _mysten_sui_transactions.TransactionResult;
    addAccessoryTx: (inputs: {
        tx: Transaction;
        suiFrenId: ObjectId;
        accessoryId: ObjectId;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    addAccessoryToOwnedSuiFrenTx: (inputs: {
        tx: Transaction;
        suiFrenId: ObjectId;
        accessoryId: ObjectId;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    removeAccessoryAndKeepTx: (inputs: {
        tx: Transaction;
        stakedPositionId: ObjectId;
        accessoryType: SuiFrenAccessoryType;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    removeAccessoryFromOwnedSuiFrenAndKeepTx: (inputs: {
        tx: Transaction;
        suiFrenId: ObjectId;
        accessoryType: SuiFrenAccessoryType;
        suiFrenType: AnyObjectType;
    }) => _mysten_sui_transactions.TransactionResult;
    fetchStakeTx: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        suiFrenId: ObjectId;
        baseFee: Balance;
        feeIncrementPerMix: Balance;
        minRemainingMixesToKeep: bigint;
        suiFrenType: AnyObjectType;
    }, "tx">) => Transaction;
    fetchUnstakeTx: (inputs: {
        walletAddress: SuiAddress;
    } & Omit<{
        tx: Transaction;
        stakedPositionId: ObjectId;
        suiFrenType: AnyObjectType;
    }, "tx">) => Transaction;
    fetchBuildMixTx: (inputs: ApiMixSuiFrensBody) => Promise<Transaction>;
    fetchBuildHarvestFeesTx: (inputs: {
        walletAddress: SuiAddress;
        stakedPositionIds: ObjectId[];
    }) => Promise<Transaction>;
    fetchBuildAddAccessoryTx: (inputs: ApiAddSuiFrenAccessoryBody) => Transaction;
    fetchBuildRemoveAccessoryTx: (inputs: ApiRemoveSuiFrenAccessoryBody) => Transaction;
    fetchSuiFrenStats: () => Promise<SuiFrenStats>;
    filterSuiFrensWithAttributes: (inputs: {
        suiFrens: SuiFrenObject[];
        attributes: Partial<SuiFrenAttributes>;
    }) => SuiFrenObject[];
    private fetchCompletePartialSuiFrenObjects;
    private fetchNonStakedCompletePartialSuiFrenObject;
    private fetchOwnedPartialSuiFrenBullsharks;
    private harvestSuiFrenFeesEventType;
    private mixSuiFrensEventType;
    private stakeSuiFrenEventType;
    private unstakeSuiFrenEventType;
}

declare class EventsApiHelpers {
    private readonly api;
    private static readonly constants;
    constructor(api: AftermathApi);
    /**
     * @deprecated `subscribeEvent` was removed from `SuiJsonRpcClient` in
     * `@mysten/sui` v2. Poll `queryEvents` instead or use a WebSocket transport.
     */
    fetchSubscribeToUserEvents: (_inputs: {
        address: SuiAddress;
        onEvent: (event: SuiEvent) => void;
    }) => Promise<never>;
    fetchCastEventsWithCursor: <EventOnChainType, EventType>(inputs: {
        query: SuiEventFilter;
        eventFromEventOnChain: (eventOnChain: EventOnChainType) => EventType;
    } & EventsInputs) => Promise<EventsWithCursor<EventType>>;
    fetchEventsWithinTime: <T extends Event$1>(inputs: {
        fetchEventsFunc: (eventsInputs: EventsInputs) => Promise<EventsWithCursor<T>>;
        timeMs: number;
        limitStepSize?: number;
    }) => Promise<T[]>;
    fetchAllEvents: <T>(inputs: {
        fetchEventsFunc: (eventsInputs: EventsInputs) => Promise<EventsWithCursor<T>>;
        limitStepSize?: number;
    }) => Promise<T[]>;
    private static resolveEventType;
    static suiEventOfTypeOrUndefined: (event: SuiEvent, eventType: AnyObjectType | (() => AnyObjectType)) => SuiEvent | undefined;
    static castEventOfTypeOrUndefined: <EventTypeOnChain, EventType>(event: SuiEvent, eventType: AnyObjectType | (() => AnyObjectType), castFunction: (eventOnChain: EventTypeOnChain) => EventType, exactMatch?: boolean) => EventType | undefined;
    static findCastEventsOrUndefined: <EventTypeOnChain, EventType>(inputs: {
        events: SuiEvent[];
        eventType: AnyObjectType | (() => AnyObjectType);
        castFunction: (eventOnChain: EventTypeOnChain) => EventType;
    }) => EventType[];
    static findCastEventOrUndefined: <EventTypeOnChain, EventType>(inputs: {
        events: SuiEvent[];
        eventType: AnyObjectType | (() => AnyObjectType);
        castFunction: (eventOnChain: EventTypeOnChain) => EventType;
    }) => EventType | undefined;
    static findCastEventInTransactionOrUndefined: <EventTypeOnChain, EventType>(transaction: SuiTransactionBlockResponse, eventType: AnyObjectType | (() => AnyObjectType), castFunction: (eventOnChain: EventTypeOnChain) => EventType) => EventType | undefined;
    static findCastEventInTransactionsOrUndefined: <EventTypeOnChain, EventType>(transactions: SuiTransactionBlockResponse[], eventType: AnyObjectType | (() => AnyObjectType), castFunction: (eventOnChain: EventTypeOnChain) => EventType) => EventType | undefined;
    static createEventType: (packageAddress: string, packageName: string, eventType: string, wrapperType?: string) => string;
}

declare class InspectionsApiHelpers {
    private readonly api;
    static constants: {
        devInspectSigner: string;
    };
    constructor(api: AftermathApi);
    fetchFirstBytesFromTxOutput: (inputs: {
        tx: Transaction;
        sender?: SuiAddress;
    }) => Promise<number[]>;
    fetchAllBytesFromTxOutput: (inputs: {
        tx: Transaction;
        sender?: SuiAddress;
    }) => Promise<Byte[][]>;
    fetchAllBytesFromTx: (inputs: {
        tx: Transaction;
        sender?: SuiAddress;
    }) => Promise<{
        events: SuiEvent[];
        effects: TransactionEffects;
        allBytes: Byte[][][];
    }>;
}

declare class ObjectsApiHelpers {
    private readonly api;
    private static readonly constants;
    constructor(api: AftermathApi);
    fetchDoesObjectExist: (objectId: ObjectId | PackageId) => Promise<boolean>;
    fetchIsObjectOwnedByAddress: (inputs: {
        objectId: ObjectId;
        walletAddress: SuiAddress;
    }) => Promise<boolean>;
    fetchObjectsOfTypeOwnedByAddress: (inputs: {
        walletAddress: SuiAddress;
        objectType: AnyObjectType;
        withDisplay?: boolean;
        options?: SuiObjectDataOptions;
    }) => Promise<SuiObjectResponse[]>;
    fetchOwnedObjects: (inputs: {
        walletAddress: SuiAddress;
        filter?: SuiObjectDataFilter;
        withDisplay?: boolean;
        options?: SuiObjectDataOptions;
    }) => Promise<SuiObjectResponse[]>;
    fetchObject: (inputs: {
        objectId: ObjectId;
        withDisplay?: boolean;
    }) => Promise<SuiObjectResponse>;
    fetchObjectGeneral: (inputs: {
        objectId: ObjectId;
        options?: SuiObjectDataOptions;
    }) => Promise<SuiObjectResponse>;
    fetchCastObject: <ObjectType>(inputs: {
        objectId: ObjectId;
        objectFromSuiObjectResponse: (SuiObjectResponse: SuiObjectResponse) => ObjectType;
        withDisplay?: boolean;
    }) => Promise<ObjectType>;
    fetchCastObjectGeneral: <ObjectType>(inputs: {
        objectId: ObjectId;
        objectFromSuiObjectResponse: (SuiObjectResponse: SuiObjectResponse) => ObjectType;
        options?: SuiObjectDataOptions;
    }) => Promise<ObjectType>;
    fetchObjectBatch: (inputs: {
        objectIds: ObjectId[];
        options?: SuiObjectDataOptions;
    }) => Promise<SuiObjectResponse[]>;
    fetchCastObjectBatch: <ObjectType>(inputs: {
        objectIds: ObjectId[];
        objectFromSuiObjectResponse: (data: SuiObjectResponse) => ObjectType;
        options?: SuiObjectDataOptions;
    }) => Promise<ObjectType[]>;
    fetchCastObjectsOwnedByAddressOfType: <ObjectType>(inputs: {
        walletAddress: SuiAddress;
        objectType: AnyObjectType;
        objectFromSuiObjectResponse: (SuiObjectResponse: SuiObjectResponse) => ObjectType;
        withDisplay?: boolean;
        options?: SuiObjectDataOptions;
    }) => Promise<ObjectType[]>;
    fetchObjectBcs: (objectId: ObjectId) => Promise<SuiObjectResponse>;
    fetchCastObjectBcs: <T, U>(inputs: {
        objectId: ObjectId;
        bcsType: BcsType<U>;
        fromDeserialized: (deserialized: U) => T;
    }) => Promise<T>;
    burnObjectTx: (inputs: {
        tx: Transaction;
        object: TransactionObjectArgument;
    }) => Promise<TransactionObjectArgument>;
    publicShareObjectTx: (inputs: {
        tx: Transaction;
        object: TransactionObjectArgument;
        objectType: AnyObjectType;
    }) => Promise<TransactionObjectArgument>;
}

declare class TransactionsApiHelpers {
    private readonly api;
    constructor(api: AftermathApi);
    fetchTransactionsWithCursor: (inputs: {
        query: SuiTransactionBlockResponseQuery;
        cursor?: TransactionDigest;
        limit?: number;
    }) => Promise<TransactionsWithCursor>;
    fetchSetGasBudgetForTx: (inputs: {
        tx: Transaction;
    }) => Promise<Transaction>;
    fetchSetGasBudgetAndSerializeTx: (inputs: {
        tx: Transaction | Promise<Transaction>;
        isSponsoredTx?: boolean;
    }) => Promise<SerializedTransaction>;
    fetchBase64TxKindFromTx: (inputs: {
        tx: Transaction | undefined;
    }) => Promise<SerializedTransaction | undefined>;
    static createTxTarget: (packageAddress: string, packageName: string, functionName: string) => `${string}::${string}::${string}`;
    static createBuildTxFunc: <Inputs>(func: (inputs: Inputs) => TransactionArgument) => ((inputs: {
        walletAddress: SuiAddress;
    } & Omit<Inputs, "tx">) => Transaction);
    static splitCoinTx(inputs: {
        tx: Transaction;
        coinType: CoinType;
        coinId: ObjectId;
        amount: Balance;
    }): _mysten_sui_transactions.TransactionResult;
    static serviceCoinDataFromCoinTxArg: (inputs: {
        coinTxArg: TransactionObjectArgument | Argument | ObjectId;
    }) => ServiceCoinData;
    static serviceCoinDataV2FromCoinTxArg: (inputs: {
        coinTxArg: TransactionObjectArgument | Argument;
    }) => ServiceCoinDataV2;
    static coinTxArgFromServiceCoinData: (inputs: {
        serviceCoinData: ServiceCoinData;
    }) => TransactionObjectArgument;
    static coinTxArgFromServiceCoinDataV2: (inputs: {
        serviceCoinDataV2: ServiceCoinDataV2;
    }) => TransactionObjectArgument;
    static transferTxMetadata: (inputs: {
        initTx: Transaction;
        newTx: Transaction;
    }) => void;
}

declare class NftsApi {
    private readonly api;
    readonly addresses: NftsAddresses;
    readonly objectTypes: {
        personalKioskCap: AnyObjectType;
    };
    constructor(api: AftermathApi);
    fetchOwnedNfts: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<Nft[]>;
    fetchNfts: (inputs: {
        objectIds: ObjectId[];
    }) => Promise<Nft[]>;
    fetchOwnedKioskOwnerCaps: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<KioskOwnerCapObject[]>;
    fetchNftsInKiosk: (inputs: {
        kioskObjectId: ObjectId;
    }) => Promise<Nft[]>;
    fetchKioskOwnerCaps: (inputs: {
        kioskOwnerCapIds: ObjectId[];
    }) => Promise<KioskOwnerCapObject[]>;
    fetchKiosks: (inputs: {
        kioskOwnerCaps: KioskOwnerCapObject[];
    }) => Promise<KioskObject[]>;
    fetchKiosksFromOwnerCaps: (inputs: {
        kioskOwnerCapIds: ObjectId[];
    }) => Promise<KioskObject[]>;
    fetchOwnedKiosks: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<KioskObject[]>;
}

declare class WalletApi {
    private readonly api;
    constructor(api: AftermathApi);
    fetchCoinBalance: (inputs: {
        walletAddress: SuiAddress;
        coin: CoinType;
    }) => Promise<bigint>;
    fetchAllCoinBalances: (inputs: {
        walletAddress: SuiAddress;
    }) => Promise<CoinsToBalance>;
    fetchPastTransactions: (inputs: {
        walletAddress: SuiAddress;
        cursor?: TransactionDigest;
        limit?: number;
    }) => Promise<TransactionsWithCursor>;
}

/**
 * The `AftermathApi` class is a low-level factory and reference point for
 * interacting directly with underlying API modules (e.g., PoolsApi, StakingApi).
 * It encapsulates a configured `SuiClient` and the known `addresses` for the
 * Aftermath protocol, allowing flexible or advanced usage scenarios.
 *
 * @example
 * ```typescript
 * import { AftermathApi } from "aftermath-ts-sdk";
 * import { SuiJsonRpcClient } from "@mysten/sui/jsonRpc";
 *
 * const addresses = { ... }; // from aftermath.getAddresses()
 * const client = new SuiJsonRpcClient({
 *   url: "https://fullnode.mainnet.sui.io",
 *   network: "mainnet",
 * });
 *
 * const afApi = new AftermathApi(client, addresses);
 * // access protocol APIs
 * const poolsApi = afApi.Pools();
 * ```
 */
declare class AftermathApi {
    readonly client: SuiJsonRpcClient;
    readonly addresses: ConfigAddresses;
    /**
     * Static helper references for quick usage without instantiating the class.
     */
    static helpers: {
        /** Helpers for accessing or iterating over dynamic fields in Sui objects. */
        dynamicFields: typeof DynamicFieldsApiHelpers;
        /** Helpers for working with Sui events and pagination. */
        events: typeof EventsApiHelpers;
        /** Helpers for reading on-chain data in an "inspection" manner (designed for Summaries). */
        inspections: typeof InspectionsApiHelpers;
        /** Helpers for retrieving and parsing Sui objects by ID or type. */
        objects: typeof ObjectsApiHelpers;
        /** Helpers for reading transaction data (by digest, query, etc.). */
        transactions: typeof TransactionsApiHelpers;
        /** Helper for wallet-based operations, separate from the main `Wallet` classes. */
        wallet: typeof WalletApi;
        /** Low-level direct coin operations, separate from the higher-level `Coin` class. */
        coin: typeof CoinApi;
        /** Low-level Sui chain data ops, separate from the higher-level `Sui` class. */
        sui: typeof SuiApi;
    };
    /**
     * Constructs a new instance of the `AftermathApi`, binding the given Sui client
     * to the known `addresses`.
     *
     * @param client - A `SuiJsonRpcClient` for on-chain queries and transactions.
     * @param addresses - The config addresses (object IDs, package IDs, etc.) for the Aftermath protocol.
     */
    constructor(client: SuiJsonRpcClient, addresses: ConfigAddresses);
    /**
     * Creates a new `DynamicFieldsApiHelpers` instance for complex object field queries.
     */
    DynamicFields: () => DynamicFieldsApiHelpers;
    /**
     * Creates a new `EventsApiHelpers` instance for querying Sui events.
     */
    Events: () => EventsApiHelpers;
    /**
     * Creates a new `InspectionsApiHelpers` instance for reading Summaries or inspection data.
     */
    Inspections: () => InspectionsApiHelpers;
    /**
     * Creates a new `ObjectsApiHelpers` instance for object retrieval/manipulation.
     */
    Objects: () => ObjectsApiHelpers;
    /**
     * Creates a new `TransactionsApiHelpers` instance for querying or parsing transaction data.
     */
    Transactions: () => TransactionsApiHelpers;
    /**
     * Creates a new `WalletApi` instance for direct wallet-based operations (fetching balances, etc.).
     */
    Wallet: () => WalletApi;
    /**
     * Creates a new `NftsApi` instance for retrieving and interacting with NFT data.
     */
    Nfts: () => NftsApi;
    /**
     * Creates a new `CoinApi` instance for detailed coin operations.
     */
    Coin: () => CoinApi;
    /**
     * Creates a new `SuiApi` instance for lower-level Sui chain interactions.
     */
    Sui: () => SuiApi;
    /**
     * Creates a new `PoolsApi` instance for pool-related interactions (AMM pools, liquidity, etc.).
     */
    Pools: () => PoolsApi;
    /**
     * Creates a new `FaucetApi` instance for dispensing tokens on supported dev/test networks.
     */
    Faucet: () => FaucetApi;
    /**
     * Creates a new `SuiFrensApi` instance for special social or token gating utilities on Sui.
     */
    SuiFrens: () => SuiFrensApi;
    /**
     * Creates a new `StakingApi` instance for advanced or direct staking operations on Sui.
     */
    Staking: () => StakingApi;
    /**
     * Creates a new `NftAmmApi` instance for NFT AMM logic (buy, sell, liquidity).
     */
    NftAmm: () => NftAmmApi;
    /**
     * Creates a new `ReferralVaultApi` instance for referral-based logic in Aftermath.
     */
    ReferralVault: () => ReferralVaultApi;
    /**
     * Creates a new `PerpetualsApi` instance for futures or perpetual derivatives on Sui.
     */
    Perpetuals: () => PerpetualsApi;
    /**
     * Creates a new `FarmsApi` instance for yield farming or liquidity mining interactions.
     */
    Farms: () => FarmsApi;
    /**
     * Creates a new `DcaApi` instance for dollar-cost averaging logic.
     */
    Dca: () => DcaApi;
    /**
     * Creates a new `MultisigApi` instance for multi-signature address creation and management.
     */
    Multisig: () => MultisigApi;
    /**
     * Creates a new `LimitOrdersApi` instance for placing limit orders on supported DEX protocols.
     */
    LimitOrders: () => LimitOrdersApi;
    /**
     * Creates a new `RouterApi` instance for best-price trade routing across multiple DEX liquidity sources.
     */
    Router: () => RouterApi;
    /**
     * Attempts to decode a Move error message into a structured error code,
     * package ID, module name, and descriptive error string.
     *
     * @param inputs - An object containing the raw `errorMessage`.
     * @returns An object with `errorCode`, `packageId`, `module`, and `error` if translation is successful, or `undefined`.
     *
     * @example
     * ```typescript
     * const errorDecoded = afApi.translateMoveErrorMessage({ errorMessage: "MoveAbort at ..." });
     * if (errorDecoded) {
     *   console.log(errorDecoded.errorCode, errorDecoded.error);
     * }
     * ```
     */
    translateMoveErrorMessage(inputs: {
        errorMessage: string;
    }): TranslatedMoveError | undefined;
}

declare class DynamicFieldsApiHelpers {
    private readonly api;
    private static readonly constants;
    constructor(api: AftermathApi);
    fetchCastDynamicFieldsOfTypeWithCursor: <ObjectType>(inputs: {
        parentObjectId: ObjectId;
        objectsFromObjectIds: (objectIds: ObjectId[]) => Promise<ObjectType[]>;
        dynamicFieldType?: AnyObjectType | ((objectType: AnyObjectType) => boolean);
        cursor?: ObjectId;
        limit?: number;
    }) => Promise<DynamicFieldObjectsWithCursor<ObjectType>>;
    fetchAllDynamicFieldsOfType: (inputs: {
        parentObjectId: ObjectId;
        dynamicFieldType?: AnyObjectType | ((objectType: AnyObjectType) => boolean);
        limitStepSize?: number;
    }) => Promise<DynamicFieldInfo[]>;
    fetchCastAllDynamicFieldsOfType: <ObjectType>(inputs: {
        parentObjectId: ObjectId;
        objectsFromObjectIds: (objectIds: ObjectId[]) => ObjectType[] | Promise<ObjectType[]>;
        dynamicFieldType?: AnyObjectType | ((objectType: AnyObjectType) => boolean);
        limitStepSize?: number;
    }) => Promise<ObjectType[]>;
    fetchDynamicFieldsUntil: <ObjectType>(inputs: {
        fetchFunc: (dynamicFieldsInputs: DynamicFieldsInputs) => Promise<DynamicFieldObjectsWithCursor<ObjectType>>;
        isComplete: (dynamicFieldObjects: ObjectType[]) => boolean;
        cursor?: ObjectId;
        limitStepSize?: number;
    }) => Promise<DynamicFieldObjectsWithCursor<ObjectType>>;
    fetchDynamicFieldsOfTypeWithCursor: (inputs: {
        parentObjectId: ObjectId;
        dynamicFieldType?: AnyObjectType | ((objectType: AnyObjectType) => boolean);
    } & DynamicFieldsInputs) => Promise<DynamicFieldsWithCursor>;
    fetchDynamicFieldObject: (inputs: {
        parentId: ObjectId;
        name: DynamicFieldName;
    }) => Promise<_mysten_sui_jsonRpc.SuiObjectResponse>;
}

/**
 * A utility class containing various helper functions for general use across
 * the Aftermath TS ecosystem. This includes numeric operations, object field
 * extraction, array transformations, slippage adjustments, and Move error parsing.
 */
declare class Helpers {
    /**
     * Static reference to the `DynamicFieldsApiHelpers`, providing utility methods
     * for working with dynamic fields in Sui objects.
     */
    static readonly dynamicFields: typeof DynamicFieldsApiHelpers;
    /**
     * Static reference to the `EventsApiHelpers`, providing methods for
     * querying and filtering Sui events.
     */
    static readonly events: typeof EventsApiHelpers;
    /**
     * Static reference to the `InspectionsApiHelpers`, used for reading
     * Summaries or inspection data from objects.
     */
    static readonly inspections: typeof InspectionsApiHelpers;
    /**
     * Static reference to the `ObjectsApiHelpers`, providing direct
     * retrieval or manipulation of on-chain Sui objects.
     */
    static readonly objects: typeof ObjectsApiHelpers;
    /**
     * Static reference to the `TransactionsApiHelpers`, enabling easier
     * queries for transaction data by digest or other criteria.
     */
    static readonly transactions: typeof TransactionsApiHelpers;
    /**
     * Removes all leading zeroes (after the '0x') from a string that represents
     * a Sui address or object type. For instance, "0x0000123" => "0x123".
     *
     * @param type - The hex string to process, potentially including "::" module syntax.
     * @returns The same string with unnecessary leading zeroes stripped out.
     */
    static stripLeadingZeroesFromType: (type: AnyObjectType) => AnyObjectType;
    /**
     * Ensures the given Sui address or object type is zero-padded to 64 hex digits
     * after the "0x". If a "::" suffix is present, only the address portion is padded.
     *
     * @param type - The "0x..." string or extended type (0x..::module).
     * @returns A new string normalized to a 64-hex-digit address or object ID.
     * @throws If the address portion is already longer than 64 hex digits.
     */
    static addLeadingZeroesToType: (type: AnyObjectType) => AnyObjectType;
    /**
     * Splits a non-SUI coin type string that may be prefixed by a chain ID for external usage,
     * returning the chain and the coin type. If no chain is recognized, defaults to `"sui"`.
     *
     * @param coin - The coin string, which may look like `"bsc:0x<...>"` or just `"0x<...>"`.
     * @returns An object with the `chain` (e.g. "bsc") and the `coinType`.
     */
    static splitNonSuiCoinType: (coin: CoinType) => {
        chain: CoinGeckoChain;
        coinType: CoinType;
    };
    /**
     * Checks if a given string represents a valid number (integer or decimal).
     *
     * @param str - The string to test.
     * @returns `true` if it's a valid numeric string, otherwise `false`.
     */
    static isNumber: (str: string) => boolean;
    /**
     * Sums an array of floating-point numbers, returning the numeric total.
     *
     * @param arr - The array of numbers to sum.
     * @returns The total as a float.
     */
    static sum: (arr: number[]) => number;
    /**
     * Sums an array of bigints, returning the total as a bigint.
     *
     * @param arr - The array of bigints to sum.
     * @returns The resulting total as a bigint.
     */
    static sumBigInt: (arr: bigint[]) => bigint;
    /**
     * Determines if two numbers are close within a given tolerance factor,
     * i.e., `|a - b| <= tolerance * max(a, b)`.
     *
     * @param a - The first number.
     * @param b - The second number.
     * @param tolerance - A fraction representing the max allowed difference relative to max(a, b).
     * @returns `true` if within tolerance, otherwise `false`.
     */
    static closeEnough: (a: number, b: number, tolerance: number) => boolean;
    /**
     * Determines if two bigints are close within a given tolerance factor,
     * by casting them to numbers internally.
     *
     * @param a - First bigint.
     * @param b - Second bigint.
     * @param tolerance - A fraction representing the max allowed difference relative to max(a, b).
     * @returns `true` if within tolerance, otherwise `false`.
     */
    static closeEnoughBigInt: (a: bigint, b: bigint, tolerance: number) => boolean;
    /**
     * Checks whether the integer divisions of `a` and `b` (by `fixedOne`) differ
     * by at most 1. Typically used in fixed math scenarios to see if two scaled
     * values are "very close."
     *
     * @param a - First number (scaled).
     * @param b - Second number (scaled).
     * @param fixedOne - The scaling factor representing 1.0 in the same scale as `a` and `b`.
     * @returns `true` if the integer parts differ by <= 1, otherwise `false`.
     */
    static veryCloseInt: (a: number, b: number, fixedOne: number) => boolean;
    /**
     * A small object containing "blended" math operations that handle
     * mixed numeric types (number vs. bigint). This is primarily for
     * internal usage in advanced math scenarios.
     */
    static blendedOperations: {
        /**
         * Multiply two floating-point numbers.
         */
        mulNNN: (a: number, b: number) => number;
        /**
         * Multiply a float and a bigint, returning a bigint (floor).
         */
        mulNNB: (a: number, b: number) => bigint;
        /**
         * Multiply a float and a bigint, returning a float.
         */
        mulNBN: (a: number, b: bigint) => number;
        /**
         * Multiply a float and a bigint, returning a bigint (floor).
         */
        mulNBB: (a: number, b: bigint) => bigint;
        /**
         * Multiply two bigints, returning a float.
         */
        mulBBN: (a: bigint, b: bigint) => number;
        /**
         * Multiply two bigints, returning a bigint.
         */
        mulBBB: (a: bigint, b: bigint) => bigint;
    };
    /**
     * Returns the maximum of multiple bigints.
     *
     * @param args - The bigints to compare.
     * @returns The largest bigint.
     */
    static maxBigInt: (...args: bigint[]) => bigint;
    /**
     * Returns the minimum of multiple bigints.
     *
     * @param args - The bigints to compare.
     * @returns The smallest bigint.
     */
    static minBigInt: (...args: bigint[]) => bigint;
    /**
     * Returns the absolute value of a bigint.
     *
     * @param num - The input bigint.
     * @returns A bigint representing the absolute value of `num`.
     */
    static absBigInt: (num: bigint) => bigint;
    /**
     * Capitalizes only the first letter of a string, making the rest lowercase.
     * E.g., "HELLO" => "Hello".
     *
     * @param str - The input string to transform.
     * @returns The resulting string with the first character in uppercase and the rest in lowercase.
     */
    static capitalizeOnlyFirstLetter: (str: string) => string;
    /**
     * Parses a JSON string containing potential BigInt values.
     * By default, it only converts strings ending in 'n' (like `"123n"`) to BigInts.
     *
     * @param json - The JSON string to parse.
     * @param unsafeStringNumberConversion - If `true`, all numeric strings (e.g., "123") will also become BigInts.
     * @returns The parsed JSON object with BigInt conversions where applicable.
     */
    static parseJsonWithBigint: (json: string, unsafeStringNumberConversion?: boolean) => any;
    /**
     * Creates a deep copy of the given target, handling nested arrays and objects.
     * Dates are cloned by their timestamp.
     *
     * @param target - The data to clone deeply.
     * @returns A new object/array/date structure mirroring `target`.
     */
    static deepCopy: <T>(target: T) => T;
    /**
     * Finds the index of the maximum value in an array. Returns -1 if the array is empty.
     *
     * @param arr - The input array.
     * @returns The index of the maximum value, or -1 if the array is empty.
     */
    static indexOfMax: <T extends number | bigint | string | Date>(arr: T[]) => number;
    private static uniqueObjectArray;
    /**
     * Returns a new array with unique elements from the input array,
     * preserving the order of first occurrences.
     *
     * @param arr - The original array.
     * @returns An array of unique items.
     */
    static uniqueArray: <T>(arr: T[]) => T[];
    /**
     * Returns a Promise that resolves after a specified number of milliseconds.
     *
     * @param ms - The delay time in milliseconds.
     * @returns A promise that resolves after `ms` milliseconds.
     */
    static sleep: (ms: number) => Promise<unknown>;
    /**
     * Creates a unique ID-like string by combining the current timestamp and random base36 digits.
     *
     * @returns A short random string (base36) that can serve as a unique identifier.
     */
    static createUid: () => string;
    /**
     * Splits an array into two groups: those for which `func` returns `true` (or truthy),
     * and those for which it returns `false`. The result is returned as a tuple `[trues, falses]`.
     *
     * @param array - The array to filter.
     * @param func - The function used to test each element.
     * @returns A tuple containing two arrays: `[elements that pass, elements that fail]`.
     */
    static bifilter: <ArrayType>(array: ArrayType[], func: (item: ArrayType, index: number, arr: ArrayType[]) => boolean) => [trues: ArrayType[], falses: ArrayType[]];
    /**
     * An async version of `bifilter`, returning a tuple of `[trues, falses]`.
     * Each element is tested asynchronously in parallel via `func`.
     *
     * @param array - The array to filter.
     * @param func - An async function returning `true` or `false`.
     * @returns A tuple `[trues, falses]` after asynchronous evaluation.
     */
    static bifilterAsync: <ArrayType>(array: ArrayType[], func: (item: ArrayType, index: number, arr: ArrayType[]) => Promise<boolean>) => Promise<[trues: ArrayType[], falses: ArrayType[]]>;
    /**
     * Filters the entries of an object based on a predicate function,
     * returning a new object with only those entries for which `predicate`
     * returns `true`.
     *
     * @param obj - The original object to filter.
     * @param predicate - A function taking `(key, value)` and returning a boolean.
     * @returns A new object with only the entries that pass the predicate.
     */
    static filterObject: <Value>(obj: Record<string, Value>, predicate: (key: string, value: Value) => boolean) => Record<string, Value>;
    /**
     * Applies downward slippage to a bigint amount by subtracting `slippage * amount`.
     * For instance, for 1% slippage, we reduce the amount by 1%.
     *
     * @param amount - The original bigint amount.
     * @param slippage - An integer percent (e.g., 1 => 1%).
     * @returns The adjusted bigint after subtracting the slippage portion.
     */
    static applySlippageBigInt: (amount: Balance, slippage: Slippage) => bigint;
    /**
     * Applies downward slippage to a floating-point amount. E.g., for 1% slippage,
     * reduce by 1% of `amount`.
     *
     * @param amount - The original float value.
     * @param slippage - An integer percent (e.g., 1 => 1%).
     * @returns The float after applying slippage.
     */
    static applySlippage: (amount: number, slippage: Slippage) => number;
    /**
     * Combines two arrays into a single array of pairs. The result length is the
     * minimum of the two input arrays' lengths.
     *
     * @param firstCollection - The first array.
     * @param lastCollection - The second array.
     * @returns An array of `[firstCollection[i], lastCollection[i]]` pairs.
     */
    static zip<S1, S2>(firstCollection: S1[], lastCollection: S2[]): [S1, S2][];
    /**
     * Removes circular references from an object or array, returning a JSON-safe structure.
     * Any cyclic references are replaced with `undefined`.
     *
     * @param obj - The object or array to remove circular references from.
     * @param seen - Internal usage to track references that have already been visited.
     * @returns A structure that can be safely JSON-stringified.
     */
    static removeCircularReferences<T>(obj: T, seen?: WeakSet<object>): T | undefined;
    /**
     * Checks if an unknown value is an array of strings.
     *
     * @param value - The value to check.
     * @returns `true` if `value` is a string array, otherwise `false`.
     */
    static isArrayOfStrings(value: unknown): value is string[];
    /**
     * Roughly checks if a string is a valid Sui type (e.g., "0x2::sui::SUI").
     * This is not guaranteed to be perfect, but covers common cases.
     *
     * @param str - The string to validate.
     * @returns `true` if it meets the minimum structure, otherwise `false`.
     */
    static isValidType: (str: string) => boolean;
    /**
     * Checks if a string is a valid hex representation, optionally prefixed with "0x".
     *
     * @param hexString - The string to check.
     * @returns `true` if `hexString` is a valid hex, otherwise `false`.
     */
    static isValidHex: (hexString: string) => boolean;
    /**
     * Extracts the fully qualified type (e.g., "0x2::coin::Coin<...>") from a `SuiObjectResponse`,
     * normalizing it with leading zeroes if necessary.
     *
     * @param data - The object response from Sui.
     * @returns The normalized object type string.
     * @throws If the type is not found.
     */
    static getObjectType(data: SuiObjectResponse): ObjectId;
    /**
     * Extracts the object ID from a `SuiObjectResponse`, normalizing it with leading zeroes.
     *
     * @param data - The object response from Sui.
     * @returns A zero-padded `ObjectId`.
     * @throws If the objectId is not found.
     */
    static getObjectId(data: SuiObjectResponse): ObjectId;
    /**
     * Retrieves the fields of a Move object from a `SuiObjectResponse`.
     *
     * @param data - The Sui object response containing a Move object.
     * @returns A record of fields for that object.
     * @throws If no fields are found.
     */
    static getObjectFields(data: SuiObjectResponse): Record<string, any>;
    /**
     * Retrieves display metadata from a Sui object response, if present.
     *
     * @param data - The Sui object response.
     * @returns The display fields for that object.
     * @throws If display fields are not found.
     */
    static getObjectDisplay(data: SuiObjectResponse): DisplayFieldsResponse;
    /**
     * Utility for building transaction commands with either a string-based
     * `ObjectId` or an existing transaction object argument. If it's a string,
     * it's converted via `tx.object(...)`; if already a `TransactionObjectArgument`,
     * it's returned as-is.
     *
     * @param tx - The current `Transaction` block to add the object to.
     * @param object - Either an `ObjectId` or a `TransactionObjectArgument`.
     * @returns A `TransactionObjectArgument` referencing the provided object.
     */
    static addTxObject: (tx: Transaction, object: ObjectId | TransactionObjectArgument) => TransactionObjectArgument;
    /**
     * Checks if a given string is a valid Sui address by normalizing it to a
     * 64-hex-digit form and calling `isValidSuiAddress`.
     *
     * @param address - The Sui address to validate.
     * @returns `true` if valid, `false` otherwise.
     */
    static isValidSuiAddress: (address: SuiAddress) => boolean;
    /**
     * Parses a MoveAbort error message from Sui into a possible `(errorCode, packageId, module)`,
     * if the message follows a known pattern. Otherwise returns undefined.
     *
     * @param inputs - The object containing the raw `errorMessage` from Sui.
     * @returns A partial structure of the error details or undefined.
     */
    static parseMoveErrorMessage(inputs: {
        errorMessage: string;
    }): ParsedMoveError | undefined;
    /**
     * Translates a Move abort error message into a known error string if it matches
     * entries in a given `moveErrors` table. This is used to map on-chain error codes
     * to user-friendly messages.
     *
     * @param inputs - Includes the raw `errorMessage` and a `moveErrors` object keyed by package, module, and code.
     * @returns A structure with `errorCode`, `packageId`, `module`, and a human-readable `error` string, or `undefined`.
     */
    static translateMoveErrorMessage(inputs: {
        errorMessage: string;
        moveErrors: MoveErrors;
    }): TranslatedMoveError | undefined;
    /**
     * Constructs a `Keypair` instance from a private key string. The `privateKey`
     * may indicate the signing scheme (ED25519, Secp256k1, or Secp256r1) via prefix,
     * as recognized by `decodeSuiPrivateKey`.
     *
     * @param privateKey - The full private key string (e.g., "0x<64_hex_chars>").
     * @returns A new `Keypair` instance for signing transactions.
     * @throws If the schema is unsupported.
     */
    static keypairFromPrivateKey: (privateKey: string) => Keypair;
}

/**
 * The `Wallet` class allows querying a user's balances and transactions.
 * It handles fetching coin balances, transactions, and more by leveraging
 * an `AftermathApi.Wallet` provider.
 */
declare class Wallet extends Caller {
    readonly address: SuiAddress;
    readonly api?: AftermathApi | undefined;
    /**
     * Creates a new `Wallet` instance for a specific address.
     *
     * @param address - The Sui address for this wallet (e.g., "0x<address>").
     * @param config - An optional caller configuration including network and authentication.
     * @param api - An optional `AftermathApi` instance for wallet-specific methods.
     */
    constructor(address: SuiAddress, config?: CallerConfig, api?: AftermathApi | undefined);
    /**
     * Fetches the balance for a single coin type in this wallet.
     *
     * @param inputs - An object containing the `coin` type to look up (e.g., "0x2::sui::SUI").
     * @returns A promise that resolves to the coin balance as a bigint.
     *
     * @example
     * ```typescript
     *
     * const afSdk = await Aftermath.create({ network: "MAINNET" });
     *
     * const wallet = afSdk.Wallet("0x<address>");
     *
     * const suiBalance = await wallet.getBalance({ coin: "0x2::sui::SUI" });
     * console.log("SUI Balance:", suiBalance.toString());
     * ```
     */
    getBalance(inputs: {
        coin: CoinType;
    }): Promise<Balance>;
    /**
     * Fetches the balances for multiple specified coin types in this wallet.
     * This method currently returns an array of balances in the same order
     * as the requested coins.
     *
     * @param inputs - An object containing an array of `coins` (coin types).
     * @returns A promise resolving to an array of `Balance`s, each matching the corresponding coin in `inputs.coins`.
     *
     * @example
     * ```typescript
     * const wallet = new Wallet("0x<address>");
     * const balances = await wallet.getBalances({ coins: ["0x2::sui::SUI", "0x<...>"] });
     * console.log(balances); // e.g. [1000000000n, 50000000000n]
     * ```
     */
    getBalances(inputs: {
        coins: CoinType[];
    }): Promise<Balance[]>;
    /**
     * Fetches all coin balances held by this wallet address, returning a record
     * keyed by coin type.
     *
     * @returns A promise resolving to an object mapping coin types to balances (bigints).
     *
     * @example
     * ```typescript
     * const wallet = new Wallet("0x<address>");
     * const allBalances = await wallet.getAllBalances();
     * console.log(allBalances); // { "0x2::sui::SUI": 1000000000n, "0x<other_coin>": 5000000000n, ... }
     * ```
     */
    getAllBalances(): Promise<CoinsToBalance>;
    /**
     * Fetches a paginated list of past transactions for this wallet address.
     *
     * @param inputs - An object implementing `ApiTransactionsBody`, which includes pagination parameters (`cursor`, `limit`) and an optional `order` or other fields.
     * @returns A promise that resolves to transaction details, including a cursor if more results exist.
     *
     * @example
     * ```typescript
     * const wallet = new Wallet("0x<address>");
     * const txHistory = await wallet.getPastTransactions({ cursor: "abc123", limit: 10 });
     * console.log(txHistory.transactions, txHistory.nextCursor);
     * ```
     */
    getPastTransactions(inputs: ApiTransactionsBody): Promise<TransactionsWithCursor>;
}

/**
 * Options accepted by {@link Aftermath.create}. All fields are optional —
 * pass `{}` for the canonical mainnet setup.
 */
interface AftermathOptions {
    /**
     * The target Sui network. Determines the canonical API host and
     * Sui fullnode URL when no explicit overrides are supplied.
     * @default "MAINNET"
     */
    network?: SuiNetwork;
    /**
     * Explicit override for the Aftermath API host (e.g.
     * `"http://localhost:8080"`). Useful for staging or local backends.
     */
    baseUrl?: Url;
    /**
     * Explicit override for the Sui fullnode URL.
     */
    fullnodeUrl?: Url;
    /**
     * Override for the API path segment between host and package prefix.
     * Defaults to `"api"`. Override only when targeting a backend that
     * mounts the Aftermath API under a different path.
     */
    apiEndpoint?: string;
    /**
     * Preloaded on-chain addresses. When supplied, `create` skips the
     * network round-trip that normally fetches them.
     */
    addresses?: ConfigAddresses;
    /**
     * Pre-built `AftermathApi` instance. When supplied, `create` uses it
     * directly and skips address discovery and Sui client setup entirely.
     */
    api?: AftermathApi;
}
/**
 * The `Aftermath` class is the primary entry point for interacting with
 * the Aftermath Finance protocols and utilities on the Sui blockchain.
 * It exposes sub-providers (e.g. `Router`, `Staking`, `Farms`) configured
 * for the chosen network.
 *
 * Instances are created through the async {@link Aftermath.create} factory
 * — direct construction is not supported.
 *
 * @example
 * ```typescript
 * const aftermath = await Aftermath.create({ network: "MAINNET" });
 * const supportedCoins = await aftermath.Router().getSupportedCoins();
 * ```
 */
declare class Aftermath extends Caller {
    /**
     * Constructs and fully initializes an `Aftermath` instance.
     *
     * Resolves on-chain addresses, configures the Sui fullnode client, and
     * returns a ready-to-use instance. Pass `addresses` or `api` to skip
     * the corresponding bootstrap steps.
     */
    static create(options?: AftermathOptions): Promise<Aftermath>;
    private readonly options;
    private constructor();
    /**
     * Resolves addresses and wires up the internal `AftermathApi`. Called
     * exactly once by the {@link Aftermath.create} factory.
     */
    private bootstrap;
    /**
     * The fully-bootstrapped low-level API provider. Set by `bootstrap()`
     * before any accessor is callable.
     */
    private api;
    /**
     * The Sui network this provider is configured for (e.g. "MAINNET").
     */
    get network(): SuiNetwork;
    /**
     * The resolved API base URL for this instance.
     */
    getApiBaseUrl(): Url | undefined;
    /**
     * Fetches the Aftermath on-chain addresses (object IDs, packages, etc.)
     * directly from the API. Typically you don't need to call this — the
     * `create` factory handles it. Useful for cache warmers or tooling.
     */
    getAddresses(): Promise<ConfigAddresses>;
    /**
     * Attempts to decode a raw Move abort/error string into a structured
     * error code, package ID, module name, and human-readable message.
     * Returns `undefined` when no registered package recognizes the error.
     *
     * Thin pass-through to the underlying {@link AftermathApi} so consumers
     * don't need to reach into the private `api` field.
     */
    translateMoveErrorMessage(inputs: {
        errorMessage: string;
    }): TranslatedMoveError | undefined;
    /** DEX pool operations. */
    Pools: () => Pools;
    /** Liquid staking and unstaking. */
    Staking: () => Staking;
    /** SuiFrens — specialized social/utility package. */
    SuiFrens: () => SuiFrens;
    /** Test-network faucet for dispensing tokens. */
    Faucet: () => Faucet;
    /** Smart order router across DEX protocols. */
    Router: () => Router;
    /** NFT AMM operations. */
    NftAmm: () => NftAmm;
    /**
     * Referral vault interactions.
     * @deprecated Use `Referrals` instead.
     */
    ReferralVault: () => ReferralVault;
    /** Referral-program interactions. */
    Referrals: () => Referrals;
    /** Shared gas pool interactions. */
    GasPools: () => GasPools;
    /** Perpetual / futures contracts. */
    Perpetuals: () => Perpetuals;
    /** User reward-point queries. */
    Rewards: () => Rewards;
    /** Yield farming / liquidity mining. */
    Farms: () => Farms;
    /** Dollar-cost averaging. */
    Dca: () => Dca;
    /** Multi-signature address creation and management. */
    Multisig: () => Multisig;
    /** Limit orders on supported DEX protocols. */
    LimitOrders: () => LimitOrders;
    /** User-specific data / key storage. */
    UserData: () => UserData;
    /** Low-level Sui chain utilities. */
    Sui: () => Sui;
    /** Coin price feeds. */
    Prices: () => Prices;
    /**
     * Creates a `Wallet` instance scoped to a specific user address.
     * @param address - The Sui address (e.g., `"0x..."`).
     */
    Wallet: (address: SuiAddress) => Wallet;
    /**
     * Returns a `Coin` helper for the given coin type. Pass `undefined`
     * for generic coin-metadata utilities.
     */
    Coin: (coinType?: CoinType) => Coin;
    /** Dynamic gas-object assignment for sponsored transactions. */
    DynamicGas: () => DynamicGas;
    /** Authentication / token-based flows. */
    Auth: () => Auth;
    /** General-purpose helpers (math, logging, etc.). */
    static helpers: typeof Helpers;
    /** Casting utilities for data type conversions (BigInt <-> IFixed, etc.). */
    static casting: typeof Casting;
}

export { type AfSuiRouterPoolObject, Aftermath, AftermathApi, type AftermathOptions, type AllocatedCollateralEvent, type AmountInCoinAndUsd, type AnyObjectType, type ApiAccessoriesForSuiFrenBody, type ApiAddSuiFrenAccessoryBody, type ApiCreateAuthAccountBody, type ApiCreatePoolBody, type ApiDataWithCursorBody, type ApiDelegatedStakesBody, type ApiDynamicFieldsBody, type ApiDynamicGasBody, type ApiDynamicGasResponse, type ApiEventsBody, type ApiFarmsCreateStakingPoolBody, type ApiFarmsCreateStakingPoolBodyV1, type ApiFarmsDepositPrincipalBody, type ApiFarmsGrantOneTimeAdminCapBody, type ApiFarmsIncreaseStakingPoolRewardsEmissionsBody, type ApiFarmsInitializeStakingPoolRewardBody, type ApiFarmsLockBody, type ApiFarmsOwnedStakedPositionsBody, type ApiFarmsOwnedStakingPoolOneTimeAdminCapsBody, type ApiFarmsOwnedStakingPoolOwnerCapsBody, type ApiFarmsRenewLockBody, type ApiFarmsStakeBody, type ApiFarmsStakeBodyV1, type ApiFarmsTopUpStakingPoolRewardsBody, type ApiFarmsUnlockBody, type ApiFarmsUnstakeBody, type ApiFaucetMintSuiFrenBody, type ApiFaucetRequestBody, type ApiGasPoolBody, type ApiGasPoolCreateBody, type ApiGasPoolCreateResponse, type ApiGasPoolDepositBody, type ApiGasPoolGrantBody, type ApiGasPoolResponse, type ApiGasPoolRevokeBody, type ApiGasPoolShareBody, type ApiGasPoolSponsorBody, type ApiGasPoolWithdrawBody, type ApiGasPoolWithdrawResponse, type ApiGetAccessTokenBody, type ApiGetAccessTokenResponse, type ApiHarvestFarmsRewardsBody, type ApiHarvestSuiFrenFeesBody, type ApiIndexerEventsBody, type ApiIndexerUserEventsBody, type ApiMixSuiFrensBody, type ApiNftAmmBuyBody, type ApiNftAmmDepositBody, type ApiNftAmmSellBody, type ApiNftAmmWithdrawBody, type ApiOwnedStakedSuiFrensBody, type ApiOwnedSuiFrenAccessoriesBody, type ApiOwnedSuiFrensBody, type ApiPerpetualsAccountCollateralHistoryBody, type ApiPerpetualsAccountCollateralHistoryResponse, type ApiPerpetualsAccountMarginHistoryBody, type ApiPerpetualsAccountMarginHistoryResponse, type ApiPerpetualsAccountOrderHistoryBody, type ApiPerpetualsAccountOrderHistoryResponse, type ApiPerpetualsAccountPositionsBody, type ApiPerpetualsAccountPositionsResponse, type ApiPerpetualsAdminAccountCapsBody, type ApiPerpetualsAdminAccountCapsResponse, type ApiPerpetualsAllMarketsBody, type ApiPerpetualsAllMarketsResponse, type ApiPerpetualsAllocateCollateralBody, type ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxBody, type ApiPerpetualsBuilderCodesClaimIntegratorVaultFeesTxResponse, type ApiPerpetualsBuilderCodesCreateIntegratorConfigTxBody, type ApiPerpetualsBuilderCodesCreateIntegratorVaultTxBody, type ApiPerpetualsBuilderCodesIntegratorConfigBody, type ApiPerpetualsBuilderCodesIntegratorConfigResponse, type ApiPerpetualsBuilderCodesIntegratorVaultsBody, type ApiPerpetualsBuilderCodesIntegratorVaultsResponse, type ApiPerpetualsBuilderCodesRemoveIntegratorConfigTxBody, type ApiPerpetualsCancelAndPlaceOrdersBody, type ApiPerpetualsCancelOrdersBody, type ApiPerpetualsCancelStopOrdersBody, type ApiPerpetualsCreateAccountBody, type ApiPerpetualsCreateAccountResponse, type ApiPerpetualsCreateCsvRebatesBody, type ApiPerpetualsCreateCsvRebatesResponse, type ApiPerpetualsCreateReferralCsvRebatesBody, type ApiPerpetualsCreateReferralCsvRebatesResponse, type ApiPerpetualsCreateVaultBody, type ApiPerpetualsCreateVaultCapBody, type ApiPerpetualsCurrentRebateRewardsBody, type ApiPerpetualsCurrentRebateRewardsResponse, type ApiPerpetualsDeallocateCollateralBody, type ApiPerpetualsDepositCollateralBody, type ApiPerpetualsEditStopOrdersBody, type ApiPerpetualsExecutionPriceBody, type ApiPerpetualsExecutionPriceResponse, type ApiPerpetualsGrantAgentWalletTxBody, type ApiPerpetualsHistoricalDataWithCursorBody, type ApiPerpetualsHistoricalDataWithCursorResponse, type ApiPerpetualsLimitOrderBody, type ApiPerpetualsMarketCandleHistoryBody, type ApiPerpetualsMarketCandleHistoryResponse, type ApiPerpetualsMarketFundingHistoryBody, type ApiPerpetualsMarketFundingHistoryResponse, type ApiPerpetualsMarketOrderBody, type ApiPerpetualsMarketOrderHistoryBody, type ApiPerpetualsMarketOrderHistoryResponse, type ApiPerpetualsMarkets24hrStatsResponse, type ApiPerpetualsMarketsBody, type ApiPerpetualsMarketsPricesBody, type ApiPerpetualsMarketsPricesResponse, type ApiPerpetualsMarketsResponse, type ApiPerpetualsMaxOrderSizeBody, type ApiPerpetualsOrderToPlace, type ApiPerpetualsOrderbooksBody, type ApiPerpetualsOrderbooksResponse, type ApiPerpetualsOwnedAccountCapsBody, type ApiPerpetualsOwnedAccountCapsResponse, type ApiPerpetualsOwnedVaultAssistantCapsBody, type ApiPerpetualsOwnedVaultAssistantCapsResponse, type ApiPerpetualsOwnedVaultCapsBody, type ApiPerpetualsOwnedVaultCapsResponse, type ApiPerpetualsPlaceSlTpOrdersBody, type ApiPerpetualsPlaceStopOrdersBody, type ApiPerpetualsPreviewCancelOrdersBody, type ApiPerpetualsPreviewCancelOrdersResponse, type ApiPerpetualsPreviewEditCollateralBody, type ApiPerpetualsPreviewEditCollateralResponse, type ApiPerpetualsPreviewPlaceLimitOrderBody, type ApiPerpetualsPreviewPlaceMarketOrderBody, type ApiPerpetualsPreviewPlaceOrderResponse, type ApiPerpetualsPreviewPlaceScaleOrderBody, type ApiPerpetualsPreviewSetLeverageBody, type ApiPerpetualsPreviewSetLeverageResponse, type ApiPerpetualsRevokeAgentWalletTxBody, type ApiPerpetualsScaleOrderBody, type ApiPerpetualsSetLeverageTxBody, type ApiPerpetualsShareAccountBody, type ApiPerpetualsStopOrderDatasBody, type ApiPerpetualsStopOrderDatasResponse, type ApiPerpetualsTransferCapTxBody, type ApiPerpetualsTransferCollateralBody, type ApiPerpetualsVaultCancelWithdrawRequestTxBody, type ApiPerpetualsVaultCreateWithdrawRequestTxBody, type ApiPerpetualsVaultDepositTxBody, type ApiPerpetualsVaultLpCoinPricesBody, type ApiPerpetualsVaultLpCoinPricesResponse, type ApiPerpetualsVaultOwnedLpCoinsBody, type ApiPerpetualsVaultOwnedLpCoinsResponse, type ApiPerpetualsVaultOwnedWithdrawRequestsBody, type ApiPerpetualsVaultOwnedWithdrawRequestsResponse, type ApiPerpetualsVaultOwnerProcessWithdrawRequestsTxBody, type ApiPerpetualsVaultOwnerUpdateForceWithdrawDelayTxBody, type ApiPerpetualsVaultOwnerUpdateLockPeriodTxBody, type ApiPerpetualsVaultOwnerUpdatePerformanceFeeTxBody, type ApiPerpetualsVaultOwnerWithdrawCollateralTxBody, type ApiPerpetualsVaultOwnerWithdrawCollateralTxResponse, type ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxBody, type ApiPerpetualsVaultOwnerWithdrawLockedLiquidityTxResponse, type ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxBody, type ApiPerpetualsVaultOwnerWithdrawPerformanceFeesTxResponse, type ApiPerpetualsVaultPauseVaultForForceWithdrawRequestTxBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestBody, type ApiPerpetualsVaultPreviewCreateWithdrawRequestResponse, type ApiPerpetualsVaultPreviewDepositBody, type ApiPerpetualsVaultPreviewDepositResponse, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsBody, type ApiPerpetualsVaultPreviewOwnerProcessWithdrawRequestsResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralBody, type ApiPerpetualsVaultPreviewOwnerWithdrawCollateralResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityBody, type ApiPerpetualsVaultPreviewOwnerWithdrawLockedLiquidityResponse, type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesBody, type ApiPerpetualsVaultPreviewOwnerWithdrawPerformanceFeesResponse, type ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestBody, type ApiPerpetualsVaultPreviewPauseVaultForForceWithdrawRequestResponse, type ApiPerpetualsVaultPreviewProcessForceWithdrawRequestBody, type ApiPerpetualsVaultPreviewProcessForceWithdrawRequestResponse, type ApiPerpetualsVaultProcessForceWithdrawRequestTxBody, type ApiPerpetualsVaultProcessForceWithdrawRequestTxResponse, type ApiPerpetualsVaultUpdateWithdrawRequestSlippageTxBody, type ApiPerpetualsVaultsBody, type ApiPerpetualsVaultsResponse, type ApiPerpetualsVaultsWithdrawRequestsBody, type ApiPerpetualsVaultsWithdrawRequestsResponse, type ApiPerpetualsWithdrawCollateralBody, type ApiPerpetualsWithdrawCollateralResponse, type ApiPoolAllCoinWithdrawBody, type ApiPoolDepositBody, type ApiPoolObjectIdForLpCoinTypeBody, type ApiPoolSpotPriceBody, type ApiPoolTradeBody, type ApiPoolWithdrawBody, type ApiPoolsOwnedDaoFeePoolOwnerCapsBody, type ApiPoolsStatsBody, type ApiPublishLpCoinBody, type ApiReferralsCreateReferralLinkBody, type ApiReferralsCreateReferralLinkResponse, type ApiReferralsGetLinkedRefCodeBody, type ApiReferralsGetLinkedRefCodeResponse, type ApiReferralsGetRefCodeBody, type ApiReferralsGetRefCodeResponse, type ApiReferralsGetRefereesBody, type ApiReferralsGetRefereesResponse, type ApiReferralsIsRefCodeTakenBody, type ApiReferralsIsRefCodeTakenResponse, type ApiReferralsSetReferrerBody, type ApiReferralsSetReferrerResponse, type ApiRemoveSuiFrenAccessoryBody, type ApiRewardsClaimRequestTxBody, type ApiRewardsClaimRequestTxResponse, type ApiRewardsGetClaimableBody, type ApiRewardsGetClaimableResponse, type ApiRewardsGetHistoryBody, type ApiRewardsGetHistoryResponse, type ApiRewardsGetPointsBody, type ApiRewardsGetPointsResponse, type ApiRouterAddTransactionForCompleteTradeRouteBody, type ApiRouterAddTransactionForCompleteTradeRouteResponse, type ApiRouterCompleteTradeRouteBody, type ApiRouterDynamicGasBody, type ApiRouterPartialCompleteTradeRouteBody, type ApiRouterTradeEventsBody, type ApiRouterTransactionForCompleteTradeRouteBody, type ApiStakeBody, type ApiStakeStakedSuiBody, type ApiStakeSuiFrenBody, type ApiStakingEventsBody, type ApiStakingPositionsBody, type ApiTransactionResponse, type ApiTransactionsBody, type ApiUnstakeBody, type ApiUnstakeSuiFrenBody, type ApiUpdateValidatorFeeBody, type ApiValidatorOperationCapsBody, type Apr, type Apy, Auth, type Balance, type BigIntAsString, type Byte, type CallerConfig, type CanceledOrderEvent, type CapyLabsAppObject, Casting, Coin, type CoinDecimal, type CoinGeckoChain, type CoinGeckoCoinApiId, type CoinGeckoCoinData, type CoinGeckoCoinSymbolData, type CoinGeckoHistoricalTradeData, type CoinGeckoTickerData, type CoinMetadaWithInfo, type CoinPriceInfo, type CoinSymbol, type CoinSymbolToCoinTypes, type CoinSymbolsToPriceInfo, type CoinType, type CoinWithAmount, type CoinWithAmountOrUndefined, type CoinsToBalance, type CoinsToBalanceOrUndefined, type CoinsToDecimals, type CoinsToPrice, type CoinsToPriceInfo, type CollateralEvent, type Color, type ComposedTransferArgs, type ConfigAddresses, type CreatedAccountEvent, type CreatedDaoFeePoolEvent, type CreatedStopOrderTicketEvent, type DaoFeePoolObject, type DaoFeePoolOwnerCapObject, type DaoFeePoolsAddresses, type DcaAddresses, type DeallocatedCollateralEvent, type DecimalsScalar, type DeferredAccountArgs, type DeletedStopOrderTicketEvent, type DepositedCollateralEvent, type DynamicFieldObjectsWithCursor, type DynamicFieldsInputs, type DynamicFieldsWithCursor, type DynamicGasAddresses, type EditedStopOrderTicketDetailsEvent, type EditedStopOrderTicketExecutorEvent, type EpochWasChangedEvent, type Event$1 as Event, type EventsInputs, type EventsWithCursor, type ExecutedStopOrderTicketEvent, type ExternalFee, type FarmEvent, type FarmOwnerOrOneTimeAdminCap, type FarmUserEvent, Farms, type FarmsAddedRewardEvent, type FarmsAddresses, type FarmsCreatedVaultEvent, type FarmsDepositedPrincipalEvent, type FarmsDestroyedStakedPositionEvent, type FarmsHarvestedRewardsEvent, type FarmsIncreasedEmissionsEvent, type FarmsInitializedRewardEvent, type FarmsJoinedEvent, type FarmsLockEnforcement, type FarmsLockedEvent, type FarmsMultiplier, type FarmsSplitEvent, type FarmsStakedEvent, FarmsStakedPosition, type FarmsStakedPositionObject, type FarmsStakedPositionRewardCoin, type FarmsStakedRelaxedEvent, FarmsStakingPool, type FarmsStakingPoolObject, type FarmsStakingPoolRewardCoin, type FarmsUnlockedEvent, type FarmsVersion, type FarmsWithdrewPrincipalEvent, Faucet, type FaucetAddCoinEvent, type FaucetAddresses, type FaucetMintCoinEvent, type FilePath, type FilledMakerOrderEventFields, type FilledMakerOrdersEvent, type FilledTakerOrderEvent, type FunctionName, type GasBudget, GasPools, type HarvestSuiFrenFeesEvent, Helpers, type IFixed, type IFixedAsBytes, type IFixedAsString, type IFixedAsStringBytes, type IdAsStringBytes, type IndexerDataWithCursorQueryParams, type IndexerEventsWithCursor, type KeyType, type KioskObject, type KioskOwnerCapObject, type LimitAddresses, type LiquidatedEvent, type LocalUrl, type MixSuiFrensEvent, type ModuleName, type MoveErrorCode, type MoveErrors, type MoveErrorsInterface, type Nft, NftAmm, type NftAmmAddresses, type NftAmmInterfaceGenericTypes, type NftAmmMarketObject, type NftDisplay, type NftDisplayOther, type NftDisplaySuggested, type NftInfo, type NftsAddresses, type NormalizedBalance, type NumberAsString, type Object$1 as Object, type ObjectDigest, type ObjectId, type ObjectVersion, type OrderbookFillReceiptEvent, type PackageId, type ParsedMoveError, type PartialFarmsStakedPositionObject, type PartialSuiFrenObject, type Percentage, Perpetuals, PerpetualsAccount, type PerpetualsAccountCap, type PerpetualsAccountCollateralChange, type PerpetualsAccountData, type PerpetualsAccountId, type PerpetualsAccountMarginHistoryData, type PerpetualsAccountMarginHistoryTimeframeKey, type PerpetualsAccountObject, type PerpetualsAccountOrderHistoryData, type PerpetualsAddresses, type PerpetualsBuilderCodeParamaters, type PerpetualsCalculationVariables, type PerpetualsCapType, type 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 TranslatedMoveError, type TxBytes, type UniqueId, type UnstakeEvent, type UnstakePosition, type UnstakePositionState, type UnstakeRequestedEvent, type UnstakeSuiFrenEvent, type UnstakedEvent, type UpdatedFeeBpsEvent, type UpdatedFeeRecipientEvent, type UpdatedFundingEvent, type UpdatedMarketVersionEvent, type UpdatedPremiumTwapEvent, type UpdatedSpreadTwapEvent, type Url, type UserEventsInputs, type UserHistoryEventType, type ValidatorConfigObject, type ValidatorOperationCapObject, type 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 };
