@velora-dex/sdk 9.3.3-dev.1 → 9.3.3

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.
@@ -42,7 +42,7 @@ type OrdersFilter = {
42
42
  * - **INSUFFICIENT_BALANCE** — returned as SUSPENDED from API
43
43
  * - **INSUFFICIENT_ALLOWANCE** — returned as SUSPENDED from API
44
44
  * - **INVALIDATED** — returned as FAILED from API
45
- * - **ACTIVE** — All orders with NOT_STARTED, RUNNING, EXECUTING or SUSPENDED statuses.
45
+ * - **ACTIVE** — All orders with NOT_STARTED, RUNNING, EXECUTING, CANCELLING or SUSPENDED statuses.
46
46
  * - **INACTIVE** — All orders with EXECUTED, FAILED, EXPIRED, CANCELLED or INVALIDATED statuses.
47
47
  */
48
48
  status?: DeltaOrderFilterByStatus[];
@@ -61,6 +61,7 @@ export type DeltaAuctionStatus =
61
61
  | 'FAILED'
62
62
  | 'EXPIRED'
63
63
  | 'CANCELLED'
64
+ | 'CANCELLING'
64
65
  | 'SUSPENDED';
65
66
 
66
67
  type DeltaAuctionTransaction = {
@@ -29,31 +29,17 @@ export type SetDeltaOrderPreSignature<T> = (
29
29
  requestParams?: RequestParameters
30
30
  ) => Promise<T>;
31
31
 
32
- export type DepositNativeAndPreSign<T> = (
33
- orderHash: string,
34
- overrides?: TxSendOverrides,
35
- requestParams?: RequestParameters
36
- ) => Promise<T>;
37
-
38
32
  export type PreSignDeltaOrder<T> = (
39
33
  signableOrderData: SignableDeltaOrderData,
40
34
  overrides?: TxSendOverrides,
41
35
  requestParams?: RequestParameters
42
36
  ) => Promise<T>;
43
37
 
44
- export type DepositNativeAndPreSignDeltaOrder<T> = (
45
- signableOrderData: SignableDeltaOrderData,
46
- overrides?: TxSendOverrides,
47
- requestParams?: RequestParameters
48
- ) => Promise<T>;
49
-
50
38
  export type PreSignDeltaOrderFunctions<T> = {
51
39
  hashDeltaOrderTypedData: HashDeltaOrderTypedData;
52
40
  hashDeltaOrder: HashDeltaOrder;
53
41
  setDeltaOrderPreSignature: SetDeltaOrderPreSignature<T>;
54
42
  preSignDeltaOrder: PreSignDeltaOrder<T>;
55
- depositNativeAndPreSign: DepositNativeAndPreSign<T>;
56
- depositNativeAndPreSignDeltaOrder: DepositNativeAndPreSignDeltaOrder<T>;
57
43
  };
58
44
 
59
45
  const PreSignatureModuleAbi = [
@@ -75,19 +61,6 @@ const PreSignatureModuleAbi = [
75
61
  stateMutability: 'nonpayable',
76
62
  type: 'function',
77
63
  },
78
- {
79
- inputs: [
80
- {
81
- internalType: 'bytes32',
82
- name: 'orderHash',
83
- type: 'bytes32',
84
- },
85
- ],
86
- name: 'depositNativeAndPreSign',
87
- outputs: [],
88
- stateMutability: 'payable',
89
- type: 'function',
90
- },
91
64
  ] as const;
92
65
 
93
66
  type AvailableMethods = ExtractAbiMethodNames<typeof PreSignatureModuleAbi>;
@@ -146,27 +119,6 @@ export const constructPreSignDeltaOrder = <T>(
146
119
  return res;
147
120
  };
148
121
 
149
- const depositNativeAndPreSign: DepositNativeAndPreSign<T> = async (
150
- orderHash,
151
- overrides = {},
152
- requestParams
153
- ) => {
154
- const ParaswapDelta = await getDeltaContract(requestParams);
155
- if (!ParaswapDelta) {
156
- throw new Error(`Delta is not available on chain ${options.chainId}`);
157
- }
158
-
159
- const res = await options.contractCaller.transactCall<AvailableMethods>({
160
- address: ParaswapDelta,
161
- abi: PreSignatureModuleAbi,
162
- contractMethod: 'depositNativeAndPreSign',
163
- args: [orderHash],
164
- overrides,
165
- });
166
-
167
- return res;
168
- };
169
-
170
122
  const preSignDeltaOrder: PreSignDeltaOrder<T> = async (
171
123
  signableOrderData,
172
124
  overrides = {},
@@ -181,25 +133,11 @@ export const constructPreSignDeltaOrder = <T>(
181
133
  return res;
182
134
  };
183
135
 
184
- const depositNativeAndPreSignDeltaOrder: DepositNativeAndPreSignDeltaOrder<
185
- T
186
- > = async (signableOrderData, overrides = {}, requestParams) => {
187
- const orderHash = hashDeltaOrderTypedData(signableOrderData);
188
- const res = await depositNativeAndPreSign(
189
- orderHash,
190
- overrides,
191
- requestParams
192
- );
193
- return res;
194
- };
195
-
196
136
  return {
197
137
  hashDeltaOrderTypedData,
198
138
  hashDeltaOrder,
199
139
  setDeltaOrderPreSignature,
200
140
  preSignDeltaOrder,
201
- depositNativeAndPreSign,
202
- depositNativeAndPreSignDeltaOrder,
203
141
  };
204
142
  };
205
143