@cowprotocol/cow-sdk 6.0.0-RC.42 → 6.0.0-RC.44

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.
Files changed (31) hide show
  1. package/dist/bridging/const.d.ts +1 -1
  2. package/dist/bridging/providers/across/AcrossBridgeProvider.d.ts +1 -1
  3. package/dist/bridging/types.d.ts +1 -4
  4. package/dist/common/utils/math.d.ts +2 -2
  5. package/dist/index-ceb19ab3.js +29 -0
  6. package/dist/index-ceb19ab3.js.map +1 -0
  7. package/dist/index.js +4 -4
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.modern.mjs +1 -1
  10. package/dist/index.module.js +4 -4
  11. package/dist/index.module.js.map +1 -1
  12. package/dist/package.json +2 -2
  13. package/dist/schemas/trading/LimitOrderAdvancedSettings.ts +135 -14
  14. package/dist/schemas/trading/LimitTradeParameters.ts +135 -14
  15. package/dist/schemas/trading/QuoteResultsSerialized.ts +270 -28
  16. package/dist/schemas/trading/SwapAdvancedSettings.ts +135 -14
  17. package/dist/schemas/trading/TradeParameters.ts +135 -14
  18. package/dist/trading/getQuote.d.ts +1 -1
  19. package/dist/trading/index.d.ts +9 -8
  20. package/dist/trading/suggestSlippageFromFee.d.ts +2 -0
  21. package/dist/trading/utils/getPartnerFeeBps.d.ts +2 -0
  22. package/dist/{utils-655d1f34.js → utils-834caecd.js} +2 -2
  23. package/dist/{utils-655d1f34.js.map → utils-834caecd.js.map} +1 -1
  24. package/dist/{utils-6c6631d7.js → utils-84b5bba2.js} +2 -2
  25. package/dist/{utils-6c6631d7.js.map → utils-84b5bba2.js.map} +1 -1
  26. package/dist/{utils-728f2693.js → utils-979cfae5.js} +2 -2
  27. package/dist/{utils-728f2693.js.map → utils-979cfae5.js.map} +1 -1
  28. package/package.json +2 -2
  29. package/dist/index-03853adc.js +0 -29
  30. package/dist/index-03853adc.js.map +0 -1
  31. package/dist/trading/sample.d.ts +0 -1
@@ -1,2 +1,2 @@
1
1
  export declare const RAW_PROVIDERS_FILES_PATH = "https://raw.githubusercontent.com/cowprotocol/cow-sdk/refs/heads/main/src/bridging/providers";
2
- export declare const DEFAULT_GAS_COST_FOR_HOOK_ESTIMATION = 110000;
2
+ export declare const DEFAULT_GAS_COST_FOR_HOOK_ESTIMATION = 200000;
@@ -33,7 +33,7 @@ export declare class AcrossBridgeProvider implements BridgeProvider<AcrossQuoteR
33
33
  getQuote(request: QuoteBridgeRequest): Promise<AcrossQuoteResult>;
34
34
  getUnsignedBridgeCall(request: QuoteBridgeRequest, quote: AcrossQuoteResult): Promise<EvmCall>;
35
35
  getGasLimitEstimationForHook(_request: QuoteBridgeRequest): number;
36
- getSignedHook(chainId: SupportedChainId, unsignedCall: EvmCall, signer: Signer): Promise<BridgeHook>;
36
+ getSignedHook(chainId: SupportedChainId, unsignedCall: EvmCall, signer: Signer, defaultGasLimit?: bigint): Promise<BridgeHook>;
37
37
  decodeBridgeHook(_hook: latestAppData.CoWHook): Promise<BridgeDeposit>;
38
38
  getBridgingId(_orderUid: string, _settlementTx: string, _logIndex: number): Promise<string>;
39
39
  getExplorerUrl(bridgingId: string): string;
@@ -156,11 +156,8 @@ export interface BridgeProvider<Q extends BridgeQuoteResult> {
156
156
  * - Deposit into the bridge contract
157
157
  *
158
158
  * This hook will include the pre-authorization (signature) of the owner of the cow-shed account (the trader).
159
- *
160
- * @param unsignedCall
161
- * @param signer
162
159
  */
163
- getSignedHook(chainId: SupportedChainId, unsignedCall: EvmCall, signer: Signer): Promise<BridgeHook>;
160
+ getSignedHook(chainId: SupportedChainId, unsignedCall: EvmCall, signer: Signer, defaultGasLimit?: bigint): Promise<BridgeHook>;
164
161
  /**
165
162
  * Decode a bridge hook into a bridge deposit information.
166
163
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Convert a percentage to a bps value.
3
3
  *
4
- * It rounds up.
4
+ * It rounds to the nearest integer.
5
5
  *
6
6
  * @param percentage - The percentage to convert
7
7
  * @returns The bps value
@@ -10,7 +10,7 @@ export declare function percentageToBps(percentage: number | bigint): number;
10
10
  /**
11
11
  * Apply a percentage to a bigint value
12
12
  *
13
- * Rounds up.
13
+ * Rounds to the nearest integer.
14
14
  *
15
15
  * @param value - The value to apply the percentage to
16
16
  * @param percentage - The percentage to apply