@atomiqlabs/base 10.0.0-dev.1 → 10.0.0-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.
@@ -164,32 +164,36 @@ export interface SpvVaultContract<TX = any, Signer extends AbstractSigner = Abst
164
164
  * Returns the fee in native token base units to claim the swap
165
165
  *
166
166
  * @param signer Signer claiming the swap
167
+ * @param vault
167
168
  * @param withdrawalData Withdrawal to claim
168
169
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
169
170
  */
170
- getClaimFee(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
171
+ getClaimFee(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
171
172
  /**
172
173
  * Returns raw fee (not including any refunds we might get that would make the getClaimFee negative) for claiming the swap
173
174
  *
174
175
  * @param signer Signer claiming the swap
176
+ * @param vault
175
177
  * @param withdrawalData Withdrawal to claim
176
178
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
177
179
  */
178
- getRawClaimFee?(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
180
+ getRawClaimFee?(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
179
181
  /**
180
182
  * Returns the fee in native token base units to claim the swap
181
183
  *
182
184
  * @param signer Signer claiming the swap
185
+ * @param vault
183
186
  * @param withdrawalData Withdrawal to claim
184
187
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
185
188
  */
186
- getFrontFee(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
189
+ getFrontFee(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
187
190
  /**
188
191
  * Returns raw fee (not including any refunds we might get that would make the getClaimFee negative) for claiming the swap
189
192
  *
190
193
  * @param signer Signer claiming the swap
194
+ * @param vault
191
195
  * @param withdrawalData Withdrawal to claim
192
196
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
193
197
  */
194
- getRawFrontFee?(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
198
+ getRawFrontFee?(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
195
199
  }
@@ -308,17 +308,19 @@ export interface SwapContract<T extends SwapData = SwapData, TX = any, PreFetchD
308
308
  /**
309
309
  * Returns the fee in native token base units to commit (initiate) the swap
310
310
  *
311
+ * @param signer
311
312
  * @param swapData Swap to initiate
312
313
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
313
314
  */
314
- getCommitFee(swapData: T, feeRate?: string): Promise<bigint>;
315
+ getCommitFee(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
315
316
  /**
316
317
  * Returns raw fee (not including any account deposits we might need) for initiating the swap
317
318
  *
319
+ * @param signer
318
320
  * @param swapData Swap to initiate
319
321
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
320
322
  */
321
- getRawCommitFee?(swapData: T, feeRate?: string): Promise<bigint>;
323
+ getRawCommitFee?(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
322
324
  /**
323
325
  * Returns the fee in native token base units to claim the swap
324
326
  *
@@ -338,17 +340,19 @@ export interface SwapContract<T extends SwapData = SwapData, TX = any, PreFetchD
338
340
  /**
339
341
  * Returns the fee in native token base units to refund the swap
340
342
  *
343
+ * @param signer
341
344
  * @param swapData Swap to refund
342
345
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
343
346
  */
344
- getRefundFee(swapData: T, feeRate?: string): Promise<bigint>;
347
+ getRefundFee(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
345
348
  /**
346
349
  * Returns raw fee (not including any refunds we might get that would make the getRefundFee negative) for claiming the swap
347
350
  *
351
+ * @param signer
348
352
  * @param swapData Swap to claim
349
353
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
350
354
  */
351
- getRawRefundFee?(swapData: T, feeRate?: string): Promise<bigint>;
355
+ getRawRefundFee?(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
352
356
  /**
353
357
  * Returns the fee rate for committing (initializing) a payIn swap
354
358
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/base",
3
- "version": "10.0.0-dev.1",
3
+ "version": "10.0.0-dev.2",
4
4
  "description": "Base classes and interfaces for atomiq protocol",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -192,36 +192,40 @@ export interface SpvVaultContract<
192
192
  * Returns the fee in native token base units to claim the swap
193
193
  *
194
194
  * @param signer Signer claiming the swap
195
+ * @param vault
195
196
  * @param withdrawalData Withdrawal to claim
196
197
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
197
198
  */
198
- getClaimFee(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
199
+ getClaimFee(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
199
200
 
200
201
  /**
201
202
  * Returns raw fee (not including any refunds we might get that would make the getClaimFee negative) for claiming the swap
202
203
  *
203
204
  * @param signer Signer claiming the swap
205
+ * @param vault
204
206
  * @param withdrawalData Withdrawal to claim
205
207
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
206
208
  */
207
- getRawClaimFee?(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
209
+ getRawClaimFee?(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
208
210
 
209
211
  /**
210
212
  * Returns the fee in native token base units to claim the swap
211
213
  *
212
214
  * @param signer Signer claiming the swap
215
+ * @param vault
213
216
  * @param withdrawalData Withdrawal to claim
214
217
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
215
218
  */
216
- getFrontFee(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
219
+ getFrontFee(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
217
220
 
218
221
  /**
219
222
  * Returns raw fee (not including any refunds we might get that would make the getClaimFee negative) for claiming the swap
220
223
  *
221
224
  * @param signer Signer claiming the swap
225
+ * @param vault
222
226
  * @param withdrawalData Withdrawal to claim
223
227
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
224
228
  */
225
- getRawFrontFee?(signer: string, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
229
+ getRawFrontFee?(signer: string, vault: Data, withdrawalData: WithdrawalTX, feeRate?: string): Promise<bigint>;
226
230
 
227
231
  }
@@ -384,18 +384,20 @@ export interface SwapContract<
384
384
  /**
385
385
  * Returns the fee in native token base units to commit (initiate) the swap
386
386
  *
387
+ * @param signer
387
388
  * @param swapData Swap to initiate
388
389
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
389
390
  */
390
- getCommitFee(swapData: T, feeRate?: string): Promise<bigint>;
391
+ getCommitFee(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
391
392
 
392
393
  /**
393
394
  * Returns raw fee (not including any account deposits we might need) for initiating the swap
394
395
  *
396
+ * @param signer
395
397
  * @param swapData Swap to initiate
396
398
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
397
399
  */
398
- getRawCommitFee?(swapData: T, feeRate?: string): Promise<bigint>;
400
+ getRawCommitFee?(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
399
401
 
400
402
  /**
401
403
  * Returns the fee in native token base units to claim the swap
@@ -418,18 +420,20 @@ export interface SwapContract<
418
420
  /**
419
421
  * Returns the fee in native token base units to refund the swap
420
422
  *
423
+ * @param signer
421
424
  * @param swapData Swap to refund
422
425
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
423
426
  */
424
- getRefundFee(swapData: T, feeRate?: string): Promise<bigint>;
427
+ getRefundFee(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
425
428
 
426
429
  /**
427
430
  * Returns raw fee (not including any refunds we might get that would make the getRefundFee negative) for claiming the swap
428
431
  *
432
+ * @param signer
429
433
  * @param swapData Swap to claim
430
434
  * @param feeRate Optional fee rate (fetched on-demand if not provided)
431
435
  */
432
- getRawRefundFee?(swapData: T, feeRate?: string): Promise<bigint>;
436
+ getRawRefundFee?(signer: string, swapData: T, feeRate?: string): Promise<bigint>;
433
437
 
434
438
  /**
435
439
  * Returns the fee rate for committing (initializing) a payIn swap