@swapkit/api-sdk-typescript 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +202 -0
- package/dist/index.cjs +1018 -0
- package/dist/index.d.cts +2224 -0
- package/dist/index.d.ts +2224 -0
- package/dist/index.js +969 -0
- package/package.json +51 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,2224 @@
|
|
|
1
|
+
type AuthToken = string | undefined;
|
|
2
|
+
interface Auth {
|
|
3
|
+
/**
|
|
4
|
+
* Which part of the request do we use to send the auth?
|
|
5
|
+
*
|
|
6
|
+
* @default 'header'
|
|
7
|
+
*/
|
|
8
|
+
in?: 'header' | 'query' | 'cookie';
|
|
9
|
+
/**
|
|
10
|
+
* Header or query parameter name.
|
|
11
|
+
*
|
|
12
|
+
* @default 'Authorization'
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
scheme?: 'basic' | 'bearer';
|
|
16
|
+
type: 'apiKey' | 'http';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface SerializerOptions<T> {
|
|
20
|
+
/**
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
explode: boolean;
|
|
24
|
+
style: T;
|
|
25
|
+
}
|
|
26
|
+
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
27
|
+
type ObjectStyle = 'form' | 'deepObject';
|
|
28
|
+
|
|
29
|
+
type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
30
|
+
type BodySerializer = (body: any) => any;
|
|
31
|
+
type QuerySerializerOptionsObject = {
|
|
32
|
+
allowReserved?: boolean;
|
|
33
|
+
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
34
|
+
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
35
|
+
};
|
|
36
|
+
type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
37
|
+
/**
|
|
38
|
+
* Per-parameter serialization overrides. When provided, these settings
|
|
39
|
+
* override the global array/object settings for specific parameter names.
|
|
40
|
+
*/
|
|
41
|
+
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
45
|
+
type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
46
|
+
/**
|
|
47
|
+
* Returns the final request URL.
|
|
48
|
+
*/
|
|
49
|
+
buildUrl: BuildUrlFn;
|
|
50
|
+
getConfig: () => Config;
|
|
51
|
+
request: RequestFn;
|
|
52
|
+
setConfig: (config: Config) => Config;
|
|
53
|
+
} & {
|
|
54
|
+
[K in HttpMethod]: MethodFn;
|
|
55
|
+
} & ([SseFn] extends [never] ? {
|
|
56
|
+
sse?: never;
|
|
57
|
+
} : {
|
|
58
|
+
sse: {
|
|
59
|
+
[K in HttpMethod]: SseFn;
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
interface Config$1 {
|
|
63
|
+
/**
|
|
64
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
65
|
+
* added to the request payload as defined by its `security` array.
|
|
66
|
+
*/
|
|
67
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
68
|
+
/**
|
|
69
|
+
* A function for serializing request body parameter. By default,
|
|
70
|
+
* {@link JSON.stringify()} will be used.
|
|
71
|
+
*/
|
|
72
|
+
bodySerializer?: BodySerializer | null;
|
|
73
|
+
/**
|
|
74
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
75
|
+
* `Headers` object with.
|
|
76
|
+
*
|
|
77
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
78
|
+
*/
|
|
79
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* The request method.
|
|
82
|
+
*
|
|
83
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
84
|
+
*/
|
|
85
|
+
method?: Uppercase<HttpMethod>;
|
|
86
|
+
/**
|
|
87
|
+
* A function for serializing request query parameters. By default, arrays
|
|
88
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
89
|
+
* style, and reserved characters are percent-encoded.
|
|
90
|
+
*
|
|
91
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
92
|
+
* API function is used.
|
|
93
|
+
*
|
|
94
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
95
|
+
*/
|
|
96
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
97
|
+
/**
|
|
98
|
+
* A function validating request data. This is useful if you want to ensure
|
|
99
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
100
|
+
* the server.
|
|
101
|
+
*/
|
|
102
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
103
|
+
/**
|
|
104
|
+
* A function transforming response data before it's returned. This is useful
|
|
105
|
+
* for post-processing data, e.g. converting ISO strings into Date objects.
|
|
106
|
+
*/
|
|
107
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
108
|
+
/**
|
|
109
|
+
* A function validating response data. This is useful if you want to ensure
|
|
110
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
111
|
+
* the transformers and returned to the user.
|
|
112
|
+
*/
|
|
113
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
117
|
+
/**
|
|
118
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
119
|
+
* fetch instance.
|
|
120
|
+
*
|
|
121
|
+
* @default globalThis.fetch
|
|
122
|
+
*/
|
|
123
|
+
fetch?: typeof fetch;
|
|
124
|
+
/**
|
|
125
|
+
* Implementing clients can call request interceptors inside this hook.
|
|
126
|
+
*/
|
|
127
|
+
onRequest?: (url: string, init: RequestInit) => Promise<Request>;
|
|
128
|
+
/**
|
|
129
|
+
* Callback invoked when a network or parsing error occurs during streaming.
|
|
130
|
+
*
|
|
131
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
132
|
+
*
|
|
133
|
+
* @param error The error that occurred.
|
|
134
|
+
*/
|
|
135
|
+
onSseError?: (error: unknown) => void;
|
|
136
|
+
/**
|
|
137
|
+
* Callback invoked when an event is streamed from the server.
|
|
138
|
+
*
|
|
139
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
140
|
+
*
|
|
141
|
+
* @param event Event streamed from the server.
|
|
142
|
+
* @returns Nothing (void).
|
|
143
|
+
*/
|
|
144
|
+
onSseEvent?: (event: StreamEvent<TData>) => void;
|
|
145
|
+
serializedBody?: RequestInit['body'];
|
|
146
|
+
/**
|
|
147
|
+
* Default retry delay in milliseconds.
|
|
148
|
+
*
|
|
149
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
150
|
+
*
|
|
151
|
+
* @default 3000
|
|
152
|
+
*/
|
|
153
|
+
sseDefaultRetryDelay?: number;
|
|
154
|
+
/**
|
|
155
|
+
* Maximum number of retry attempts before giving up.
|
|
156
|
+
*/
|
|
157
|
+
sseMaxRetryAttempts?: number;
|
|
158
|
+
/**
|
|
159
|
+
* Maximum retry delay in milliseconds.
|
|
160
|
+
*
|
|
161
|
+
* Applies only when exponential backoff is used.
|
|
162
|
+
*
|
|
163
|
+
* This option applies only if the endpoint returns a stream of events.
|
|
164
|
+
*
|
|
165
|
+
* @default 30000
|
|
166
|
+
*/
|
|
167
|
+
sseMaxRetryDelay?: number;
|
|
168
|
+
/**
|
|
169
|
+
* Optional sleep function for retry backoff.
|
|
170
|
+
*
|
|
171
|
+
* Defaults to using `setTimeout`.
|
|
172
|
+
*/
|
|
173
|
+
sseSleepFn?: (ms: number) => Promise<void>;
|
|
174
|
+
url: string;
|
|
175
|
+
};
|
|
176
|
+
interface StreamEvent<TData = unknown> {
|
|
177
|
+
data: TData;
|
|
178
|
+
event?: string;
|
|
179
|
+
id?: string;
|
|
180
|
+
retry?: number;
|
|
181
|
+
}
|
|
182
|
+
type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
|
|
183
|
+
stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
|
|
187
|
+
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
188
|
+
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
189
|
+
declare class Interceptors<Interceptor> {
|
|
190
|
+
fns: Array<Interceptor | null>;
|
|
191
|
+
clear(): void;
|
|
192
|
+
eject(id: number | Interceptor): void;
|
|
193
|
+
exists(id: number | Interceptor): boolean;
|
|
194
|
+
getInterceptorIndex(id: number | Interceptor): number;
|
|
195
|
+
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
196
|
+
use(fn: Interceptor): number;
|
|
197
|
+
}
|
|
198
|
+
interface Middleware<Req, Res, Err, Options> {
|
|
199
|
+
error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
|
|
200
|
+
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
201
|
+
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
type ResponseStyle = 'data' | 'fields';
|
|
205
|
+
interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
206
|
+
/**
|
|
207
|
+
* Base URL for all requests made by this client.
|
|
208
|
+
*/
|
|
209
|
+
baseUrl?: T['baseUrl'];
|
|
210
|
+
/**
|
|
211
|
+
* Fetch API implementation. You can use this option to provide a custom
|
|
212
|
+
* fetch instance.
|
|
213
|
+
*
|
|
214
|
+
* @default globalThis.fetch
|
|
215
|
+
*/
|
|
216
|
+
fetch?: typeof fetch;
|
|
217
|
+
/**
|
|
218
|
+
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
219
|
+
* options won't have any effect.
|
|
220
|
+
*
|
|
221
|
+
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
222
|
+
*/
|
|
223
|
+
next?: never;
|
|
224
|
+
/**
|
|
225
|
+
* Return the response data parsed in a specified format. By default, `auto`
|
|
226
|
+
* will infer the appropriate method from the `Content-Type` response header.
|
|
227
|
+
* You can override this behavior with any of the {@link Body} methods.
|
|
228
|
+
* Select `stream` if you don't want to parse response data at all.
|
|
229
|
+
*
|
|
230
|
+
* @default 'auto'
|
|
231
|
+
*/
|
|
232
|
+
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
233
|
+
/**
|
|
234
|
+
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
235
|
+
*
|
|
236
|
+
* @default 'fields'
|
|
237
|
+
*/
|
|
238
|
+
responseStyle?: ResponseStyle;
|
|
239
|
+
/**
|
|
240
|
+
* Throw an error instead of returning it in the response?
|
|
241
|
+
*
|
|
242
|
+
* @default false
|
|
243
|
+
*/
|
|
244
|
+
throwOnError?: T['throwOnError'];
|
|
245
|
+
}
|
|
246
|
+
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
247
|
+
responseStyle: TResponseStyle;
|
|
248
|
+
throwOnError: ThrowOnError;
|
|
249
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
250
|
+
/**
|
|
251
|
+
* Any body that you want to add to your request.
|
|
252
|
+
*
|
|
253
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
254
|
+
*/
|
|
255
|
+
body?: unknown;
|
|
256
|
+
path?: Record<string, unknown>;
|
|
257
|
+
query?: Record<string, unknown>;
|
|
258
|
+
/**
|
|
259
|
+
* Security mechanism(s) to use for the request.
|
|
260
|
+
*/
|
|
261
|
+
security?: ReadonlyArray<Auth>;
|
|
262
|
+
url: Url;
|
|
263
|
+
}
|
|
264
|
+
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
265
|
+
serializedBody?: string;
|
|
266
|
+
}
|
|
267
|
+
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
268
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
269
|
+
request: Request;
|
|
270
|
+
response: Response;
|
|
271
|
+
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
272
|
+
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
273
|
+
error: undefined;
|
|
274
|
+
} | {
|
|
275
|
+
data: undefined;
|
|
276
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
277
|
+
}) & {
|
|
278
|
+
request: Request;
|
|
279
|
+
response: Response;
|
|
280
|
+
}>;
|
|
281
|
+
interface ClientOptions$1 {
|
|
282
|
+
baseUrl?: string;
|
|
283
|
+
responseStyle?: ResponseStyle;
|
|
284
|
+
throwOnError?: boolean;
|
|
285
|
+
}
|
|
286
|
+
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
287
|
+
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
288
|
+
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
289
|
+
type BuildUrlFn = <TData extends {
|
|
290
|
+
body?: unknown;
|
|
291
|
+
path?: Record<string, unknown>;
|
|
292
|
+
query?: Record<string, unknown>;
|
|
293
|
+
url: string;
|
|
294
|
+
}>(options: TData & Options$1<TData>) => string;
|
|
295
|
+
type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
296
|
+
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
297
|
+
};
|
|
298
|
+
interface TDataShape {
|
|
299
|
+
body?: unknown;
|
|
300
|
+
headers?: unknown;
|
|
301
|
+
path?: unknown;
|
|
302
|
+
query?: unknown;
|
|
303
|
+
url: string;
|
|
304
|
+
}
|
|
305
|
+
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
306
|
+
type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
307
|
+
|
|
308
|
+
type ClientOptions = {
|
|
309
|
+
baseUrl: 'http://localhost:8080' | 'https://api.swapkit.dev/tokenlist' | 'https://dev-api.swapkit.dev/tokenlist' | (string & {});
|
|
310
|
+
};
|
|
311
|
+
type GetProvidersData = {
|
|
312
|
+
body?: never;
|
|
313
|
+
path?: never;
|
|
314
|
+
query?: never;
|
|
315
|
+
url: '/providers';
|
|
316
|
+
};
|
|
317
|
+
type GetProvidersErrors = {
|
|
318
|
+
/**
|
|
319
|
+
* Default Response
|
|
320
|
+
*/
|
|
321
|
+
500: {
|
|
322
|
+
message: string;
|
|
323
|
+
error: string;
|
|
324
|
+
data?: unknown;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
type GetProvidersError = GetProvidersErrors[keyof GetProvidersErrors];
|
|
328
|
+
type GetProvidersResponses = {
|
|
329
|
+
/**
|
|
330
|
+
* Default Response
|
|
331
|
+
*/
|
|
332
|
+
200: Array<{
|
|
333
|
+
name: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
334
|
+
provider: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
335
|
+
displayName?: string;
|
|
336
|
+
displayNameLong?: string;
|
|
337
|
+
keywords?: Array<string>;
|
|
338
|
+
count: number;
|
|
339
|
+
logoURI?: string;
|
|
340
|
+
url?: string;
|
|
341
|
+
enabledChainIds?: Array<'42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash'>;
|
|
342
|
+
supportedActions?: Array<'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake'>;
|
|
343
|
+
supportedChainIds?: Array<'42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash'>;
|
|
344
|
+
}>;
|
|
345
|
+
};
|
|
346
|
+
type GetProvidersResponse = GetProvidersResponses[keyof GetProvidersResponses];
|
|
347
|
+
type GetTokensData = {
|
|
348
|
+
body?: never;
|
|
349
|
+
path?: never;
|
|
350
|
+
query?: {
|
|
351
|
+
/**
|
|
352
|
+
* Provider name
|
|
353
|
+
*/
|
|
354
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
355
|
+
};
|
|
356
|
+
url: '/tokens';
|
|
357
|
+
};
|
|
358
|
+
type GetTokensErrors = {
|
|
359
|
+
/**
|
|
360
|
+
* Default Response
|
|
361
|
+
*/
|
|
362
|
+
400: {
|
|
363
|
+
message: string;
|
|
364
|
+
error: string;
|
|
365
|
+
data?: unknown;
|
|
366
|
+
};
|
|
367
|
+
/**
|
|
368
|
+
* Default Response
|
|
369
|
+
*/
|
|
370
|
+
500: {
|
|
371
|
+
message: string;
|
|
372
|
+
error: string;
|
|
373
|
+
data?: unknown;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
type GetTokensError = GetTokensErrors[keyof GetTokensErrors];
|
|
377
|
+
type GetTokensResponses = {
|
|
378
|
+
/**
|
|
379
|
+
* Default Response
|
|
380
|
+
*/
|
|
381
|
+
200: {
|
|
382
|
+
provider: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
383
|
+
chainId?: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
384
|
+
name: string;
|
|
385
|
+
tags?: {
|
|
386
|
+
[key: string]: unknown;
|
|
387
|
+
};
|
|
388
|
+
timestamp: string;
|
|
389
|
+
version?: {
|
|
390
|
+
major: number;
|
|
391
|
+
minor: number;
|
|
392
|
+
patch: number;
|
|
393
|
+
};
|
|
394
|
+
keywords?: Array<string>;
|
|
395
|
+
count: number;
|
|
396
|
+
tokens: Array<{
|
|
397
|
+
chain?: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
398
|
+
address?: string;
|
|
399
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
400
|
+
ticker: string;
|
|
401
|
+
identifier: string;
|
|
402
|
+
symbol?: string;
|
|
403
|
+
name?: string;
|
|
404
|
+
decimals: number;
|
|
405
|
+
logoURI?: string;
|
|
406
|
+
extensions?: {
|
|
407
|
+
[key: string]: unknown;
|
|
408
|
+
};
|
|
409
|
+
shortCode?: string;
|
|
410
|
+
coingeckoId?: string;
|
|
411
|
+
}>;
|
|
412
|
+
logoURI?: string;
|
|
413
|
+
url?: string;
|
|
414
|
+
enabledChainIds?: Array<'42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash'>;
|
|
415
|
+
supportedActions?: Array<'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake'>;
|
|
416
|
+
supportedChainIds?: Array<'42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash'>;
|
|
417
|
+
} | Array<{
|
|
418
|
+
provider: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
419
|
+
chainId?: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
420
|
+
name: string;
|
|
421
|
+
tags?: {
|
|
422
|
+
[key: string]: unknown;
|
|
423
|
+
};
|
|
424
|
+
timestamp: string;
|
|
425
|
+
version?: {
|
|
426
|
+
major: number;
|
|
427
|
+
minor: number;
|
|
428
|
+
patch: number;
|
|
429
|
+
};
|
|
430
|
+
keywords?: Array<string>;
|
|
431
|
+
count: number;
|
|
432
|
+
tokens: Array<{
|
|
433
|
+
chain?: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
434
|
+
address?: string;
|
|
435
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
436
|
+
ticker: string;
|
|
437
|
+
identifier: string;
|
|
438
|
+
symbol?: string;
|
|
439
|
+
name?: string;
|
|
440
|
+
decimals: number;
|
|
441
|
+
logoURI?: string;
|
|
442
|
+
extensions?: {
|
|
443
|
+
[key: string]: unknown;
|
|
444
|
+
};
|
|
445
|
+
shortCode?: string;
|
|
446
|
+
coingeckoId?: string;
|
|
447
|
+
}>;
|
|
448
|
+
logoURI?: string;
|
|
449
|
+
url?: string;
|
|
450
|
+
enabledChainIds?: Array<'42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash'>;
|
|
451
|
+
supportedActions?: Array<'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake'>;
|
|
452
|
+
supportedChainIds?: Array<'42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash'>;
|
|
453
|
+
}>;
|
|
454
|
+
};
|
|
455
|
+
type GetTokensResponse = GetTokensResponses[keyof GetTokensResponses];
|
|
456
|
+
type GetSwapToData = {
|
|
457
|
+
body?: never;
|
|
458
|
+
path?: never;
|
|
459
|
+
query: {
|
|
460
|
+
/**
|
|
461
|
+
* Asset to swap from
|
|
462
|
+
*/
|
|
463
|
+
sellAsset: string;
|
|
464
|
+
};
|
|
465
|
+
url: '/swapTo';
|
|
466
|
+
};
|
|
467
|
+
type GetSwapToErrors = {
|
|
468
|
+
/**
|
|
469
|
+
* Default Response
|
|
470
|
+
*/
|
|
471
|
+
400: {
|
|
472
|
+
message: string;
|
|
473
|
+
error: string;
|
|
474
|
+
data?: unknown;
|
|
475
|
+
};
|
|
476
|
+
/**
|
|
477
|
+
* Default Response
|
|
478
|
+
*/
|
|
479
|
+
500: {
|
|
480
|
+
message: string;
|
|
481
|
+
error: string;
|
|
482
|
+
data?: unknown;
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
type GetSwapToError = GetSwapToErrors[keyof GetSwapToErrors];
|
|
486
|
+
type GetSwapToResponses = {
|
|
487
|
+
/**
|
|
488
|
+
* Default Response
|
|
489
|
+
*/
|
|
490
|
+
200: Array<string>;
|
|
491
|
+
};
|
|
492
|
+
type GetSwapToResponse = GetSwapToResponses[keyof GetSwapToResponses];
|
|
493
|
+
type GetSwapFromData = {
|
|
494
|
+
body?: never;
|
|
495
|
+
path?: never;
|
|
496
|
+
query: {
|
|
497
|
+
/**
|
|
498
|
+
* Asset to swap to (target asset)
|
|
499
|
+
*/
|
|
500
|
+
buyAsset: string;
|
|
501
|
+
};
|
|
502
|
+
url: '/swapFrom';
|
|
503
|
+
};
|
|
504
|
+
type GetSwapFromErrors = {
|
|
505
|
+
/**
|
|
506
|
+
* Default Response
|
|
507
|
+
*/
|
|
508
|
+
400: {
|
|
509
|
+
message: string;
|
|
510
|
+
error: string;
|
|
511
|
+
data?: unknown;
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* Default Response
|
|
515
|
+
*/
|
|
516
|
+
500: {
|
|
517
|
+
message: string;
|
|
518
|
+
error: string;
|
|
519
|
+
data?: unknown;
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
type GetSwapFromError = GetSwapFromErrors[keyof GetSwapFromErrors];
|
|
523
|
+
type GetSwapFromResponses = {
|
|
524
|
+
/**
|
|
525
|
+
* Default Response
|
|
526
|
+
*/
|
|
527
|
+
200: Array<string>;
|
|
528
|
+
};
|
|
529
|
+
type GetSwapFromResponse = GetSwapFromResponses[keyof GetSwapFromResponses];
|
|
530
|
+
type PostChainflipBrokerChannelData = {
|
|
531
|
+
body: {
|
|
532
|
+
destinationAddress: string;
|
|
533
|
+
sellAsset: {
|
|
534
|
+
chain: string;
|
|
535
|
+
asset: string;
|
|
536
|
+
};
|
|
537
|
+
buyAsset: {
|
|
538
|
+
chain: string;
|
|
539
|
+
asset: string;
|
|
540
|
+
};
|
|
541
|
+
channelMetadata?: {
|
|
542
|
+
ccmAdditionalData?: string;
|
|
543
|
+
gasBudget?: string;
|
|
544
|
+
message?: string;
|
|
545
|
+
cfParameters?: string;
|
|
546
|
+
};
|
|
547
|
+
affiliateFees?: Array<{
|
|
548
|
+
brokerAddress: string;
|
|
549
|
+
feeBps: number;
|
|
550
|
+
}>;
|
|
551
|
+
refundParameters?: {
|
|
552
|
+
minPrice?: string;
|
|
553
|
+
refundAddress?: string;
|
|
554
|
+
retryDuration?: number;
|
|
555
|
+
};
|
|
556
|
+
dcaParameters?: {
|
|
557
|
+
chunkInterval?: number;
|
|
558
|
+
numberOfChunks?: number;
|
|
559
|
+
};
|
|
560
|
+
brokerCommissionBps?: number;
|
|
561
|
+
maxBoostFeeBps?: number;
|
|
562
|
+
};
|
|
563
|
+
path?: never;
|
|
564
|
+
query?: never;
|
|
565
|
+
url: '/chainflip/broker/channel';
|
|
566
|
+
};
|
|
567
|
+
type PostChainflipBrokerChannelResponses = {
|
|
568
|
+
/**
|
|
569
|
+
* Default Response
|
|
570
|
+
*/
|
|
571
|
+
200: {
|
|
572
|
+
depositAddress: string;
|
|
573
|
+
channelId: string;
|
|
574
|
+
explorerUrl: string;
|
|
575
|
+
/**
|
|
576
|
+
* Error message
|
|
577
|
+
*/
|
|
578
|
+
error?: string;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
type PostChainflipBrokerChannelResponse = PostChainflipBrokerChannelResponses[keyof PostChainflipBrokerChannelResponses];
|
|
582
|
+
type PostTrackData = {
|
|
583
|
+
body?: {
|
|
584
|
+
/**
|
|
585
|
+
* Hash for the first transaction broadcasted by the end user. e.g. `88D1819378ECD09E5284C54937CDC1E99B52F253C007617A02DD1200710CE677`
|
|
586
|
+
*/
|
|
587
|
+
hash?: string;
|
|
588
|
+
/**
|
|
589
|
+
* ChainId for the hash. e.g. `thorchain-1`
|
|
590
|
+
*/
|
|
591
|
+
chainId?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Block number. Required for Polkadot chain. e.g. `123456`
|
|
594
|
+
*/
|
|
595
|
+
block?: number;
|
|
596
|
+
/**
|
|
597
|
+
* Deposit channel ID, required for Chainflip if tx was broadcasted without wallet connection
|
|
598
|
+
*/
|
|
599
|
+
depositChannelId?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Deposit address associated with a deposit channel
|
|
602
|
+
*/
|
|
603
|
+
depositAddress?: string;
|
|
604
|
+
};
|
|
605
|
+
path?: never;
|
|
606
|
+
query?: {
|
|
607
|
+
forceUpdate?: string;
|
|
608
|
+
};
|
|
609
|
+
url: '/track';
|
|
610
|
+
};
|
|
611
|
+
type PostTrackResponses = {
|
|
612
|
+
/**
|
|
613
|
+
* Default Response
|
|
614
|
+
*/
|
|
615
|
+
200: {
|
|
616
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
617
|
+
hash: string;
|
|
618
|
+
block: number;
|
|
619
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
620
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
621
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
622
|
+
fromAsset: string;
|
|
623
|
+
fromAmount: string;
|
|
624
|
+
fromAddress: string;
|
|
625
|
+
toAsset: string;
|
|
626
|
+
toAmount: string;
|
|
627
|
+
toAddress: string;
|
|
628
|
+
finalAsset?: {
|
|
629
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
630
|
+
symbol: string;
|
|
631
|
+
ticker: string;
|
|
632
|
+
decimal?: number;
|
|
633
|
+
address?: string;
|
|
634
|
+
isGasAsset: boolean;
|
|
635
|
+
isSynthetic: boolean;
|
|
636
|
+
tax?: {
|
|
637
|
+
buy: number;
|
|
638
|
+
sell: number;
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
finalAddress?: string;
|
|
642
|
+
finalisedAt: number;
|
|
643
|
+
transient?: {
|
|
644
|
+
estimatedTimeToComplete: number;
|
|
645
|
+
currentLegIndex?: number;
|
|
646
|
+
estimates?: {
|
|
647
|
+
inboundObservation: number;
|
|
648
|
+
inboundConfirmation: number;
|
|
649
|
+
streamingSwap: number;
|
|
650
|
+
outboundDelay: number;
|
|
651
|
+
outboundObservation: number;
|
|
652
|
+
currentStage: string;
|
|
653
|
+
};
|
|
654
|
+
providerDetails?: {
|
|
655
|
+
streamingDetails?: {
|
|
656
|
+
quantity?: number;
|
|
657
|
+
count?: number;
|
|
658
|
+
interval?: number;
|
|
659
|
+
subSwapsMap?: Array<number>;
|
|
660
|
+
};
|
|
661
|
+
depositChannelId?: string;
|
|
662
|
+
depositAddress?: string;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
meta?: {
|
|
666
|
+
broadcastedAt?: number;
|
|
667
|
+
wallet?: string;
|
|
668
|
+
quoteId?: string;
|
|
669
|
+
explorerUrl?: string;
|
|
670
|
+
affiliate?: string;
|
|
671
|
+
fees?: {
|
|
672
|
+
network?: {
|
|
673
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
674
|
+
symbol: string;
|
|
675
|
+
ticker: string;
|
|
676
|
+
decimal?: number;
|
|
677
|
+
address?: string;
|
|
678
|
+
isGasAsset: boolean;
|
|
679
|
+
isSynthetic: boolean;
|
|
680
|
+
tax?: {
|
|
681
|
+
buy: number;
|
|
682
|
+
sell: number;
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
affiliate?: {
|
|
686
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
687
|
+
symbol: string;
|
|
688
|
+
ticker: string;
|
|
689
|
+
decimal?: number;
|
|
690
|
+
address?: string;
|
|
691
|
+
isGasAsset: boolean;
|
|
692
|
+
isSynthetic: boolean;
|
|
693
|
+
tax?: {
|
|
694
|
+
buy: number;
|
|
695
|
+
sell: number;
|
|
696
|
+
};
|
|
697
|
+
};
|
|
698
|
+
liquidity?: {
|
|
699
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
700
|
+
symbol: string;
|
|
701
|
+
ticker: string;
|
|
702
|
+
decimal?: number;
|
|
703
|
+
address?: string;
|
|
704
|
+
isGasAsset: boolean;
|
|
705
|
+
isSynthetic: boolean;
|
|
706
|
+
tax?: {
|
|
707
|
+
buy: number;
|
|
708
|
+
sell: number;
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
protocol?: {
|
|
712
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
713
|
+
symbol: string;
|
|
714
|
+
ticker: string;
|
|
715
|
+
decimal?: number;
|
|
716
|
+
address?: string;
|
|
717
|
+
isGasAsset: boolean;
|
|
718
|
+
isSynthetic: boolean;
|
|
719
|
+
tax?: {
|
|
720
|
+
buy: number;
|
|
721
|
+
sell: number;
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
tax?: {
|
|
725
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
726
|
+
symbol: string;
|
|
727
|
+
ticker: string;
|
|
728
|
+
decimal?: number;
|
|
729
|
+
address?: string;
|
|
730
|
+
isGasAsset: boolean;
|
|
731
|
+
isSynthetic: boolean;
|
|
732
|
+
tax?: {
|
|
733
|
+
buy: number;
|
|
734
|
+
sell: number;
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
739
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake';
|
|
740
|
+
images?: {
|
|
741
|
+
from?: string;
|
|
742
|
+
to?: string;
|
|
743
|
+
provider?: string;
|
|
744
|
+
chain?: string;
|
|
745
|
+
};
|
|
746
|
+
affiliateFees?: Array<{
|
|
747
|
+
affiliate: string;
|
|
748
|
+
bps: string;
|
|
749
|
+
isReferrer: boolean;
|
|
750
|
+
}>;
|
|
751
|
+
};
|
|
752
|
+
payload?: {
|
|
753
|
+
evmCalldata?: string;
|
|
754
|
+
evmValue?: string;
|
|
755
|
+
logs?: unknown;
|
|
756
|
+
memo?: string;
|
|
757
|
+
spender?: string;
|
|
758
|
+
manifest?: unknown;
|
|
759
|
+
intentHash?: string;
|
|
760
|
+
thorname?: string;
|
|
761
|
+
decodedPayload?: unknown;
|
|
762
|
+
};
|
|
763
|
+
legs: Array<{
|
|
764
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
765
|
+
hash: string;
|
|
766
|
+
block: number;
|
|
767
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
768
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
769
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
770
|
+
fromAsset: string;
|
|
771
|
+
fromAmount: string;
|
|
772
|
+
fromAddress: string;
|
|
773
|
+
toAsset: string;
|
|
774
|
+
toAmount: string;
|
|
775
|
+
toAddress: string;
|
|
776
|
+
finalAsset?: {
|
|
777
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
778
|
+
symbol: string;
|
|
779
|
+
ticker: string;
|
|
780
|
+
decimal?: number;
|
|
781
|
+
address?: string;
|
|
782
|
+
isGasAsset: boolean;
|
|
783
|
+
isSynthetic: boolean;
|
|
784
|
+
tax?: {
|
|
785
|
+
buy: number;
|
|
786
|
+
sell: number;
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
finalAddress?: string;
|
|
790
|
+
finalisedAt: number;
|
|
791
|
+
transient?: {
|
|
792
|
+
estimatedTimeToComplete: number;
|
|
793
|
+
currentLegIndex?: number;
|
|
794
|
+
estimates?: {
|
|
795
|
+
inboundObservation: number;
|
|
796
|
+
inboundConfirmation: number;
|
|
797
|
+
streamingSwap: number;
|
|
798
|
+
outboundDelay: number;
|
|
799
|
+
outboundObservation: number;
|
|
800
|
+
currentStage: string;
|
|
801
|
+
};
|
|
802
|
+
providerDetails?: {
|
|
803
|
+
streamingDetails?: {
|
|
804
|
+
quantity?: number;
|
|
805
|
+
count?: number;
|
|
806
|
+
interval?: number;
|
|
807
|
+
subSwapsMap?: Array<number>;
|
|
808
|
+
};
|
|
809
|
+
depositChannelId?: string;
|
|
810
|
+
depositAddress?: string;
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
meta?: {
|
|
814
|
+
broadcastedAt?: number;
|
|
815
|
+
wallet?: string;
|
|
816
|
+
quoteId?: string;
|
|
817
|
+
explorerUrl?: string;
|
|
818
|
+
affiliate?: string;
|
|
819
|
+
fees?: {
|
|
820
|
+
network?: {
|
|
821
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
822
|
+
symbol: string;
|
|
823
|
+
ticker: string;
|
|
824
|
+
decimal?: number;
|
|
825
|
+
address?: string;
|
|
826
|
+
isGasAsset: boolean;
|
|
827
|
+
isSynthetic: boolean;
|
|
828
|
+
tax?: {
|
|
829
|
+
buy: number;
|
|
830
|
+
sell: number;
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
affiliate?: {
|
|
834
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
835
|
+
symbol: string;
|
|
836
|
+
ticker: string;
|
|
837
|
+
decimal?: number;
|
|
838
|
+
address?: string;
|
|
839
|
+
isGasAsset: boolean;
|
|
840
|
+
isSynthetic: boolean;
|
|
841
|
+
tax?: {
|
|
842
|
+
buy: number;
|
|
843
|
+
sell: number;
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
liquidity?: {
|
|
847
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
848
|
+
symbol: string;
|
|
849
|
+
ticker: string;
|
|
850
|
+
decimal?: number;
|
|
851
|
+
address?: string;
|
|
852
|
+
isGasAsset: boolean;
|
|
853
|
+
isSynthetic: boolean;
|
|
854
|
+
tax?: {
|
|
855
|
+
buy: number;
|
|
856
|
+
sell: number;
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
protocol?: {
|
|
860
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
861
|
+
symbol: string;
|
|
862
|
+
ticker: string;
|
|
863
|
+
decimal?: number;
|
|
864
|
+
address?: string;
|
|
865
|
+
isGasAsset: boolean;
|
|
866
|
+
isSynthetic: boolean;
|
|
867
|
+
tax?: {
|
|
868
|
+
buy: number;
|
|
869
|
+
sell: number;
|
|
870
|
+
};
|
|
871
|
+
};
|
|
872
|
+
tax?: {
|
|
873
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
874
|
+
symbol: string;
|
|
875
|
+
ticker: string;
|
|
876
|
+
decimal?: number;
|
|
877
|
+
address?: string;
|
|
878
|
+
isGasAsset: boolean;
|
|
879
|
+
isSynthetic: boolean;
|
|
880
|
+
tax?: {
|
|
881
|
+
buy: number;
|
|
882
|
+
sell: number;
|
|
883
|
+
};
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
887
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake';
|
|
888
|
+
images?: {
|
|
889
|
+
from?: string;
|
|
890
|
+
to?: string;
|
|
891
|
+
provider?: string;
|
|
892
|
+
chain?: string;
|
|
893
|
+
};
|
|
894
|
+
affiliateFees?: Array<{
|
|
895
|
+
affiliate: string;
|
|
896
|
+
bps: string;
|
|
897
|
+
isReferrer: boolean;
|
|
898
|
+
}>;
|
|
899
|
+
};
|
|
900
|
+
payload?: {
|
|
901
|
+
evmCalldata?: string;
|
|
902
|
+
evmValue?: string;
|
|
903
|
+
logs?: unknown;
|
|
904
|
+
memo?: string;
|
|
905
|
+
spender?: string;
|
|
906
|
+
manifest?: unknown;
|
|
907
|
+
intentHash?: string;
|
|
908
|
+
thorname?: string;
|
|
909
|
+
decodedPayload?: unknown;
|
|
910
|
+
};
|
|
911
|
+
}>;
|
|
912
|
+
};
|
|
913
|
+
/**
|
|
914
|
+
* Default Response
|
|
915
|
+
*/
|
|
916
|
+
202: {
|
|
917
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
918
|
+
hash: string;
|
|
919
|
+
block: number;
|
|
920
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
921
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
922
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
923
|
+
fromAsset: string;
|
|
924
|
+
fromAmount: string;
|
|
925
|
+
fromAddress: string;
|
|
926
|
+
toAsset: string;
|
|
927
|
+
toAmount: string;
|
|
928
|
+
toAddress: string;
|
|
929
|
+
finalAsset?: {
|
|
930
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
931
|
+
symbol: string;
|
|
932
|
+
ticker: string;
|
|
933
|
+
decimal?: number;
|
|
934
|
+
address?: string;
|
|
935
|
+
isGasAsset: boolean;
|
|
936
|
+
isSynthetic: boolean;
|
|
937
|
+
tax?: {
|
|
938
|
+
buy: number;
|
|
939
|
+
sell: number;
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
finalAddress?: string;
|
|
943
|
+
finalisedAt: number;
|
|
944
|
+
transient?: {
|
|
945
|
+
estimatedTimeToComplete: number;
|
|
946
|
+
currentLegIndex?: number;
|
|
947
|
+
estimates?: {
|
|
948
|
+
inboundObservation: number;
|
|
949
|
+
inboundConfirmation: number;
|
|
950
|
+
streamingSwap: number;
|
|
951
|
+
outboundDelay: number;
|
|
952
|
+
outboundObservation: number;
|
|
953
|
+
currentStage: string;
|
|
954
|
+
};
|
|
955
|
+
providerDetails?: {
|
|
956
|
+
streamingDetails?: {
|
|
957
|
+
quantity?: number;
|
|
958
|
+
count?: number;
|
|
959
|
+
interval?: number;
|
|
960
|
+
subSwapsMap?: Array<number>;
|
|
961
|
+
};
|
|
962
|
+
depositChannelId?: string;
|
|
963
|
+
depositAddress?: string;
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
meta?: {
|
|
967
|
+
broadcastedAt?: number;
|
|
968
|
+
wallet?: string;
|
|
969
|
+
quoteId?: string;
|
|
970
|
+
explorerUrl?: string;
|
|
971
|
+
affiliate?: string;
|
|
972
|
+
fees?: {
|
|
973
|
+
network?: {
|
|
974
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
975
|
+
symbol: string;
|
|
976
|
+
ticker: string;
|
|
977
|
+
decimal?: number;
|
|
978
|
+
address?: string;
|
|
979
|
+
isGasAsset: boolean;
|
|
980
|
+
isSynthetic: boolean;
|
|
981
|
+
tax?: {
|
|
982
|
+
buy: number;
|
|
983
|
+
sell: number;
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
affiliate?: {
|
|
987
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
988
|
+
symbol: string;
|
|
989
|
+
ticker: string;
|
|
990
|
+
decimal?: number;
|
|
991
|
+
address?: string;
|
|
992
|
+
isGasAsset: boolean;
|
|
993
|
+
isSynthetic: boolean;
|
|
994
|
+
tax?: {
|
|
995
|
+
buy: number;
|
|
996
|
+
sell: number;
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
liquidity?: {
|
|
1000
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1001
|
+
symbol: string;
|
|
1002
|
+
ticker: string;
|
|
1003
|
+
decimal?: number;
|
|
1004
|
+
address?: string;
|
|
1005
|
+
isGasAsset: boolean;
|
|
1006
|
+
isSynthetic: boolean;
|
|
1007
|
+
tax?: {
|
|
1008
|
+
buy: number;
|
|
1009
|
+
sell: number;
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
protocol?: {
|
|
1013
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1014
|
+
symbol: string;
|
|
1015
|
+
ticker: string;
|
|
1016
|
+
decimal?: number;
|
|
1017
|
+
address?: string;
|
|
1018
|
+
isGasAsset: boolean;
|
|
1019
|
+
isSynthetic: boolean;
|
|
1020
|
+
tax?: {
|
|
1021
|
+
buy: number;
|
|
1022
|
+
sell: number;
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
tax?: {
|
|
1026
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1027
|
+
symbol: string;
|
|
1028
|
+
ticker: string;
|
|
1029
|
+
decimal?: number;
|
|
1030
|
+
address?: string;
|
|
1031
|
+
isGasAsset: boolean;
|
|
1032
|
+
isSynthetic: boolean;
|
|
1033
|
+
tax?: {
|
|
1034
|
+
buy: number;
|
|
1035
|
+
sell: number;
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1039
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1040
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake';
|
|
1041
|
+
images?: {
|
|
1042
|
+
from?: string;
|
|
1043
|
+
to?: string;
|
|
1044
|
+
provider?: string;
|
|
1045
|
+
chain?: string;
|
|
1046
|
+
};
|
|
1047
|
+
affiliateFees?: Array<{
|
|
1048
|
+
affiliate: string;
|
|
1049
|
+
bps: string;
|
|
1050
|
+
isReferrer: boolean;
|
|
1051
|
+
}>;
|
|
1052
|
+
};
|
|
1053
|
+
payload?: {
|
|
1054
|
+
evmCalldata?: string;
|
|
1055
|
+
evmValue?: string;
|
|
1056
|
+
logs?: unknown;
|
|
1057
|
+
memo?: string;
|
|
1058
|
+
spender?: string;
|
|
1059
|
+
manifest?: unknown;
|
|
1060
|
+
intentHash?: string;
|
|
1061
|
+
thorname?: string;
|
|
1062
|
+
decodedPayload?: unknown;
|
|
1063
|
+
};
|
|
1064
|
+
legs: Array<{
|
|
1065
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1066
|
+
hash: string;
|
|
1067
|
+
block: number;
|
|
1068
|
+
type: 'approve' | 'claim' | 'deposit' | 'lending' | 'lp_action' | 'native_contract_call' | 'native_send' | 'stake' | 'unstake' | 'streaming_swap' | 'swap' | 'thorname_action' | 'token_contract_call' | 'token_transfer' | 'unknown' | 'donate';
|
|
1069
|
+
status: 'unknown' | 'not_started' | 'pending' | 'swapping' | 'completed' | 'refunded' | 'failed';
|
|
1070
|
+
trackingStatus?: 'not_started' | 'starting' | 'broadcasted' | 'mempool' | 'inbound' | 'outbound' | 'swapping' | 'completed' | 'refunded' | 'partially_refunded' | 'dropped' | 'reverted' | 'replaced' | 'retries_exceeded' | 'parsing_error';
|
|
1071
|
+
fromAsset: string;
|
|
1072
|
+
fromAmount: string;
|
|
1073
|
+
fromAddress: string;
|
|
1074
|
+
toAsset: string;
|
|
1075
|
+
toAmount: string;
|
|
1076
|
+
toAddress: string;
|
|
1077
|
+
finalAsset?: {
|
|
1078
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1079
|
+
symbol: string;
|
|
1080
|
+
ticker: string;
|
|
1081
|
+
decimal?: number;
|
|
1082
|
+
address?: string;
|
|
1083
|
+
isGasAsset: boolean;
|
|
1084
|
+
isSynthetic: boolean;
|
|
1085
|
+
tax?: {
|
|
1086
|
+
buy: number;
|
|
1087
|
+
sell: number;
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
finalAddress?: string;
|
|
1091
|
+
finalisedAt: number;
|
|
1092
|
+
transient?: {
|
|
1093
|
+
estimatedTimeToComplete: number;
|
|
1094
|
+
currentLegIndex?: number;
|
|
1095
|
+
estimates?: {
|
|
1096
|
+
inboundObservation: number;
|
|
1097
|
+
inboundConfirmation: number;
|
|
1098
|
+
streamingSwap: number;
|
|
1099
|
+
outboundDelay: number;
|
|
1100
|
+
outboundObservation: number;
|
|
1101
|
+
currentStage: string;
|
|
1102
|
+
};
|
|
1103
|
+
providerDetails?: {
|
|
1104
|
+
streamingDetails?: {
|
|
1105
|
+
quantity?: number;
|
|
1106
|
+
count?: number;
|
|
1107
|
+
interval?: number;
|
|
1108
|
+
subSwapsMap?: Array<number>;
|
|
1109
|
+
};
|
|
1110
|
+
depositChannelId?: string;
|
|
1111
|
+
depositAddress?: string;
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
meta?: {
|
|
1115
|
+
broadcastedAt?: number;
|
|
1116
|
+
wallet?: string;
|
|
1117
|
+
quoteId?: string;
|
|
1118
|
+
explorerUrl?: string;
|
|
1119
|
+
affiliate?: string;
|
|
1120
|
+
fees?: {
|
|
1121
|
+
network?: {
|
|
1122
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1123
|
+
symbol: string;
|
|
1124
|
+
ticker: string;
|
|
1125
|
+
decimal?: number;
|
|
1126
|
+
address?: string;
|
|
1127
|
+
isGasAsset: boolean;
|
|
1128
|
+
isSynthetic: boolean;
|
|
1129
|
+
tax?: {
|
|
1130
|
+
buy: number;
|
|
1131
|
+
sell: number;
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
affiliate?: {
|
|
1135
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1136
|
+
symbol: string;
|
|
1137
|
+
ticker: string;
|
|
1138
|
+
decimal?: number;
|
|
1139
|
+
address?: string;
|
|
1140
|
+
isGasAsset: boolean;
|
|
1141
|
+
isSynthetic: boolean;
|
|
1142
|
+
tax?: {
|
|
1143
|
+
buy: number;
|
|
1144
|
+
sell: number;
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
liquidity?: {
|
|
1148
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1149
|
+
symbol: string;
|
|
1150
|
+
ticker: string;
|
|
1151
|
+
decimal?: number;
|
|
1152
|
+
address?: string;
|
|
1153
|
+
isGasAsset: boolean;
|
|
1154
|
+
isSynthetic: boolean;
|
|
1155
|
+
tax?: {
|
|
1156
|
+
buy: number;
|
|
1157
|
+
sell: number;
|
|
1158
|
+
};
|
|
1159
|
+
};
|
|
1160
|
+
protocol?: {
|
|
1161
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1162
|
+
symbol: string;
|
|
1163
|
+
ticker: string;
|
|
1164
|
+
decimal?: number;
|
|
1165
|
+
address?: string;
|
|
1166
|
+
isGasAsset: boolean;
|
|
1167
|
+
isSynthetic: boolean;
|
|
1168
|
+
tax?: {
|
|
1169
|
+
buy: number;
|
|
1170
|
+
sell: number;
|
|
1171
|
+
};
|
|
1172
|
+
};
|
|
1173
|
+
tax?: {
|
|
1174
|
+
chain: 'ARB' | 'AURORA' | 'AVAX' | 'BASE' | 'BERA' | 'BSC' | 'BTC' | 'BCH' | 'BOTANIX' | 'ADA' | 'FLIP' | 'CORE' | 'CORN' | 'GAIA' | 'CRO' | 'DASH' | 'DOGE' | 'ETH' | 'GNO' | 'HARBOR' | 'HYPEREVM' | 'KUJI' | 'LTC' | 'MAYA' | 'MEGAETH' | 'MONAD' | 'NEAR' | 'NOBLE' | 'OP' | 'DOT' | 'POL' | 'XRD' | 'XRP' | 'SOL' | 'SONIC' | 'STRK' | 'SUI' | 'THOR' | 'TON' | 'TRON' | 'UNI' | 'XLAYER' | 'ZEC';
|
|
1175
|
+
symbol: string;
|
|
1176
|
+
ticker: string;
|
|
1177
|
+
decimal?: number;
|
|
1178
|
+
address?: string;
|
|
1179
|
+
isGasAsset: boolean;
|
|
1180
|
+
isSynthetic: boolean;
|
|
1181
|
+
tax?: {
|
|
1182
|
+
buy: number;
|
|
1183
|
+
sell: number;
|
|
1184
|
+
};
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1188
|
+
providerAction?: 'swap' | 'aggregation' | 'addLiquidity' | 'withdrawLiquidity' | 'addSavers' | 'withdrawSavers' | 'borrow' | 'repay' | 'name' | 'donate' | 'claim' | 'stake' | 'unstake';
|
|
1189
|
+
images?: {
|
|
1190
|
+
from?: string;
|
|
1191
|
+
to?: string;
|
|
1192
|
+
provider?: string;
|
|
1193
|
+
chain?: string;
|
|
1194
|
+
};
|
|
1195
|
+
affiliateFees?: Array<{
|
|
1196
|
+
affiliate: string;
|
|
1197
|
+
bps: string;
|
|
1198
|
+
isReferrer: boolean;
|
|
1199
|
+
}>;
|
|
1200
|
+
};
|
|
1201
|
+
payload?: {
|
|
1202
|
+
evmCalldata?: string;
|
|
1203
|
+
evmValue?: string;
|
|
1204
|
+
logs?: unknown;
|
|
1205
|
+
memo?: string;
|
|
1206
|
+
spender?: string;
|
|
1207
|
+
manifest?: unknown;
|
|
1208
|
+
intentHash?: string;
|
|
1209
|
+
thorname?: string;
|
|
1210
|
+
decodedPayload?: unknown;
|
|
1211
|
+
};
|
|
1212
|
+
}>;
|
|
1213
|
+
};
|
|
1214
|
+
};
|
|
1215
|
+
type PostTrackResponse = PostTrackResponses[keyof PostTrackResponses];
|
|
1216
|
+
type PostScreenData = {
|
|
1217
|
+
body: {
|
|
1218
|
+
addresses: string | Array<string>;
|
|
1219
|
+
chains: string | Array<string>;
|
|
1220
|
+
};
|
|
1221
|
+
path?: never;
|
|
1222
|
+
query?: never;
|
|
1223
|
+
url: '/screen';
|
|
1224
|
+
};
|
|
1225
|
+
type PostScreenErrors = {
|
|
1226
|
+
/**
|
|
1227
|
+
* Default Response
|
|
1228
|
+
*/
|
|
1229
|
+
400: {
|
|
1230
|
+
message: string;
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
type PostScreenError = PostScreenErrors[keyof PostScreenErrors];
|
|
1234
|
+
type PostScreenResponses = {
|
|
1235
|
+
/**
|
|
1236
|
+
* Default Response
|
|
1237
|
+
*/
|
|
1238
|
+
200: {
|
|
1239
|
+
confirm: boolean;
|
|
1240
|
+
isBlacklisted?: boolean;
|
|
1241
|
+
isRisky?: boolean;
|
|
1242
|
+
isSanctioned?: boolean;
|
|
1243
|
+
module?: number;
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1246
|
+
type PostScreenResponse = PostScreenResponses[keyof PostScreenResponses];
|
|
1247
|
+
type GetGasHistoryData = {
|
|
1248
|
+
body?: never;
|
|
1249
|
+
path?: never;
|
|
1250
|
+
query?: {
|
|
1251
|
+
/**
|
|
1252
|
+
* Chain id, if omitted return gas for all chains
|
|
1253
|
+
*/
|
|
1254
|
+
chainId?: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1255
|
+
/**
|
|
1256
|
+
* Time frame to get gas history
|
|
1257
|
+
*/
|
|
1258
|
+
timeFrame?: '1h' | '1d' | '1w' | '1m';
|
|
1259
|
+
};
|
|
1260
|
+
url: '/gas/history';
|
|
1261
|
+
};
|
|
1262
|
+
type GetGasHistoryResponses = {
|
|
1263
|
+
/**
|
|
1264
|
+
* Default Response
|
|
1265
|
+
*/
|
|
1266
|
+
200: Array<{
|
|
1267
|
+
id: number;
|
|
1268
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1269
|
+
value: string;
|
|
1270
|
+
unit: string;
|
|
1271
|
+
createdAt: string;
|
|
1272
|
+
}> | {
|
|
1273
|
+
[key: string]: Array<{
|
|
1274
|
+
id: number;
|
|
1275
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1276
|
+
value: string;
|
|
1277
|
+
unit: string;
|
|
1278
|
+
createdAt: string;
|
|
1279
|
+
}>;
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
type GetGasHistoryResponse = GetGasHistoryResponses[keyof GetGasHistoryResponses];
|
|
1283
|
+
type GetGasData = {
|
|
1284
|
+
body?: never;
|
|
1285
|
+
path?: never;
|
|
1286
|
+
query?: {
|
|
1287
|
+
/**
|
|
1288
|
+
* Chain id, if omitted return gas for all chains
|
|
1289
|
+
*/
|
|
1290
|
+
chainId?: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1291
|
+
/**
|
|
1292
|
+
* Time frame to get gas history
|
|
1293
|
+
*/
|
|
1294
|
+
timeFrame?: '1h' | '1d' | '1w' | '1m';
|
|
1295
|
+
};
|
|
1296
|
+
url: '/gas';
|
|
1297
|
+
};
|
|
1298
|
+
type GetGasResponses = {
|
|
1299
|
+
/**
|
|
1300
|
+
* Default Response
|
|
1301
|
+
*/
|
|
1302
|
+
200: {
|
|
1303
|
+
id: number;
|
|
1304
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1305
|
+
value: string;
|
|
1306
|
+
unit: string;
|
|
1307
|
+
createdAt: string;
|
|
1308
|
+
} | Array<{
|
|
1309
|
+
id: number;
|
|
1310
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1311
|
+
value: string;
|
|
1312
|
+
unit: string;
|
|
1313
|
+
createdAt: string;
|
|
1314
|
+
}>;
|
|
1315
|
+
};
|
|
1316
|
+
type GetGasResponse = GetGasResponses[keyof GetGasResponses];
|
|
1317
|
+
type PostPriceCachedPriceData = {
|
|
1318
|
+
body: {
|
|
1319
|
+
tokens: Array<{
|
|
1320
|
+
identifier: string;
|
|
1321
|
+
}>;
|
|
1322
|
+
metadata: boolean;
|
|
1323
|
+
};
|
|
1324
|
+
path?: never;
|
|
1325
|
+
query?: never;
|
|
1326
|
+
url: '/price/cached-price';
|
|
1327
|
+
};
|
|
1328
|
+
type PostPriceCachedPriceResponses = {
|
|
1329
|
+
/**
|
|
1330
|
+
* Default Response
|
|
1331
|
+
*/
|
|
1332
|
+
200: Array<{
|
|
1333
|
+
identifier?: string;
|
|
1334
|
+
provider?: string;
|
|
1335
|
+
cg?: {
|
|
1336
|
+
id: string;
|
|
1337
|
+
name?: string;
|
|
1338
|
+
market_cap?: number;
|
|
1339
|
+
total_volume?: number;
|
|
1340
|
+
price_change_24h_usd?: number | null;
|
|
1341
|
+
price_change_percentage_24h_usd?: number | null;
|
|
1342
|
+
sparkline_in_7d?: Array<number>;
|
|
1343
|
+
timestamp?: string;
|
|
1344
|
+
};
|
|
1345
|
+
price_usd?: number;
|
|
1346
|
+
timestamp?: number;
|
|
1347
|
+
}>;
|
|
1348
|
+
};
|
|
1349
|
+
type PostPriceCachedPriceResponse = PostPriceCachedPriceResponses[keyof PostPriceCachedPriceResponses];
|
|
1350
|
+
type PostV3QuoteData = {
|
|
1351
|
+
body: {
|
|
1352
|
+
/**
|
|
1353
|
+
* Asset to sell
|
|
1354
|
+
*/
|
|
1355
|
+
sellAsset: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Asset to buy
|
|
1358
|
+
*/
|
|
1359
|
+
buyAsset: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* Amount of asset to sell
|
|
1362
|
+
*/
|
|
1363
|
+
sellAmount: string;
|
|
1364
|
+
providers?: Array<string>;
|
|
1365
|
+
/**
|
|
1366
|
+
* Address to send asset from
|
|
1367
|
+
*/
|
|
1368
|
+
sourceAddress?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Address to send asset to
|
|
1371
|
+
*/
|
|
1372
|
+
destinationAddress?: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* Slippage tolerance as a percentage. Default is 3%.
|
|
1375
|
+
*/
|
|
1376
|
+
slippage?: number;
|
|
1377
|
+
/**
|
|
1378
|
+
* Set to true to enable CF boost to speed up Chainflip swaps. BTC only.
|
|
1379
|
+
*/
|
|
1380
|
+
cfBoost?: boolean;
|
|
1381
|
+
referrer?: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Set to true to disable on-chain estimation
|
|
1384
|
+
*/
|
|
1385
|
+
disableEstimate?: boolean;
|
|
1386
|
+
/**
|
|
1387
|
+
* Maximum execution time in seconds. Routes exceeding this time will be filtered out.
|
|
1388
|
+
*/
|
|
1389
|
+
maxExecutionTime?: number;
|
|
1390
|
+
/**
|
|
1391
|
+
* Affiliate fee in basis points. This should only be used as an override, for example when you have some rebate or discount program. If not provided, the fees configured in your API Key will be used.
|
|
1392
|
+
*/
|
|
1393
|
+
affiliateFee?: number;
|
|
1394
|
+
};
|
|
1395
|
+
path?: never;
|
|
1396
|
+
query?: never;
|
|
1397
|
+
url: '/v3/quote';
|
|
1398
|
+
};
|
|
1399
|
+
type PostV3QuoteErrors = {
|
|
1400
|
+
/**
|
|
1401
|
+
* Default Response
|
|
1402
|
+
*/
|
|
1403
|
+
400: {
|
|
1404
|
+
message: string;
|
|
1405
|
+
error: string;
|
|
1406
|
+
data?: unknown;
|
|
1407
|
+
};
|
|
1408
|
+
/**
|
|
1409
|
+
* Default Response
|
|
1410
|
+
*/
|
|
1411
|
+
500: {
|
|
1412
|
+
message: string;
|
|
1413
|
+
error: string;
|
|
1414
|
+
data?: unknown;
|
|
1415
|
+
};
|
|
1416
|
+
};
|
|
1417
|
+
type PostV3QuoteError = PostV3QuoteErrors[keyof PostV3QuoteErrors];
|
|
1418
|
+
type PostV3QuoteResponses = {
|
|
1419
|
+
/**
|
|
1420
|
+
* Default Response
|
|
1421
|
+
*/
|
|
1422
|
+
200: {
|
|
1423
|
+
/**
|
|
1424
|
+
* Quote ID
|
|
1425
|
+
*/
|
|
1426
|
+
quoteId: string;
|
|
1427
|
+
routes: Array<{
|
|
1428
|
+
/**
|
|
1429
|
+
* Asset to sell
|
|
1430
|
+
*/
|
|
1431
|
+
sellAsset: string;
|
|
1432
|
+
/**
|
|
1433
|
+
* Sell amount
|
|
1434
|
+
*/
|
|
1435
|
+
sellAmount: string;
|
|
1436
|
+
/**
|
|
1437
|
+
* Asset to buy
|
|
1438
|
+
*/
|
|
1439
|
+
buyAsset: string;
|
|
1440
|
+
/**
|
|
1441
|
+
* Buy amount
|
|
1442
|
+
*/
|
|
1443
|
+
buyAmount?: string;
|
|
1444
|
+
/**
|
|
1445
|
+
* Buy amount max slippage
|
|
1446
|
+
*/
|
|
1447
|
+
buyAmountMaxSlippage?: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* Expected Buy amount
|
|
1450
|
+
*/
|
|
1451
|
+
expectedBuyAmount?: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* Expected Buy amount max slippage
|
|
1454
|
+
*/
|
|
1455
|
+
expectedBuyAmountMaxSlippage?: string;
|
|
1456
|
+
fees: Array<{
|
|
1457
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
1458
|
+
amount: string;
|
|
1459
|
+
asset: string;
|
|
1460
|
+
chain: string;
|
|
1461
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1462
|
+
}>;
|
|
1463
|
+
/**
|
|
1464
|
+
* Route ID
|
|
1465
|
+
*/
|
|
1466
|
+
routeId: string;
|
|
1467
|
+
providers: Array<'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3'>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Expiration
|
|
1470
|
+
*/
|
|
1471
|
+
expiration?: string;
|
|
1472
|
+
estimatedTime?: {
|
|
1473
|
+
/**
|
|
1474
|
+
* Time to receive inbound asset in seconds
|
|
1475
|
+
*/
|
|
1476
|
+
inbound?: number;
|
|
1477
|
+
/**
|
|
1478
|
+
* Time to swap assets in seconds
|
|
1479
|
+
*/
|
|
1480
|
+
swap?: number;
|
|
1481
|
+
/**
|
|
1482
|
+
* Time to receive outbound asset in seconds
|
|
1483
|
+
*/
|
|
1484
|
+
outbound?: number;
|
|
1485
|
+
/**
|
|
1486
|
+
* Total time in seconds
|
|
1487
|
+
*/
|
|
1488
|
+
total: number;
|
|
1489
|
+
};
|
|
1490
|
+
/**
|
|
1491
|
+
* Total slippage in bps
|
|
1492
|
+
*/
|
|
1493
|
+
totalSlippageBps: number;
|
|
1494
|
+
legs: Array<{
|
|
1495
|
+
provider: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1496
|
+
/**
|
|
1497
|
+
* Asset to sell
|
|
1498
|
+
*/
|
|
1499
|
+
sellAsset: string;
|
|
1500
|
+
/**
|
|
1501
|
+
* Sell amount
|
|
1502
|
+
*/
|
|
1503
|
+
sellAmount: string;
|
|
1504
|
+
/**
|
|
1505
|
+
* Asset to buy
|
|
1506
|
+
*/
|
|
1507
|
+
buyAsset: string;
|
|
1508
|
+
/**
|
|
1509
|
+
* Buy amount
|
|
1510
|
+
*/
|
|
1511
|
+
buyAmount?: string;
|
|
1512
|
+
/**
|
|
1513
|
+
* Buy amount max slippage
|
|
1514
|
+
*/
|
|
1515
|
+
buyAmountMaxSlippage?: string;
|
|
1516
|
+
/**
|
|
1517
|
+
* Expected Buy amount
|
|
1518
|
+
*/
|
|
1519
|
+
expectedBuyAmount?: string;
|
|
1520
|
+
/**
|
|
1521
|
+
* Expected Buy amount max slippage
|
|
1522
|
+
*/
|
|
1523
|
+
expectedBuyAmountMaxSlippage?: string;
|
|
1524
|
+
fees: Array<{
|
|
1525
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
1526
|
+
amount: string;
|
|
1527
|
+
asset: string;
|
|
1528
|
+
chain: string;
|
|
1529
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1530
|
+
}>;
|
|
1531
|
+
}>;
|
|
1532
|
+
warnings: Array<{
|
|
1533
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'unableToBuildTransaction' | 'unableToEstimateGas';
|
|
1534
|
+
display: string;
|
|
1535
|
+
tooltip?: string;
|
|
1536
|
+
}>;
|
|
1537
|
+
meta: {
|
|
1538
|
+
assets?: Array<{
|
|
1539
|
+
/**
|
|
1540
|
+
* Asset name
|
|
1541
|
+
*/
|
|
1542
|
+
asset: string;
|
|
1543
|
+
/**
|
|
1544
|
+
* Price in USD
|
|
1545
|
+
*/
|
|
1546
|
+
price: number;
|
|
1547
|
+
/**
|
|
1548
|
+
* Asset image
|
|
1549
|
+
*/
|
|
1550
|
+
image: string;
|
|
1551
|
+
}>;
|
|
1552
|
+
tags: Array<'CHEAPEST' | 'FASTEST' | 'RECOMMENDED'>;
|
|
1553
|
+
streamingInterval?: number;
|
|
1554
|
+
maxStreamingQuantity?: number;
|
|
1555
|
+
referrer?: string;
|
|
1556
|
+
/**
|
|
1557
|
+
* Approval address for token swap
|
|
1558
|
+
*/
|
|
1559
|
+
approvalAddress?: string;
|
|
1560
|
+
};
|
|
1561
|
+
nextActions?: Array<{
|
|
1562
|
+
method: string;
|
|
1563
|
+
url: string;
|
|
1564
|
+
payload?: unknown;
|
|
1565
|
+
}>;
|
|
1566
|
+
}>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Error message
|
|
1569
|
+
*/
|
|
1570
|
+
error?: string;
|
|
1571
|
+
providerErrors?: Array<{
|
|
1572
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1573
|
+
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'noLiquidtyProvidersFound' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'radixIncorrectInstructions' | 'radixTxMissedParam' | 'radixTxMissedAccount' | 'radixManifestParseError' | 'radixManifestBuildError' | 'invalidAddressForChain' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'snowflakeFailedToFetchSwaps' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'invalidTokenProgram' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'externalServiceFailed' | 'invalidTxHashFormat';
|
|
1574
|
+
message?: string;
|
|
1575
|
+
}>;
|
|
1576
|
+
};
|
|
1577
|
+
/**
|
|
1578
|
+
* Default Response
|
|
1579
|
+
*/
|
|
1580
|
+
218: {
|
|
1581
|
+
/**
|
|
1582
|
+
* Quote ID
|
|
1583
|
+
*/
|
|
1584
|
+
quoteId: string;
|
|
1585
|
+
routes: Array<{
|
|
1586
|
+
/**
|
|
1587
|
+
* Asset to sell
|
|
1588
|
+
*/
|
|
1589
|
+
sellAsset: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Sell amount
|
|
1592
|
+
*/
|
|
1593
|
+
sellAmount: string;
|
|
1594
|
+
/**
|
|
1595
|
+
* Asset to buy
|
|
1596
|
+
*/
|
|
1597
|
+
buyAsset: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* Buy amount
|
|
1600
|
+
*/
|
|
1601
|
+
buyAmount?: string;
|
|
1602
|
+
/**
|
|
1603
|
+
* Buy amount max slippage
|
|
1604
|
+
*/
|
|
1605
|
+
buyAmountMaxSlippage?: string;
|
|
1606
|
+
/**
|
|
1607
|
+
* Expected Buy amount
|
|
1608
|
+
*/
|
|
1609
|
+
expectedBuyAmount?: string;
|
|
1610
|
+
/**
|
|
1611
|
+
* Expected Buy amount max slippage
|
|
1612
|
+
*/
|
|
1613
|
+
expectedBuyAmountMaxSlippage?: string;
|
|
1614
|
+
fees: Array<{
|
|
1615
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
1616
|
+
amount: string;
|
|
1617
|
+
asset: string;
|
|
1618
|
+
chain: string;
|
|
1619
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1620
|
+
}>;
|
|
1621
|
+
/**
|
|
1622
|
+
* Route ID
|
|
1623
|
+
*/
|
|
1624
|
+
routeId: string;
|
|
1625
|
+
providers: Array<'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3'>;
|
|
1626
|
+
/**
|
|
1627
|
+
* Expiration
|
|
1628
|
+
*/
|
|
1629
|
+
expiration?: string;
|
|
1630
|
+
estimatedTime?: {
|
|
1631
|
+
/**
|
|
1632
|
+
* Time to receive inbound asset in seconds
|
|
1633
|
+
*/
|
|
1634
|
+
inbound?: number;
|
|
1635
|
+
/**
|
|
1636
|
+
* Time to swap assets in seconds
|
|
1637
|
+
*/
|
|
1638
|
+
swap?: number;
|
|
1639
|
+
/**
|
|
1640
|
+
* Time to receive outbound asset in seconds
|
|
1641
|
+
*/
|
|
1642
|
+
outbound?: number;
|
|
1643
|
+
/**
|
|
1644
|
+
* Total time in seconds
|
|
1645
|
+
*/
|
|
1646
|
+
total: number;
|
|
1647
|
+
};
|
|
1648
|
+
/**
|
|
1649
|
+
* Total slippage in bps
|
|
1650
|
+
*/
|
|
1651
|
+
totalSlippageBps: number;
|
|
1652
|
+
legs: Array<{
|
|
1653
|
+
provider: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1654
|
+
/**
|
|
1655
|
+
* Asset to sell
|
|
1656
|
+
*/
|
|
1657
|
+
sellAsset: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* Sell amount
|
|
1660
|
+
*/
|
|
1661
|
+
sellAmount: string;
|
|
1662
|
+
/**
|
|
1663
|
+
* Asset to buy
|
|
1664
|
+
*/
|
|
1665
|
+
buyAsset: string;
|
|
1666
|
+
/**
|
|
1667
|
+
* Buy amount
|
|
1668
|
+
*/
|
|
1669
|
+
buyAmount?: string;
|
|
1670
|
+
/**
|
|
1671
|
+
* Buy amount max slippage
|
|
1672
|
+
*/
|
|
1673
|
+
buyAmountMaxSlippage?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* Expected Buy amount
|
|
1676
|
+
*/
|
|
1677
|
+
expectedBuyAmount?: string;
|
|
1678
|
+
/**
|
|
1679
|
+
* Expected Buy amount max slippage
|
|
1680
|
+
*/
|
|
1681
|
+
expectedBuyAmountMaxSlippage?: string;
|
|
1682
|
+
fees: Array<{
|
|
1683
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
1684
|
+
amount: string;
|
|
1685
|
+
asset: string;
|
|
1686
|
+
chain: string;
|
|
1687
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1688
|
+
}>;
|
|
1689
|
+
}>;
|
|
1690
|
+
warnings: Array<{
|
|
1691
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'unableToBuildTransaction' | 'unableToEstimateGas';
|
|
1692
|
+
display: string;
|
|
1693
|
+
tooltip?: string;
|
|
1694
|
+
}>;
|
|
1695
|
+
meta: {
|
|
1696
|
+
assets?: Array<{
|
|
1697
|
+
/**
|
|
1698
|
+
* Asset name
|
|
1699
|
+
*/
|
|
1700
|
+
asset: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* Price in USD
|
|
1703
|
+
*/
|
|
1704
|
+
price: number;
|
|
1705
|
+
/**
|
|
1706
|
+
* Asset image
|
|
1707
|
+
*/
|
|
1708
|
+
image: string;
|
|
1709
|
+
}>;
|
|
1710
|
+
tags: Array<'CHEAPEST' | 'FASTEST' | 'RECOMMENDED'>;
|
|
1711
|
+
streamingInterval?: number;
|
|
1712
|
+
maxStreamingQuantity?: number;
|
|
1713
|
+
referrer?: string;
|
|
1714
|
+
/**
|
|
1715
|
+
* Approval address for token swap
|
|
1716
|
+
*/
|
|
1717
|
+
approvalAddress?: string;
|
|
1718
|
+
};
|
|
1719
|
+
nextActions?: Array<{
|
|
1720
|
+
method: string;
|
|
1721
|
+
url: string;
|
|
1722
|
+
payload?: unknown;
|
|
1723
|
+
}>;
|
|
1724
|
+
}>;
|
|
1725
|
+
/**
|
|
1726
|
+
* Error message
|
|
1727
|
+
*/
|
|
1728
|
+
error?: string;
|
|
1729
|
+
providerErrors?: Array<{
|
|
1730
|
+
provider?: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1731
|
+
errorCode?: 'noRpcFallbacks' | 'requestTimeout' | 'invalidApiVersion' | 'isSanctionedAddress' | 'unknownError' | 'test_error' | 'blockHeaderNotFound' | 'blockHashNotFoundAtHeight' | 'blackListAsset' | 'txHashMissing' | 'invalidAsset' | 'currentBlockHeaderNotFound' | 'failedToRetrieveBalance' | 'failedToRetrieveBlock' | 'failedToRetrieveFees' | 'notImplementedBCH' | 'notImplementedDoge' | 'noPoolsFound' | 'noVaultsFound' | 'noTxFound' | 'multipleCosmosMessages' | 'heightOrHashNotProvided' | 'priceTooVolatile' | 'unknownDenom' | 'invalidBlockHeight' | 'timestampExtrinsicNoArgumentsForBlock' | 'timestampExtrinsicNoTimestampForBlock' | 'noTimestampExtrinsicForHash' | 'timestampExtrinsicNoArgumentsForHash' | 'txMemoUndefined' | 'txMemoIncorrect' | 'txTypeNotFound' | 'txNoMessage' | 'txNotFound' | 'txReceiptNotFound' | 'txParsingError' | 'txLogsParsingError' | 'txFailed' | 'jobDataParsingError' | 'blockNotFound' | 'balanceNotFound' | 'blockbookCallFailed' | 'configError' | 'synthSwapDisallowed' | 'noQuoteResponse' | 'noPoolAssetsFound' | 'noThorchainPools' | 'noMayachainPools' | 'noThorchainNetworkInfo' | 'invalidAffiliateFee' | 'invalidBuyAssetAddress' | 'invalidSellAssetAddress' | 'invalidSourceAddress' | 'invalidDestinationAddress' | 'invalidParam' | 'xrpAddressRequiresTag' | 'invalidChainId' | 'invalidChain' | 'unsupportedChainId' | 'unsupportedEVMChainId' | 'unsupportedMethod' | 'unsupportedProvider' | 'unsupportedProgram' | 'unsupportedEvent' | 'invalidParamsForMethod' | 'noWhitelistTokens' | 'failedFetchGasPrice' | 'chainflipBrokerApiUnavailable' | 'failedToBuildVaultSwapTransaction' | 'failedToOpenBtcPrivateChannel' | 'failedToCloseBtcPrivateChannel' | 'affiliateNotRegistered' | 'failedToCreateDepositChannel' | 'failedToRegisterAccount' | 'failedToRegisterAffiliate' | 'failedToWithdrawAffiliate' | 'noProviderDetailsFound' | 'noTokenListsFound' | 'tokenNotFound' | 'tokenPriceNotFound' | 'tokenPriceFailedToUpdate' | 'legsArrayIsEmpty' | 'failedToFetchQuoteForLeg' | 'noBlockHeaderFound' | 'failedToSimulateSwap' | 'swapHalted' | 'addressScreeningFailed' | 'missingScreeningConfig' | 'noLiquidtyProvidersFound' | 'insufficientLiquidity' | 'noSaversFound' | 'noInbounDataFound' | 'noInboundAddressesFound' | 'noTargetAddress' | 'noInboundAddressFoundForChain' | 'noLastBlocksFound' | 'noVersionFound' | 'noConstantsFound' | 'noMimirsFound' | 'noRoutesFound' | 'quoteNotFound' | 'ledgerWrongPayload' | 'failedToFetchTx' | 'failedBuildTransactionDetails' | 'txBuildingTimeout' | 'noLegsForRoute' | 'insufficientBalance' | 'insufficientAllowance' | 'unableToBuildTransaction' | 'noRouterAddressFound' | 'noAggregatorAddressFound' | 'noContractInstanceFound' | 'noContractAddressFound' | 'invalidAffiliate' | 'invalidAffiliateName' | 'thornameNotFound' | 'thornameAffiliate' | 'No provider found' | 'No Record found' | 'Slippage too low' | 'tradingHalted' | 'mayanameNotFound' | 'noWrappedGasAsset' | 'aggregatorAddressNotFound' | 'routerAddressNotFound' | 'dummyAddressNotFound' | 'trackerError' | 'thorchainPoolUnavailable' | 'noTradingPairs' | 'missingState' | 'ledgerSwapNotFound' | 'ledgerSwapNotReadyForTracking' | 'ledgerInvalidParsingMode' | 'errorEstimatingGas' | 'apiKeyInvalid' | 'apiKeyFailedToUpdate' | 'apiKeySignatureExists' | 'apiKeyExpired' | 'unauthorized' | 'failedToCreateMemo' | 'radixIncorrectInstructions' | 'radixTxMissedParam' | 'radixTxMissedAccount' | 'radixManifestParseError' | 'radixManifestBuildError' | 'invalidAddressForChain' | 'riskyAddress' | 'noRoutesToProcess' | 'sellAssetAmountTooSmall' | 'sellAssetAmountTooLarge' | 'missingPrivateKey' | 'noMemoPriceProtection' | 'nodeMethodNotFound' | 'nodeRpcNotFound' | 'thirdPartyProviderNotFound' | 'quoteUnavailable' | 'targetInstructionNotFound' | 'referrerExist' | 'referrerNotFound' | 'invalidReferrer' | 'quoteLogicError' | 'missingDecimal' | 'noGasInfoInDB' | 'quoteError' | 'valueOverflow' | 'missingChainflipMeta' | 'contractAndMethodRequired' | 'tokenImageError' | 'fileNotFound' | 'fileFormatError' | 'ipError' | 'failedToSaveLedgerSwap' | 'missingValue' | 'missingDBQueryParam' | 'unableEstimateTxTime' | 'affiliateStatsMissingDate' | 'affiliateStatsMissingNextFilter' | 'affiliateStatsNoActions' | 'unsupportedNotificationEvent' | 'unsupportedNotificationChannel' | 'invalidWebhookUrl' | 'webhookDeliveryFailed' | 'serverStateNotFound' | 'apiRequestFailed' | 'apiRateLimit' | 'invalidActionStep' | 'providerIsRequired' | 'rateLimitExceeded' | 'depositChannelNotFound' | 'snowflakeFailedToFetchSwaps' | 'auditLogInsertFailed' | 'affiliateNameHistoryInsertFailed' | 'invalidRouteId' | 'invalidQuoteId' | 'invalidRoute' | 'quoteExpired' | 'swapQuoteNotFound' | 'swapRouteNotFound' | 'swapTransactionFailed' | 'swapChainflipMetaMissing' | 'swapChainflipChannelFailed' | 'swapTransferTxFailed' | 'chainflipVaultSwapNotSupported' | 'chainflipVaultSwapEncodingFailed' | 'chainflipVaultSwapInvalidChain' | 'chainflipVaultSwapBitcoinCCMNotSupported' | 'chainflipVaultSwapTransactionBuildFailed' | 'zcashInvalidAddress' | 'zcashInsufficientUTXOs' | 'zcashUTXOSelectionFailed' | 'zcashTransactionBuildFailed' | 'invalidTokenProgram' | 'invalidRequest' | 'pubsubEventNotRegistered' | 'pubsubTopicNotFound' | 'invalidSpender' | 'outputAmountDeviationTooHigh' | 'externalServiceFailed' | 'invalidTxHashFormat';
|
|
1732
|
+
message?: string;
|
|
1733
|
+
}>;
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1736
|
+
type PostV3QuoteResponse = PostV3QuoteResponses[keyof PostV3QuoteResponses];
|
|
1737
|
+
type PostV3SwapData = {
|
|
1738
|
+
body: {
|
|
1739
|
+
/**
|
|
1740
|
+
* The ID of the route to swap
|
|
1741
|
+
*/
|
|
1742
|
+
routeId: string;
|
|
1743
|
+
/**
|
|
1744
|
+
* Address to send asset from
|
|
1745
|
+
*/
|
|
1746
|
+
sourceAddress: string;
|
|
1747
|
+
/**
|
|
1748
|
+
* Recipient address to send asset to
|
|
1749
|
+
*/
|
|
1750
|
+
destinationAddress: string;
|
|
1751
|
+
/**
|
|
1752
|
+
* Whether to disable balance check
|
|
1753
|
+
*/
|
|
1754
|
+
disableBalanceCheck?: boolean;
|
|
1755
|
+
/**
|
|
1756
|
+
* Whether to disable estimate gas
|
|
1757
|
+
*/
|
|
1758
|
+
disableEstimate?: boolean;
|
|
1759
|
+
/**
|
|
1760
|
+
* Whether to allow smart contract sender
|
|
1761
|
+
*/
|
|
1762
|
+
allowSmartContractSender?: boolean;
|
|
1763
|
+
/**
|
|
1764
|
+
* Whether to allow smart contract receiver
|
|
1765
|
+
*/
|
|
1766
|
+
allowSmartContractReceiver?: boolean;
|
|
1767
|
+
/**
|
|
1768
|
+
* Whether to disable security checks
|
|
1769
|
+
*/
|
|
1770
|
+
disableSecurityChecks?: boolean;
|
|
1771
|
+
/**
|
|
1772
|
+
* Whether to override slippage validation on quote refresh
|
|
1773
|
+
*/
|
|
1774
|
+
overrideSlippage?: boolean;
|
|
1775
|
+
/**
|
|
1776
|
+
* Set to true to skip building a transaction. Used when you build a custom transaction from our response.
|
|
1777
|
+
*/
|
|
1778
|
+
disableBuildTx?: boolean;
|
|
1779
|
+
};
|
|
1780
|
+
path?: never;
|
|
1781
|
+
query?: never;
|
|
1782
|
+
url: '/v3/swap';
|
|
1783
|
+
};
|
|
1784
|
+
type PostV3SwapErrors = {
|
|
1785
|
+
/**
|
|
1786
|
+
* Default Response
|
|
1787
|
+
*/
|
|
1788
|
+
400: {
|
|
1789
|
+
message: string;
|
|
1790
|
+
error: string;
|
|
1791
|
+
data?: unknown;
|
|
1792
|
+
};
|
|
1793
|
+
/**
|
|
1794
|
+
* Default Response
|
|
1795
|
+
*/
|
|
1796
|
+
404: {
|
|
1797
|
+
message: string;
|
|
1798
|
+
error: string;
|
|
1799
|
+
data?: unknown;
|
|
1800
|
+
};
|
|
1801
|
+
/**
|
|
1802
|
+
* Default Response
|
|
1803
|
+
*/
|
|
1804
|
+
500: {
|
|
1805
|
+
message: string;
|
|
1806
|
+
error: string;
|
|
1807
|
+
data?: unknown;
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
type PostV3SwapError = PostV3SwapErrors[keyof PostV3SwapErrors];
|
|
1811
|
+
type PostV3SwapResponses = {
|
|
1812
|
+
/**
|
|
1813
|
+
* Default Response
|
|
1814
|
+
*/
|
|
1815
|
+
200: {
|
|
1816
|
+
/**
|
|
1817
|
+
* Asset to sell
|
|
1818
|
+
*/
|
|
1819
|
+
sellAsset: string;
|
|
1820
|
+
/**
|
|
1821
|
+
* Sell amount
|
|
1822
|
+
*/
|
|
1823
|
+
sellAmount: string;
|
|
1824
|
+
/**
|
|
1825
|
+
* Asset to buy
|
|
1826
|
+
*/
|
|
1827
|
+
buyAsset: string;
|
|
1828
|
+
/**
|
|
1829
|
+
* Buy amount
|
|
1830
|
+
*/
|
|
1831
|
+
buyAmount?: string;
|
|
1832
|
+
/**
|
|
1833
|
+
* Buy amount max slippage
|
|
1834
|
+
*/
|
|
1835
|
+
buyAmountMaxSlippage?: string;
|
|
1836
|
+
/**
|
|
1837
|
+
* Expected Buy amount
|
|
1838
|
+
*/
|
|
1839
|
+
expectedBuyAmount?: string;
|
|
1840
|
+
/**
|
|
1841
|
+
* Expected Buy amount max slippage
|
|
1842
|
+
*/
|
|
1843
|
+
expectedBuyAmountMaxSlippage?: string;
|
|
1844
|
+
fees: Array<{
|
|
1845
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
1846
|
+
amount: string;
|
|
1847
|
+
asset: string;
|
|
1848
|
+
chain: string;
|
|
1849
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1850
|
+
}>;
|
|
1851
|
+
/**
|
|
1852
|
+
* Route ID
|
|
1853
|
+
*/
|
|
1854
|
+
routeId: string;
|
|
1855
|
+
providers: Array<'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3'>;
|
|
1856
|
+
/**
|
|
1857
|
+
* Expiration
|
|
1858
|
+
*/
|
|
1859
|
+
expiration?: string;
|
|
1860
|
+
estimatedTime?: {
|
|
1861
|
+
/**
|
|
1862
|
+
* Time to receive inbound asset in seconds
|
|
1863
|
+
*/
|
|
1864
|
+
inbound?: number;
|
|
1865
|
+
/**
|
|
1866
|
+
* Time to swap assets in seconds
|
|
1867
|
+
*/
|
|
1868
|
+
swap?: number;
|
|
1869
|
+
/**
|
|
1870
|
+
* Time to receive outbound asset in seconds
|
|
1871
|
+
*/
|
|
1872
|
+
outbound?: number;
|
|
1873
|
+
/**
|
|
1874
|
+
* Total time in seconds
|
|
1875
|
+
*/
|
|
1876
|
+
total: number;
|
|
1877
|
+
};
|
|
1878
|
+
/**
|
|
1879
|
+
* Total slippage in bps
|
|
1880
|
+
*/
|
|
1881
|
+
totalSlippageBps: number;
|
|
1882
|
+
legs: Array<{
|
|
1883
|
+
provider: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1884
|
+
/**
|
|
1885
|
+
* Asset to sell
|
|
1886
|
+
*/
|
|
1887
|
+
sellAsset: string;
|
|
1888
|
+
/**
|
|
1889
|
+
* Sell amount
|
|
1890
|
+
*/
|
|
1891
|
+
sellAmount: string;
|
|
1892
|
+
/**
|
|
1893
|
+
* Asset to buy
|
|
1894
|
+
*/
|
|
1895
|
+
buyAsset: string;
|
|
1896
|
+
/**
|
|
1897
|
+
* Buy amount
|
|
1898
|
+
*/
|
|
1899
|
+
buyAmount?: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* Buy amount max slippage
|
|
1902
|
+
*/
|
|
1903
|
+
buyAmountMaxSlippage?: string;
|
|
1904
|
+
/**
|
|
1905
|
+
* Expected Buy amount
|
|
1906
|
+
*/
|
|
1907
|
+
expectedBuyAmount?: string;
|
|
1908
|
+
/**
|
|
1909
|
+
* Expected Buy amount max slippage
|
|
1910
|
+
*/
|
|
1911
|
+
expectedBuyAmountMaxSlippage?: string;
|
|
1912
|
+
fees: Array<{
|
|
1913
|
+
type: 'liquidity' | 'network' | 'inbound' | 'outbound' | 'affiliate' | 'service' | 'tax' | 'priority';
|
|
1914
|
+
amount: string;
|
|
1915
|
+
asset: string;
|
|
1916
|
+
chain: string;
|
|
1917
|
+
protocol: 'CHAINFLIP' | 'CHAINFLIP_STREAMING' | 'MAYACHAIN' | 'MAYACHAIN_STREAMING' | 'ONEINCH' | 'PANCAKESWAP' | 'SUSHISWAP_V2' | 'THORCHAIN' | 'THORCHAIN_STREAMING' | 'TRADERJOE_V2' | 'UNISWAP_V2' | 'UNISWAP_V3' | 'JUPITER' | 'OKX' | 'NEAR' | 'GARDEN' | 'HARBOR' | 'PANGOLIN_V1' | 'CAVIAR_V1' | 'OPENOCEAN_V2' | 'OCISWAP_V1' | 'CAMELOT_V3';
|
|
1918
|
+
}>;
|
|
1919
|
+
}>;
|
|
1920
|
+
warnings: Array<{
|
|
1921
|
+
code: 'highSlippage' | 'highPriceImpact' | 'noSourceAddressToBuildTransaction' | 'affiliateFeeTooSmallSoRemoved' | 'unableToApplyReferralProgram' | 'insufficientBalance' | 'unableToBuildTransaction' | 'unableToEstimateGas';
|
|
1922
|
+
display: string;
|
|
1923
|
+
tooltip?: string;
|
|
1924
|
+
}>;
|
|
1925
|
+
/**
|
|
1926
|
+
* Source address
|
|
1927
|
+
*/
|
|
1928
|
+
sourceAddress: string;
|
|
1929
|
+
/**
|
|
1930
|
+
* Destination address
|
|
1931
|
+
*/
|
|
1932
|
+
destinationAddress: string;
|
|
1933
|
+
/**
|
|
1934
|
+
* Target address
|
|
1935
|
+
*/
|
|
1936
|
+
targetAddress?: string;
|
|
1937
|
+
/**
|
|
1938
|
+
* Inbound address
|
|
1939
|
+
*/
|
|
1940
|
+
inboundAddress?: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* Memo to include in the transaction
|
|
1943
|
+
*/
|
|
1944
|
+
memo?: string;
|
|
1945
|
+
txType?: 'PSBT' | 'EVM' | 'COSMOS' | 'RADIX' | 'SOLANA' | 'RIPPLE' | 'TRON' | 'NEAR' | 'SUI' | 'CARDANO' | 'TON' | 'STARKNET' | 'zcash-unsigned';
|
|
1946
|
+
tx?: {
|
|
1947
|
+
/**
|
|
1948
|
+
* Address of the recipient
|
|
1949
|
+
*/
|
|
1950
|
+
to: string;
|
|
1951
|
+
/**
|
|
1952
|
+
* Address of the sender
|
|
1953
|
+
*/
|
|
1954
|
+
from?: string;
|
|
1955
|
+
/**
|
|
1956
|
+
* Gas limit
|
|
1957
|
+
*/
|
|
1958
|
+
gas?: string;
|
|
1959
|
+
/**
|
|
1960
|
+
* Gas price
|
|
1961
|
+
*/
|
|
1962
|
+
gasPrice?: string;
|
|
1963
|
+
/**
|
|
1964
|
+
* Value to send
|
|
1965
|
+
*/
|
|
1966
|
+
value: string;
|
|
1967
|
+
/**
|
|
1968
|
+
* Data to send
|
|
1969
|
+
*/
|
|
1970
|
+
data: string;
|
|
1971
|
+
} | {
|
|
1972
|
+
memo: string;
|
|
1973
|
+
accountNumber: number;
|
|
1974
|
+
sequence: number;
|
|
1975
|
+
chainId: '42161' | '1313161554' | '43114' | '8453' | '80094' | '56' | 'bitcoin' | 'bitcoincash' | '3637' | 'cardano' | 'chainflip' | '1116' | '21000000' | 'cosmoshub-4' | '25' | 'dash' | 'dogecoin' | '1' | '100' | 'harbor-1' | 'harbor-stagenet-1' | '2868' | 'kaiyo-1' | 'litecoin' | 'mayachain-mainnet-v1' | 'mayachain-stagenet-v1' | '4326' | '143' | 'near' | 'noble-1' | '10' | 'polkadot' | '137' | 'radix-mainnet' | 'ripple' | 'solana' | '146' | '0x534e5f4d41494e' | 'sui' | 'thorchain-1' | 'thorchain-stagenet-v2' | 'ton' | '728126428' | '130' | '196' | 'zcash';
|
|
1976
|
+
msgs: Array<{
|
|
1977
|
+
type: string;
|
|
1978
|
+
value: unknown;
|
|
1979
|
+
} | {
|
|
1980
|
+
typeUrl: string;
|
|
1981
|
+
value: unknown;
|
|
1982
|
+
}>;
|
|
1983
|
+
fee: {
|
|
1984
|
+
amount: Array<{
|
|
1985
|
+
denom: string;
|
|
1986
|
+
amount: string;
|
|
1987
|
+
}>;
|
|
1988
|
+
gas: string;
|
|
1989
|
+
};
|
|
1990
|
+
} | {
|
|
1991
|
+
visible: boolean;
|
|
1992
|
+
txID: string;
|
|
1993
|
+
raw_data: {
|
|
1994
|
+
contract: unknown;
|
|
1995
|
+
ref_block_bytes: string;
|
|
1996
|
+
ref_block_hash: string;
|
|
1997
|
+
expiration: number;
|
|
1998
|
+
fee_limit?: number;
|
|
1999
|
+
timestamp: number;
|
|
2000
|
+
data?: unknown;
|
|
2001
|
+
};
|
|
2002
|
+
raw_data_hex: string;
|
|
2003
|
+
} | Array<{
|
|
2004
|
+
contractAddress: string;
|
|
2005
|
+
entrypoint: string;
|
|
2006
|
+
calldata: Array<string>;
|
|
2007
|
+
}> | string;
|
|
2008
|
+
meta: {
|
|
2009
|
+
assets?: Array<{
|
|
2010
|
+
/**
|
|
2011
|
+
* Asset name
|
|
2012
|
+
*/
|
|
2013
|
+
asset: string;
|
|
2014
|
+
/**
|
|
2015
|
+
* Price in USD
|
|
2016
|
+
*/
|
|
2017
|
+
price: number;
|
|
2018
|
+
/**
|
|
2019
|
+
* Asset image
|
|
2020
|
+
*/
|
|
2021
|
+
image: string;
|
|
2022
|
+
}>;
|
|
2023
|
+
tags: Array<'CHEAPEST' | 'FASTEST' | 'RECOMMENDED'>;
|
|
2024
|
+
streamingInterval?: number;
|
|
2025
|
+
maxStreamingQuantity?: number;
|
|
2026
|
+
referrer?: string;
|
|
2027
|
+
/**
|
|
2028
|
+
* Price impact
|
|
2029
|
+
*/
|
|
2030
|
+
priceImpact?: number;
|
|
2031
|
+
/**
|
|
2032
|
+
* Approval address for swap
|
|
2033
|
+
*/
|
|
2034
|
+
approvalAddress?: string;
|
|
2035
|
+
affiliate?: string;
|
|
2036
|
+
affiliateFee?: string;
|
|
2037
|
+
txType?: 'PSBT' | 'EVM' | 'COSMOS' | 'RADIX' | 'SOLANA' | 'RIPPLE' | 'TRON' | 'NEAR' | 'SUI' | 'CARDANO' | 'TON' | 'STARKNET' | 'zcash-unsigned';
|
|
2038
|
+
chainflip?: {
|
|
2039
|
+
destinationAddress: string;
|
|
2040
|
+
sellAsset: {
|
|
2041
|
+
chain: string;
|
|
2042
|
+
asset: string;
|
|
2043
|
+
};
|
|
2044
|
+
buyAsset: {
|
|
2045
|
+
chain: string;
|
|
2046
|
+
asset: string;
|
|
2047
|
+
};
|
|
2048
|
+
channelMetadata?: {
|
|
2049
|
+
ccmAdditionalData?: string;
|
|
2050
|
+
gasBudget?: string;
|
|
2051
|
+
message?: string;
|
|
2052
|
+
cfParameters?: string;
|
|
2053
|
+
};
|
|
2054
|
+
affiliateFees?: Array<{
|
|
2055
|
+
brokerAddress: string;
|
|
2056
|
+
feeBps: number;
|
|
2057
|
+
}>;
|
|
2058
|
+
refundParameters?: {
|
|
2059
|
+
minPrice?: string;
|
|
2060
|
+
refundAddress?: string;
|
|
2061
|
+
retryDuration?: number;
|
|
2062
|
+
};
|
|
2063
|
+
dcaParameters?: {
|
|
2064
|
+
chunkInterval?: number;
|
|
2065
|
+
numberOfChunks?: number;
|
|
2066
|
+
};
|
|
2067
|
+
brokerCommissionBps?: number;
|
|
2068
|
+
maxBoostFeeBps?: number;
|
|
2069
|
+
};
|
|
2070
|
+
near?: {
|
|
2071
|
+
destinationAddress: string;
|
|
2072
|
+
sellAsset: string;
|
|
2073
|
+
buyAsset: string;
|
|
2074
|
+
sourceAddress: string;
|
|
2075
|
+
sellAmount: string;
|
|
2076
|
+
affiliateFees?: {
|
|
2077
|
+
nearId: string;
|
|
2078
|
+
feeBps: number;
|
|
2079
|
+
};
|
|
2080
|
+
slippage: number;
|
|
2081
|
+
};
|
|
2082
|
+
garden?: {
|
|
2083
|
+
destinationAddress: string;
|
|
2084
|
+
sellAsset: string;
|
|
2085
|
+
buyAsset: string;
|
|
2086
|
+
buyAmount: string;
|
|
2087
|
+
sellAmount: string;
|
|
2088
|
+
sourceAddress: string;
|
|
2089
|
+
affiliateFees?: {
|
|
2090
|
+
address: string;
|
|
2091
|
+
asset: string;
|
|
2092
|
+
fee: number;
|
|
2093
|
+
};
|
|
2094
|
+
slippage: number;
|
|
2095
|
+
};
|
|
2096
|
+
isFastQuote?: boolean;
|
|
2097
|
+
/**
|
|
2098
|
+
* Indicates if the quote was refreshed
|
|
2099
|
+
*/
|
|
2100
|
+
isRefreshed?: boolean;
|
|
2101
|
+
};
|
|
2102
|
+
/**
|
|
2103
|
+
* The unique swap ID for tracking
|
|
2104
|
+
*/
|
|
2105
|
+
swapId: string;
|
|
2106
|
+
/**
|
|
2107
|
+
* Optional approval transaction if ERC-20 approval is required before swap
|
|
2108
|
+
*/
|
|
2109
|
+
approvalTx?: {
|
|
2110
|
+
/**
|
|
2111
|
+
* Token contract address
|
|
2112
|
+
*/
|
|
2113
|
+
to: string;
|
|
2114
|
+
/**
|
|
2115
|
+
* User wallet address
|
|
2116
|
+
*/
|
|
2117
|
+
from: string;
|
|
2118
|
+
/**
|
|
2119
|
+
* ETH value (always '0' for approvals)
|
|
2120
|
+
*/
|
|
2121
|
+
value: string;
|
|
2122
|
+
/**
|
|
2123
|
+
* Encoded approval call data
|
|
2124
|
+
*/
|
|
2125
|
+
data: string;
|
|
2126
|
+
/**
|
|
2127
|
+
* Estimated gas limit
|
|
2128
|
+
*/
|
|
2129
|
+
gasLimit?: string;
|
|
2130
|
+
/**
|
|
2131
|
+
* Current gas price
|
|
2132
|
+
*/
|
|
2133
|
+
gasPrice?: string;
|
|
2134
|
+
};
|
|
2135
|
+
};
|
|
2136
|
+
};
|
|
2137
|
+
type PostV3SwapResponse = PostV3SwapResponses[keyof PostV3SwapResponses];
|
|
2138
|
+
|
|
2139
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
2140
|
+
/**
|
|
2141
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
2142
|
+
* individual options. This might be also useful if you want to implement a
|
|
2143
|
+
* custom client.
|
|
2144
|
+
*/
|
|
2145
|
+
client?: Client;
|
|
2146
|
+
/**
|
|
2147
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
2148
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
2149
|
+
*/
|
|
2150
|
+
meta?: Record<string, unknown>;
|
|
2151
|
+
};
|
|
2152
|
+
declare const getProviders: <ThrowOnError extends boolean = false>(options?: Options<GetProvidersData, ThrowOnError>) => RequestResult<GetProvidersResponses, GetProvidersErrors, ThrowOnError, "fields">;
|
|
2153
|
+
declare const getTokens: <ThrowOnError extends boolean = false>(options?: Options<GetTokensData, ThrowOnError>) => RequestResult<GetTokensResponses, GetTokensErrors, ThrowOnError, "fields">;
|
|
2154
|
+
declare const getSwapTo: <ThrowOnError extends boolean = false>(options: Options<GetSwapToData, ThrowOnError>) => RequestResult<GetSwapToResponses, GetSwapToErrors, ThrowOnError, "fields">;
|
|
2155
|
+
declare const getSwapFrom: <ThrowOnError extends boolean = false>(options: Options<GetSwapFromData, ThrowOnError>) => RequestResult<GetSwapFromResponses, GetSwapFromErrors, ThrowOnError, "fields">;
|
|
2156
|
+
declare const postChainflipBrokerChannel: <ThrowOnError extends boolean = false>(options: Options<PostChainflipBrokerChannelData, ThrowOnError>) => RequestResult<PostChainflipBrokerChannelResponses, unknown, ThrowOnError, "fields">;
|
|
2157
|
+
declare const postTrack: <ThrowOnError extends boolean = false>(options?: Options<PostTrackData, ThrowOnError>) => RequestResult<PostTrackResponses, unknown, ThrowOnError, "fields">;
|
|
2158
|
+
declare const postScreen: <ThrowOnError extends boolean = false>(options: Options<PostScreenData, ThrowOnError>) => RequestResult<PostScreenResponses, PostScreenErrors, ThrowOnError, "fields">;
|
|
2159
|
+
declare const getGasHistory: <ThrowOnError extends boolean = false>(options?: Options<GetGasHistoryData, ThrowOnError>) => RequestResult<GetGasHistoryResponses, unknown, ThrowOnError, "fields">;
|
|
2160
|
+
declare const getGas: <ThrowOnError extends boolean = false>(options?: Options<GetGasData, ThrowOnError>) => RequestResult<GetGasResponses, unknown, ThrowOnError, "fields">;
|
|
2161
|
+
declare const postPriceCachedPrice: <ThrowOnError extends boolean = false>(options: Options<PostPriceCachedPriceData, ThrowOnError>) => RequestResult<PostPriceCachedPriceResponses, unknown, ThrowOnError, "fields">;
|
|
2162
|
+
declare const postV3Quote: <ThrowOnError extends boolean = false>(options: Options<PostV3QuoteData, ThrowOnError>) => RequestResult<PostV3QuoteResponses, PostV3QuoteErrors, ThrowOnError, "fields">;
|
|
2163
|
+
declare const postV3Swap: <ThrowOnError extends boolean = false>(options: Options<PostV3SwapData, ThrowOnError>) => RequestResult<PostV3SwapResponses, PostV3SwapErrors, ThrowOnError, "fields">;
|
|
2164
|
+
|
|
2165
|
+
declare const client: Client;
|
|
2166
|
+
|
|
2167
|
+
interface SwapKitClientOptions {
|
|
2168
|
+
apiKey: string;
|
|
2169
|
+
baseUrl?: string;
|
|
2170
|
+
}
|
|
2171
|
+
declare function configureSwapKit(options: SwapKitClientOptions): void;
|
|
2172
|
+
|
|
2173
|
+
declare class SwapKitService {
|
|
2174
|
+
static getProviders: <ThrowOnError extends boolean = false>(options?: Options<GetProvidersData, ThrowOnError>) => RequestResult<GetProvidersResponses, GetProvidersErrors, ThrowOnError, "fields">;
|
|
2175
|
+
static getTokens: <ThrowOnError extends boolean = false>(options?: Options<GetTokensData, ThrowOnError>) => RequestResult<GetTokensResponses, GetTokensErrors, ThrowOnError, "fields">;
|
|
2176
|
+
static getSwapTo: <ThrowOnError extends boolean = false>(options: Options<GetSwapToData, ThrowOnError>) => RequestResult<GetSwapToResponses, GetSwapToErrors, ThrowOnError, "fields">;
|
|
2177
|
+
static getSwapFrom: <ThrowOnError extends boolean = false>(options: Options<GetSwapFromData, ThrowOnError>) => RequestResult<GetSwapFromResponses, GetSwapFromErrors, ThrowOnError, "fields">;
|
|
2178
|
+
static getQuote: <ThrowOnError extends boolean = false>(options: Options<PostV3QuoteData, ThrowOnError>) => RequestResult<PostV3QuoteResponses, PostV3QuoteErrors, ThrowOnError, "fields">;
|
|
2179
|
+
static getSwap: <ThrowOnError extends boolean = false>(options: Options<PostV3SwapData, ThrowOnError>) => RequestResult<PostV3SwapResponses, PostV3SwapErrors, ThrowOnError, "fields">;
|
|
2180
|
+
static trackTransaction: <ThrowOnError extends boolean = false>(options?: Options<PostTrackData, ThrowOnError>) => RequestResult<PostTrackResponses, unknown, ThrowOnError, "fields">;
|
|
2181
|
+
static screenAddress: <ThrowOnError extends boolean = false>(options: Options<PostScreenData, ThrowOnError>) => RequestResult<PostScreenResponses, PostScreenErrors, ThrowOnError, "fields">;
|
|
2182
|
+
static getGasPrices: <ThrowOnError extends boolean = false>(options?: Options<GetGasData, ThrowOnError>) => RequestResult<GetGasResponses, unknown, ThrowOnError, "fields">;
|
|
2183
|
+
static getGasHistory: <ThrowOnError extends boolean = false>(options?: Options<GetGasHistoryData, ThrowOnError>) => RequestResult<GetGasHistoryResponses, unknown, ThrowOnError, "fields">;
|
|
2184
|
+
static getCachedPrice: <ThrowOnError extends boolean = false>(options: Options<PostPriceCachedPriceData, ThrowOnError>) => RequestResult<PostPriceCachedPriceResponses, unknown, ThrowOnError, "fields">;
|
|
2185
|
+
static createBrokerChannel: <ThrowOnError extends boolean = false>(options: Options<PostChainflipBrokerChannelData, ThrowOnError>) => RequestResult<PostChainflipBrokerChannelResponses, unknown, ThrowOnError, "fields">;
|
|
2186
|
+
}
|
|
2187
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2188
|
+
declare const TokenlistService: {
|
|
2189
|
+
readonly getProviders: <ThrowOnError extends boolean = false>(options?: Options<GetProvidersData, ThrowOnError>) => RequestResult<GetProvidersResponses, GetProvidersErrors, ThrowOnError, "fields">;
|
|
2190
|
+
readonly getTokens: <ThrowOnError extends boolean = false>(options?: Options<GetTokensData, ThrowOnError>) => RequestResult<GetTokensResponses, GetTokensErrors, ThrowOnError, "fields">;
|
|
2191
|
+
readonly getSwapTo: <ThrowOnError extends boolean = false>(options: Options<GetSwapToData, ThrowOnError>) => RequestResult<GetSwapToResponses, GetSwapToErrors, ThrowOnError, "fields">;
|
|
2192
|
+
readonly getSwapFrom: <ThrowOnError extends boolean = false>(options: Options<GetSwapFromData, ThrowOnError>) => RequestResult<GetSwapFromResponses, GetSwapFromErrors, ThrowOnError, "fields">;
|
|
2193
|
+
};
|
|
2194
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2195
|
+
declare const QuoteService: {
|
|
2196
|
+
readonly getQuote: <ThrowOnError extends boolean = false>(options: Options<PostV3QuoteData, ThrowOnError>) => RequestResult<PostV3QuoteResponses, PostV3QuoteErrors, ThrowOnError, "fields">;
|
|
2197
|
+
};
|
|
2198
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2199
|
+
declare const SwapService: {
|
|
2200
|
+
readonly getSwap: <ThrowOnError extends boolean = false>(options: Options<PostV3SwapData, ThrowOnError>) => RequestResult<PostV3SwapResponses, PostV3SwapErrors, ThrowOnError, "fields">;
|
|
2201
|
+
};
|
|
2202
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2203
|
+
declare const TrackService: {
|
|
2204
|
+
readonly trackTransaction: <ThrowOnError extends boolean = false>(options?: Options<PostTrackData, ThrowOnError>) => RequestResult<PostTrackResponses, unknown, ThrowOnError, "fields">;
|
|
2205
|
+
};
|
|
2206
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2207
|
+
declare const ScreenService: {
|
|
2208
|
+
readonly screenAddress: <ThrowOnError extends boolean = false>(options: Options<PostScreenData, ThrowOnError>) => RequestResult<PostScreenResponses, PostScreenErrors, ThrowOnError, "fields">;
|
|
2209
|
+
};
|
|
2210
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2211
|
+
declare const GasService: {
|
|
2212
|
+
readonly getGasPrices: <ThrowOnError extends boolean = false>(options?: Options<GetGasData, ThrowOnError>) => RequestResult<GetGasResponses, unknown, ThrowOnError, "fields">;
|
|
2213
|
+
readonly getGasHistory: <ThrowOnError extends boolean = false>(options?: Options<GetGasHistoryData, ThrowOnError>) => RequestResult<GetGasHistoryResponses, unknown, ThrowOnError, "fields">;
|
|
2214
|
+
};
|
|
2215
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2216
|
+
declare const PriceService: {
|
|
2217
|
+
readonly getCachedPrice: <ThrowOnError extends boolean = false>(options: Options<PostPriceCachedPriceData, ThrowOnError>) => RequestResult<PostPriceCachedPriceResponses, unknown, ThrowOnError, "fields">;
|
|
2218
|
+
};
|
|
2219
|
+
/** @deprecated Use `SwapKitService` instead */
|
|
2220
|
+
declare const ChainflipService: {
|
|
2221
|
+
readonly createBrokerChannel: <ThrowOnError extends boolean = false>(options: Options<PostChainflipBrokerChannelData, ThrowOnError>) => RequestResult<PostChainflipBrokerChannelResponses, unknown, ThrowOnError, "fields">;
|
|
2222
|
+
};
|
|
2223
|
+
|
|
2224
|
+
export { ChainflipService, type ClientOptions, GasService, type GetGasData, type GetGasHistoryData, type GetGasHistoryResponse, type GetGasHistoryResponses, type GetGasResponse, type GetGasResponses, type GetProvidersData, type GetProvidersError, type GetProvidersErrors, type GetProvidersResponse, type GetProvidersResponses, type GetSwapFromData, type GetSwapFromError, type GetSwapFromErrors, type GetSwapFromResponse, type GetSwapFromResponses, type GetSwapToData, type GetSwapToError, type GetSwapToErrors, type GetSwapToResponse, type GetSwapToResponses, type GetTokensData, type GetTokensError, type GetTokensErrors, type GetTokensResponse, type GetTokensResponses, type Options, type PostChainflipBrokerChannelData, type PostChainflipBrokerChannelResponse, type PostChainflipBrokerChannelResponses, type PostPriceCachedPriceData, type PostPriceCachedPriceResponse, type PostPriceCachedPriceResponses, type PostScreenData, type PostScreenError, type PostScreenErrors, type PostScreenResponse, type PostScreenResponses, type PostTrackData, type PostTrackResponse, type PostTrackResponses, type PostV3QuoteData, type PostV3QuoteError, type PostV3QuoteErrors, type PostV3QuoteResponse, type PostV3QuoteResponses, type PostV3SwapData, type PostV3SwapError, type PostV3SwapErrors, type PostV3SwapResponse, type PostV3SwapResponses, PriceService, QuoteService, ScreenService, type SwapKitClientOptions, SwapKitService, SwapService, TokenlistService, TrackService, client, configureSwapKit, getGas, getGasHistory, getProviders, getSwapFrom, getSwapTo, getTokens, postChainflipBrokerChannel, postPriceCachedPrice, postScreen, postTrack, postV3Quote, postV3Swap };
|