@velora-dex/sdk 9.3.5-dev.1 → 9.3.5-dev.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velora-dex/sdk",
3
- "version": "9.3.5-dev.1",
3
+ "version": "9.3.5-dev.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/sdk.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -34,8 +34,6 @@ export type DeltaPriceParams = {
34
34
  destChainId?: number;
35
35
  /** @description SELL or BUY, default is SELL */
36
36
  side?: SwapSideUnion;
37
- /** @description In %. It's a way to bypass the API price impact check (default = 15%) */
38
- maxImpact?: number;
39
37
 
40
38
  includeAgents?: string[];
41
39
  excludeAgents?: string[];
@@ -44,7 +42,6 @@ export type DeltaPriceParams = {
44
42
 
45
43
  /** @description Allow swap on destChain after bridge. Default is true. */
46
44
  allowBridgeAndSwap?: boolean;
47
- degenMode?: boolean;
48
45
  };
49
46
 
50
47
  type DeltaPriceQueryOptions = Omit<
@@ -62,7 +62,8 @@ export type DeltaAuctionStatus =
62
62
  | 'EXPIRED'
63
63
  | 'CANCELLED'
64
64
  | 'CANCELLING'
65
- | 'SUSPENDED';
65
+ | 'SUSPENDED'
66
+ | 'REFUNDED';
66
67
 
67
68
  type DeltaAuctionTransaction = {
68
69
  id: string;
@@ -60,7 +60,6 @@ export type SubmitDeltaOrderParams = BuildDeltaOrderDataParams & {
60
60
  partiallyFillable?: boolean;
61
61
  /** @description Referrer address */
62
62
  referrerAddress?: string;
63
- degenMode?: boolean;
64
63
  } & Pick<DeltaOrderToPost, 'type' | 'includeAgents' | 'excludeAgents'>;
65
64
 
66
65
  type SubmitDeltaOrder = (
@@ -92,7 +91,6 @@ export const constructSubmitDeltaOrder = (
92
91
  type: orderParams.type,
93
92
  includeAgents: orderParams.includeAgents,
94
93
  excludeAgents: orderParams.excludeAgents,
95
- degenMode: orderParams.degenMode,
96
94
  });
97
95
 
98
96
  return response;
@@ -1,5 +1,4 @@
1
1
  import { API_URL } from '../../constants';
2
- import { constructSearchString } from '../../helpers/misc';
3
2
  import type { ConstructFetchInput, RequestParameters } from '../../types';
4
3
  import { DeltaAuctionOrder, DeltaAuction } from './helpers/types';
5
4
 
@@ -22,9 +21,7 @@ export type DeltaOrderToPost = {
22
21
  excludeAgents?: string[];
23
22
  };
24
23
 
25
- export type PostDeltaOrderParams = Omit<DeltaOrderToPost, 'chainId'> & {
26
- degenMode?: boolean;
27
- };
24
+ export type PostDeltaOrderParams = Omit<DeltaOrderToPost, 'chainId'>;
28
25
 
29
26
  export type DeltaOrderApiResponse = Omit<DeltaAuction, 'transactions'> & {
30
27
  orderVersion: string; // "2.0.0"
@@ -48,17 +45,11 @@ export const constructPostDeltaOrder = ({
48
45
  }: ConstructFetchInput): PostDeltaOrderFunctions => {
49
46
  const postOrderUrl = `${apiURL}/delta/orders` as const;
50
47
 
51
- const postDeltaOrder: PostDeltaOrder = (_postData, requestParams) => {
52
- const { degenMode, ...postData } = _postData;
48
+ const postDeltaOrder: PostDeltaOrder = (postData, requestParams) => {
53
49
  const deltaOrderToPost: DeltaOrderToPost = { ...postData, chainId };
54
50
 
55
- const search = constructSearchString<{ degenMode?: boolean }>({
56
- degenMode,
57
- });
58
- const fetchURL = `${postOrderUrl}/${search}` as const;
59
-
60
51
  return fetcher<DeltaOrderApiResponse>({
61
- url: fetchURL,
52
+ url: postOrderUrl,
62
53
  method: 'POST',
63
54
  data: deltaOrderToPost,
64
55
  requestParams,
@@ -139,7 +139,6 @@ type RateQueryParams = {
139
139
  * @description Exclude all RFQs from pricing, e.g.: AugustusRFQ, Hashflow. Default: false
140
140
  */
141
141
  excludeRFQ?: boolean;
142
- degenMode?: boolean;
143
142
  };
144
143
 
145
144
  // more details in the docs https://developers.velora.xyz/api/velora-api/velora-market-api/get-rate-for-a-token-pair#query-parameters
@@ -170,7 +169,6 @@ export type RateOptions = {
170
169
  srcTokenDexTransferFee?: string;
171
170
  /** @description Some tokens only charge tax when swapped in/out DEXs and not on ordinary transfers. */
172
171
  destTokenDexTransferFee?: string;
173
- degenMode?: boolean;
174
172
  };
175
173
 
176
174
  type CommonGetRateInput = {
@@ -168,7 +168,6 @@ export type BuildOptionsBase = {
168
168
  ignoreAllowance?: boolean;
169
169
  /** @description Allows the API to return the contract parameters only. */
170
170
  onlyParams?: boolean;
171
- degenMode?: boolean;
172
171
  };
173
172
 
174
173
  export type BuildOptionsWithGasPrice = BuildOptionsBase & Partial<WithGasPrice>;