UNPKG

solana-framework-deno

Version:

solana-framework-deno is solana uni-tools for deno

119 lines 5.8 kB
/** * Jupiter API v6 * The core of [jup.ag](https://jup.ag). Easily get a quote and swap through Jupiter API. ### Rate Limit We update our rate limit from time to time depending on the load of our servers. We recommend running your own instance of the API if you want to have high rate limit, here to learn how to run the [self-hosted API](https://station.jup.ag/docs/apis/self-hosted). ### API Wrapper - Typescript [@jup-ag/api](https://github.com/jup-ag/jupiter-quote-api-node) ### Data types - Public keys are base58 encoded strings - raw data such as Vec<u8\\> are base64 encoded strings * * The version of the OpenAPI document: 6.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 { IndexedRouteMapResponse, QuoteResponse, SwapInstructionsResponse, SwapRequest, SwapResponse } from '../models/index'; import * as runtime from '../runtime'; export interface IndexedRouteMapGetRequest { onlyDirectRoutes?: boolean; } export interface QuoteGetRequest { inputMint: string; outputMint: string; amount: number; slippageBps?: number; autoSlippage?: boolean; autoSlippageCollisionUsdValue?: number; computeAutoSlippage?: boolean; swapMode?: QuoteGetSwapModeEnum; dexes?: Array<string>; excludeDexes?: Array<string>; restrictIntermediateTokens?: boolean; onlyDirectRoutes?: boolean; asLegacyTransaction?: boolean; platformFeeBps?: number; maxAccounts?: number; } export interface SwapInstructionsPostRequest { swapRequest: SwapRequest; } export interface SwapPostRequest { swapRequest: SwapRequest; } /** * */ export declare class DefaultApi extends runtime.BaseAPI { /** * DEPRECATED, please use /tokens for tradable mints. Returns a hash map, input mint as key and an array of valid output mint as values, token mints are indexed to reduce the file size * GET /indexed-route-map * @deprecated */ indexedRouteMapGetRaw(requestParameters: IndexedRouteMapGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexedRouteMapResponse>>; /** * DEPRECATED, please use /tokens for tradable mints. Returns a hash map, input mint as key and an array of valid output mint as values, token mints are indexed to reduce the file size * GET /indexed-route-map * @deprecated */ indexedRouteMapGet(requestParameters?: IndexedRouteMapGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexedRouteMapResponse>; /** * Returns a hash, which key is the program id and value is the label. This is used to help map error from transaction by identifying the fault program id. With that, we can use the `excludeDexes` or `dexes` parameter. * GET /program-id-to-label */ programIdToLabelGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{ [key: string]: string; }>>; /** * Returns a hash, which key is the program id and value is the label. This is used to help map error from transaction by identifying the fault program id. With that, we can use the `excludeDexes` or `dexes` parameter. * GET /program-id-to-label */ programIdToLabelGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: string; }>; /** * Sends a GET request to the Jupiter API to get the best priced quote. * GET /quote */ quoteGetRaw(requestParameters: QuoteGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuoteResponse>>; /** * Sends a GET request to the Jupiter API to get the best priced quote. * GET /quote */ quoteGet(requestParameters: QuoteGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuoteResponse>; /** * Returns instructions that you can use from the quote you get from `/quote`. * POST /swap-instructions */ swapInstructionsPostRaw(requestParameters: SwapInstructionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SwapInstructionsResponse>>; /** * Returns instructions that you can use from the quote you get from `/quote`. * POST /swap-instructions */ swapInstructionsPost(requestParameters: SwapInstructionsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SwapInstructionsResponse>; /** * Returns a transaction that you can use from the quote you get from `/quote`. * POST /swap */ swapPostRaw(requestParameters: SwapPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SwapResponse>>; /** * Returns a transaction that you can use from the quote you get from `/quote`. * POST /swap */ swapPost(requestParameters: SwapPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SwapResponse>; /** * Returns a list of all the tradable mints * GET /tokens */ tokensGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>; /** * Returns a list of all the tradable mints * GET /tokens */ tokensGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>; } /** * @export */ export declare const QuoteGetSwapModeEnum: { readonly ExactIn: "ExactIn"; readonly ExactOut: "ExactOut"; }; export type QuoteGetSwapModeEnum = typeof QuoteGetSwapModeEnum[keyof typeof QuoteGetSwapModeEnum]; //# sourceMappingURL=DefaultApi.d.ts.map