@velora-dex/sdk 9.4.1-dev.1 → 9.4.1-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.4.1-dev.1",
3
+ "version": "9.4.1-dev.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/sdk.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,9 +1,11 @@
1
1
  import type { ConstructFetchInput, RequestParameters } from '../../types';
2
+ import { DEFAULT_BRIDGE } from './constants';
2
3
  import { constructGetDeltaContract } from './getDeltaContract';
3
4
  import type { BridgePrice } from './getDeltaPrice';
4
5
  import { constructGetPartnerFee } from './getPartnerFee';
5
6
  import {
6
7
  buildTWAPSignableOrderData,
8
+ TWAPOrderCommonInput,
7
9
  type BuildTWAPOrderDataInput,
8
10
  type SignableTWAPOrderData,
9
11
  } from './helpers/buildTWAPOrderData';
@@ -113,7 +115,7 @@ export const constructBuildTWAPDeltaOrder = (
113
115
  const { partnerAddress, partnerFeeBps, partnerTakesSurplus } =
114
116
  await resolvePartnerFee(params, getPartnerFee, requestParams);
115
117
 
116
- const commonInput = {
118
+ const commonInput: TWAPOrderCommonInput = {
117
119
  owner: params.owner,
118
120
  beneficiary: params.beneficiary,
119
121
  srcToken: params.srcToken,
@@ -124,7 +126,11 @@ export const constructBuildTWAPDeltaOrder = (
124
126
  metadata: params.metadata,
125
127
  interval: params.interval,
126
128
  numSlices: params.numSlices,
127
- bridge: params.deltaPrice.bridge,
129
+ bridge: {
130
+ ...params.deltaPrice.bridge,
131
+ // TWAP child orders get their bridge data at execution time
132
+ protocolData: DEFAULT_BRIDGE.protocolData,
133
+ },
128
134
 
129
135
  chainId,
130
136
  paraswapDeltaAddress: ParaswapDelta,
@@ -113,7 +113,7 @@ export function produceTWAPOrderTypedData({
113
113
  };
114
114
  }
115
115
 
116
- type TWAPOrderCommonInput = {
116
+ export type TWAPOrderCommonInput = {
117
117
  owner: string;
118
118
  beneficiary?: string;
119
119
  srcToken: string;