@velora-dex/sdk 9.3.2-dev.1 → 9.3.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.2-dev.1",
3
+ "version": "9.3.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/sdk.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -45,9 +45,9 @@ export const constructFetcher =
45
45
  const response = await fetch(url, {
46
46
  method,
47
47
  body,
48
+ keepalive: extra?.keepalive,
48
49
  ...requestParams,
49
50
  headers,
50
- keepalive: extra?.keepalive,
51
51
  });
52
52
 
53
53
  const data = await response.json();
@@ -29,6 +29,8 @@ export type DeltaPriceParams = {
29
29
  beneficiary?: string; // beneficiary==owner if no transferTo
30
30
  /** @description Partner string. */
31
31
  partner?: string;
32
+ /** @description Used together with `partner` if provided. Represented in basis points, 50bps=0.5% */
33
+ partnerFeeBps?: number;
32
34
  /** @description Destination Chain ID for Crosschain Orders */
33
35
  destChainId?: number;
34
36
  /** @description SELL or BUY, default is SELL */
@@ -29,6 +29,8 @@ export type QuoteParams<M extends TradeMode = TradeMode> = {
29
29
  userAddress?: string;
30
30
  /** @description Partner string */
31
31
  partner?: string;
32
+ /** @description Used together with `partner` if provided. Represented in basis points, 50bps=0.5% */
33
+ partnerFeeBps?: number;
32
34
  /** @description Maximum price impact (in percentage) acceptable for the trade */
33
35
  maxImpact?: number;
34
36
  /** @description Maximum price impact (in USD) acceptable for the trade */
@@ -149,6 +149,8 @@ export type RateOptions = {
149
149
  excludeContractMethods?: ContractMethodByName[];
150
150
  includeContractMethods?: ContractMethodByName[];
151
151
  partner?: string;
152
+ /** @description Used together with `partner` if provided. Represented in basis points, 50bps=0.5% */
153
+ partnerFeeBps?: number;
152
154
  /** @description In %. It's a way to bypass the API price impact check (default = 15%) */
153
155
  maxImpact?: number;
154
156
  maxUSDImpact?: number;
package/src/sdk/simple.ts CHANGED
@@ -219,7 +219,11 @@ const constructFetcher = (options: FetcherOptions): FetcherFunction => {
219
219
  ...params.headers,
220
220
  ...params.requestParams?.headers,
221
221
  }
222
- : { ...options.headers, ...params.headers };
222
+ : {
223
+ ...options.headers,
224
+ ...params.headers,
225
+ ...params.requestParams?.headers,
226
+ };
223
227
 
224
228
  return options.fetcher({ ...params, headers });
225
229
  };