UNPKG

@swap-coffee/sdk

Version:

SDK for swap.coffee DEX aggregator

2,403 lines 293 kB
/** * Swap Coffee API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; import type { RequestArgs } from './base'; import { BaseAPI } from './base'; /** * * @export * @enum {string} */ export declare const ApiAmmType: { readonly ConstantProduct: "constant_product"; readonly CubicStable: "cubic_stable"; readonly CurveFiStable: "curve_fi_stable"; readonly ConcentratedV3: "concentrated_v3"; readonly Tonstakers: "tonstakers"; readonly WeightedConstantProduct: "weighted_constant_product"; readonly WeightedStable: "weighted_stable"; }; export type ApiAmmType = typeof ApiAmmType[keyof typeof ApiAmmType]; /** * * @export * @interface ApiAuthToken */ export interface ApiAuthToken { /** * * @type {string} * @memberof ApiAuthToken */ 'token': string; /** * * @type {string} * @memberof ApiAuthToken */ 'name': string; /** * * @type {number} * @memberof ApiAuthToken */ 'hourly_limit'?: number; /** * * @type {Array<ApiAuthTokenOption>} * @memberof ApiAuthToken */ 'options'?: Array<ApiAuthTokenOption>; } /** * * @export * @enum {string} */ export declare const ApiAuthTokenOption: { readonly Administrator: "administrator"; readonly Moderator: "moderator"; readonly AllowCycles: "allow_cycles"; readonly ExtendedTxStatus: "extended_tx_status"; }; export type ApiAuthTokenOption = typeof ApiAuthTokenOption[keyof typeof ApiAuthTokenOption]; /** * * @export * @interface ApiBlockchain */ export interface ApiBlockchain { /** * * @type {string} * @memberof ApiBlockchain */ 'name': string; } /** * * @export * @interface ApiBoost */ export interface ApiBoost { /** * * @type {string} * @memberof ApiBoost */ 'pool_address': string; /** * * @type {string} * @memberof ApiBoost */ 'boost_factory'?: string; /** * * @type {number} * @memberof ApiBoost */ 'boost_id'?: number; /** * * @type {ApiToken} * @memberof ApiBoost */ 'reward_token': ApiToken; /** * * @type {string} * @memberof ApiBoost */ 'reward_rate_per_second': string; /** * * @type {number} * @memberof ApiBoost */ 'start_seconds_unix'?: number; /** * * @type {number} * @memberof ApiBoost */ 'finish_seconds_unix': number; /** * * @type {number} * @memberof ApiBoost */ 'rewards_per_day_usd': number; /** * Apr in percents * @type {number} * @memberof ApiBoost */ 'apr': number; /** * * @type {number} * @memberof ApiBoost */ 'lock_duration_seconds'?: number; /** * * @type {Array<string>} * @memberof ApiBoost */ 'excluded_addresses'?: Array<string>; } /** * * @export * @interface ApiBoostAggregated */ export interface ApiBoostAggregated { /** * Total amount of boosts * @type {number} * @memberof ApiBoostAggregated */ 'count': number; /** * * @type {Array<ApiBoost>} * @memberof ApiBoostAggregated */ 'infos': Array<ApiBoost>; } /** * * @export * @interface ApiBoostPoolApr */ export interface ApiBoostPoolApr { /** * Apr percentage * @type {number} * @memberof ApiBoostPoolApr */ 'apr': number; } /** * * @export * @interface ApiCashbackCreateRequest */ export interface ApiCashbackCreateRequest { /** * * @type {string} * @memberof ApiCashbackCreateRequest */ 'title': string; /** * * @type {string} * @memberof ApiCashbackCreateRequest */ 'description': string; /** * Where rewards stored * @type {string} * @memberof ApiCashbackCreateRequest */ 'distributor': string; /** * * @type {string} * @memberof ApiCashbackCreateRequest */ 'reward_token': string; /** * * @type {Array<ApiDexSwapCondition>} * @memberof ApiCashbackCreateRequest */ 'conditions': Array<ApiDexSwapCondition>; /** * How many tokens will be distributed to users * @type {number} * @memberof ApiCashbackCreateRequest */ 'distribute': number; /** * How many tokens already distributed to users * @type {number} * @memberof ApiCashbackCreateRequest */ 'distributed': number; /** * Begin cashback promo in unix seconds * @type {number} * @memberof ApiCashbackCreateRequest */ 'start_time_seconds': number; /** * End cashback promo in unix seconds * @type {number} * @memberof ApiCashbackCreateRequest */ 'end_time_seconds': number; /** * * @type {number} * @memberof ApiCashbackCreateRequest */ 'reward_denominator': number; /** * * @type {boolean} * @memberof ApiCashbackCreateRequest */ 'is_hidden': boolean; /** * * @type {Array<ApiCashbackLimitCreateRequest>} * @memberof ApiCashbackCreateRequest */ 'limits': Array<ApiCashbackLimitCreateRequest>; /** * * @type {string} * @memberof ApiCashbackCreateRequest */ 'image_url': string; /** * * @type {Array<ApiContentReference>} * @memberof ApiCashbackCreateRequest */ 'references': Array<ApiContentReference>; } /** * * @export * @interface ApiCashbackInfo */ export interface ApiCashbackInfo { /** * * @type {number} * @memberof ApiCashbackInfo */ 'id': number; /** * * @type {string} * @memberof ApiCashbackInfo */ 'title': string; /** * * @type {string} * @memberof ApiCashbackInfo */ 'description': string; /** * Where rewards stored * @type {string} * @memberof ApiCashbackInfo */ 'distributor': string; /** * * @type {string} * @memberof ApiCashbackInfo */ 'reward_token': string; /** * * @type {Array<ApiDexSwapCondition>} * @memberof ApiCashbackInfo */ 'conditions': Array<ApiDexSwapCondition>; /** * How many tokens will be distributed to users * @type {number} * @memberof ApiCashbackInfo */ 'distribute': number; /** * How many tokens already distributed to users * @type {number} * @memberof ApiCashbackInfo */ 'distributed': number; /** * Begin cashback promo in unix seconds * @type {number} * @memberof ApiCashbackInfo */ 'start_time_seconds': number; /** * End cashback promo in unix seconds * @type {number} * @memberof ApiCashbackInfo */ 'end_time_seconds': number; /** * * @type {number} * @memberof ApiCashbackInfo */ 'reward_denominator': number; /** * Can this cashback program accrue tokens to participants * @type {boolean} * @memberof ApiCashbackInfo */ 'is_active': boolean; /** * * @type {Array<ApiCashbackLimit>} * @memberof ApiCashbackInfo */ 'limits': Array<ApiCashbackLimit>; /** * * @type {string} * @memberof ApiCashbackInfo */ 'image_url': string; /** * * @type {Array<ApiContentReference>} * @memberof ApiCashbackInfo */ 'references': Array<ApiContentReference>; /** * * @type {boolean} * @memberof ApiCashbackInfo */ 'is_hidden': boolean; } /** * * @export * @interface ApiCashbackInfoResponse */ export interface ApiCashbackInfoResponse { /** * Total amount of similar cashback promos * @type {number} * @memberof ApiCashbackInfoResponse */ 'count': number; /** * * @type {Array<ApiCashbackInfo>} * @memberof ApiCashbackInfoResponse */ 'infos': Array<ApiCashbackInfo>; } /** * * @export * @interface ApiCashbackLimit */ export interface ApiCashbackLimit { /** * * @type {number} * @memberof ApiCashbackLimit */ 'limit_id': number; /** * * @type {number} * @memberof ApiCashbackLimit */ 'interval_duration_seconds': number; /** * * @type {number} * @memberof ApiCashbackLimit */ 'max_distribute_at_interval': number; } /** * * @export * @interface ApiCashbackLimitCreateRequest */ export interface ApiCashbackLimitCreateRequest { /** * * @type {number} * @memberof ApiCashbackLimitCreateRequest */ 'interval_duration_seconds': number; /** * * @type {number} * @memberof ApiCashbackLimitCreateRequest */ 'max_distribute_at_interval': number; } /** * * @export * @interface ApiCashbackLimitUpdateRequest */ export interface ApiCashbackLimitUpdateRequest { /** * * @type {number} * @memberof ApiCashbackLimitUpdateRequest */ 'limit_id'?: number; /** * * @type {number} * @memberof ApiCashbackLimitUpdateRequest */ 'interval_duration_seconds'?: number; /** * * @type {number} * @memberof ApiCashbackLimitUpdateRequest */ 'max_distribute_at_interval'?: number; } /** * * @export * @interface ApiCashbackUpdateRequest */ export interface ApiCashbackUpdateRequest { /** * * @type {string} * @memberof ApiCashbackUpdateRequest */ 'title'?: string; /** * * @type {string} * @memberof ApiCashbackUpdateRequest */ 'description'?: string; /** * Where rewards stored * @type {string} * @memberof ApiCashbackUpdateRequest */ 'distributor'?: string; /** * * @type {string} * @memberof ApiCashbackUpdateRequest */ 'reward_token'?: string; /** * * @type {Array<ApiDexSwapCondition>} * @memberof ApiCashbackUpdateRequest */ 'conditions'?: Array<ApiDexSwapCondition>; /** * How many tokens will be distributed to users * @type {number} * @memberof ApiCashbackUpdateRequest */ 'distribute'?: number; /** * How many tokens already distributed to users * @type {number} * @memberof ApiCashbackUpdateRequest */ 'distributed'?: number; /** * Begin cashback promo in unix seconds * @type {number} * @memberof ApiCashbackUpdateRequest */ 'start_time_seconds'?: number; /** * End cashback promo in unix seconds * @type {number} * @memberof ApiCashbackUpdateRequest */ 'end_time_seconds'?: number; /** * * @type {number} * @memberof ApiCashbackUpdateRequest */ 'reward_denominator'?: number; /** * * @type {boolean} * @memberof ApiCashbackUpdateRequest */ 'is_hidden'?: boolean; /** * * @type {Array<ApiCashbackLimitUpdateRequest>} * @memberof ApiCashbackUpdateRequest */ 'limits'?: Array<ApiCashbackLimitUpdateRequest>; /** * * @type {string} * @memberof ApiCashbackUpdateRequest */ 'image_url'?: string; /** * * @type {Array<ApiContentReference>} * @memberof ApiCashbackUpdateRequest */ 'references'?: Array<ApiContentReference>; } /** * * @export * @interface ApiClaimState */ export interface ApiClaimState { /** * * @type {ApiClaimingType} * @memberof ApiClaimState */ 'type': ApiClaimingType; /** * * @type {number} * @memberof ApiClaimState */ 'query_id': number; /** * When transaction happened in blockchain - unix seconds * @type {number} * @memberof ApiClaimState */ 'unix_time': number; /** * When transaction happened in blockchain - on-chain logical time * @type {number} * @memberof ApiClaimState */ 'logical_time': number; /** * * @type {string} * @memberof ApiClaimState */ 'transaction_hash': string; /** * * @type {string} * @memberof ApiClaimState */ 'token_address': string; /** * * @type {string} * @memberof ApiClaimState */ 'wallet_address': string; /** * * @type {number} * @memberof ApiClaimState */ 'amount': number; /** * * @type {ApiWithdrawal} * @memberof ApiClaimState */ 'withdrawal': ApiWithdrawal; } /** * * @export * @interface ApiClaimStateResponse */ export interface ApiClaimStateResponse { /** * * @type {number} * @memberof ApiClaimStateResponse */ 'total_count': number; /** * * @type {Array<ApiClaimState>} * @memberof ApiClaimStateResponse */ 'items': Array<ApiClaimState>; } /** * * @export * @interface ApiClaimingStats */ export interface ApiClaimingStats { /** * * @type {Array<ApiClaimingTypeStats>} * @memberof ApiClaimingStats */ 'aggregated': Array<ApiClaimingTypeStats>; /** * * @type {Array<ApiClaimingTokenStats>} * @memberof ApiClaimingStats */ 'detailed': Array<ApiClaimingTokenStats>; } /** * * @export * @interface ApiClaimingTokenStats */ export interface ApiClaimingTokenStats { /** * * @type {ApiToken} * @memberof ApiClaimingTokenStats */ 'token': ApiToken; /** * Wallet\'s address where token resides * @type {string} * @memberof ApiClaimingTokenStats */ 'wallet': string; /** * * @type {ApiClaimingType} * @memberof ApiClaimingTokenStats */ 'type': ApiClaimingType; /** * * @type {string} * @memberof ApiClaimingTokenStats */ 'claimed': string; /** * * @type {string} * @memberof ApiClaimingTokenStats */ 'locked': string; /** * * @type {string} * @memberof ApiClaimingTokenStats */ 'available': string; /** * * @type {number} * @memberof ApiClaimingTokenStats */ 'available_usd': number; } /** * * @export * @enum {string} */ export declare const ApiClaimingType: { readonly All: "all"; readonly Referral: "referral"; readonly Cashback: "cashback"; readonly Staking: "staking"; readonly RewardsStonfi: "rewards_stonfi"; readonly RewardsDedust: "rewards_dedust"; readonly CoffeeDex: "coffee_dex"; readonly Boost: "boost"; }; export type ApiClaimingType = typeof ApiClaimingType[keyof typeof ApiClaimingType]; /** * * @export * @interface ApiClaimingTypeStats */ export interface ApiClaimingTypeStats { /** * * @type {ApiClaimingType} * @memberof ApiClaimingTypeStats */ 'type': ApiClaimingType; /** * * @type {number} * @memberof ApiClaimingTypeStats */ 'available_usd': number; } /** * * @export * @interface ApiCoffeeDexTrimmedPool */ export interface ApiCoffeeDexTrimmedPool { /** * * @type {string} * @memberof ApiCoffeeDexTrimmedPool */ 'address': string; /** * * @type {ApiAmmType} * @memberof ApiCoffeeDexTrimmedPool */ 'amm_type': ApiAmmType; /** * * @type {{ [key: string]: any; }} * @memberof ApiCoffeeDexTrimmedPool */ 'amm_settings'?: { [key: string]: any; }; /** * * @type {Array<string>} * @memberof ApiCoffeeDexTrimmedPool */ 'tokens': Array<string>; /** * * @type {Array<number>} * @memberof ApiCoffeeDexTrimmedPool */ 'reserves': Array<number>; /** * UTC unix timestamp in seconds * @type {number} * @memberof ApiCoffeeDexTrimmedPool */ 'unavailable_until'?: number; } /** * * @export * @interface ApiContentReference */ export interface ApiContentReference { /** * * @type {string} * @memberof ApiContentReference */ 'ref_name': string; /** * * @type {string} * @memberof ApiContentReference */ 'ref_url': string; } /** * * @export * @interface ApiContestInfo */ export interface ApiContestInfo { /** * * @type {string} * @memberof ApiContestInfo */ 'title': string; /** * * @type {string} * @memberof ApiContestInfo */ 'description': string; /** * * @type {Array<ApiContentReference>} * @memberof ApiContestInfo */ 'references': Array<ApiContentReference>; /** * * @type {Array<ApiDexSwapCondition>} * @memberof ApiContestInfo */ 'conditions': Array<ApiDexSwapCondition>; /** * * @type {Array<ApiContestReward>} * @memberof ApiContestInfo */ 'rewards': Array<ApiContestReward>; /** * in seconds * @type {number} * @memberof ApiContestInfo */ 'start_time_unix': number; /** * in seconds * @type {number} * @memberof ApiContestInfo */ 'end_time_unix': number; /** * * @type {string} * @memberof ApiContestInfo */ 'image_url': string; /** * * @type {string} * @memberof ApiContestInfo */ 'total_reward': string; /** * * @type {boolean} * @memberof ApiContestInfo */ 'hidden': boolean; } /** * * @export * @interface ApiContestInfoWithID */ export interface ApiContestInfoWithID { /** * * @type {number} * @memberof ApiContestInfoWithID */ 'id': number; /** * * @type {ApiContestInfo} * @memberof ApiContestInfoWithID */ 'info': ApiContestInfo; } /** * * @export * @interface ApiContestReward */ export interface ApiContestReward { /** * * @type {string} * @memberof ApiContestReward */ 'reward': string; /** * * @type {number} * @memberof ApiContestReward */ 'place'?: number; /** * * @type {number} * @memberof ApiContestReward */ 'place_from'?: number; /** * * @type {number} * @memberof ApiContestReward */ 'place_to'?: number; } /** * * @export * @interface ApiContestTokenPayoutAccrual */ export interface ApiContestTokenPayoutAccrual { /** * * @type {string} * @memberof ApiContestTokenPayoutAccrual */ 'address': string; /** * * @type {number} * @memberof ApiContestTokenPayoutAccrual */ 'amount': number; /** * * @type {number} * @memberof ApiContestTokenPayoutAccrual */ 'volume_usd': number; /** * * @type {string} * @memberof ApiContestTokenPayoutAccrual */ 'reason': string; } /** * * @export * @interface ApiContestTokenPayoutEntry */ export interface ApiContestTokenPayoutEntry { /** * * @type {number} * @memberof ApiContestTokenPayoutEntry */ 'place_from': number; /** * * @type {number} * @memberof ApiContestTokenPayoutEntry */ 'place_to': number; /** * * @type {number} * @memberof ApiContestTokenPayoutEntry */ 'token_amount': number; } /** * * @export * @interface ApiContestTokenPayoutInfo */ export interface ApiContestTokenPayoutInfo { /** * * @type {string} * @memberof ApiContestTokenPayoutInfo */ 'distributor': string; /** * * @type {ApiTokenAddress} * @memberof ApiContestTokenPayoutInfo */ 'token': ApiTokenAddress; /** * * @type {Array<ApiContestTokenPayoutEntry>} * @memberof ApiContestTokenPayoutInfo */ 'entries'?: Array<ApiContestTokenPayoutEntry>; /** * * @type {ApiContestTokenPayoutRandoms} * @memberof ApiContestTokenPayoutInfo */ 'random'?: ApiContestTokenPayoutRandoms; } /** * * @export * @interface ApiContestTokenPayoutRandoms */ export interface ApiContestTokenPayoutRandoms { /** * * @type {number} * @memberof ApiContestTokenPayoutRandoms */ 'count': number; /** * * @type {number} * @memberof ApiContestTokenPayoutRandoms */ 'token_amount': number; /** * * @type {number} * @memberof ApiContestTokenPayoutRandoms */ 'min_volume_usd': number; } /** * * @export * @interface ApiContestUserStats */ export interface ApiContestUserStats { /** * * @type {string} * @memberof ApiContestUserStats */ 'address': string; /** * * @type {number} * @memberof ApiContestUserStats */ 'position': number; /** * * @type {number} * @memberof ApiContestUserStats */ 'volume_usd': number; } /** * * @export * @interface ApiCreateAuthTokenRequest */ export interface ApiCreateAuthTokenRequest { /** * * @type {string} * @memberof ApiCreateAuthTokenRequest */ 'name': string; /** * * @type {number} * @memberof ApiCreateAuthTokenRequest */ 'hourly_limit'?: number; /** * * @type {Array<ApiAuthTokenOption>} * @memberof ApiCreateAuthTokenRequest */ 'options'?: Array<ApiAuthTokenOption>; } /** * * @export * @interface ApiCreateBoostRequest */ export interface ApiCreateBoostRequest { /** * * @type {string} * @memberof ApiCreateBoostRequest */ 'pool_address': string; /** * * @type {number} * @memberof ApiCreateBoostRequest */ 'start_seconds': number; /** * * @type {number} * @memberof ApiCreateBoostRequest */ 'finish_seconds': number; /** * Absolute value * @type {string} * @memberof ApiCreateBoostRequest */ 'amount_raw': string; /** * * @type {string} * @memberof ApiCreateBoostRequest */ 'reward_token': string; /** * * @type {Array<string>} * @memberof ApiCreateBoostRequest */ 'exclude_addresses': Array<string>; } /** * * @export * @interface ApiCreateStakeRequest */ export interface ApiCreateStakeRequest { /** * Token to be staked. * @type {string} * @memberof ApiCreateStakeRequest */ 'asset_address': string; /** * * @type {number} * @memberof ApiCreateStakeRequest */ 'amount_to_stake_raw': number; /** * Lock identifier. * @type {number} * @memberof ApiCreateStakeRequest */ 'period_id': number; } /** * * @export * @interface ApiDex */ export interface ApiDex { /** * * @type {string} * @memberof ApiDex */ 'blockchain': string; /** * * @type {string} * @memberof ApiDex */ 'name': string; } /** * * @export * @interface ApiDexPoolCreationRequest */ export interface ApiDexPoolCreationRequest { /** * * @type {string} * @memberof ApiDexPoolCreationRequest */ 'user_wallet': string; /** * * @type {string} * @memberof ApiDexPoolCreationRequest */ 'asset_1': string; /** * * @type {string} * @memberof ApiDexPoolCreationRequest */ 'asset_2': string; /** * Absolute value * @type {string} * @memberof ApiDexPoolCreationRequest */ 'asset_1_amount': string; /** * Absolute value * @type {string} * @memberof ApiDexPoolCreationRequest */ 'asset_2_amount': string; } /** * * @export * @interface ApiDexPoolCreationResponse */ export interface ApiDexPoolCreationResponse { /** * * @type {Array<ApiTransactionResponse>} * @memberof ApiDexPoolCreationResponse */ 'transactions': Array<ApiTransactionResponse>; } /** * * @export * @interface ApiDexPoolLiquidityProvisioningRequest */ export interface ApiDexPoolLiquidityProvisioningRequest { /** * * @type {string} * @memberof ApiDexPoolLiquidityProvisioningRequest */ 'user_wallet': string; /** * Absolute value * @type {string} * @memberof ApiDexPoolLiquidityProvisioningRequest */ 'asset_1_amount': string; /** * Absolute value * @type {string} * @memberof ApiDexPoolLiquidityProvisioningRequest */ 'asset_2_amount': string; /** * Absolute value * @type {string} * @memberof ApiDexPoolLiquidityProvisioningRequest */ 'min_lp_amount'?: string; /** * * @type {ApiDexPoolLiquidityProvisioningReservesRatioCondition} * @memberof ApiDexPoolLiquidityProvisioningRequest */ 'reserves_ratio_condition'?: ApiDexPoolLiquidityProvisioningReservesRatioCondition; } /** * * @export * @interface ApiDexPoolLiquidityProvisioningReservesRatioCondition */ export interface ApiDexPoolLiquidityProvisioningReservesRatioCondition { /** * * @type {number} * @memberof ApiDexPoolLiquidityProvisioningReservesRatioCondition */ 'denominator': number; /** * * @type {number} * @memberof ApiDexPoolLiquidityProvisioningReservesRatioCondition */ 'min_nominator': number; /** * * @type {number} * @memberof ApiDexPoolLiquidityProvisioningReservesRatioCondition */ 'max_nominator': number; } /** * * @export * @interface ApiDexPoolLiquidityWithdrawalRequest */ export interface ApiDexPoolLiquidityWithdrawalRequest { /** * * @type {string} * @memberof ApiDexPoolLiquidityWithdrawalRequest */ 'user_address': string; /** * Absolute value * @type {string} * @memberof ApiDexPoolLiquidityWithdrawalRequest */ 'lp_amount': string; } /** * * @export * @interface ApiDexSwapCondition */ export interface ApiDexSwapCondition { /** * * @type {ApiDexSwapConditionType} * @memberof ApiDexSwapCondition */ 'type': ApiDexSwapConditionType; /** * Arguments required to construct condition type * @type {Array<string>} * @memberof ApiDexSwapCondition */ 'args'?: Array<string>; } /** * * @export * @enum {string} */ export declare const ApiDexSwapConditionType: { readonly Unique: "unique"; readonly Listed: "listed"; readonly PartnerAddress: "partner_address"; readonly Tokens: "tokens"; readonly TokensPair: "tokens-pair"; readonly TokensExact: "tokens-exact"; readonly UsersWhitelist: "users-whitelist"; readonly SwapTxMinAmount: "swap-tx-min-amount"; readonly BlacklistPair: "blacklist-pair"; readonly BlacklistTokens: "blacklist-tokens"; readonly Dexes: "dexes"; }; export type ApiDexSwapConditionType = typeof ApiDexSwapConditionType[keyof typeof ApiDexSwapConditionType]; /** * * @export * @interface ApiEditAuthTokenRequest */ export interface ApiEditAuthTokenRequest { /** * * @type {string} * @memberof ApiEditAuthTokenRequest */ 'token': string; /** * * @type {string} * @memberof ApiEditAuthTokenRequest */ 'name'?: string; /** * * @type {number} * @memberof ApiEditAuthTokenRequest */ 'hourly_limit'?: number; /** * * @type {Array<ApiAuthTokenOption>} * @memberof ApiEditAuthTokenRequest */ 'options'?: Array<ApiAuthTokenOption>; } /** * * @export * @interface ApiError */ export interface ApiError { /** * * @type {string} * @memberof ApiError */ 'error': string; } /** * * @export * @interface ApiExtendStakeRequest */ export interface ApiExtendStakeRequest { /** * Lock identifier. * @type {number} * @memberof ApiExtendStakeRequest */ 'period_id': number; } /** * * @export * @enum {string} */ export declare const ApiExternalStatus: { readonly Pending: "pending"; readonly Succeeded: "succeeded"; readonly Failed: "failed"; }; export type ApiExternalStatus = typeof ApiExternalStatus[keyof typeof ApiExternalStatus]; /** * * @export * @interface ApiHistoricalTransaction */ export interface ApiHistoricalTransaction { /** * * @type {number} * @memberof ApiHistoricalTransaction */ 'route_id': number; /** * When transaction happened in blockchain - unix seconds * @type {number} * @memberof ApiHistoricalTransaction */ 'unix_time': number; /** * When transaction happened in blockchain - on-chain logical time * @type {number} * @memberof ApiHistoricalTransaction */ 'logical_time': number; /** * * @type {ApiQuantifiedToken} * @memberof ApiHistoricalTransaction */ 'from': ApiQuantifiedToken; /** * * @type {ApiQuantifiedToken} * @memberof ApiHistoricalTransaction */ 'to': ApiQuantifiedToken; /** * * @type {string} * @memberof ApiHistoricalTransaction */ 'dex': string; } /** * * @export * @enum {string} */ export declare const ApiLpMigrationPoolAction: { readonly NotExistingPool: "not_existing_pool"; readonly ExistingPool: "existing_pool"; }; export type ApiLpMigrationPoolAction = typeof ApiLpMigrationPoolAction[keyof typeof ApiLpMigrationPoolAction]; /** * * @export * @interface ApiLpMigrationPoolDestination */ export interface ApiLpMigrationPoolDestination { /** * * @type {string} * @memberof ApiLpMigrationPoolDestination */ 'pool_address'?: string; /** * Absolute value * @type {string} * @memberof ApiLpMigrationPoolDestination */ 'total_lp_amount': string; /** * * @type {ApiAmmType} * @memberof ApiLpMigrationPoolDestination */ 'amm_type': ApiAmmType; /** * * @type {Array<ApiToken>} * @memberof ApiLpMigrationPoolDestination */ 'tokens': Array<ApiToken>; /** * * @type {Array<number>} * @memberof ApiLpMigrationPoolDestination */ 'reserves': Array<number>; /** * * @type {ApiLpMigrationPoolAction} * @memberof ApiLpMigrationPoolDestination */ 'pool_action_type': ApiLpMigrationPoolAction; /** * * @type {{ [key: string]: any; }} * @memberof ApiLpMigrationPoolDestination */ 'amm_settings'?: { [key: string]: any; }; } /** * * @export * @interface ApiLpMigrationUserPoolInfo */ export interface ApiLpMigrationUserPoolInfo { /** * * @type {ApiPool} * @memberof ApiLpMigrationUserPoolInfo */ 'pool': ApiPool; /** * Absolute value * @type {string} * @memberof ApiLpMigrationUserPoolInfo */ 'total_lp_amount': string; /** * Absolute value * @type {string} * @memberof ApiLpMigrationUserPoolInfo */ 'user_lp_amount': string; } /** * * @export * @interface ApiLpMigrationUserRequest */ export interface ApiLpMigrationUserRequest { /** * * @type {string} * @memberof ApiLpMigrationUserRequest */ 'source_pool': string; /** * If not passed, then volatile pool with source pool tokens will be created * @type {string} * @memberof ApiLpMigrationUserRequest */ 'destination_pool'?: string; /** * Absolute value * @type {string} * @memberof ApiLpMigrationUserRequest */ 'source_lp': string; /** * Absolute value * @type {string} * @memberof ApiLpMigrationUserRequest */ 'min_destination_lp': string; /** * * @type {ApiLpMigrationPoolAction} * @memberof ApiLpMigrationUserRequest */ 'pool_action_type': ApiLpMigrationPoolAction; } /** * * @export * @interface ApiMultiAssetInputAsset */ export interface ApiMultiAssetInputAsset { /** * * @type {ApiTokenAddress} * @memberof ApiMultiAssetInputAsset */ 'token': ApiTokenAddress; /** * Input amount in tokens (not nano!) to be swapped * @type {number} * @memberof ApiMultiAssetInputAsset */ 'amount': number; } /** * * @export * @interface ApiMultiAssetRoute */ export interface ApiMultiAssetRoute { /** * * @type {Array<ApiRoute>} * @memberof ApiMultiAssetRoute */ 'routes': Array<ApiRoute>; /** * * @type {ApiToken} * @memberof ApiMultiAssetRoute */ 'output_token': ApiToken; /** * * @type {number} * @memberof ApiMultiAssetRoute */ 'total_output_amount': number; /** * * @type {number} * @memberof ApiMultiAssetRoute */ 'total_savings'?: number; /** * * @type {number} * @memberof ApiMultiAssetRoute */ 'total_estimated_cashback_usd'?: number; /** * * @type {number} * @memberof ApiMultiAssetRoute */ 'total_partner_commission_ton'?: number; /** * Fees for the usage of MEV protection. * @type {number} * @memberof ApiMultiAssetRoute */ 'total_mev_protection_fee'?: number; } /** * * @export * @interface ApiMultiAssetRouteRequest */ export interface ApiMultiAssetRouteRequest { /** * * @type {Array<ApiMultiAssetInputAsset>} * @memberof ApiMultiAssetRouteRequest */ 'input_assets': Array<ApiMultiAssetInputAsset>; /** * * @type {ApiTokenAddress} * @memberof ApiMultiAssetRouteRequest */ 'output_asset': ApiTokenAddress; /** * Defines the maximum number of independent paths (i.e., transactions) . For v4 wallets, you can omit this or set it to 4; for v5 wallets, you can set it to 100 (this is our internal upper limit, and we may reduce it later). No more than 20 splits will be used for single input_asset. * @type {number} * @memberof ApiMultiAssetRouteRequest */ 'max_splits'?: number; /** * Defines the maximum length of each path in tokens. It accepts values from [2; 5]. If it\'s 2, only direct swaps A -> B without multihops are possible. If it\'s 3, there can be a maximum of 1 intermediate token, i.e., A -> X -> B. If it\'s 4/5, there can be 2/3 intermediate tokens. A value of 2 deprives you of more profitable exchanges by finding market inefficiencies and does not allow you to exchange tokens without a direct pair (since there can be no intermediate tokens). The higher the value, the more profitable routes can be built, but the higher the likelihood that the user ends up with an intermediate token (since our blockchain is asynchronous, and some swap in the middle of the route may fail due to slippage). * @type {number} * @memberof ApiMultiAssetRouteRequest */ 'max_length'?: number; /** * * @type {ApiPoolSelector} * @memberof ApiMultiAssetRouteRequest */ 'pool_selector'?: ApiPoolSelector; /** * Whether a MEV protection should be enabled * @type {boolean} * @memberof ApiMultiAssetRouteRequest */ 'mev_protection'?: boolean; /** * * @type {ApiRouteRequestAdditionalData} * @memberof ApiMultiAssetRouteRequest */ 'additional_data'?: ApiRouteRequestAdditionalData; } /** * * @export * @interface ApiPartnerSettings */ export interface ApiPartnerSettings { /** * * @type {number} * @memberof ApiPartnerSettings */ 'ref_share': number; /** * * @type {ApiTransactionsCustomFee} * @memberof ApiPartnerSettings */ 'custom_fee': ApiTransactionsCustomFee; } /** * * @export * @interface ApiPool */ export interface ApiPool { /** * * @type {string} * @memberof ApiPool */ 'dex': string; /** * * @type {string} * @memberof ApiPool */ 'address': string; /** * * @type {ApiPoolType} * @memberof ApiPool */ 'type': ApiPoolType; /** * * @type {ApiAmmType} * @memberof ApiPool */ 'amm_type': ApiAmmType; /** * * @type {{ [key: string]: any; }} * @memberof ApiPool */ 'amm_settings'?: { [key: string]: any; }; /** * * @type {Array<ApiToken>} * @memberof ApiPool */ 'tokens': Array<ApiToken>; /** * * @type {Array<number>} * @memberof ApiPool */ 'reserves': Array<number>; /** * * @type {Array<ApiTokenRestrictions>} * @memberof ApiPool */ 'restrictions'?: Array<ApiTokenRestrictions>; /** * * @type {ApiPoolFees} * @memberof ApiPool */ 'fees': ApiPoolFees; /** * UTC unix timestamp in seconds * @type {number} * @memberof ApiPool */ 'unavailable_until'?: number; } /** * * @export * @interface ApiPoolFees */ export interface ApiPoolFees { /** * * @type {number} * @memberof ApiPoolFees */ 'average_gas': number; /** * * @type {number} * @memberof ApiPoolFees */ 'divider'?: number; /** * * @type {number} * @memberof ApiPoolFees */ 'input'?: number; /** * * @type {number} * @memberof ApiPoolFees */ 'output'?: number; /** * * @type {number} * @memberof ApiPoolFees */ 'first_token'?: number; /** * * @type {number} * @memberof ApiPoolFees */ 'second_token'?: number; } /** * * @export * @interface ApiPoolInfo */ export interface ApiPoolInfo { /** * * @type {ApiPool} * @memberof ApiPoolInfo */ 'pool': ApiPool; /** * * @type {ApiPoolStatistics} * @memberof ApiPoolInfo */ 'info': ApiPoolStatistics; } /** * Configures the DEX pools that can appear in the generated route. By setting blockchains = [\"ton\"] inside it, you can remove the dexes field; max_volatility allows you to exclude pools whose volatility has been above a certain percentage in the last 15 minutes. This makes sense when you allow 2-3 intermediate tokens or a large number of splits to smooth out potential issues. * @export * @interface ApiPoolSelector */ export interface ApiPoolSelector { /** * If specified, only pools from given blockchains will be used for routing * @type {Array<string>} * @memberof ApiPoolSelector */ 'blockchains'?: Array<string>; /** * If specified, only pools from given dexes will be used for routing * @type {Array<string>} * @memberof ApiPoolSelector */ 'dexes'?: Array<string>; /** * If specified, only pools with volatility lower than given value will be used for routing * @type {number} * @memberof ApiPoolSelector */ 'max_volatility'?: number; } /** * * @export * @enum {string} */ export declare const ApiPoolSortOrder: { readonly Tvl: "tvl"; readonly Volume: "volume"; readonly Apr: "apr"; }; export type ApiPoolSortOrder = typeof ApiPoolSortOrder[keyof typeof ApiPoolSortOrder]; /** * * @export * @interface ApiPoolStatistics */ export interface ApiPoolStatistics { /** * * @type {string} * @memberof ApiPoolStatistics */ 'address': string; /** * * @type {number} * @memberof ApiPoolStatistics */ 'tvl_usd': number; /** * * @type {number} * @memberof ApiPoolStatistics */ 'volume_usd': number; /** * * @type {number} * @memberof ApiPoolStatistics */ 'fee_usd': number; /** * * @type {number} * @memberof ApiPoolStatistics */ 'apr': number; /** * * @type {number} * @memberof ApiPoolStatistics */ 'lp_apr': number; /** * * @type {number} * @memberof ApiPoolStatistics */ 'boost_apr': number; /** * * @type {string} * @memberof ApiPoolStatistics */ 'locked_asset_amount'?: string; } /** * * @export * @enum {string} */ export declare const ApiPoolType: { readonly Public: "public"; readonly Private: "private"; readonly Slumbering: "slumbering"; readonly Invalid: "invalid"; }; export type ApiPoolType = typeof ApiPoolType[keyof typeof ApiPoolType]; /** * * @export * @interface ApiPoolsSearchResponse */ export interface ApiPoolsSearchResponse { /** * * @type {number} * @memberof ApiPoolsSearchResponse */ 'total_count': number; /** * * @type {Array<ApiPoolInfo>} * @memberof ApiPoolsSearchResponse */ 'pools': Array<ApiPoolInfo>; } /** * * @export * @interface ApiProofValidationRequest */ export interface ApiProofValidationRequest { /** * * @type {string} * @memberof ApiProofValidationRequest */ 'public_key': string; /** * Base64-encoded initial state. Must be retrieved from ton-connect. * @type {string} * @memberof ApiProofValidationRequest */ 'wallet_state_init': string; /** * * @type {ApiTonProof} * @memberof ApiProofValidationRequest */ 'proof': ApiTonProof; } /** * * @export * @interface ApiQuantifiedToken */ export interface ApiQuantifiedToken { /** * * @type {string} * @memberof ApiQuantifiedToken */ 'token_blockchain': string; /** * * @type {string} * @memberof ApiQuantifiedToken */ 'token_address': string; /** * * @type {number} * @memberof ApiQuantifiedToken */ 'amount': number; } /** * * @export * @interface ApiRawTransactionRecord */ export interface ApiRawTransactionRecord { /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'query_id': number; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'route_id': number; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'timestamp': number; /** * * @type {string} * @memberof ApiRawTransactionRecord */ 'hash': string; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'lt': number; /** * * @type {string} * @memberof ApiRawTransactionRecord */ 'user_wallet': string; /** * * @type {string} * @memberof ApiRawTransactionRecord */ 'token_from': string; /** * * @type {string} * @memberof ApiRawTransactionRecord */ 'token_to': string; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'amount_from': number; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'amount_from_usd': number; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'amount_to': number; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'amount_to_usd': number; /** * * @type {string} * @memberof ApiRawTransactionRecord */ 'dex': string; /** * * @type {number} * @memberof ApiRawTransactionRecord */ 'ref_fee_usd': number; /** * * @type {boolean} * @memberof ApiRawTransactionRecord */ 'failed': boolean; /** * * @type {boolean} * @memberof ApiRawTransactionRecord */ 'suspicious': boolean; } /** * * @export * @interface ApiRecommendedGas */ export interface ApiRecommendedGas { /** * * @type {string} * @memberof ApiRecommendedGas */ 'blockchain': string; /** * * @type {number} * @memberof ApiRecommendedGas */ 'amount': number; } /** * * @export * @interface ApiReferralAccountInfo */ export interface ApiReferralAccountInfo { /** * * @type {string} * @memberof ApiReferralAccountInfo */ 'link': string; /** * * @type {number} * @memberof ApiReferralAccountInfo */ 'level': number; /** * * @type {number} * @memberof ApiReferralAccountInfo */ 'fees_percentage': number; /** * * @type {number} * @memberof ApiReferralAccountInfo */ 'referrals_count': number; /** * Number of transactions sent by referral users * @type {number} * @memberof ApiReferralAccountInfo */ 'transactions_count': number; /** * * @type {ApiReferralAccountRewards} * @memberof ApiReferralAccountInfo */ 'rewards': ApiReferralAccountRewards; } /** * * @export * @interface ApiReferralAccountInfoUpdate */ export interface ApiReferralAccountInfoUpdate { /** * * @type {number} * @memberof ApiReferralAccountInfoUpdate */ 'fees_percentage': number; } /** * * @export * @interface ApiReferralAccountReward */ export interface ApiReferralAccountReward { /** * * @type {number} * @memberof ApiReferralAccountReward */ 'volume': number; /** * * @type {number} * @memberof ApiReferralAccountReward */ 'fees': number; } /** * * @export * @interface ApiReferralAccountRewards */ export interface ApiReferralAccountRewards { /** * * @type {ApiReferralAccountReward} * @memberof ApiReferralAccountRewards */ 'monthly': ApiReferralAccountReward; /** * * @type {ApiReferralAccountReward} * @memberof ApiReferralAccountRewards */ 'total': ApiReferralAccountReward; } /** * * @export * @interface ApiReferralInfo */ export interface ApiReferralInfo { /** * * @type {string} * @memberof ApiReferralInfo */ 'address': string; /** * * @type {number} * @memberof ApiReferralInfo */ 'transactions_count': number; /** * * @type {ApiReferralAccountReward} * @memberof ApiReferralInfo */ 'rewards': ApiReferralAccountReward; } /** * * @export * @interface ApiReferralSetAliasRequest */ export interface ApiReferralSetAliasRequest { /** * * @type {string} * @memberof ApiReferralSetAliasRequest */ 'address': string; } /** * * @export * @interface ApiRoute */ export interface ApiRoute { /** * * @type {ApiToken} * @memberof ApiRoute */ 'input_token': ApiToken; /** * * @type {ApiToken} * @memberof ApiRoute */ 'output_token': ApiToken; /** * * @type {number} * @memberof ApiRoute */ 'input_amount': number; /** * * @type {number} * @memberof ApiRoute */ 'output_amount': number; /** * * @type {number} * @memberof ApiRoute */ 'input_usd': number; /** * * @type {number} * @memberof ApiRoute */ 'output_usd': number; /** * * @type {number} * @memberof ApiRoute */ 'savings'?: number; /** * * @type {number} * @memberof ApiRoute */ 'left_amount'?: number; /** * * @type {number} * @memberof ApiRoute */ 'recommended_gas': number; /** * * @type {number} * @memberof ApiRoute */ 'price_impact': number; /** * * @type {number} * @memberof ApiRoute */ 'estimated_cashback_usd'?: number; /** * * @type {number} * @memberof ApiRoute */ 'partner_commission_ton'?: number; /** * Fees for the usage of MEV protection. * @type {number} * @memberof ApiRoute */ 'mev_protection_fee'?: number; /** * * @type {Array<ApiRoutingStep>} * @memberof ApiRoute */ 'paths': Array<ApiRoutingStep>; } /** * * @export * @interface ApiRouteRequest */ export interface ApiRouteRequest { /** * * @type {ApiTokenAddress} * @memberof ApiRouteRequest */ 'input_token': ApiTokenAddress; /** * * @type {ApiTokenAddress} * @memberof ApiRouteRequest */ 'output_token': ApiTokenAddress; /** * Input amount in tokens (not nano!) to be swapped * @type {number} * @memberof ApiRouteRequest */ 'input_amount'?: number; /** * If specified, the route will be built to get the specified output amount. If not specified, the route will be built to get the maximum output amount for the given input amount. * @type {number} * @memberof ApiRouteRequest */ 'output_amount'?: number; /** * Defines the maximum number of independent paths (i.e., transactions) the route can split into. For v4 wallets, you can omit this or set it to 4; for v5 wallets, you can set it to 20 (this is our internal upper limit, and we may reduce it later to something like 10). * @type {number} * @memberof ApiRouteRequest */ 'max_splits'?: number; /** * Defines the maximum length of each path in tokens. It accepts values from [2; 5]. If it\'s 2, only direct swaps A -> B without multihops are possible. If it\'s 3, there can be a maximum of 1 intermediate token, i.e., A -> X -> B. If it\'s 4/5, there can be 2/3 intermediate tokens. A value of 2 deprives you of more profitable exchanges by finding market inefficiencies and does not allow you to exchange tokens without a direct pair (since there can be no intermediate tokens). The higher the value, the more profitable routes can be built, but the higher the likelihood that the user ends up with an intermediate token (since our blockchain is asynchronous, and some swap in the middle of the r